diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 12:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 12:09:24 +0300 |
commit | 4720b569f0fcbb47e9f1a60e95172ae63b6f065a (patch) | |
tree | 5c6bcecbca227e608753a57a9aad19ccfe0567b6 /app/assets/javascripts/monitoring | |
parent | cefe554b7ce2d0b52f9de855be832a47c2bc24ab (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/monitoring')
-rw-r--r-- | app/assets/javascripts/monitoring/components/charts/anomaly.vue | 2 | ||||
-rw-r--r-- | app/assets/javascripts/monitoring/components/charts/time_series.vue | 28 |
2 files changed, 18 insertions, 12 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/anomaly.vue b/app/assets/javascripts/monitoring/components/charts/anomaly.vue index bcbc1dad89d..447f8845506 100644 --- a/app/assets/javascripts/monitoring/components/charts/anomaly.vue +++ b/app/assets/javascripts/monitoring/components/charts/anomaly.vue @@ -127,7 +127,6 @@ export default { }); const yAxisWithOffset = { - name: this.yAxisLabel, axisLabel: { formatter: num => roundOffFloat(num - this.yOffset, 3).toString(), }, @@ -162,6 +161,7 @@ export default { }), ); } + return { yAxis: yAxisWithOffset, series: boundarySeries }; }, }, diff --git a/app/assets/javascripts/monitoring/components/charts/time_series.vue b/app/assets/javascripts/monitoring/components/charts/time_series.vue index e6dbc38402e..d2b1e4da3fd 100644 --- a/app/assets/javascripts/monitoring/components/charts/time_series.vue +++ b/app/assets/javascripts/monitoring/components/charts/time_series.vue @@ -162,7 +162,8 @@ export default { ); }, chartOptions() { - const option = omit(this.option, 'series'); + const { yAxis, xAxis } = this.option; + const option = omit(this.option, ['series', 'yAxis', 'xAxis']); const dataYAxis = { name: this.yAxisLabel, @@ -173,7 +174,9 @@ export default { axisLabel: { formatter: num => roundOffFloat(num, 3).toString(), }, + ...yAxis, }; + const deploymentsYAxis = { show: false, min: deploymentYAxisCoords.min, @@ -184,18 +187,21 @@ export default { }, }; + const timeXAxis = { + name: __('Time'), + type: 'time', + axisLabel: { + formatter: date => dateFormat(date, dateFormats.timeOfDay), + }, + axisPointer: { + snap: true, + }, + ...xAxis, + }; + return { series: this.chartOptionSeries, - xAxis: { - name: __('Time'), - type: 'time', - axisLabel: { - formatter: date => dateFormat(date, dateFormats.timeOfDay), - }, - axisPointer: { - snap: true, - }, - }, + xAxis: timeXAxis, yAxis: [dataYAxis, deploymentsYAxis], dataZoom: [this.dataZoomConfig], ...option, |