orangeCatDeveloper opened a new pull request, #4242:
URL: https://github.com/apache/hertzbeat/pull/4242

   ### What's changed
   
   The dashboard header always rendered an auto-scrolling carousel of **all 11**
   monitor categories, even for categories with `0` monitors — and a brand-new 
user
   with no monitors saw the same carousel of empty cards. This renders only the
   non-empty categories and shows a proper empty state when there are no 
monitors.
   Closes #3087.
   
   - Render only categories that have at least one monitor.
   - When there are no monitors, show an empty state with an **Add Monitor** CTA
     (illustration + prominent button, matching the direction discussed in 
#3087).
   - When there are `<= slidesToShow` cards, the carousel no longer auto-scrolls
     (a couple of cards sit still instead of looping).
   - The 11 hard-coded card blocks are collapsed into one `*ngFor` (this is the
     large deletion in the diff — dedup, not lost functionality).
   - Add the two i18n keys to all six locales; existing behavior (chart click,
     navigation) is unchanged.
   
   ### Screenshots
   
   **No monitors — before / after**
   
   <!-- paste before-A-empty-carousel.jpg (or the GIF 
before-carousel-scrolling.gif) here -->
   
   <!-- paste after-A-empty-state.jpg here -->
   
   **A few monitors — before / after**
   
   <!-- paste before-B-all-categories.jpg here -->
   
   <!-- paste after-B-only-nonempty.jpg here -->
   
   ### Test plan
   
   - With 0 monitors, open the dashboard -> empty state with Add Monitor button 
(no carousel of empty cards).
   - Add monitors in 2 categories -> only those 2 cards show, no auto-scroll.
   - Add monitors in 5+ categories -> carousel returns (auto-scroll) as before.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to