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

26 lines
862 B
JavaScript
Raw Normal View History

2018-11-08 19:23:39 +05:30
import initGkeDropdowns from '~/projects/gke_cluster_dropdowns';
2019-10-12 21:52:04 +05:30
import initGkeNamespace from '~/projects/gke_cluster_namespace';
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-07-07 11:18:12 +05:30
PersistentUserCallout.factory(callout);
2019-02-15 15:39:39 +05:30
2018-11-08 19:23:39 +05:30
initGkeDropdowns();
2019-10-12 21:52:04 +05:30
initGkeNamespace();
2018-11-08 19:23:39 +05:30
}
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
});