summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/monitoring
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-25 15:08:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-25 15:08:50 +0000
commite06d0e779673d745972863302858105aad9032e5 (patch)
tree0ff35b27a949a164f586613004b4abfe33e7d20e /app/assets/javascripts/monitoring
parentf7dae0cdcb70ecb71c1d65f099e9d96b27a4548c (diff)
downloadgitlab-ce-e06d0e779673d745972863302858105aad9032e5.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/monitoring')
-rw-r--r--app/assets/javascripts/monitoring/components/charts/time_series.vue9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/time_series.vue b/app/assets/javascripts/monitoring/components/charts/time_series.vue
index 8abb16f58ca..1c39fb072d9 100644
--- a/app/assets/javascripts/monitoring/components/charts/time_series.vue
+++ b/app/assets/javascripts/monitoring/components/charts/time_series.vue
@@ -4,7 +4,7 @@ import { GlLink, GlButton, GlTooltip, GlResizeObserverDirective } from '@gitlab/
import { GlAreaChart, GlLineChart, GlChartSeriesLabel } from '@gitlab/ui/dist/charts';
import dateFormat from 'dateformat';
import { s__, __ } from '~/locale';
-import { roundOffFloat } from '~/lib/utils/common_utils';
+import { getFormatter } from '~/lib/utils/unit_format';
import { getSvgIconPathContent } from '~/lib/utils/icon_utils';
import Icon from '~/vue_shared/components/icon.vue';
import {
@@ -37,6 +37,8 @@ const events = {
datazoom: 'datazoom',
};
+const yValFormatter = getFormatter('number');
+
export default {
components: {
GlAreaChart,
@@ -171,7 +173,7 @@ export default {
boundaryGap: [0.1, 0.1],
scale: true,
axisLabel: {
- formatter: num => roundOffFloat(num, 3).toString(),
+ formatter: num => yValFormatter(num, 3),
},
...yAxis,
};
@@ -313,7 +315,8 @@ export default {
this.tooltip.commitUrl = deploy.commitUrl;
} else {
const { seriesName, color, dataIndex } = dataPoint;
- const value = yVal.toFixed(3);
+ const value = yValFormatter(yVal, 3);
+
this.tooltip.content.push({
name: seriesName,
dataIndex,