dashboard: on admin dashboard use red-dot icon when hosts are in alert (#8144)

This improves the function to not show the alert status on host icon
when there are no hosts in alert state. Instead a colour/theme matching
exclaimation is show next to the host icon, otherwise show green tick.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2023-10-25 22:04:30 +05:30 committed by GitHub
parent 8fe13f91a1
commit ebf1409622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,8 @@
:value-style="{ color: $config.theme['@primary-color'] }">
<template #prefix>
<database-outlined/>
<status class="status" text="Alert" style="margin-left: -10px"/>
<a-badge v-if="data.alertHosts > 0" count="!" style="margin-left: -5px" />
<a-badge v-else count="✓" style="margin-left: -5px" :number-style="{ backgroundColor: '#52c41a' }" />
</template>
</a-statistic>
</router-link>