Fixed the y_label not setting correctly for each graph on the monitoring dashboard
This commit is contained in:
parent
c8eef2d2a6
commit
2a829d0f53
|
@ -104,7 +104,7 @@
|
||||||
}
|
}
|
||||||
this.data = query.result[0].values;
|
this.data = query.result[0].values;
|
||||||
this.unitOfDisplay = query.unit || 'N/A';
|
this.unitOfDisplay = query.unit || 'N/A';
|
||||||
this.yAxisLabel = this.columnData.y_axis || 'Values';
|
this.yAxisLabel = this.columnData.y_label || 'Values';
|
||||||
this.legendTitle = query.legend || 'Average';
|
this.legendTitle = query.legend || 'Average';
|
||||||
this.graphWidth = this.$refs.baseSvg.clientWidth -
|
this.graphWidth = this.$refs.baseSvg.clientWidth -
|
||||||
this.margin.left - this.margin.right;
|
this.margin.left - this.margin.right;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Fixed the y_label not setting correctly for each graph on the monitoring dashboard
|
||||||
|
merge_request:
|
||||||
|
author:
|
|
@ -13,7 +13,7 @@ const metricsGroupsAPIResponse = {
|
||||||
'queries': [
|
'queries': [
|
||||||
{
|
{
|
||||||
'query_range': 'avg(container_memory_usage_bytes{%{environment_filter}}) / 2^20',
|
'query_range': 'avg(container_memory_usage_bytes{%{environment_filter}}) / 2^20',
|
||||||
'label': 'Container memory',
|
'y_label': 'Memory',
|
||||||
'unit': 'MiB',
|
'unit': 'MiB',
|
||||||
'result': [
|
'result': [
|
||||||
{
|
{
|
||||||
|
@ -2477,7 +2477,7 @@ export const singleRowMetrics = [
|
||||||
{
|
{
|
||||||
'title': 'CPU usage',
|
'title': 'CPU usage',
|
||||||
'weight': 1,
|
'weight': 1,
|
||||||
'y_label': 'Values',
|
'y_label': 'Memory',
|
||||||
'queries': [
|
'queries': [
|
||||||
{
|
{
|
||||||
'query_range': 'avg(rate(container_cpu_usage_seconds_total{%{environment_filter}}[2m])) * 100',
|
'query_range': 'avg(rate(container_cpu_usage_seconds_total{%{environment_filter}}[2m])) * 100',
|
||||||
|
|
|
@ -94,4 +94,15 @@ describe('MonitoringColumn', () => {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('has a title for the y-axis that comes from the backend', () => {
|
||||||
|
const component = createComponent({
|
||||||
|
columnData: singleRowMetrics[0],
|
||||||
|
classType: 'col-md-6',
|
||||||
|
updateAspectRatio: false,
|
||||||
|
deploymentData,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(component.yAxisLabel).toEqual(component.columnData.y_label);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue