From: Ricardo Marques Date: Thu, 17 May 2018 12:15:23 +0000 (+0100) Subject: mgr/dashboard: Add performance counters breadcrumb X-Git-Tag: v13.2.1~98^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=50eca93021769e30284dd6a5cc810d1cb4bfdc22;p=ceph.git mgr/dashboard: Add performance counters breadcrumb Fixes: https://tracker.ceph.com/issues/23806 Signed-off-by: Ricardo Marques (cherry picked from commit e89d5bef7fb768d508db6600174be6388a314b15) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts index de18f7924868..d66e7ff6e7be 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.ts @@ -50,11 +50,13 @@ export class MonitorComponent { data.in_quorum.map((row) => { row.cdOpenSessions = row.stats.num_sessions.map(i => i[1]); row.cdLink = '/perf_counters/mon/' + row.name; + row.cdParams = {fromLink: '/monitor'}; return row; }); data.out_quorum.map((row) => { row.cdLink = '/perf_counters/mon/' + row.name; + row.cdParams = {fromLink: '/monitor'}; return row; }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.html index ebb9ba93d62f..615228b7e68b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.html @@ -1,6 +1,19 @@ + +
- Performance Counters -

{{ serviceType }}.{{ serviceId }}

+ {{ serviceType }}.{{ serviceId }} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.ts index 06f5a9270ac4..40287758b71b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/performance-counter/performance-counter/performance-counter.component.ts @@ -7,10 +7,19 @@ import { ActivatedRoute } from '@angular/router'; styleUrls: ['./performance-counter.component.scss'] }) export class PerformanceCounterComponent { + + static defaultFromLink = '/hosts'; + serviceId: string; serviceType: string; + fromLink: string; constructor(private route: ActivatedRoute) { + this.route.queryParams.subscribe( + (params: { fromLink: string }) => { + this.fromLink = params.fromLink || PerformanceCounterComponent.defaultFromLink; + } + ); this.route.params.subscribe( (params: { type: string; id: string }) => { this.serviceId = params.id;