badge visibility: add link to available conditions (#37396)

This commit is contained in:
c0ffeeca7 2025-02-10 15:33:08 +01:00 committed by GitHub
parent c42f5cbb0a
commit 4a135b0c87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View File

@ -6,7 +6,7 @@ description: The Conditional card displays another card based on conditions.
related: related:
- docs: /dashboards/cards/ - docs: /dashboards/cards/
title: Dashboard cards title: Dashboard cards
- docs: /dashboards/cards/#showing-or-hiding-a-card-conditionally - docs: /dashboards/cards/#showing-or-hiding-a-card-or-badge-conditionally
title: Conditional settings on the card's visibility tab title: Conditional settings on the card's visibility tab
--- ---
@ -17,7 +17,7 @@ The conditional card displays another card based on conditions.
{% include dashboard/edit_dashboard.md %} {% include dashboard/edit_dashboard.md %}
Note that while editing the dashboard, the card will always be shown, so be sure to exit editing mode to test the conditions. Note that while editing the dashboard, the card will always be shown, so be sure to exit editing mode to test the conditions.
The conditional card can still be used. However, it is now possible to define a setting to show or hide a card conditionally directly on each card type, on its [Visibility](/dashboards/cards/#showing-or-hiding-a-card-conditionally) tab. The conditional card can still be used. However, it is now possible to define a setting to show or hide a card conditionally directly on each card type, on its [Visibility](/dashboards/cards/#showing-or-hiding-a-card-or-badge-conditionally) tab.
Most options for this card can be configured via the user interface. Most options for this card can be configured via the user interface.

View File

@ -27,7 +27,8 @@ Badges are widgets that sit at the top of a panel, above all the cards.
![Screenshot showing how to configure a badge](/images/dashboards/badge_configure.png) ![Screenshot showing how to configure a badge](/images/dashboards/badge_configure.png)
7. Under **Interactions**, you can define the tap behavior. 7. Under **Interactions**, you can define the tap behavior.
8. If you want this badge to be visible only to specific users or under a certain condition, open the **Visibility** tab to [define those conditions](/dashboards/cards/#showing-or-hiding-a-card-conditionally). 8. If you want this badge to be visible only to specific users or under a certain condition, open the **Visibility** tab to [define those conditions](/dashboards/cards/#showing-or-hiding-a-card-or-badge-conditionally).
- The [available conditions](/dashboards/conditional/#conditions-options) are the same as the ones for the conditional card.
9. Select **Save**. 9. Select **Save**.
<p class="img"> <p class="img">

View File

@ -53,7 +53,7 @@ A card can be added to a dashboard directly [from the view](#to-add-a-card-from-
- Then, select **Continue**. - Then, select **Continue**.
![Screenshot add cards by entity](/images/dashboards/dashboard_add-by-entity_02.png) ![Screenshot add cards by entity](/images/dashboards/dashboard_add-by-entity_02.png)
3. If you want this card to be visible only to specific users or under a certain condition, you can [define those conditions](#showing-or-hiding-a-card-conditionally). 3. If you want this card to be visible only to specific users or under a certain condition, you can [define those conditions](#showing-or-hiding-a-card-or-badge-conditionally).
4. If you are adding this card to a [sections view](/dashboards/sections/), on the **Layout** tab, you can [resize the card](#resizing-a-card). 4. If you are adding this card to a [sections view](/dashboards/sections/), on the **Layout** tab, you can [resize the card](#resizing-a-card).
5. If you like, define [card actions, features, header and footer widgets](#card-actions-features-header-and-footer-widgets). 5. If you like, define [card actions, features, header and footer widgets](#card-actions-features-header-and-footer-widgets).
- Not all cards support these elements. Refer to the documentation of the specific card type. - Not all cards support these elements. Refer to the documentation of the specific card type.
@ -78,7 +78,7 @@ This method is useful if you are on the **Device** page and want to create a car
![Add to Dashboard button on the device page](/images/dashboards/add_card_from_device_page_02.png) ![Add to Dashboard button on the device page](/images/dashboards/add_card_from_device_page_02.png)
5. To edit the card configuration, open the view to which you added the card. 5. To edit the card configuration, open the view to which you added the card.
- Select **Edit card**. - Select **Edit card**.
6. If you want this card to be visible only to specific users or under a certain condition, you can [define those conditions](#showing-or-hiding-a-card-conditionally). 6. If you want this card to be visible only to specific users or under a certain condition, you can [define those conditions](#showing-or-hiding-a-card-or-badge-conditionally).
7. If you are adding this card to a [sections view](/dashboards/sections/), on the **Layout** tab, you can [resize the card](#resizing-a-card). 7. If you are adding this card to a [sections view](/dashboards/sections/), on the **Layout** tab, you can [resize the card](#resizing-a-card).
8. If you like, define [card actions, features, header and footer widgets](#card-actions-features-header-and-footer-widgets). 8. If you like, define [card actions, features, header and footer widgets](#card-actions-features-header-and-footer-widgets).
@ -88,10 +88,11 @@ This method is useful if you are on the **Device** page and want to create a car
You can choose to show or hide certain cards or [badges](/dashboards/badges/) based on different conditions. The [available conditions](/dashboards/conditional/#card-conditions) are the same as the ones for the conditional card. You can choose to show or hide certain cards or [badges](/dashboards/badges/) based on different conditions. The [available conditions](/dashboards/conditional/#card-conditions) are the same as the ones for the conditional card.
1. On the **Visibility** tab, select **Add condition**. 1. On the **Visibility** tab, select **Add condition**./dashboards/conditional/#conditions-options
- Don't see a **Visibility** tab? - **Troubleshooting**: Don't see a **Visibility** tab?
- It is not available inside nested cards: vertical stack, horizontal stack, and grid card - It is not available inside nested cards: vertical stack, horizontal stack, and grid card
2. Select the type of condition, and enter the parameters. 2. Select the type of condition, and enter the parameters.
- The [available conditions](/dashboards/conditional/#conditions-options) are the same as the ones for the conditional card.
- If you define multiple conditions, the section is only shown when all conditions are met. - If you define multiple conditions, the section is only shown when all conditions are met.
- If you did not define any conditions, the section is always shown, to all users. - If you did not define any conditions, the section is always shown, to all users.
3. Select **Save**. 3. Select **Save**.