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