2018-11-08 19:23:39 +05:30
|
|
|
import initGkeDropdowns from '~/projects/gke_cluster_dropdowns';
|
2019-02-15 15:39:39 +05:30
|
|
|
import PersistentUserCallout from '../../persistent_user_callout';
|
2018-03-17 18:26:18 +05:30
|
|
|
import Project from './project';
|
2018-12-05 23:21:45 +05:30
|
|
|
import ShortcutsNavigation from '../../behaviors/shortcuts/shortcuts_navigation';
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
2018-11-08 19:23:39 +05:30
|
|
|
const { page } = document.body.dataset;
|
|
|
|
const newClusterViews = [
|
|
|
|
'projects:clusters:new',
|
|
|
|
'projects:clusters:create_gcp',
|
|
|
|
'projects:clusters:create_user',
|
|
|
|
];
|
|
|
|
|
|
|
|
if (newClusterViews.indexOf(page) > -1) {
|
2019-02-15 15:39:39 +05:30
|
|
|
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
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
initGkeDropdowns();
|
|
|
|
}
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
new Project(); // eslint-disable-line no-new
|
|
|
|
new ShortcutsNavigation(); // eslint-disable-line no-new
|
2018-03-27 19:54:05 +05:30
|
|
|
});
|