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:
authorFilipa Lacerda <filipa@gitlab.com>2017-11-27 20:18:55 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-11-27 20:28:33 +0300
commit074fcb56bb21f5e30711538df0c3bc6de013e21c (patch)
treeb15e8e316fa86ced04ccb9e7b687c83a5358109a /app/assets
parent554bf24b2a9e2964286272e690be417901cbd6e0 (diff)
Adds JS unit tests
Finishes tabs & table Updates e2e tests
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/clusters/clusters_index.js10
-rw-r--r--app/assets/stylesheets/pages/clusters.scss6
2 files changed, 11 insertions, 5 deletions
diff --git a/app/assets/javascripts/clusters/clusters_index.js b/app/assets/javascripts/clusters/clusters_index.js
index efdf2de5583..6249943da43 100644
--- a/app/assets/javascripts/clusters/clusters_index.js
+++ b/app/assets/javascripts/clusters/clusters_index.js
@@ -18,11 +18,11 @@ export default class ClusterTable {
this.container = '.js-clusters-list';
document.querySelectorAll(`${this.container} .js-toggle-cluster-list`).forEach(button => button.addEventListener('click', e => ClusterTable.updateCluster(e)));
}
-
- removeListeners() {
- document.querySelectorAll(`${this.container} .js-toggle-cluster-list`).forEach(button => button.removeEventListener('click'));
- }
-
+ /**
+ * When the toggle button is clicked,
+ * updates the status and makes a request to the API to update the cluster
+ * @param {Event} e
+ */
static updateCluster(e) {
const toggleButton = e.currentTarget;
const value = toggleButton.classList.contains('checked').toString();
diff --git a/app/assets/stylesheets/pages/clusters.scss b/app/assets/stylesheets/pages/clusters.scss
index e5b9e1f2de6..88395325fd2 100644
--- a/app/assets/stylesheets/pages/clusters.scss
+++ b/app/assets/stylesheets/pages/clusters.scss
@@ -8,3 +8,9 @@
// Wait for the Vue to kick-in and render the applications block
min-height: 302px;
}
+
+.clusters-container {
+ .nav-bar-right {
+ padding: $gl-padding-top $gl-padding;
+ }
+}