Merge pull request #701 from harshanL/master

Prevented device-info API calls if the device is removed
revert-dabc3590
Chatura Dilan 8 years ago committed by GitHub
commit 5455094ab5

@ -8,7 +8,7 @@
<h1 class="page-sub-title device-id device-select"
data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}"
data-ownership="{{device.ownership}}"
data-owner="{{device.owner}}">
data-owner="{{device.owner}}" data-status="{{device.status}}">
Device {{device.name}}
{{#if device.model}}
<span class="lbl-device">

@ -23,6 +23,7 @@ var InitiateViewOption = null;
var deviceIdentifier = deviceId.data("deviceid");
var deviceType = deviceId.data("type");
var ownership = deviceId.data("ownership");
var devStatus = deviceId.data("status");
var payload = [deviceIdentifier];
var operationTable;
var serviceUrl;
@ -35,7 +36,7 @@ var InitiateViewOption = null;
serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info";
serviceUrlLocal = "/api/device-mgt/android/v1.0/admin/devices/location";
}
if (serviceUrl) {
if (serviceUrl && ("REMOVED" !== devStatus)) {
invokerUtil.post(
serviceUrl,
payload,

@ -10,7 +10,7 @@
<h1 class="page-sub-title device-id device-select"
data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}"
data-ownership="{{device.ownership}}"
data-owner="{{device.owner}}">
data-owner="{{device.owner}}" data-status="{{device.status}}">
Device {{device.name}}
{{#if device.model}}
<span class="lbl-device">

@ -23,6 +23,7 @@ var InitiateViewOption = null;
var deviceIdentifier = deviceId.data("deviceid");
var deviceType = deviceId.data("type");
var ownership = deviceId.data("ownership");
var devStatus = deviceId.data("status");
var payload = [deviceIdentifier];
var operationTable;
var serviceUrl;
@ -34,7 +35,7 @@ var InitiateViewOption = null;
serviceUrl = "/api/device-mgt/android/v1.0/admin/devices/info";
}
if (serviceUrl) {
if (serviceUrl && ("REMOVED" !== devStatus)) {
invokerUtil.post(
serviceUrl,
payload,

Loading…
Cancel
Save