b4cc539d3c
This commit creates a create_cluster directory to collect all Vue applications related to creating kubernetes applications using gitlab. It also moves the gke_cluster_dropdowns collection of apps to the create_cluster directory. gke_cluster_dropdowns contains dropdown components used to select configuration options to create a Kubernetes cluster in Google Cloud.
21 lines
594 B
JavaScript
21 lines
594 B
JavaScript
import PersistentUserCallout from '~/persistent_user_callout';
|
|
import initGkeDropdowns from '~/create_cluster/gke_cluster';
|
|
|
|
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();
|
|
}
|
|
});
|