<div class="navbar-header">
<a class="navbar-brand" href="."><img src="./img/rspamd_logo_navbar.png" style="width: 67px; margin-top: -16px;"/></a>
</div>
+ <form class="navbar-form navbar-left">
+ <select id="selSrv" class="form-control"></select>
+ </form>
<ul class="nav navbar-nav nav-pills" role="tablist">
<li role="presentation" class="active"><a id="status_nav" aria-controls="status" role="tab" href="#status" data-toggle="tab">Status</a></li>
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) {
$('#statWidgets').find('li.pull-right').appendTo('#statWidgets');
$("#clusterTable tbody").empty();
+ $("#selSrv").empty();
$.each(servers, function (key, val) {
var glyph_status;
if (val.status) {
}
}
+
+ $("#selSrv").append( $('<option value="' + key + '">' + key + '</option>'));
+ if (checked_server == key) {
+ $('#selSrv [value="' + key + '"]').attr("selected", "selected");
+ } else if (!val.status) {
+ $('#selSrv [value="' + key + '"]').attr("disabled", "disabled");
+ }
});
$(widgets).show();
}