mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
fixing operations loading spinner and other ui issues
This commit is contained in:
parent
9fa4775ec6
commit
34225bd9da
@ -51,7 +51,10 @@
|
|||||||
var operationsLogTable = "#operations-log-table";
|
var operationsLogTable = "#operations-log-table";
|
||||||
if (update) {
|
if (update) {
|
||||||
operationTable = $(operationsLogTable).DataTable();
|
operationTable = $(operationsLogTable).DataTable();
|
||||||
operationTable.ajax.reload(false);
|
$("#operations-spinner").removeClass("hidden");
|
||||||
|
operationTable.ajax.reload(function ( json ) {
|
||||||
|
$("#operations-spinner").addClass("hidden");
|
||||||
|
}, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
operationTable = $(operationsLogTable).datatables_extended({
|
operationTable = $(operationsLogTable).datatables_extended({
|
||||||
@ -142,14 +145,14 @@
|
|||||||
function (template) {
|
function (template) {
|
||||||
var getEffectivePolicyURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/effective-policy";
|
var getEffectivePolicyURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/effective-policy";
|
||||||
var getDeviceComplianceURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/compliance-data";
|
var getDeviceComplianceURL = "/api/device-mgt/v1.0/devices/" + deviceType + "/" + deviceId + "/compliance-data";
|
||||||
|
|
||||||
invokerUtil.get(
|
invokerUtil.get(
|
||||||
getEffectivePolicyURL,
|
getEffectivePolicyURL,
|
||||||
// success-callback
|
// success-callback
|
||||||
function (data, textStatus, jqXHR) {
|
function (data, textStatus, jqXHR) {
|
||||||
if (jqXHR.status == 200 && data) {
|
if (jqXHR.status == 200) {
|
||||||
data = JSON.parse(data);
|
|
||||||
$("#policy-spinner").addClass("hidden");
|
$("#policy-spinner").addClass("hidden");
|
||||||
|
if(data){
|
||||||
|
data = JSON.parse(data);
|
||||||
if (data["active"] == true) {
|
if (data["active"] == true) {
|
||||||
activePolicy = data;
|
activePolicy = data;
|
||||||
invokerUtil.get(
|
invokerUtil.get(
|
||||||
@ -191,6 +194,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// error-callback
|
// error-callback
|
||||||
function () {
|
function () {
|
||||||
|
|||||||
@ -244,6 +244,7 @@ var responsiveTextRatio = 0.2,
|
|||||||
initComplete: function(){
|
initComplete: function(){
|
||||||
|
|
||||||
var ROW_SELECTED_CLASS = 'DTTT_selected';
|
var ROW_SELECTED_CLASS = 'DTTT_selected';
|
||||||
|
var table = this;
|
||||||
|
|
||||||
this.api().columns().every(function(){
|
this.api().columns().every(function(){
|
||||||
|
|
||||||
@ -335,9 +336,11 @@ var responsiveTextRatio = 0.2,
|
|||||||
/**
|
/**
|
||||||
* append advance operations to list table toolbar
|
* append advance operations to list table toolbar
|
||||||
*/
|
*/
|
||||||
|
if (table.hasClass('dataTables_toolbar')) {
|
||||||
$('.dataTable.list-table').closest('.dataTables_wrapper').find('.dataTablesTop .dataTables_toolbar').html(
|
$('.dataTable.list-table').closest('.dataTables_wrapper').find('.dataTablesTop .dataTables_toolbar').html(
|
||||||
getAdvanceToolBar()
|
getAdvanceToolBar()
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//Sorting dropdown menu select function
|
//Sorting dropdown menu select function
|
||||||
$('.dataTables_wrapper .sort-list li a').click(function() {
|
$('.dataTables_wrapper .sort-list li a').click(function() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user