Commit 2c01bf05 authored by Ad Schellevis's avatar Ad Schellevis

(ids) add service status widget to page

parent a3f0df6f
...@@ -32,6 +32,14 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -32,6 +32,14 @@ POSSIBILITY OF SUCH DAMAGE.
// //
var data_get_map = {'frm_GeneralSettings':"/api/ids/settings/get"}; var data_get_map = {'frm_GeneralSettings':"/api/ids/settings/get"};
/**
* update service status
*/
function updateStatus() {
ajaxCall(url="/api/ids/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
}
/** /**
* list all known classtypes and add to selection box * list all known classtypes and add to selection box
...@@ -111,6 +119,8 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -111,6 +119,8 @@ POSSIBILITY OF SUCH DAMAGE.
$('.selectpicker').selectpicker('refresh'); $('.selectpicker').selectpicker('refresh');
}); });
updateStatus();
/** /**
* load content on tab changes * load content on tab changes
*/ */
...@@ -210,6 +220,7 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -210,6 +220,7 @@ POSSIBILITY OF SUCH DAMAGE.
ajaxCall(url="/api/ids/service/reconfigure", sendData={}, callback=function(data,status) { ajaxCall(url="/api/ids/service/reconfigure", sendData={}, callback=function(data,status) {
// when done, disable progress animation. // when done, disable progress animation.
$("#reconfigureAct_progress").removeClass("fa fa-spinner fa-pulse"); $("#reconfigureAct_progress").removeClass("fa fa-spinner fa-pulse");
updateStatus();
if (status != "success" || data['status'].toLowerCase().trim() != "ok") { if (status != "success" || data['status'].toLowerCase().trim() != "ok") {
BootstrapDialog.show({ BootstrapDialog.show({
...@@ -232,6 +243,7 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -232,6 +243,7 @@ POSSIBILITY OF SUCH DAMAGE.
// when done, disable progress animation and reload grid. // when done, disable progress animation and reload grid.
$("#updateRulesAct_progress").removeClass("fa fa-spinner fa-pulse"); $("#updateRulesAct_progress").removeClass("fa fa-spinner fa-pulse");
$('#grid-rule-files').bootgrid('reload'); $('#grid-rule-files').bootgrid('reload');
updateStatus();
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment