diff options
author | Luke Bennett <lbennett@gitlab.com> | 2018-11-07 05:06:40 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2018-11-21 15:25:52 +0000 |
commit | 874544507cde6c079fdbc29132c1b2e01a633d73 (patch) | |
tree | 18cd891e319bdd92fc87acd82b22fedef7a3029b /app/assets/javascripts/clusters/clusters_bundle.js | |
parent | 7d1bc0bee8abe4bb029f96b74fd7de492219a49c (diff) | |
download | gitlab-ce-874544507cde6c079fdbc29132c1b2e01a633d73.tar.gz |
Promote the GitLab.com Gold trial on a users default dashboardce-6983-promote-starting-a-gitlab-com-trial
Show a dismissable callout on a users dashboard for a free trial of
the GitLab.com Gold plan. Hide the callout from users who have
dismissed the callout, are already on a trial or are already on the
gold plan
Diffstat (limited to 'app/assets/javascripts/clusters/clusters_bundle.js')
-rw-r--r-- | app/assets/javascripts/clusters/clusters_bundle.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/assets/javascripts/clusters/clusters_bundle.js b/app/assets/javascripts/clusters/clusters_bundle.js index 71fc2ac7d80..f1c34b2d947 100644 --- a/app/assets/javascripts/clusters/clusters_bundle.js +++ b/app/assets/javascripts/clusters/clusters_bundle.js @@ -1,6 +1,6 @@ import Visibility from 'visibilityjs'; import Vue from 'vue'; -import initDismissableCallout from '~/dismissable_callout'; +import PersistentUserCallout from '../persistent_user_callout'; import { s__, sprintf } from '../locale'; import Flash from '../flash'; import Poll from '../lib/utils/poll'; @@ -65,7 +65,7 @@ export default class Clusters { this.showTokenButton = document.querySelector('.js-show-cluster-token'); this.tokenField = document.querySelector('.js-cluster-token'); - initDismissableCallout('.js-cluster-security-warning'); + Clusters.initDismissableCallout(); initSettingsPanels(); setupToggleButtons(document.querySelector('.js-cluster-enable-toggle-area')); this.initApplications(clusterType); @@ -106,6 +106,12 @@ export default class Clusters { }); } + static initDismissableCallout() { + const callout = document.querySelector('.js-cluster-security-warning'); + + if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new + } + addListeners() { if (this.showTokenButton) this.showTokenButton.addEventListener('click', this.showToken); eventHub.$on('installApplication', this.installApplication); |