summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/monitoring/components/charts/annotations.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 06:09:49 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 06:09:49 +0000
commit00a8c64ffd18e74df4b1cdeda7776b5221fddafe (patch)
tree3a5262df3df89455384809bbd45dfb696c48ecde /app/assets/javascripts/monitoring/components/charts/annotations.js
parentb71a496c7a3e109f7c85ad7ac453e6f7bf7cda45 (diff)
downloadgitlab-ce-00a8c64ffd18e74df4b1cdeda7776b5221fddafe.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/monitoring/components/charts/annotations.js')
-rw-r--r--app/assets/javascripts/monitoring/components/charts/annotations.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/annotations.js b/app/assets/javascripts/monitoring/components/charts/annotations.js
index de2b0c69a88..947750b3721 100644
--- a/app/assets/javascripts/monitoring/components/charts/annotations.js
+++ b/app/assets/javascripts/monitoring/components/charts/annotations.js
@@ -45,19 +45,16 @@ export const annotationsYAxis = {
* Fetched list of annotations are parsed into a
* format the eCharts accepts to draw markLines
*
- * If Annotation is a single line, the `from` property
- * has a value and the `to` is null. Because annotations
- * only supports lines the from value does not exist yet.
+ * If Annotation is a single line, the `starting_at` property
+ * has a value and the `ending_at` is null. Because annotations
+ * only supports lines the `ending_at` value does not exist yet.
*
*
* @param {Object} annotation object
* @returns {Object} markLine object
*/
-export const parseAnnotations = ({
- from: annotationFrom = '',
- color = colorValues.primaryColor,
-}) => ({
- xAxis: annotationFrom,
+export const parseAnnotations = ({ starting_at = '', color = colorValues.primaryColor }) => ({
+ xAxis: starting_at,
lineStyle: {
color,
},
@@ -105,7 +102,7 @@ export const generateAnnotationsSeries = ({ deployments = [], annotations = [] }
const annotationsData = annotations.map(annotation => {
return {
name: 'annotations',
- value: [annotation.from, annotationsYAxisCoords.pos],
+ value: [annotation.starting_at, annotationsYAxisCoords.pos],
// style options
symbol: 'none',
// metadata that are accessible in `formatTooltipText` method