From 8c5e31ec1a13bc53394eb2cb6880d74db169fac4 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Tue, 2 Feb 2021 20:42:02 +0530 Subject: [PATCH] mgr/dashboard: Add badge to the Label column in Host List Fixes: https://tracker.ceph.com/issues/49105 Signed-off-by: Nizamudeen A --- .../src/app/ceph/cluster/hosts/hosts.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts index 8ed8db0301cf0..86b8a6fd3b8be 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.ts @@ -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`, -- 2.39.5