summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 03:07:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 03:07:24 +0000
commit050f88965560f5ad38799a8344f7b8ac5e7a1b8d (patch)
tree629ff07854af86f765a42f3561d9b6ed7f673d11
parentb7e6df1abde1112ae1fa0778f45d6053eec3f052 (diff)
downloadgitlab-ce-050f88965560f5ad38799a8344f7b8ac5e7a1b8d.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/monitoring/components/charts/time_series.vue6
-rw-r--r--app/assets/javascripts/monitoring/components/embed.vue2
-rw-r--r--changelogs/unreleased/psi-indy-embed-zooms.yml5
-rw-r--r--spec/features/boards/sidebar_spec.rb31
-rw-r--r--spec/frontend/monitoring/embed/embed_spec.js4
5 files changed, 16 insertions, 32 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/time_series.vue b/app/assets/javascripts/monitoring/components/charts/time_series.vue
index 76fb35aaa78..78fe575717a 100644
--- a/app/assets/javascripts/monitoring/components/charts/time_series.vue
+++ b/app/assets/javascripts/monitoring/components/charts/time_series.vue
@@ -63,6 +63,11 @@ export default {
required: false,
default: s__('Metrics|Max'),
},
+ groupId: {
+ type: String,
+ required: false,
+ default: '',
+ },
},
data() {
return {
@@ -290,6 +295,7 @@ export default {
:is="glChartComponent"
ref="chart"
v-bind="$attrs"
+ :group-id="groupId"
:data="chartData"
:option="chartOptions"
:format-tooltip-text="formatTooltipText"
diff --git a/app/assets/javascripts/monitoring/components/embed.vue b/app/assets/javascripts/monitoring/components/embed.vue
index da1e88071ab..7857aaa6ecc 100644
--- a/app/assets/javascripts/monitoring/components/embed.vue
+++ b/app/assets/javascripts/monitoring/components/embed.vue
@@ -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"
diff --git a/changelogs/unreleased/psi-indy-embed-zooms.yml b/changelogs/unreleased/psi-indy-embed-zooms.yml
new file mode 100644
index 00000000000..a05977664f3
--- /dev/null
+++ b/changelogs/unreleased/psi-indy-embed-zooms.yml
@@ -0,0 +1,5 @@
+---
+title: Embed metrics time window scroll no longer affects other embeds
+merge_request: 18109
+author:
+type: fixed
diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb
index d68a4c52448..2b923df40c5 100644
--- a/spec/features/boards/sidebar_spec.rb
+++ b/spec/features/boards/sidebar_spec.rb
@@ -14,8 +14,6 @@ describe 'Issue Boards', :js do
let!(:bug) { create(:label, project: project, name: 'Bug') }
let!(:regression) { create(:label, project: project, name: 'Regression') }
let!(:stretch) { create(:label, project: project, name: 'Stretch') }
- let!(:scoped_label_1) { create(:label, project: project, name: 'Scoped::Label1') }
- let!(:scoped_label_2) { create(:label, project: project, name: 'Scoped::Label2') }
let!(:issue1) { create(:labeled_issue, project: project, assignees: [user], milestone: milestone, labels: [development], relative_position: 2) }
let!(:issue2) { create(:labeled_issue, project: project, labels: [development, stretch], relative_position: 1) }
let(:board) { create(:board, project: project) }
@@ -29,8 +27,6 @@ describe 'Issue Boards', :js do
end
before do
- stub_licensed_features(scoped_labels: true)
-
project.add_maintainer(user)
sign_in(user)
@@ -313,33 +309,6 @@ describe 'Issue Boards', :js do
expect(card).to have_content(bug.title)
end
- it 'removes existing scoped label' do
- click_card(card)
-
- page.within('.labels') do
- click_link 'Edit'
-
- wait_for_requests
-
- click_link scoped_label_1.title
- click_link scoped_label_2.title
-
- wait_for_requests
-
- find('.dropdown-menu-close-icon').click
-
- page.within('.value') do
- expect(page).to have_selector('.scoped-label-wrapper', count: 1)
- expect(page).not_to have_content(scoped_label_1.title)
- expect(page).to have_content(scoped_label_2.title)
- end
- end
-
- expect(card).to have_selector('.scoped-label-wrapper', count: 1)
- expect(card).not_to have_content(scoped_label_1.title)
- expect(card).to have_content(scoped_label_2.title)
- end
-
it 'adds a multiple labels' do
click_card(card)
diff --git a/spec/frontend/monitoring/embed/embed_spec.js b/spec/frontend/monitoring/embed/embed_spec.js
index 1ce14e2418a..5de1a7c4c3b 100644
--- a/spec/frontend/monitoring/embed/embed_spec.js
+++ b/spec/frontend/monitoring/embed/embed_spec.js
@@ -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);
+ });
});
});