debian-mirror-gitlab/app/assets/javascripts/pages/admin/clusters/index.js

22 lines
594 B
JavaScript
Raw Normal View History

2019-07-31 22:56:46 +05:30
import PersistentUserCallout from '~/persistent_user_callout';
2019-12-04 20:38:33 +05:30
import initGkeDropdowns from '~/create_cluster/gke_cluster';
2019-07-31 22:56:46 +05:30
function initGcpSignupCallout() {
const callout = document.querySelector('.gcp-signup-offer');
PersistentUserCallout.factory(callout);
}
document.addEventListener('DOMContentLoaded', () => {
const { page } = document.body.dataset;
const newClusterViews = [
'admin:clusters:new',
'admin:clusters:create_gcp',
'admin:clusters:create_user',
];
if (newClusterViews.indexOf(page) > -1) {
initGcpSignupCallout();
initGkeDropdowns();
}
});