summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/groups
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2018-12-06 13:41:20 +0000
committerMichael Kozono <mkozono@gmail.com>2019-01-03 10:39:36 -0800
commit5f110a6acff7571126c22013923d3f5d2aab770d (patch)
treea60fdc9812d72f942ca85698517c0b967f1c09fa /app/assets/javascripts/pages/groups
parent24665ccbe13134bf8379dc68ddfbe80f6c035808 (diff)
downloadgitlab-ce-5f110a6acff7571126c22013923d3f5d2aab770d.tar.gz
Port GitLab.com gold trial callout changes to CEce-revert-revert-gold-trial-mrs
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8731
Diffstat (limited to 'app/assets/javascripts/pages/groups')
-rw-r--r--app/assets/javascripts/pages/groups/clusters/index/index.js6
-rw-r--r--app/assets/javascripts/pages/groups/index.js10
2 files changed, 12 insertions, 4 deletions
diff --git a/app/assets/javascripts/pages/groups/clusters/index/index.js b/app/assets/javascripts/pages/groups/clusters/index/index.js
index 845a5f7042c..21efc4f6d00 100644
--- a/app/assets/javascripts/pages/groups/clusters/index/index.js
+++ b/app/assets/javascripts/pages/groups/clusters/index/index.js
@@ -1,5 +1,7 @@
-import initDismissableCallout from '~/dismissable_callout';
+import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', () => {
- initDismissableCallout('.gcp-signup-offer');
+ const callout = document.querySelector('.gcp-signup-offer');
+
+ if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
});
diff --git a/app/assets/javascripts/pages/groups/index.js b/app/assets/javascripts/pages/groups/index.js
index bf80d8b8193..a63a0dbc6b1 100644
--- a/app/assets/javascripts/pages/groups/index.js
+++ b/app/assets/javascripts/pages/groups/index.js
@@ -1,6 +1,12 @@
-import initDismissableCallout from '~/dismissable_callout';
+import PersistentUserCallout from '~/persistent_user_callout';
import initGkeDropdowns from '~/projects/gke_cluster_dropdowns';
+function initGcpSignupCallout() {
+ const callout = document.querySelector('.gcp-signup-offer');
+
+ if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
+}
+
document.addEventListener('DOMContentLoaded', () => {
const { page } = document.body.dataset;
const newClusterViews = [
@@ -10,7 +16,7 @@ document.addEventListener('DOMContentLoaded', () => {
];
if (newClusterViews.indexOf(page) > -1) {
- initDismissableCallout('.gcp-signup-offer');
+ initGcpSignupCallout();
initGkeDropdowns();
}
});