diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-10-05 01:47:03 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-10-05 01:47:03 +0300 |
commit | 7d8e410ffea377f101bf26022ce2e3dd881adb02 (patch) | |
tree | 5a7033602b5010b339dfa31c29f08f8b1f3b4acc /app/assets/javascripts/clusters.js | |
parent | 62545ddb2c1552de84c7c5c2b3fdfa8ca2c38a67 (diff) |
Changes after review
Diffstat (limited to 'app/assets/javascripts/clusters.js')
-rw-r--r-- | app/assets/javascripts/clusters.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/clusters.js b/app/assets/javascripts/clusters.js index 8bd4de92e6f..50dbeb06362 100644 --- a/app/assets/javascripts/clusters.js +++ b/app/assets/javascripts/clusters.js @@ -39,6 +39,7 @@ export default class Clusters { this.errorContainer = document.querySelector('.js-cluster-error'); this.successContainer = document.querySelector('.js-cluster-success'); this.creatingContainer = document.querySelector('.js-cluster-creating'); + this.errorReasonContainer = this.errorContainer.querySelector('.js-error-reason'); this.toggleButton.addEventListener('click', this.toggle.bind(this)); @@ -47,7 +48,7 @@ export default class Clusters { } if (this.state.statusPath) { - this.initPoling(); + this.initPolling(); } } @@ -56,7 +57,7 @@ export default class Clusters { this.toggleInput.setAttribute('value', this.toggleButton.classList.contains('checked').toString()); } - initPoling() { + initPolling() { this.poll = new Poll({ resource: this.service, method: 'fetchData', @@ -98,7 +99,7 @@ export default class Clusters { break; case 'errored': this.errorContainer.classList.remove('hidden'); - this.errorContainer.querySelector('.js-error-reason').textContent = error; + this.errorReasonContainer.textContent = error; break; case 'scheduled': case 'creating': |