mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Fix for JIRA: https://wso2.org/jira/browse/EMM-1610
This commit is contained in:
parent
1cca664e96
commit
bff3b3ee12
@ -3,6 +3,7 @@
|
|||||||
{{unit "mdm.unit.device.qr-modal"}}
|
{{unit "mdm.unit.device.qr-modal"}}
|
||||||
|
|
||||||
{{#zone "content"}}
|
{{#zone "content"}}
|
||||||
|
{{#if deviceFound}}
|
||||||
{{#if isAuthorized}}
|
{{#if isAuthorized}}
|
||||||
<h1 class="page-sub-title device-id device-select" data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}">
|
<h1 class="page-sub-title device-id device-select" data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}">
|
||||||
Device {{device.name}}
|
Device {{device.name}}
|
||||||
@ -361,15 +362,25 @@
|
|||||||
<br>
|
<br>
|
||||||
You are not authorized to view specified device in the system.
|
You are not authorized to view specified device in the system.
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<h1 class="page-sub-title">
|
||||||
|
Device not found
|
||||||
|
</h1>
|
||||||
|
<br>
|
||||||
|
You have tried to access either a removed or non-existing device.
|
||||||
|
{{/if}}
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
{{#zone "bottomJs"}}
|
{{#zone "bottomJs"}}
|
||||||
{{#if isAuthorized}}
|
{{#if isAuthorized}}
|
||||||
|
<!--suppress HtmlUnknownTarget -->
|
||||||
<script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs"
|
<script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs"
|
||||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
||||||
type="text/x-handlebars-template"></script>
|
type="text/x-handlebars-template"></script>
|
||||||
|
<!--suppress HtmlUnknownTarget -->
|
||||||
<script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs"
|
<script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs"
|
||||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
||||||
type="text/x-handlebars-template"></script>
|
type="text/x-handlebars-template"></script>
|
||||||
|
<!--suppress HtmlUnknownTarget -->
|
||||||
<script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs"
|
<script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs"
|
||||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
||||||
type="text/x-handlebars-template"></script>
|
type="text/x-handlebars-template"></script>
|
||||||
|
|||||||
@ -26,6 +26,7 @@ function onRequest(context) {
|
|||||||
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
|
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
|
||||||
var response = deviceModule.viewDevice(deviceType, deviceId);
|
var response = deviceModule.viewDevice(deviceType, deviceId);
|
||||||
if (response["status"] == "success") {
|
if (response["status"] == "success") {
|
||||||
|
deviceData["deviceFound"] = true;
|
||||||
deviceData["isAuthorized"] = true;
|
deviceData["isAuthorized"] = true;
|
||||||
|
|
||||||
var device = response["content"];
|
var device = response["content"];
|
||||||
@ -98,7 +99,10 @@ function onRequest(context) {
|
|||||||
}
|
}
|
||||||
deviceData["device"] = device;
|
deviceData["device"] = device;
|
||||||
} else if (response["status"] == "unauthorized") {
|
} else if (response["status"] == "unauthorized") {
|
||||||
|
deviceData["deviceFound"] = true;
|
||||||
deviceData["isAuthorized"] = false;
|
deviceData["isAuthorized"] = false;
|
||||||
|
} else if (response["status"] == "notFound") {
|
||||||
|
deviceData["deviceFound"] = false;
|
||||||
}
|
}
|
||||||
return deviceData;
|
return deviceData;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user