Merge pull request #839 from Kamidu/master

UI enhancement : policy creation
revert-70aa11f8
Madhawa Perera 7 years ago committed by GitHub
commit 55e3cf56c2

@ -1,6 +1,7 @@
{
"appContext": "/devicemgt/",
"isCloud": false,
"isDeviceOwnerEnabled": false,
"httpsURL": "https://%iot.gateway.host%:%iot.gateway.https.port%",
"httpURL": "http://%iot.gateway.host%:%iot.gateway.http.port%",
"wssURL": "https://%iot.analytics.host%:%iot.analytics.https.port%",

@ -1,7 +1,7 @@
{{#zone "content"}}
{{#if isAuthorized}}
<span id="logged-in-user" class="hidden" data-username="{{@user.username}}" data-domain="{{@user.domain}}"
data-tenant-id="{{@user.tenantId}}" data-iscloud="{{isCloud}}"></span>
data-tenant-id="{{@user.tenantId}}" data-iscloud="{{isCloud}}" data-isDeviceOwnerEnabled="{{isDeviceOwnerEnabled}}"></span>
<div class="row">
<div class="col-md-12">

@ -88,13 +88,15 @@ function onRequest(context) {
}
}
var roles = userModule.getRoles();
if (roles["status"] == "success") {
types["roles"] = roles["content"];
}
types["groups"] = groupModule.getGroups();
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
types["isCloud"] = devicemgtProps.isCloud;
var roles = userModule.getRoles();
if (roles["status"] == "success") {
types["roles"] = roles["content"];
}
types["groups"] = groupModule.getGroups();
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
types["isCloud"] = devicemgtProps.isCloud;
types["isDeviceOwnerEnabled"] = devicemgtProps.isDeviceOwnerEnabled;
return types;
}

@ -146,7 +146,7 @@ stepForwardFrom["policy-platform"] = function (actionButton) {
if (policyOperationsTemplateSrc) {
$.template(policyOperationsTemplateCacheKey, context + policyOperationsTemplateSrc, function (template) {
var content = template({"iscloud" : $("#logged-in-user").data("iscloud")});
var content = template({"iscloud" : $("#logged-in-user").data("iscloud"), "isDeviceOwnerEnabled" : $("#logged-in-user").data("isdeviceownerenabled")});
$("#device-type-policy-operations").html(content).removeClass("hidden");
$(".policy-platform").addClass("hidden");
});

@ -6888,6 +6888,12 @@ select > option:hover {
/*background:url('http://cdn-sg1.pgimgs.com/images/pg/close-button.png') no-repeat center center;*/
}
.device-owner-operations {
pointer-events: none;
opacity: 0.5;
background: #b6b4bb;
}
.label-bold {
font-weight: 400;
}
@ -6998,3 +7004,4 @@ header.header-default {
.header .fw-user{
color: #333 !important;
}

Loading…
Cancel
Save