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

22 lines
685 B
JavaScript
Raw Normal View History

2018-11-20 20:47:30 +05:30
import initDismissableCallout from '~/dismissable_callout';
2018-11-08 19:23:39 +05:30
import initGkeDropdowns from '~/projects/gke_cluster_dropdowns';
2018-03-17 18:26:18 +05:30
import Project from './project';
import ShortcutsNavigation from '../../shortcuts_navigation';
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) {
2018-11-20 20:47:30 +05:30
initDismissableCallout('.gcp-signup-offer');
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
});