mirror of https://github.com/rancher/ui.git
commit
10014d9b8f
|
|
@ -1,4 +1,5 @@
|
|||
import Component from '@ember/component';
|
||||
import { get, computed } from '@ember/object';
|
||||
import layout from './template';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
|
|
@ -9,4 +10,8 @@ export default Component.extend({
|
|||
|
||||
layout,
|
||||
classNames: 'row',
|
||||
|
||||
largeScale: computed('scope.currentCluster.nodes.length', function() {
|
||||
return get(this, 'scope.currentCluster.nodes.length') > 10;
|
||||
}),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
grafanaUrl=scope.currentCluster.grafanaUrl
|
||||
title=(t "clusterDashboard.sections.cluster")
|
||||
}}
|
||||
{{cluster-metrics}}
|
||||
{{cluster-metrics largeScale=largeScale}}
|
||||
{{/metrics-summary}}
|
||||
|
||||
{{#if scope.currentCluster.isRKE}}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
expandAll=al.expandAll
|
||||
expandFn=expandFn
|
||||
grafanaUrl=grafana.etcdUrl
|
||||
classNames='mt-20'
|
||||
classNames="mt-20"
|
||||
title=(t "clusterDashboard.sections.etcd")
|
||||
}}
|
||||
{{etcd-metrics}}
|
||||
{{etcd-metrics largeScale=largeScale}}
|
||||
{{/metrics-summary}}
|
||||
{{/if}}
|
||||
|
||||
|
|
@ -24,19 +24,19 @@
|
|||
expandAll=al.expandAll
|
||||
expandFn=expandFn
|
||||
grafanaUrl=grafana.k8sUrl
|
||||
classNames='mt-20'
|
||||
classNames="mt-20"
|
||||
title=(t "clusterDashboard.sections.k8s")
|
||||
}}
|
||||
{{k8s-metrics}}
|
||||
{{k8s-metrics largeScale=largeScale}}
|
||||
{{/metrics-summary}}
|
||||
|
||||
{{#metrics-summary
|
||||
expandAll=al.expandAll
|
||||
expandFn=expandFn
|
||||
grafanaUrl=grafana.rancherUrl
|
||||
classNames='mt-20 mb-20'
|
||||
classNames="mt-20 mb-20"
|
||||
title=(t "clusterDashboard.sections.rancher" appName=settings.appName)
|
||||
}}
|
||||
{{rancher-metrics noDataLabel='clusterDashboard.noRancherComponents'}}
|
||||
{{rancher-metrics largeScale=largeScale noDataLabel="clusterDashboard.noRancherComponents"}}
|
||||
{{/metrics-summary}}
|
||||
{{/accordion-list}}
|
||||
|
|
@ -229,13 +229,14 @@ export default Mixin.create({
|
|||
projectScope: false,
|
||||
metricParams: null,
|
||||
timeOutAnchor: null,
|
||||
largeScale: false,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
set(this, 'state', {
|
||||
loading: false,
|
||||
detail: true,
|
||||
detail: !get(this, 'largeScale'),
|
||||
noGraphs: false,
|
||||
isCustom: false,
|
||||
from: null,
|
||||
|
|
|
|||
Loading…
Reference in New Issue