2019-02-15 15:39:39 +05:30
|
|
|
import PersistentUserCallout from '~/persistent_user_callout';
|
|
|
|
import initGkeDropdowns from '~/projects/gke_cluster_dropdowns';
|
|
|
|
|
|
|
|
function initGcpSignupCallout() {
|
|
|
|
const callout = document.querySelector('.gcp-signup-offer');
|
2019-05-30 16:15:17 +05:30
|
|
|
|
|
|
|
if (callout) new PersistentUserCallout(callout); // eslint-disable-line no-new
|
2019-02-15 15:39:39 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
const { page } = document.body.dataset;
|
|
|
|
const newClusterViews = [
|
|
|
|
'groups:clusters:new',
|
|
|
|
'groups:clusters:create_gcp',
|
|
|
|
'groups:clusters:create_user',
|
|
|
|
];
|
|
|
|
|
|
|
|
if (newClusterViews.indexOf(page) > -1) {
|
|
|
|
initGcpSignupCallout();
|
|
|
|
initGkeDropdowns();
|
|
|
|
}
|
|
|
|
});
|