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/", "appContext": "/devicemgt/",
"isCloud": false, "isCloud": false,
"isDeviceOwnerEnabled": false,
"httpsURL": "https://%iot.gateway.host%:%iot.gateway.https.port%", "httpsURL": "https://%iot.gateway.host%:%iot.gateway.https.port%",
"httpURL": "http://%iot.gateway.host%:%iot.gateway.http.port%", "httpURL": "http://%iot.gateway.host%:%iot.gateway.http.port%",
"wssURL": "https://%iot.analytics.host%:%iot.analytics.https.port%", "wssURL": "https://%iot.analytics.host%:%iot.analytics.https.port%",

@ -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}}" data-iscloud="{{isCloud}}"></span> data-tenant-id="{{@user.tenantId}}" data-iscloud="{{isCloud}}" data-isDeviceOwnerEnabled="{{isDeviceOwnerEnabled}}"></span>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">

@ -95,6 +95,8 @@ function onRequest(context) {
types["groups"] = groupModule.getGroups(); types["groups"] = groupModule.getGroups();
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
types["isCloud"] = devicemgtProps.isCloud; types["isCloud"] = devicemgtProps.isCloud;
types["isDeviceOwnerEnabled"] = devicemgtProps.isDeviceOwnerEnabled;
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({"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"); $("#device-type-policy-operations").html(content).removeClass("hidden");
$(".policy-platform").addClass("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;*/ /*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 { .label-bold {
font-weight: 400; font-weight: 400;
} }
@ -6998,3 +7004,4 @@ header.header-default {
.header .fw-user{ .header .fw-user{
color: #333 !important; color: #333 !important;
} }

Loading…
Cancel
Save