summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/prometheus_metrics
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/prometheus_metrics
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/prometheus_metrics')
-rw-r--r--app/assets/javascripts/prometheus_metrics/custom_metrics.js12
-rw-r--r--app/assets/javascripts/prometheus_metrics/prometheus_metrics.js8
2 files changed, 10 insertions, 10 deletions
diff --git a/app/assets/javascripts/prometheus_metrics/custom_metrics.js b/app/assets/javascripts/prometheus_metrics/custom_metrics.js
index 36df7837785..e891b8bf3b6 100644
--- a/app/assets/javascripts/prometheus_metrics/custom_metrics.js
+++ b/app/assets/javascripts/prometheus_metrics/custom_metrics.js
@@ -65,12 +65,12 @@ export default class CustomMetrics extends PrometheusMetrics {
// eslint-disable-next-line class-methods-use-this
setHidden(els) {
- els.forEach(el => el.addClass('hidden'));
+ els.forEach((el) => el.addClass('hidden'));
}
setVisible(...els) {
- this.setHidden(this.$els.filter(el => !els.includes(el)));
- els.forEach(el => el.removeClass('hidden'));
+ this.setHidden(this.$els.filter((el) => !els.includes(el)));
+ els.forEach((el) => el.removeClass('hidden'));
}
showMonitoringCustomMetricsPanelState(stateName) {
@@ -98,14 +98,14 @@ export default class CustomMetrics extends PrometheusMetrics {
}
populateCustomMetrics() {
- const capitalizeGroup = metric => ({
+ const capitalizeGroup = (metric) => ({
...metric,
group: capitalizeFirstCharacter(metric.group),
});
const sortedMetrics = sortBy(this.customMetrics.map(capitalizeGroup), ['group', 'title']);
- sortedMetrics.forEach(metric => {
+ sortedMetrics.forEach((metric) => {
this.$monitoredCustomMetricsList.append(CustomMetrics.customMetricTemplate(metric));
});
@@ -145,7 +145,7 @@ export default class CustomMetrics extends PrometheusMetrics {
this.populateCustomMetrics(customMetrics.data.metrics);
}
})
- .catch(customMetricError => {
+ .catch((customMetricError) => {
this.showFlashMessage(customMetricError);
this.showMonitoringCustomMetricsPanelState(PANEL_STATE.EMPTY);
});
diff --git a/app/assets/javascripts/prometheus_metrics/prometheus_metrics.js b/app/assets/javascripts/prometheus_metrics/prometheus_metrics.js
index bb9689f09a1..57f9cec9682 100644
--- a/app/assets/javascripts/prometheus_metrics/prometheus_metrics.js
+++ b/app/assets/javascripts/prometheus_metrics/prometheus_metrics.js
@@ -26,8 +26,8 @@ export default class PrometheusMetrics {
this.activeMetricsEndpoint = this.$monitoredMetricsPanel.data('activeMetrics');
this.helpMetricsPath = this.$monitoredMetricsPanel.data('metrics-help-path');
- this.$panelToggleRight.on('click', e => this.handlePanelToggle(e));
- this.$panelToggleDown.on('click', e => this.handlePanelToggle(e));
+ this.$panelToggleRight.on('click', (e) => this.handlePanelToggle(e));
+ this.$panelToggleDown.on('click', (e) => this.handlePanelToggle(e));
}
init() {
@@ -72,7 +72,7 @@ export default class PrometheusMetrics {
let totalMissingEnvVarMetrics = 0;
let totalExporters = 0;
- metrics.forEach(metric => {
+ metrics.forEach((metric) => {
if (metric.active_metrics > 0) {
totalExporters += 1;
this.$monitoredMetricsList.append(
@@ -137,7 +137,7 @@ export default class PrometheusMetrics {
})
.catch(stop);
})
- .then(res => {
+ .then((res) => {
if (res && res.data && res.data.length) {
this.populateActiveMetrics(res.data);
} else {