diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-15 09:09:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-15 09:09:49 +0300 |
commit | 00a8c64ffd18e74df4b1cdeda7776b5221fddafe (patch) | |
tree | 3a5262df3df89455384809bbd45dfb696c48ecde /app/assets/javascripts/monitoring | |
parent | b71a496c7a3e109f7c85ad7ac453e6f7bf7cda45 (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/annotations.js | 15 | ||||
-rw-r--r-- | app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql | 4 |
2 files changed, 8 insertions, 11 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 diff --git a/app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql b/app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql index e2edaa707b2..2fd698eadf9 100644 --- a/app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql +++ b/app/assets/javascripts/monitoring/queries/getAnnotations.query.graphql @@ -4,8 +4,8 @@ query getAnnotations($projectPath: ID!) { annotations: nodes { id description - from - to + starting_at + ending_at panelId } } |