diff --git a/edit/monitoring.coreos.com.receiver/types/opsgenie.vue b/edit/monitoring.coreos.com.receiver/types/opsgenie.vue
index b8868a46dd..0fee4bce64 100644
--- a/edit/monitoring.coreos.com.receiver/types/opsgenie.vue
+++ b/edit/monitoring.coreos.com.receiver/types/opsgenie.vue
@@ -1,191 +1,198 @@
-
-
-
-
-
-
-
-
-
-
-
-
Responders
-
-
-
-
- Type
-
-
- Send To
-
-
-
-
-
-
- {{ typeLabel(scope.row.value.type) }}
-
-
-
- {{ targetLabel(scope.row.value.target) }}: {{ scope.row.value.value }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Responders
+
+
+
+
+ Type
+
+
+ Send To
+
+
+
+
+
+
+ {{ typeLabel(scope.row.value.type) }}
+
+
+
+ {{ targetLabel(scope.row.value.target) }}: {{ scope.row.value.value }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/edit/monitoring.coreos.com.receiver/types/pagerduty.vue b/edit/monitoring.coreos.com.receiver/types/pagerduty.vue
index c6008c2192..384879b68d 100644
--- a/edit/monitoring.coreos.com.receiver/types/pagerduty.vue
+++ b/edit/monitoring.coreos.com.receiver/types/pagerduty.vue
@@ -1,66 +1,88 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/edit/monitoring.coreos.com.receiver/types/slack.vue b/edit/monitoring.coreos.com.receiver/types/slack.vue
index f75b7eb3b7..aadd580476 100644
--- a/edit/monitoring.coreos.com.receiver/types/slack.vue
+++ b/edit/monitoring.coreos.com.receiver/types/slack.vue
@@ -12,15 +12,19 @@ export default {
},
value: {
type: Object,
- required: true
- }
+ required: true,
+ },
},
data() {
this.$set(this.value, 'http_config', this.value.http_config || {});
this.$set(this.value, 'send_resolved', this.value.send_resolved || false);
if (this.mode === _CREATE) {
- this.$set(this.value, 'text', this.value.text || '{{ template "slack.rancher.text" . }}');
+ this.$set(
+ this.value,
+ 'text',
+ this.value.text || '{{ template "slack.rancher.text" . }}'
+ );
}
return {};
@@ -32,19 +36,39 @@ export default {
diff --git a/models/monitoring.coreos.com.receiver.js b/models/monitoring.coreos.com.receiver.js
index 040b59ace1..a0a89270bf 100644
--- a/models/monitoring.coreos.com.receiver.js
+++ b/models/monitoring.coreos.com.receiver.js
@@ -6,43 +6,46 @@ import jsyaml from 'js-yaml';
export const RECEIVERS_TYPES = [
{
name: 'slack',
- label: 'Slack',
- title: 'Slack Config',
+ label: 'monitoringReceiver.slack.label',
+ title: 'monitoringReceiver.slack.title',
+ info: 'monitoringReceiver.slack.info',
key: 'slack_configs',
logo: require(`~/assets/images/vendor/slack.svg`)
},
{
name: 'email',
- label: 'Email',
- title: 'Email Config',
+ label: 'monitoringReceiver.email.label',
+ title: 'monitoringReceiver.email.title',
key: 'email_configs',
logo: require(`~/assets/images/vendor/email.svg`)
},
{
name: 'pagerduty',
- label: 'PagerDuty',
- title: 'PagerDuty Config',
+ label: 'monitoringReceiver.pagerduty.label',
+ title: 'monitoringReceiver.pagerduty.title',
+ info: 'monitoringReceiver.pagerduty.info',
key: 'pagerduty_configs',
logo: require(`~/assets/images/vendor/pagerduty.svg`)
},
{
name: 'opsgenie',
- label: 'Opsgenie',
- title: 'Opsgenie Config',
+ label: 'monitoringReceiver.opsgenie.label',
+ title: 'monitoringReceiver.opsgenie.title',
key: 'opsgenie_configs',
logo: require(`~/assets/images/vendor/email.svg`)
},
{
name: 'webhook',
- label: 'Webhook',
- title: 'Webhook Config',
+ label: 'monitoringReceiver.webhook.label',
+ title: 'monitoringReceiver.webhook.title',
key: 'webhook_configs',
logo: require(`~/assets/images/vendor/webhook.svg`)
},
{
name: 'custom',
- label: 'Custom',
- title: 'Custom Config',
+ label: 'monitoringReceiver.custom.label',
+ title: 'monitoringReceiver.custom.title',
+ info: 'monitoringReceiver.custom.info',
key: 'webhook_configs',
logo: require(`~/assets/images/vendor/custom.svg`)
},
diff --git a/pages/c/_cluster/monitoring/index.vue b/pages/c/_cluster/monitoring/index.vue
index 28d332087d..1ae33c2f2b 100644
--- a/pages/c/_cluster/monitoring/index.vue
+++ b/pages/c/_cluster/monitoring/index.vue
@@ -59,24 +59,27 @@ export default {
group: 'prometheus',
iconSrc: this.prometheusSrc,
label: 'monitoring.overview.linkedList.prometheusPromQl.label',
- description: 'monitoring.overview.linkedList.prometheusPromQl.description',
- link: `/k8s/clusters/${ this.currentCluster.id }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-prometheus:9090/proxy/graph`,
+ description:
+ 'monitoring.overview.linkedList.prometheusPromQl.description',
+ link: `/k8s/clusters/${ this.currentCluster.id }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-prometheus:9090/proxy/graph`,
},
{
enabled: false,
group: 'prometheus',
iconSrc: this.prometheusSrc,
label: 'monitoring.overview.linkedList.prometheusRules.label',
- description: 'monitoring.overview.linkedList.prometheusRules.description',
- link: `/k8s/clusters/${ this.currentCluster.id }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-prometheus:9090/proxy/rules`,
+ description:
+ 'monitoring.overview.linkedList.prometheusRules.description',
+ link: `/k8s/clusters/${ this.currentCluster.id }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-prometheus:9090/proxy/rules`,
},
{
enabled: false,
group: 'prometheus',
iconSrc: this.prometheusSrc,
label: 'monitoring.overview.linkedList.prometheusTargets.label',
- description: 'monitoring.overview.linkedList.prometheusTargets.description',
- link: `/k8s/clusters/${ this.currentCluster.id }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-prometheus:9090/proxy/targets`,
+ description:
+ 'monitoring.overview.linkedList.prometheusTargets.description',
+ link: `/k8s/clusters/${ this.currentCluster.id }/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-prometheus:9090/proxy/targets`,
},
];
@@ -87,13 +90,17 @@ export default {
async fetchDeps() {
const { $store, externalLinks } = this;
- const workloads = await Promise.all(Object.values(WORKLOAD_TYPES).map(type => this.$store.dispatch('cluster/findAll', { type })));
+ const workloads = await Promise.all(
+ Object.values(WORKLOAD_TYPES).map(type => this.$store.dispatch('cluster/findAll', { type })
+ )
+ );
workloads.flat().forEach((workload) => {
if (
!isEmpty(workload?.spec?.template?.spec?.containers) &&
- (workload.spec.template.spec.containers.find(c => c.image.includes('quay.io/coreos/prometheus-operator') ||
- c.image.includes('rancher/coreos-prometheus-operator'))
+ workload.spec.template.spec.containers.find(
+ c => c.image.includes('quay.io/coreos/prometheus-operator') ||
+ c.image.includes('rancher/coreos-prometheus-operator')
) &&
workload?.metadata?.namespace !== CATTLE_MONITORING_NAMESPACE
) {
@@ -108,10 +115,24 @@ export default {
if (!isEmpty(hash.endpoints)) {
const amMatch = findBy(externalLinks, 'group', 'alertmanager');
const grafanaMatch = findBy(externalLinks, 'group', 'grafana');
- const promeMatch = externalLinks.filter(el => el.group === 'prometheus');
- const alertmanager = findBy(hash.endpoints, 'id', `${ CATTLE_MONITORING_NAMESPACE }/rancher-monitoring-alertmanager`);
- const grafana = findBy(hash.endpoints, 'id', `${ CATTLE_MONITORING_NAMESPACE }/rancher-monitoring-grafana`);
- const prometheus = findBy(hash.endpoints, 'id', `${ CATTLE_MONITORING_NAMESPACE }/rancher-monitoring-prometheus`);
+ const promeMatch = externalLinks.filter(
+ el => el.group === 'prometheus'
+ );
+ const alertmanager = findBy(
+ hash.endpoints,
+ 'id',
+ `${ CATTLE_MONITORING_NAMESPACE }/rancher-monitoring-alertmanager`
+ );
+ const grafana = findBy(
+ hash.endpoints,
+ 'id',
+ `${ CATTLE_MONITORING_NAMESPACE }/rancher-monitoring-grafana`
+ );
+ const prometheus = findBy(
+ hash.endpoints,
+ 'id',
+ `${ CATTLE_MONITORING_NAMESPACE }/rancher-monitoring-prometheus`
+ );
if (!isEmpty(alertmanager) && !isEmpty(alertmanager.subsets)) {
amMatch.enabled = true;
@@ -126,7 +147,7 @@ export default {
}
}
},
- }
+ },
};
@@ -142,112 +163,48 @@ export default {
-