mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge pull request #588 from Kamidu/cloud-3.1.0
adding location operation to device view page
This commit is contained in:
commit
dfc348f043
@ -26,12 +26,14 @@ var InitiateViewOption = null;
|
|||||||
var payload = [deviceIdentifier];
|
var payload = [deviceIdentifier];
|
||||||
var operationTable;
|
var operationTable;
|
||||||
var serviceUrl;
|
var serviceUrl;
|
||||||
|
var serviceUrlLocal = "/api/device-mgt/android/v1.0/admin/devices/location";
|
||||||
|
|
||||||
if (deviceType == "ios") {
|
if (deviceType == "ios") {
|
||||||
serviceUrl = "/ios/operation/deviceinfo";
|
serviceUrl = "/ios/operation/deviceinfo";
|
||||||
} else if (deviceType == "android") {
|
} else if (deviceType == "android") {
|
||||||
//var serviceUrl = "/mdm-android-agent/operation/device-info";
|
//var serviceUrl = "/mdm-android-agent/operation/device-info";
|
||||||
serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info";
|
serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info";
|
||||||
|
serviceUrlLocal = "/api/device-mgt/android/v1.0/admin/devices/location";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (serviceUrl) {
|
if (serviceUrl) {
|
||||||
@ -49,6 +51,23 @@ var InitiateViewOption = null;
|
|||||||
$(".panel-body").append(defaultInnerHTML);
|
$(".panel-body").append(defaultInnerHTML);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
invokerUtil.post(
|
||||||
|
serviceUrlLocal,
|
||||||
|
payload,
|
||||||
|
// success-callback
|
||||||
|
function () {
|
||||||
|
$(".panel-body").show();
|
||||||
|
},
|
||||||
|
// error-callback
|
||||||
|
function () {
|
||||||
|
var defaultInnerHTML =
|
||||||
|
"<br><p class='fw-warning'>Device data may not have been updated. Please refresh to try again.<p>";
|
||||||
|
$(".panel-body").append(defaultInnerHTML);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user