diff --git a/interface/index.html b/interface/index.html
index 3fa0459b4..71b9d5754 100644
--- a/interface/index.html
+++ b/interface/index.html
@@ -19,6 +19,9 @@
+
- Status
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index 1490c927c..98e6f5429 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -205,6 +205,12 @@ define(['jquery', 'd3pie', 'visibility', 'app/stats', 'app/graph', 'app/config',
tabClick(tab_id);
});
+ $("#selSrv").change(function () {
+ checked_server = this.value;
+ $('#selSrv [value="' + checked_server + '"]').prop("checked", true);
+ tabClick("#" + $("#navBar ul li.active > a").attr("id"));
+ });
+
// Radio buttons
$(document).on('click', 'input:radio[name="clusterName"]', function () {
if (!this.disabled) {
diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js
index e2ce33d0f..632b6a8ab 100644
--- a/interface/js/app/stats.js
+++ b/interface/js/app/stats.js
@@ -98,6 +98,7 @@ function($, d3pie, Humanize) {
$('#statWidgets').find('li.pull-right').appendTo('#statWidgets');
$("#clusterTable tbody").empty();
+ $("#selSrv").empty();
$.each(servers, function (key, val) {
var glyph_status;
if (val.status) {
@@ -135,6 +136,13 @@ function($, d3pie, Humanize) {
}
}
+
+ $("#selSrv").append( $(''));
+ if (checked_server == key) {
+ $('#selSrv [value="' + key + '"]').attr("selected", "selected");
+ } else if (!val.status) {
+ $('#selSrv [value="' + key + '"]').attr("disabled", "disabled");
+ }
});
$(widgets).show();
}