Skip to content
Snippets Groups Projects
Commit 2fc41f6e authored by Wes Felter's avatar Wes Felter
Browse files

UI: Added checkbox to header to control background updates

parent 48627d12
No related branches found
No related tags found
No related merge requests found
......@@ -117,11 +117,11 @@ tpl.loadTemplates(['home', 'status', 'topology', 'header', 'switch', 'switch-lis
});
});
setInterval(function () {
swl.fetch();
}, 3000);
var updating = true;
setInterval(function () {
hl.fetch();
if(updating) {
swl.fetch();
hl.fetch();
}
}, 3000);
......@@ -24,6 +24,9 @@ window.HeaderView = Backbone.View.extend({
render:function (eventName) {
$(this.el).html(this.template());
$('#live-updates', this.el).change(function () {
updating = $(this).is(':checked');
})
// $('.navbar-search', this.el).append(this.searchresultsView.render().el);
return this;
},
......
......@@ -16,11 +16,18 @@
<li><a href="/hosts">Hosts</a></li>
<!-- <li><a href="/vlans">VLANs</a></li> -->
</ul>
<!--
<form id="searchForm" class="navbar-search pull-right dropdown">
<input id="searchText" type="text" class="search-query dropdown-toggle"
placeholder="Search (try an IP or MAC address)">
</form>
-->
</div> <!--/.nav-collapse -->
<form class="navbar-form pull-right">
<label class="checkbox">
<input type="checkbox" id="live-updates" checked="yes">Live updates
</label>
</form>
</div>
</div>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment