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"}}
|
||||
|
||||
{{#zone "content"}}
|
||||
{{#if deviceFound}}
|
||||
{{#if isAuthorized}}
|
||||
<h1 class="page-sub-title device-id device-select" data-deviceid="{{device.deviceIdentifier}}" data-type="{{device.type}}">
|
||||
Device {{device.name}}
|
||||
@ -361,15 +362,25 @@
|
||||
<br>
|
||||
You are not authorized to view specified device in the system.
|
||||
{{/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 "bottomJs"}}
|
||||
{{#if isAuthorized}}
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script id="policy-view" src="{{@unit.publicUri}}/templates/policy-compliance.hbs"
|
||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
||||
type="text/x-handlebars-template"></script>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script id="applications-list" src="{{@unit.publicUri}}/templates/applications-list.hbs"
|
||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
||||
type="text/x-handlebars-template"></script>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<script id="operations-log" src="{{@unit.publicUri}}/templates/operations-log.hbs"
|
||||
data-device-id="{{device.deviceIdentifier}}" data-device-type="{{device.type}}"
|
||||
type="text/x-handlebars-template"></script>
|
||||
|
||||
@ -26,6 +26,7 @@ function onRequest(context) {
|
||||
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
|
||||
var response = deviceModule.viewDevice(deviceType, deviceId);
|
||||
if (response["status"] == "success") {
|
||||
deviceData["deviceFound"] = true;
|
||||
deviceData["isAuthorized"] = true;
|
||||
|
||||
var device = response["content"];
|
||||
@ -98,7 +99,10 @@ function onRequest(context) {
|
||||
}
|
||||
deviceData["device"] = device;
|
||||
} else if (response["status"] == "unauthorized") {
|
||||
deviceData["deviceFound"] = true;
|
||||
deviceData["isAuthorized"] = false;
|
||||
} else if (response["status"] == "notFound") {
|
||||
deviceData["deviceFound"] = false;
|
||||
}
|
||||
return deviceData;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user