Commit 0e9693f6 authored by Simon Knox's avatar Simon Knox

Independence for embed timewindow scroll

Adds groupId to time_series rather than depending on attrs
parent cb800ef7
......@@ -62,6 +62,11 @@ export default {
required: false,
default: s__('Metrics|Max'),
},
groupId: {
type: String,
required: false,
default: '',
},
},
data() {
return {
......@@ -274,6 +279,7 @@ export default {
:is="glChartComponent"
ref="chart"
v-bind="$attrs"
:group-id="groupId"
:data="chartData"
:option="chartOptions"
:format-tooltip-text="formatTooltipText"
......
......@@ -98,7 +98,7 @@ export default {
class="w-100"
:graph-data="graphData"
:container-width="elWidth"
group-id="monitor-area-chart"
:group-id="dashboardUrl"
:project-path="null"
:show-border="true"
:single-embed="isSingleChart"
......
---
title: Embed metrics time window scroll no longer affects other embeds
merge_request: 18109
author:
type: fixed
......@@ -74,5 +74,9 @@ describe('Embed', () => {
expect(wrapper.find(MonitorTimeSeriesChart).exists()).toBe(true);
expect(wrapper.findAll(MonitorTimeSeriesChart).length).toBe(2);
});
it('includes groupId with dashboardUrl', () => {
expect(wrapper.find(MonitorTimeSeriesChart).props('groupId')).toBe(TEST_HOST);
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment