Proxy fix status check

This commit is contained in:
Ad Schellevis 2015-05-08 16:25:57 +00:00
parent e472f1322e
commit 397c56aa06
2 changed files with 8 additions and 6 deletions

View File

@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
$('.selectpicker').selectpicker('refresh');
// request service status on load and update status box
ajaxCall(url="/api/proxy/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI("proxy",data['responseText']);
updateServiceStatusUI(data['status']);
});
});
@ -68,10 +68,12 @@ POSSIBILITY OF SUCH DAMAGE.
draggable: true
});
} else {
// request service status after successful save and update status box
ajaxCall(url="/api/proxy/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI("proxy",data['responseText']);
});
// request service status after successful save and update status box (wait a few seconds before update)
setTimeout(function(){
ajaxCall(url="/api/proxy/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
},3000);
}
});
});

View File

@ -105,7 +105,7 @@ function mapDataToFormUI(data_get_map) {
/**
* update service status buttons in user interface
*/
function updateServiceStatusUI(service, status) {
function updateServiceStatusUI(status) {
var status_html = '';