From: guodan1 Date: Fri, 25 Jan 2019 11:12:22 +0000 (+0800) Subject: mgr/dashboard: CRUSH map viewer RFE X-Git-Tag: v14.1.0~254^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26162%2Fhead;p=ceph.git mgr/dashboard: CRUSH map viewer RFE Fixes: http://tracker.ceph.com/issues/37794 Signed-off-by: familyuu --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.html index 973ddbd598c0d..a9394aeed978d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.html @@ -11,17 +11,16 @@ - -   {{ node.status }} +   + - diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.scss index 7bd19fca1671d..65c94d5050ae3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.scss @@ -1,3 +1,21 @@ ::ng-deep tree-internal .tree li { cursor: pointer; } + +::ng-deep tree-internal .tree .node-value { + color: #2b99a8; + border-radius: 5px; +} + +::ng-deep tree-internal .tree .node-selected { + background-color: #d9edf7; + color: #212121; +} + +::ng-deep tree-internal .tree .node-value:hover { + color: #212121; +} + +::ng-deep tree-internal .tree .node-value:after { + height: 0; +} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.ts index 945b1ed5fb432..d7a6f5e4fbd5f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/crushmap/crushmap.component.ts @@ -12,6 +12,7 @@ import { HealthService } from '../../../shared/api/health.service'; export class CrushmapComponent implements OnInit { tree: TreeModel; metadata: any; + metadataTitle: string; metadataKeyMap: { [key: number]: number } = {}; constructor(private healthService: HealthService) {} @@ -62,6 +63,8 @@ export class CrushmapComponent implements OnInit { } onNodeSelected(e: NodeEvent) { - this.metadata = this.metadataKeyMap[e.node.id]; + const { name, type, status, ...remain } = this.metadataKeyMap[e.node.id]; + this.metadata = remain; + this.metadataTitle = name + ' (' + type + ')'; } }