Commit 95cbe90e authored by Adriel Santiago's avatar Adriel Santiago Committed by Kushal Pandya

Remove auto-appended units

Remove duplicate units from metrics dashboard graphs
parent a40bb1e8
......@@ -139,8 +139,7 @@ export default {
return this.graphData.queries.map(query => query.label).join(', ');
},
yAxisLabel() {
const [query] = this.graphData.queries;
return `${this.graphData.y_label} (${query.unit})`;
return `${this.graphData.y_label}`;
},
},
watch: {
......
---
title: Remove duplicate units from metrics graph
merge_request: 25485
author:
type: fixed
......@@ -127,7 +127,7 @@ describe('Area component', () => {
});
it('formats tooltip content', () => {
expect(areaChart.vm.tooltip.content).toBe('CPU (Cores) 5.556');
expect(areaChart.vm.tooltip.content).toBe('CPU 5.556');
});
});
......@@ -213,7 +213,7 @@ describe('Area component', () => {
describe('yAxisLabel', () => {
it('constructs a label for the chart y-axis', () => {
expect(areaChart.vm.yAxisLabel).toBe('CPU (Cores)');
expect(areaChart.vm.yAxisLabel).toBe('CPU');
});
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment