summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Lambert <joshua@gitlab.com>2017-07-04 09:21:20 -0400
committerJose Ivan Vargas <jvargas@gitlab.com>2017-07-06 06:59:00 -0500
commit9ec791eedbad7afc35117ead7cc418c6524e75b7 (patch)
tree3ff8ebdbe9b47c3c269f1b7371fc88804b6b4f9a
parent674f05d29ae7775f4eb71c0549a3e39751e04052 (diff)
downloadgitlab-ce-9ec791eedbad7afc35117ead7cc418c6524e75b7.tar.gz
Use correct field for label name, fix default for unit to be blank
-rw-r--r--app/assets/javascripts/monitoring/components/monitoring_column.vue18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/assets/javascripts/monitoring/components/monitoring_column.vue b/app/assets/javascripts/monitoring/components/monitoring_column.vue
index 0f33581ec52..2b6d05a5838 100644
--- a/app/assets/javascripts/monitoring/components/monitoring_column.vue
+++ b/app/assets/javascripts/monitoring/components/monitoring_column.vue
@@ -105,9 +105,9 @@
this.measurements = measurements.small;
}
this.data = query.result[0].values;
- this.unitOfDisplay = query.unit || 'N/A';
+ this.unitOfDisplay = query.unit || '';
this.yAxisLabel = this.columnData.y_label || 'Values';
- this.legendTitle = query.legend || 'Average';
+ this.legendTitle = query.label || 'Average';
this.graphWidth = this.$refs.baseSvg.clientWidth -
this.margin.left - this.margin.right;
this.graphHeight = this.graphHeight - this.margin.top - this.margin.bottom;
@@ -215,16 +215,16 @@
};
</script>
<template>
- <div
+ <div
:class="classType">
- <h5
+ <h5
class="text-center graph-title">
{{columnData.title}}
</h5>
<div
class="prometheus-svg-container"
:style="paddingBottomRootSvg">
- <svg
+ <svg
:viewBox="outterViewBox"
ref="baseSvg">
<g
@@ -235,7 +235,7 @@
class="y-axis"
transform="translate(70, 20)">
</g>
- <monitoring-legends
+ <monitoring-legends
:graph-width="graphWidth"
:graph-height="graphHeight"
:margin="margin"
@@ -245,7 +245,7 @@
:y-axis-label="yAxisLabel"
:metric-usage="metricUsage"
/>
- <svg
+ <svg
class="graph-data"
:viewBox="innerViewBox"
ref="graphData">
@@ -263,7 +263,7 @@
stroke-width="2"
transform="translate(-5, 20)">
</path>
- <rect
+ <rect
class="prometheus-graph-overlay"
:width="(graphWidth - 70)"
:height="(graphHeight - 100)"
@@ -277,7 +277,7 @@
:graph-height="graphHeight"
:graph-height-offset="graphHeightOffset"
/>
- <monitoring-flag
+ <monitoring-flag
v-if="showFlag"
:current-x-coordinate="currentXCoordinate"
:current-y-coordinate="currentYCoordinate"