fixing operations loading spinner and other ui issues

merge-requests/7/head
Ace 8 years ago
parent 9fa4775ec6
commit 34225bd9da

@ -51,7 +51,10 @@
var operationsLogTable = "#operations-log-table";
if (update) {
operationTable = $(operationsLogTable).DataTable();
operationTable.ajax.reload(false);
$("#operations-spinner").removeClass("hidden");
operationTable.ajax.reload(function ( json ) {
$("#operations-spinner").addClass("hidden");
}, false);
return;
}
operationTable = $(operationsLogTable).datatables_extended({
@ -142,14 +145,14 @@
function (template) {
var getEffectivePolicyURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/effective-policy";
var getDeviceComplianceURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/compliance-data";
invokerUtil.get(
getEffectivePolicyURL,
// success-callback
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200 && data) {
data = JSON.parse(data);
if (jqXHR.status == 200) {
$("#policy-spinner").addClass("hidden");
if(data){
data = JSON.parse(data);
if (data["active"] == true) {
activePolicy = data;
invokerUtil.get(
@ -191,6 +194,7 @@
);
}
}
}
},
// error-callback
function () {

@ -244,6 +244,7 @@ var responsiveTextRatio = 0.2,
initComplete: function(){
var ROW_SELECTED_CLASS = 'DTTT_selected';
var table = this;
this.api().columns().every(function(){
@ -335,9 +336,11 @@ var responsiveTextRatio = 0.2,
/**
* append advance operations to list table toolbar
*/
if (table.hasClass('dataTables_toolbar')) {
$('.dataTable.list-table').closest('.dataTables_wrapper').find('.dataTablesTop .dataTables_toolbar').html(
getAdvanceToolBar()
);
}
//Sorting dropdown menu select function
$('.dataTables_wrapper .sort-list li a').click(function() {

Loading…
Cancel
Save