From fdd1ef9ba164692b2913ce2a171a95e87c72bb74 Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Wed, 24 Oct 2018 08:42:01 +0530 Subject: [PATCH 1/2] Configure default operations loading When loading device details page, default operatios are loaded always. With this improvement, default operations will be loaded if API paths are defined in the config.json --- .../device-view.hbs | 12 ++-- .../device-view.js | 15 +++- .../public/js/device-detail.js | 68 +++++++++---------- .../device-view.hbs | 12 ++-- .../device-view.js | 11 ++- .../public/js/device-detail.js | 54 +++++++++------ 6 files changed, 101 insertions(+), 71 deletions(-) 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); + } ); + } } From 225b9a3201f4d3a0f78e05d73f65bd22b0d7270f Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Wed, 24 Oct 2018 09:58:35 +0530 Subject: [PATCH 2/2] Upgrade device mgt version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8c58e0abc6..0e21bf66f0 100644 --- a/pom.xml +++ b/pom.xml @@ -1230,7 +1230,7 @@ 1.1.1 - 3.1.47 + 3.1.48 [3.1.0, 4.0.0)