Skip to content
代码片段 群组 项目
提交 c2c04242 编辑于 作者: Natalia Tepluhina's avatar Natalia Tepluhina
浏览文件

Merge branch 'xanf/fix-anomaly-vue' into 'master'

Fix props mutation in anomaly.vue

See merge request gitlab-org/gitlab!50095
No related branches found
No related tags found
无相关合并请求
<script>
import produce from 'immer';
import { flattenDeep, isNumber } from 'lodash';
import { GlChartSeriesLabel } from '@gitlab/ui/dist/charts';
import { roundOffFloat } from '~/lib/utils/common_utils';
......@@ -84,11 +85,13 @@ export default {
metricData() {
const originalMetricQuery = this.graphData.metrics[0];
const metricQuery = { ...originalMetricQuery };
metricQuery.result[0].values = metricQuery.result[0].values.map(([x, y]) => [
x,
y + this.yOffset,
]);
const metricQuery = produce(originalMetricQuery, draftQuery => {
// eslint-disable-next-line no-param-reassign
draftQuery.result[0].values = draftQuery.result[0].values.map(([x, y]) => [
x,
y + this.yOffset,
]);
});
return {
...this.graphData,
type: panelTypes.LINE_CHART,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册