]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Add badge to the Label column in Host List 39229/head
authorNizamudeen A <nia@redhat.com>
Tue, 2 Feb 2021 15:12:02 +0000 (20:42 +0530)
committerNizamudeen A <nia@redhat.com>
Tue, 2 Feb 2021 15:12:02 +0000 (20:42 +0530)
Fixes: https://tracker.ceph.com/issues/49105
Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts

index 8ed8db0301cf0741fa11235a4f087600f5e39579..86b8a6fd3b8bea1718b48fb79afc7142e30c25a7 100644 (file)
@@ -12,6 +12,7 @@ import { FormModalComponent } from '~/app/shared/components/form-modal/form-moda
 import { SelectMessages } from '~/app/shared/components/select/select-messages.model';
 import { ActionLabelsI18n } from '~/app/shared/constants/app.constants';
 import { TableComponent } from '~/app/shared/datatable/table/table.component';
+import { CellTemplate } from '~/app/shared/enum/cell-template.enum';
 import { Icons } from '~/app/shared/enum/icons.enum';
 import { NotificationType } from '~/app/shared/enum/notification-type.enum';
 import { CdTableAction } from '~/app/shared/models/cd-table-action';
@@ -23,7 +24,6 @@ import { OrchestratorFeature } from '~/app/shared/models/orchestrator.enum';
 import { OrchestratorStatus } from '~/app/shared/models/orchestrator.interface';
 import { Permissions } from '~/app/shared/models/permissions';
 import { CephShortVersionPipe } from '~/app/shared/pipes/ceph-short-version.pipe';
-import { JoinPipe } from '~/app/shared/pipes/join.pipe';
 import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
 import { ModalService } from '~/app/shared/services/modal.service';
 import { NotificationService } from '~/app/shared/services/notification.service';
@@ -68,7 +68,6 @@ export class HostsComponent extends ListWithDetails implements OnInit {
     private authStorageService: AuthStorageService,
     private hostService: HostService,
     private cephShortVersionPipe: CephShortVersionPipe,
-    private joinPipe: JoinPipe,
     private urlBuilder: URLBuilderService,
     private actionLabels: ActionLabelsI18n,
     private modalService: ModalService,
@@ -121,7 +120,10 @@ export class HostsComponent extends ListWithDetails implements OnInit {
         name: $localize`Labels`,
         prop: 'labels',
         flexGrow: 1,
-        pipe: this.joinPipe
+        cellTransformation: CellTemplate.badge,
+        customTemplateConfig: {
+          class: 'badge-dark'
+        }
       },
       {
         name: $localize`Version`,