Repository navigation
[task] migrate dashboard carousel to Swiper - #4427
butterfly-520-boy wants to merge 8 commits into
Conversation
Duansg
left a comment
There was a problem hiding this comment.
Thanks for the migration. Could you also update the distribution’s license files for Swiper?
The existing jQuery/Slick dependencies are listed in both material/licenses/frontend/LICENSE and material/licenses/LICENSE, with their license texts under material/licenses/frontend/.
Please add Swiper’s version and MIT license entry to those lists, and include its copyright notice and full license text in material/licenses/frontend/LICENSE-swiper.txt. If jQuery, slick-carousel, and ngx-slick-carousel are no longer bundled, please remove their obsolete entries and license files as well.
This will keep the license information aligned with what HertzBeat distributes.
|
Thanks for catching this, @Duansg. Updated both license lists for Swiper 14.3.0 and included the copyright notice and full MIT text from the published package in |
Duansg
left a comment
There was a problem hiding this comment.
Hi, thanks for providing the additional information. However, I tested this PR and found that it didn't produce the expected results. This may be related to the Swiper initialization logic. Have you tested it locally to see if it works?
You might want to check this out: https://swiperjs.com/element#parameters-as-props |
|
Yes, the issue does exist. However, when I previously tested it locally, I didn't stay on the page for long, and the card displayed normally within a short period. The current problem is that over time, the card gradually expands from its normal width to span the entire row, and the status label on the right also disappears. I will identify the root cause and fix this bug. Thank you for pointing it out. |
@butterfly-520-boy You might want to try adding monitoring for multiple categories, since I've noticed that they aren't displayed in a carousel. |
Okay, I’ll follow this approach to fix the issue |
|
Thanks for the pointers! I've fixed the Swiper initialization and the card-width issue after statistics refreshes. I tested the carousel locally with six monitoring categories, and all 15 related tests pass. The screenshots below show the updated carousel. |
|
pls check ci |
|
The Angular app this PR builds on (angular.json, app.module.ts, the dashboard component) was replaced by a React + Vite frontend in the 2.0 merge. Can't be merged — if we still want the carousel swap it needs to be rebuilt on the new dashboard. |



What's changed?
Closes #1344
Checklist
Add or update API