From 50eca93021769e30284dd6a5cc810d1cb4bfdc22 Mon Sep 17 00:00:00 2001 From: Ricardo Marques Date: Thu, 17 May 2018 13:15:23 +0100 Subject: [PATCH] mgr/dashboard: Add performance counters breadcrumb Fixes: https://tracker.ceph.com/issues/23806 Signed-off-by: Ricardo Marques (cherry picked from commit e89d5bef7fb768d508db6600174be6388a314b15) --- .../ceph/cluster/monitor/monitor.component.ts | 2 ++ .../performance-counter.component.html | 17 +++++++++++++++-- .../performance-counter.component.ts | 9 +++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) 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 de18f79248689..d66e7ff6e7be7 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 ebb9ba93d62fd..615228b7e68b2 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 06f5a9270ac45..40287758b71bc 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; -- 2.39.5