From: Aashish Sharma Date: Wed, 17 May 2023 13:40:35 +0000 (+0530) Subject: mgr/dashboard: show the host's IP address on Hosts page X-Git-Tag: v19.0.0~1176^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F51557%2Fhead;p=ceph.git mgr/dashboard: show the host's IP address on Hosts page Fixes: https://tracker.ceph.com/issues/61222 Signed-off-by: Aashish Sharma --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.html index 69a942e56d285..0fbdbd7d1b586 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.html @@ -60,6 +60,17 @@ + + + {{ row.hostname }} +
+ + ({{ row.addr }}) + +
+
    diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts index 03a61e0834d03..2e76d1f43ed63 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts @@ -114,7 +114,7 @@ describe('HostsComponent', () => { const spans = fixture.debugElement.nativeElement.querySelectorAll( '.datatable-body-cell-label span' ); - expect(spans[0].textContent).toBe(hostname); + expect(spans[0].textContent.trim()).toBe(hostname); }); it('should show the exact count of the repeating daemons', () => { 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 6089965fc7487..3cba750f08412 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 @@ -56,6 +56,8 @@ export class HostsComponent extends ListWithDetails implements OnDestroy, OnInit orchTmpl: TemplateRef; @ViewChild('flashTmpl', { static: true }) flashTmpl: TemplateRef; + @ViewChild('hostNameTpl', { static: true }) + hostNameTpl: TemplateRef; @Input() hiddenColumns: string[] = []; @@ -193,7 +195,8 @@ export class HostsComponent extends ListWithDetails implements OnDestroy, OnInit { name: $localize`Hostname`, prop: 'hostname', - flexGrow: 1 + flexGrow: 1, + cellTemplate: this.hostNameTpl }, { name: $localize`Service Instances`,