]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: where the alert page tag colors are not being applied 66588/head
authorpujashahu <pshahu@redhat.com>
Wed, 10 Dec 2025 10:57:46 +0000 (16:27 +0530)
committerpujashahu <pshahu@redhat.com>
Wed, 10 Dec 2025 10:57:46 +0000 (16:27 +0530)
Fixes: https://tracker.ceph.com/issues/74176
Signed-off-by: pujashahu <pshahu@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-list/silence-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html

index b5c9eed87aee9b9ff96b3bd9c2a490cb8c6fe7c6..53b6a945e3d92a7d36f83a2a649ca604ccb1ebd8 100644 (file)
@@ -151,7 +151,14 @@ export class SilenceListComponent extends PrometheusListHelper {
       {
         name: $localize`Status`,
         prop: 'status.state',
-        cellTransformation: CellTemplate.classAdding
+        cellTransformation: CellTemplate.tag,
+        customTemplateConfig: {
+          map: {
+            active: { class: 'tag-danger' },
+            pending: { class: 'tag-warning' },
+            expired: { class: 'tag-default' }
+          }
+        }
       }
     ];
   }
index 82f844de5b3ef033011b09426d005024a6a93178..2893f59cc93002f2729092fc8cd54dd4ed71150b 100644 (file)
   <span *ngFor="let item of (value | array); last as last">
     <cds-tag [size]="'md'"
              class="table-tag"
-             [class]="(column?.customTemplateConfig?.map && column?.customTemplateConfig?.map[item]?.class) ? column.customTemplateConfig.map[item].class : (column?.customTemplateConfig?.class ? column.customTemplateConfig.class : 'tags-primary')"
+             [class]="(column?.customTemplateConfig?.map && column?.customTemplateConfig?.map[item]?.class) ? column.customTemplateConfig.map[item].class : (column?.customTemplateConfig?.class ? column.customTemplateConfig.class : 'tag-primary')"
              *ngIf="(column?.customTemplateConfig?.map && column?.customTemplateConfig?.map[item]?.value) ? column.customTemplateConfig.map[item].value : column?.customTemplateConfig?.prefix ? column.customTemplateConfig.prefix + item : item">
       {{(column?.customTemplateConfig?.map && column?.customTemplateConfig?.map[item]?.value) ? column.customTemplateConfig.map[item].value : column?.customTemplateConfig?.prefix ? column.customTemplateConfig.prefix + item : item }}
     </cds-tag>