summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/monitoring/components/graph.vue
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-10-06 07:20:34 +0000
committerTim Zallmann <tzallmann@gitlab.com>2017-10-06 07:20:34 +0000
commit6c5837ae4933b17f657c80c96431e528ff62d971 (patch)
treef838d1a30a37237f33e849ad5e724ccdeea52137 /app/assets/javascripts/monitoring/components/graph.vue
parent9560d5b8399df42109e5768f19a99d0d5a664bd9 (diff)
parent790bc25dcd727471698838c5f8504fa9dc44fc37 (diff)
downloadgitlab-ce-6c5837ae4933b17f657c80c96431e528ff62d971.tar.gz
Merge branch '37105-monitoring-graph-axes-labels-are-inaccurate-and-inconsistent' into 'master'
Resolve "Monitoring graph axes labels are inaccurate and inconsistent" Closes #37105 See merge request gitlab-org/gitlab-ce!14258
Diffstat (limited to 'app/assets/javascripts/monitoring/components/graph.vue')
-rw-r--r--app/assets/javascripts/monitoring/components/graph.vue18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/javascripts/monitoring/components/graph.vue b/app/assets/javascripts/monitoring/components/graph.vue
index 33611c408ef..5aa3865f96a 100644
--- a/app/assets/javascripts/monitoring/components/graph.vue
+++ b/app/assets/javascripts/monitoring/components/graph.vue
@@ -3,7 +3,7 @@
import GraphLegend from './graph/legend.vue';
import GraphFlag from './graph/flag.vue';
import GraphDeployment from './graph/deployment.vue';
- import GraphPath from './graph_path.vue';
+ import GraphPath from './graph/path.vue';
import MonitoringMixin from '../mixins/monitoring_mixins';
import eventHub from '../event_hub';
import measurements from '../utils/measurements';
@@ -69,7 +69,7 @@
},
computed: {
- outterViewBox() {
+ outerViewBox() {
return `0 0 ${this.baseGraphWidth} ${this.baseGraphHeight}`;
},
@@ -137,17 +137,19 @@
},
renderAxesPaths() {
- this.timeSeries = createTimeSeries(this.graphData.queries[0],
- this.graphWidth,
- this.graphHeight,
- this.graphHeightOffset);
+ this.timeSeries = createTimeSeries(
+ this.graphData.queries[0],
+ this.graphWidth,
+ this.graphHeight,
+ this.graphHeightOffset,
+ );
if (this.timeSeries.length > 3) {
this.baseGraphHeight = this.baseGraphHeight += (this.timeSeries.length - 3) * 20;
}
const axisXScale = d3.time.scale()
- .range([0, this.graphWidth]);
+ .range([0, this.graphWidth - 70]);
const axisYScale = d3.scale.linear()
.range([this.graphHeight - this.graphHeightOffset, 0]);
@@ -214,7 +216,7 @@
class="prometheus-svg-container"
:style="paddingBottomRootSvg">
<svg
- :viewBox="outterViewBox"
+ :viewBox="outerViewBox"
ref="baseSvg">
<g
class="x-axis"