mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge pull request #677 from Kamidu/cloud-3.1.0
Device location refresh and COPE related policy filtering in Cloud 3.1.0
This commit is contained in:
commit
a66b4b21d5
@ -1,7 +1,7 @@
|
|||||||
{{#zone "content"}}
|
{{#zone "content"}}
|
||||||
{{#if isAuthorized}}
|
{{#if isAuthorized}}
|
||||||
<span id="logged-in-user" class="hidden" data-username="{{user.username}}" data-domain="{{user.domain}}"
|
<span id="logged-in-user" class="hidden" data-username="{{user.username}}" data-domain="{{user.domain}}"
|
||||||
data-tenant-id="{{user.tenantId}}"></span>
|
data-tenant-id="{{user.tenantId}}" data-iscloud="{{isCloud}}"></span>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@ -284,8 +284,8 @@
|
|||||||
<i class="icon fw fw-error"></i><span></span>
|
<i class="icon fw fw-error"></i><span></span>
|
||||||
</div>
|
</div>
|
||||||
{{#unless types}}
|
{{#unless types}}
|
||||||
<h3><i class="icon fw fw-warning"></i> No compatible device types have been installed.
|
<h3><i class="icon fw fw-warning"></i> No compatible device types have been installed.
|
||||||
Install device types to add policies.</h3>
|
Install device types to add policies.</h3>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<div class="row wr-tile-buttons-list">
|
<div class="row wr-tile-buttons-list">
|
||||||
<div class="wr-input-control">
|
<div class="wr-input-control">
|
||||||
|
|||||||
@ -50,17 +50,17 @@ function onRequest(context) {
|
|||||||
var policyOperationsTemplateSrc = policyWizardSrc + "/public/templates/" + deviceType + "-policy-operations.hbs";
|
var policyOperationsTemplateSrc = policyWizardSrc + "/public/templates/" + deviceType + "-policy-operations.hbs";
|
||||||
if (new File(policyOperationsTemplateSrc).isExists()) {
|
if (new File(policyOperationsTemplateSrc).isExists()) {
|
||||||
content["template"] = "/public/cdmf.unit.device.type." + deviceType +
|
content["template"] = "/public/cdmf.unit.device.type." + deviceType +
|
||||||
".policy-wizard/templates/" + deviceType + "-policy-operations.hbs";
|
".policy-wizard/templates/" + deviceType + "-policy-operations.hbs";
|
||||||
}
|
}
|
||||||
var policyOperationsScriptSrc = policyWizardSrc + "/public/js/" + deviceType + "-policy-operations.js";
|
var policyOperationsScriptSrc = policyWizardSrc + "/public/js/" + deviceType + "-policy-operations.js";
|
||||||
if (new File(policyOperationsScriptSrc).isExists()) {
|
if (new File(policyOperationsScriptSrc).isExists()) {
|
||||||
content["script"] = "/public/cdmf.unit.device.type." + deviceType +
|
content["script"] = "/public/cdmf.unit.device.type." + deviceType +
|
||||||
".policy-wizard/js/" + deviceType + "-policy-operations.js";;
|
".policy-wizard/js/" + deviceType + "-policy-operations.js";;
|
||||||
}
|
}
|
||||||
var policyOperationsStylesSrc = policyWizardSrc + "/public/css/" + deviceType + "-policy-operations.css";
|
var policyOperationsStylesSrc = policyWizardSrc + "/public/css/" + deviceType + "-policy-operations.css";
|
||||||
if (new File(policyOperationsStylesSrc).isExists()) {
|
if (new File(policyOperationsStylesSrc).isExists()) {
|
||||||
content["style"] = "/public/cdmf.unit.device.type." + deviceType +
|
content["style"] = "/public/cdmf.unit.device.type." + deviceType +
|
||||||
".policy-wizard/css/" + deviceType + "-policy-operations.css";;
|
".policy-wizard/css/" + deviceType + "-policy-operations.css";;
|
||||||
}
|
}
|
||||||
types["types"].push(content);
|
types["types"].push(content);
|
||||||
}
|
}
|
||||||
@ -74,6 +74,8 @@ function onRequest(context) {
|
|||||||
types["roles"] = roles["content"];
|
types["roles"] = roles["content"];
|
||||||
}
|
}
|
||||||
types["groups"] = groupModule.getGroups();
|
types["groups"] = groupModule.getGroups();
|
||||||
|
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
|
||||||
|
types["isCloud"] = devicemgtProps.isCloud;
|
||||||
|
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -146,7 +146,7 @@ stepForwardFrom["policy-platform"] = function (actionButton) {
|
|||||||
|
|
||||||
if (policyOperationsTemplateSrc) {
|
if (policyOperationsTemplateSrc) {
|
||||||
$.template(policyOperationsTemplateCacheKey, context + policyOperationsTemplateSrc, function (template) {
|
$.template(policyOperationsTemplateCacheKey, context + policyOperationsTemplateSrc, function (template) {
|
||||||
var content = template();
|
var content = template({"iscloud" : $("#logged-in-user").data("iscloud")});
|
||||||
$("#device-type-policy-operations").html(content).removeClass("hidden");
|
$("#device-type-policy-operations").html(content).removeClass("hidden");
|
||||||
$(".policy-platform").addClass("hidden");
|
$(".policy-platform").addClass("hidden");
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user