diff options
author | Mike Greiling <mike@pixelcog.com> | 2019-08-02 23:08:53 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-08-02 23:08:53 +0300 |
commit | 9fb1df8f9781ea5f1c5db71ef4baeabc9b369528 (patch) | |
tree | 421ccbb46bdc7523436e7f43c9f84e61c2f5d0c0 /app/assets/javascripts/projects | |
parent | 57e00e191dad442ba74940c6a97ba4ae2bc60d8b (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.js | 6 |
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; |