diff --git a/css/app.css b/css/app.css
index b12d62b..eb7259d 100644
--- a/css/app.css
+++ b/css/app.css
@@ -122,6 +122,16 @@ header section .label.darker
/* Nodes */
+#nodes-wrapper h2 a
+ { color: #999;
+ text-transform: none;
+ float: right; }
+
+#nodes-wrapper h2 a:hover
+ { color: #666;
+ border-bottom: 1px solid #666;
+ cursor: pointer; }
+
#nodes .node
{ margin: 0.25em 0.5em 0.25em 0;
padding: 0.25em 0.5em 0.25em 0;
@@ -138,6 +148,16 @@ header section .label.darker
/* Indices */
+#indices-wrapper h2 a
+ { color: #999;
+ text-transform: none;
+ float: right; }
+
+#indices-wrapper h2 a:hover
+ { color: #666;
+ border-bottom: 1px solid #666;
+ cursor: pointer; }
+
#indices
{ counter-reset: index; }
diff --git a/index.html b/index.html
index 11e02e3..4b2dc32 100644
--- a/index.html
+++ b/index.html
@@ -86,98 +86,116 @@
- Nodes
-
+
-
-
- Indices
-
+
+
+
+
diff --git a/js/app.js b/js/app.js
index 36121e8..04a8e42 100755
--- a/js/app.js
+++ b/js/app.js
@@ -94,6 +94,7 @@ App.cluster = Ember.Object.create({
});
App.nodes = Ember.ArrayController.create({
+ hidden: false,
content: [],
contains: function(item) {
@@ -101,6 +102,8 @@ App.nodes = Ember.ArrayController.create({
},
refresh: function() {
+ if (App.nodes.hidden) { return }
+
clearTimeout(App.nodes.poller)
setTimeout(function() { App.set("refreshing", false) }, 1000)
App.nodes.poller = setTimeout( function() { App.nodes.__perform_refresh() }, App.refresh_interval.value )
@@ -158,6 +161,7 @@ App.nodes = Ember.ArrayController.create({
});
App.indices = Ember.ArrayController.create({
+ hidden: false,
content: [],
contains: function(item) {
@@ -165,6 +169,8 @@ App.indices = Ember.ArrayController.create({
},
refresh: function() {
+ if (App.indices.hidden) { return }
+
clearTimeout(App.indices.poller)
setTimeout(function() { App.set("refreshing", false) }, 1000)
App.indices.poller = setTimeout( function() { App.indices.__perform_refresh() }, App.refresh_interval.value )
@@ -415,6 +421,30 @@ App.toggleChart = Ember.View.create({
this.set("text", visible ? 'Show' : 'Hide')
visible ? chart.hide('fast') : chart.show('fast')
+ App.nodes.refresh();
+ }
+});
+
+App.toggleIndices = Ember.View.create({
+ hidden: false,
+ text: 'Hide',
+
+ toggle: function(event) {
+ this.set("text", this.get('hidden') ? 'Hide' : 'Show')
+ this.toggleProperty('hidden')
+ App.indices.toggleProperty('hidden')
+ App.indices.refresh();
+ }
+});
+
+App.toggleNodes = Ember.View.create({
+ hidden: false,
+ text: 'Hide',
+
+ toggle: function(event) {
+ this.set("text", this.get('hidden') ? 'Hide' : 'Show')
+ this.toggleProperty('hidden')
+ App.nodes.toggleProperty('hidden')
}
});