diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index a1f1a38629..c0424ebd4f 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -12,11 +12,13 @@ {{#zone "device-details-header"}}

+ data-deviceid="{{device.deviceIdentifier}}" + data-type="{{device.type}}" + data-ownership="{{device.ownership}}" + data-owner="{{device.owner}}" + data-status="{{device.status}}" + data-deviceinfoservice="{{device.deviceInfoServiceAPI}}" + data-devicelocationservice="{{device.deviceLocationServiceAPI}}"> {{device.owner}}'s {{device.name}}

Device data may not have been updated. Please refresh to try again.

"; - $(".panel-body").append(defaultInnerHTML); - } + deviceInfoServiceAPI, + payload, + // success-callback + function () { + $(".panel-body").show(); + }, + // error-callback + function () { + var defaultInnerHTML = + "

Device data may not have been updated. Please refresh to try again.

"; + $(".panel-body").append(defaultInnerHTML); + } ); + } + if (deviceLocationServiceAPI) { invokerUtil.post( - serviceUrlLocal, - payload, - // success-callback - function () { - $(".panel-body").show(); - }, - // error-callback - function () { - var defaultInnerHTML = - "

Device data may not have been updated. Please refresh to try again.

"; - $(".panel-body").append(defaultInnerHTML); - } + deviceLocationServiceAPI, + payload, + // success-callback + function () { + $(".panel-body").show(); + }, + // error-callback + function () { + var defaultInnerHTML = + "

Device data may not have been updated. Please refresh to try again.

"; + $(".panel-body").append(defaultInnerHTML); + } ); - + } } $(".media.tab-responsive [data-toggle=tab]").on("shown.bs.tab", function (e) { diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs index c292e3e7db..76ca1ccfda 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.device-view/device-view.hbs @@ -11,11 +11,13 @@ {{#zone "device-details-header"}}

+ data-deviceid="{{device.deviceIdentifier}}" + data-type="{{device.type}}" + data-ownership="{{device.ownership}}" + data-owner="{{device.owner}}" + data-status="{{device.status}}" + data-deviceinfoservice="{{device.deviceInfoServiceAPI}}" + data-devicelocationservice="{{device.deviceLocationServiceAPI}}"> {{device.owner}}'s {{device.name}}

Device data may not have been updated. Please refresh to try again.

"; - $(".panel-body").append(defaultInnerHTML); - } + deviceInfoServiceAPI, + payload, + // success-callback + function () { + $(".panel-body").show(); + }, + // error-callback + function () { + var defaultInnerHTML = + "

Device data may not have been updated. Please refresh to try again.

"; + $(".panel-body").append(defaultInnerHTML); + } + ); + } + if (deviceLocationServiceAPI) { + invokerUtil.post( + deviceLocationServiceAPI, + payload, + // success-callback + function () { + $(".panel-body").show(); + }, + // error-callback + function () { + var defaultInnerHTML = + "

Device data may not have been updated. Please refresh to try again.

"; + $(".panel-body").append(defaultInnerHTML); + } ); + } }