Skip to content

Use bootstrap 5.3.1 for data-sources-statistics attachment#6673

Merged
valfirst merged 1 commit into
masterfrom
data-sources-statistics
Jun 4, 2026
Merged

Use bootstrap 5.3.1 for data-sources-statistics attachment#6673
valfirst merged 1 commit into
masterfrom
data-sources-statistics

Conversation

@uarlouski
Copy link
Copy Markdown
Member

@uarlouski uarlouski commented Jun 4, 2026

Summary by CodeRabbit

Release Notes

  • Style
    • Updated data sources statistics display to use modern Bootstrap framework styling with improved responsive design and updated UI components for better visual presentation across devices.

@uarlouski uarlouski requested a review from a team as a code owner June 4, 2026 09:34
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

A Freemarker template for database data-sources statistics is upgraded from Bootstrap 3.4.1 to Bootstrap 5.3.1. The template's query display migrates from panel-group collapsible panels to Bootstrap 5 accordion components with updated markup and data attributes. Responsive grid classes and JavaScript dependencies are updated to match Bootstrap 5 conventions.

Changes

Bootstrap 5 migration

Layer / File(s) Summary
Query accordion and CSS migration
vividus-plugin-db/src/main/resources/data-sources-statistics.ftl (lines 9–66)
Converts collapsible query panels from Bootstrap 3's panel-group structure with a[data-toggle='collapse'] to Bootstrap 5's accordion component. CSS includes upgrade from bootstrap/3.4.1 to bootstrap/5.3.1, and collapse wiring switches to data-bs-toggle and data-bs-target attributes.
Summary grid layout and JavaScript upgrade
vividus-plugin-db/src/main/resources/data-sources-statistics.ftl (lines 102–119)
Summary section layout updates from Bootstrap 3's col-xs-* to Bootstrap 5's row/col-6 grid classes. Bootstrap JavaScript include updates from version 3.4.1 to 5.3.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: upgrading Bootstrap from 3.4.1 to 5.3.1 in the data-sources-statistics template, which aligns with the file modifications summarized.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch data-sources-statistics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@uarlouski
Copy link
Copy Markdown
Member Author

image @valfirst

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.79%. Comparing base (054daa3) to head (47c6121).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6673   +/-   ##
=========================================
  Coverage     97.79%   97.79%           
  Complexity     7325     7325           
=========================================
  Files          1015     1015           
  Lines         21508    21508           
  Branches       1416     1416           
=========================================
  Hits          21033    21033           
  Misses          359      359           
  Partials        116      116           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@vividus-plugin-db/src/main/resources/data-sources-statistics.ftl`:
- Line 110: The <p> tag currently uses the deprecated align="center" attribute;
replace it by removing the align attribute and applying Bootstrap's text-center
class instead (e.g., change the <p align="center"> element to a <p> element that
includes class="text-center", merging with any existing class attribute if
present) so centering uses modern HTML/CSS conventions.
- Around line 35-46: The accordion markup lacks proper accessibility linkage:
add an id attribute to the header element (e.g., give the <h4
class="accordion-header"> an id like "heading-left-sql") and add
aria-labelledby="heading-left-sql" to the collapse container with
id="collapse-left-sql" so the collapse div references its header; optionally add
data-bs-parent="`#accordion`" to the collapse div to enforce single-open accordion
behavior.
- Around line 50-61: The right-query accordion markup (button with class
"accordion-button" and collapse div id "collapse-right-sql") lacks the
accessibility attributes used on the left accordion; add a unique id to the
header button (e.g., id="heading-right-sql"), set aria-controls on the button to
"collapse-right-sql" (if not present), and add role="region" plus
aria-labelledby="heading-right-sql" on the div with id="collapse-right-sql" so
the button and panel are properly linked for screen readers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 957e2c81-d316-4aed-96ef-4454f18b5fdf

📥 Commits

Reviewing files that changed from the base of the PR and between 054daa3 and 47c6121.

📒 Files selected for processing (1)
  • vividus-plugin-db/src/main/resources/data-sources-statistics.ftl

Comment on lines +35 to 46
<div class="accordion-item accordion-item-info">
<h4 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-left-sql" aria-expanded="false" aria-controls="collapse-left-sql">
Left query
</button>
</h4>
<div id="collapse-left-sql" class="accordion-collapse collapse">
<div class="accordion-body">
<pre><code class="sql">${left.query}</code></pre>
</div>
</div>
</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add accessibility attributes for proper accordion semantics.

The accordion structure is missing key accessibility attributes:

  1. The <h4 class="accordion-header"> should have an id attribute (e.g., id="heading-left-sql")
  2. The collapse div should have aria-labelledby pointing to that heading ID

Additionally, consider adding data-bs-parent="#accordion" to the collapse div if you want only one accordion panel open at a time (standard accordion behavior).

♿ Proposed fix for accessibility
-            <div class="accordion-item accordion-item-info">
-                <h4 class="accordion-header">
+            <div class="accordion-item accordion-item-info">
+                <h4 class="accordion-header" id="heading-left-sql">
                     <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="`#collapse-left-sql`" aria-expanded="false" aria-controls="collapse-left-sql">
                         Left query
                     </button>
                 </h4>
-                <div id="collapse-left-sql" class="accordion-collapse collapse">
+                <div id="collapse-left-sql" class="accordion-collapse collapse" aria-labelledby="heading-left-sql" data-bs-parent="`#accordion`">
                     <div class="accordion-body">
                         <pre><code class="sql">${left.query}</code></pre>
                     </div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div class="accordion-item accordion-item-info">
<h4 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-left-sql" aria-expanded="false" aria-controls="collapse-left-sql">
Left query
</button>
</h4>
<div id="collapse-left-sql" class="accordion-collapse collapse">
<div class="accordion-body">
<pre><code class="sql">${left.query}</code></pre>
</div>
</div>
</div>
<div class="accordion-item accordion-item-info">
<h4 class="accordion-header" id="heading-left-sql">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="`#collapse-left-sql`" aria-expanded="false" aria-controls="collapse-left-sql">
Left query
</button>
</h4>
<div id="collapse-left-sql" class="accordion-collapse collapse" aria-labelledby="heading-left-sql" data-bs-parent="`#accordion`">
<div class="accordion-body">
<pre><code class="sql">${left.query}</code></pre>
</div>
</div>
</div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vividus-plugin-db/src/main/resources/data-sources-statistics.ftl` around
lines 35 - 46, The accordion markup lacks proper accessibility linkage: add an
id attribute to the header element (e.g., give the <h4 class="accordion-header">
an id like "heading-left-sql") and add aria-labelledby="heading-left-sql" to the
collapse container with id="collapse-left-sql" so the collapse div references
its header; optionally add data-bs-parent="`#accordion`" to the collapse div to
enforce single-open accordion behavior.

Comment on lines +50 to 61
<div class="accordion-item accordion-item-info">
<h4 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-right-sql" aria-expanded="false" aria-controls="collapse-right-sql">
Right query
</button>
</h4>
<div id="collapse-right-sql" class="accordion-collapse collapse">
<div class="accordion-body">
<pre><code class="sql">${right.query}</code></pre>
</div>
</div>
</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add accessibility attributes for proper accordion semantics.

Same as the left query accordion, this right query accordion is missing accessibility attributes. Apply the same fix pattern here.

♿ Proposed fix for accessibility
-            <div class="accordion-item accordion-item-info">
-                <h4 class="accordion-header">
+            <div class="accordion-item accordion-item-info">
+                <h4 class="accordion-header" id="heading-right-sql">
                     <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="`#collapse-right-sql`" aria-expanded="false" aria-controls="collapse-right-sql">
                         Right query
                     </button>
                 </h4>
-                <div id="collapse-right-sql" class="accordion-collapse collapse">
+                <div id="collapse-right-sql" class="accordion-collapse collapse" aria-labelledby="heading-right-sql" data-bs-parent="`#accordion`">
                     <div class="accordion-body">
                         <pre><code class="sql">${right.query}</code></pre>
                     </div>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div class="accordion-item accordion-item-info">
<h4 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-right-sql" aria-expanded="false" aria-controls="collapse-right-sql">
Right query
</button>
</h4>
<div id="collapse-right-sql" class="accordion-collapse collapse">
<div class="accordion-body">
<pre><code class="sql">${right.query}</code></pre>
</div>
</div>
</div>
<div class="accordion-item accordion-item-info">
<h4 class="accordion-header" id="heading-right-sql">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="`#collapse-right-sql`" aria-expanded="false" aria-controls="collapse-right-sql">
Right query
</button>
</h4>
<div id="collapse-right-sql" class="accordion-collapse collapse" aria-labelledby="heading-right-sql" data-bs-parent="`#accordion`">
<div class="accordion-body">
<pre><code class="sql">${right.query}</code></pre>
</div>
</div>
</div>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vividus-plugin-db/src/main/resources/data-sources-statistics.ftl` around
lines 50 - 61, The right-query accordion markup (button with class
"accordion-button" and collapse div id "collapse-right-sql") lacks the
accessibility attributes used on the left accordion; add a unique id to the
header button (e.g., id="heading-right-sql"), set aria-controls on the button to
"collapse-right-sql" (if not present), and add role="region" plus
aria-labelledby="heading-right-sql" on the div with id="collapse-right-sql" so
the button and panel are properly linked for screen readers.

<h4 style='text-align: center'>Counts difference: ${(left.rowsQuantity - right.rowsQuantity)?abs}</h4>
</div>
</div>
<p align="center">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace deprecated HTML align attribute with Bootstrap class.

The align="center" attribute is deprecated in HTML5. Use Bootstrap's text-center class instead.

🔧 Proposed fix
-                <p align="center">
+                <p class="text-center">
                     <canvas id="statistics-pie-chart" style="max-width: 360px; max-height: 360px;"></canvas>
                 </p>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<p align="center">
<p class="text-center">
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vividus-plugin-db/src/main/resources/data-sources-statistics.ftl` at line
110, The <p> tag currently uses the deprecated align="center" attribute; replace
it by removing the align attribute and applying Bootstrap's text-center class
instead (e.g., change the <p align="center"> element to a <p> element that
includes class="text-center", merging with any existing class attribute if
present) so centering uses modern HTML/CSS conventions.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 4, 2026

@valfirst valfirst merged commit fcc0bdb into master Jun 4, 2026
15 of 17 checks passed
@valfirst valfirst deleted the data-sources-statistics branch June 4, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants