Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2019-08-02 23:08:53 +0300
committerFatih Acet <acetfatih@gmail.com>2019-08-02 23:08:53 +0300
commit9fb1df8f9781ea5f1c5db71ef4baeabc9b369528 (patch)
tree421ccbb46bdc7523436e7f43c9f84e61c2f5d0c0 /app/assets/javascripts/projects
parent57e00e191dad442ba74940c6a97ba4ae2bc60d8b (diff)
Hide cluster details until cluster is created
Only display the details of the cluster page when the cluster exists. If it is in "creating" state, show a message and a spinner
Diffstat (limited to 'app/assets/javascripts/projects')
-rw-r--r--app/assets/javascripts/projects/gke_cluster_namespace/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/projects/gke_cluster_namespace/index.js b/app/assets/javascripts/projects/gke_cluster_namespace/index.js
index 288740203ad..0ec4d8807b0 100644
--- a/app/assets/javascripts/projects/gke_cluster_namespace/index.js
+++ b/app/assets/javascripts/projects/gke_cluster_namespace/index.js
@@ -28,8 +28,10 @@ const setState = glManagedCheckbox => {
const initGkeNamespace = () => {
const glManagedCheckbox = document.querySelector('.js-gl-managed');
- setState(glManagedCheckbox); // this is needed in order to set the initial state
- glManagedCheckbox.addEventListener('change', () => setState(glManagedCheckbox));
+ if (glManagedCheckbox) {
+ setState(glManagedCheckbox); // this is needed in order to set the initial state
+ glManagedCheckbox.addEventListener('change', () => setState(glManagedCheckbox));
+ }
};
export default initGkeNamespace;