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" <h1 class="page-sub-title device-id device-select"
data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}" data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}"
data-ownership="{{device.ownership}}" data-ownership="{{device.ownership}}"
data-owner="{{device.owner}}"> data-owner="{{device.owner}}" data-status="{{device.status}}">
Device {{device.name}} Device {{device.name}}
{{#if device.model}} {{#if device.model}}
<span class="lbl-device"> <span class="lbl-device">

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

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

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

Loading…
Cancel
Save