Merge pull request #2663 from loganhz/monitoring

Support enable project monitoring only
This commit is contained in:
Westly Wright 2019-02-20 08:03:08 -07:00 committed by GitHub
commit b7201e552e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 7 deletions

View File

@ -251,7 +251,7 @@
}}
{{#unless isSidekick}}
{{#if scope.currentCluster.enableClusterMonitoring}}
{{#if scope.currentProject.enableProjectMonitoring}}
{{container/form-custom-metrics
classNames="accordion-wrapper"
workload=service

View File

@ -126,9 +126,6 @@ const rootNav = [
resourceScope: 'global',
resource: [],
ctx: [getProjectId],
condition() {
return get(this, 'cluster.enableClusterMonitoring')
}
},
{
id: 'tools-pipeline',

View File

@ -15,6 +15,14 @@
</div>
</section>
{{#if (and (eq selected "prometheus") scope.currentProject.enableProjectMonitoring (not scope.currentCluster.enableClusterMonitoring))}}
{{#banner-message color="bg-warning"}}
<p>
{{t "monitoringPage.clusterNotEnabled"}}
</p>
{{/banner-message}}
{{/if}}
{{#banner-message color="bg-info"}}
<p>
{{#if (eq selected "none")}}
@ -24,7 +32,7 @@
{{t (concat "monitoringPage." level ".disabled")}}
{{/if}}
{{else if (eq selected "prometheus")}}
{{t (if enabled "monitoringPage.toUpdate" "monitoringPage.prometheus")}}
{{t (if enabled (concat "monitoringPage.toUpdate." level) "monitoringPage.prometheus")}}
{{/if}}
</p>
{{/banner-message}}

View File

@ -87,7 +87,10 @@ clusterDashboard:
monitoringPage:
update: Update configuration
toUpdate: Monitoring is enabled.
toUpdate:
cluster: Cluster level monitoring is enabled.
project: Project level monitoring is enabled.
clusterNotEnabled: Cluster level monitoring is not enabled. Only custom metrics will be collected.
prometheus: Monitoring is not enabled yet, click the Save button below to enable it.
config:
types:

View File

@ -80,7 +80,10 @@ clusterDashboard:
monitoringPage:
update: 更新监控配置
toUpdate: 监控已启用。
toUpdate:
cluster: 集群级别监控已启用。
project: 项目级别监控已启用。
clusterNotEnabled: 集群级别监控未启用。将只采集自定义指标。
prometheus: 监控尚未启用,点击下面的保存按钮去启用监控。
config:
header: Prometheus配置