From: Pere Diaz Bou Date: Fri, 19 May 2023 09:54:38 +0000 (+0200) Subject: mgr/dashboard: merge running and size columns in services page X-Git-Tag: v17.2.7~346^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=60b12ca22cc7ef2ce0ea7c8f973676dd17502849;p=ceph.git mgr/dashboard: merge running and size columns in services page Fixes: https://tracker.ceph.com/issues/61295 Signed-off-by: Pere Diaz Bou (cherry picked from commit 3eeca5c5c42c85d1925828a2e9ac3d87c83a401b) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html index fbcc8583cf1d..d84449e237ee 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.html @@ -25,3 +25,15 @@ + + + + + {{ value.running }} / {{ value.size }} + + + + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.ts index 55638de24de8..1234a684e6c9 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/services.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core'; +import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; @@ -39,6 +39,8 @@ const BASE_URL = 'services'; export class ServicesComponent extends ListWithDetails implements OnChanges, OnInit { @ViewChild(TableComponent, { static: true }) table: TableComponent; + @ViewChild('runningTpl', { static: true }) + public runningTpl: TemplateRef; @Input() hostname: string; @@ -68,6 +70,7 @@ export class ServicesComponent extends ListWithDetails implements OnChanges, OnI services: Array = []; isLoadingServices = false; selection: CdTableSelection = new CdTableSelection(); + icons = Icons; constructor( private actionLabels: ActionLabelsI18n, @@ -155,13 +158,9 @@ export class ServicesComponent extends ListWithDetails implements OnChanges, OnI }, { name: $localize`Running`, - prop: 'status.running', - flexGrow: 1 - }, - { - name: $localize`Size`, - prop: 'status.size', - flexGrow: 1 + prop: 'status', + flexGrow: 1, + cellTemplate: this.runningTpl }, { name: $localize`Last Refreshed`,