Merge pull request #1140 from Kamidu/master

Enaled policy description on effective policy view
revert-70aa11f8
Madawa Soysa 7 years ago committed by GitHub
commit e4645fb76d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -83,13 +83,11 @@ var displayPolicy = function (policyPayloadObj) {
var policyOperationsTemplateCacheKey = deviceType + '-policy-operations'; var policyOperationsTemplateCacheKey = deviceType + '-policy-operations';
$.isResourceExists(policyOperationsTemplateSrc, function (status) { $.isResourceExists(policyOperationsTemplateSrc, function (status) {
if (status) {
$.template(policyOperationsTemplateCacheKey, policyOperationsTemplateSrc, function (template) { $.template(policyOperationsTemplateCacheKey, policyOperationsTemplateSrc, function (template) {
var content = template(); var content = template();
$("#device-type-policy-operations").html(content).removeClass("hidden"); $("#device-type-policy-operations").html(content).removeClass("hidden");
$(".policy-platform").addClass("hidden"); $(".policy-platform").addClass("hidden");
$.isResourceExists(policyOperationsScriptSrc, function (status) { $.isResourceExists(policyOperationsScriptSrc, function (status) {
if (status) {
var script = document.createElement('script'); var script = document.createElement('script');
script.type = 'text/javascript'; script.type = 'text/javascript';
script.src = policyOperationsScriptSrc; script.src = policyOperationsScriptSrc;
@ -99,22 +97,17 @@ var displayPolicy = function (policyPayloadObj) {
populate the policy profile in the plugin specific UI. populate the policy profile in the plugin specific UI.
*/ */
polulateProfileOperations(policyPayloadObj["profile"]["profileFeaturesList"]); polulateProfileOperations(policyPayloadObj["profile"]["profileFeaturesList"]);
}
}); });
}); });
$.isResourceExists(policyOperationsStylesSrc, function (status) { $.isResourceExists(policyOperationsStylesSrc, function (status) {
if (status) {
var style = document.createElement('link'); var style = document.createElement('link');
style.type = 'text/css'; style.type = 'text/css';
style.rel = 'stylesheet'; style.rel = 'stylesheet';
style.href = policyOperationsStylesSrc; style.href = policyOperationsStylesSrc;
$(".wr-advance-operations").prepend(style); $(".wr-advance-operations").prepend(style);
}
}); });
} else {
$("#generic-policy-operations").removeClass("hidden");
}
$(".wr-advance-operations-init").addClass("hidden"); $(".wr-advance-operations-init").addClass("hidden");
}); });
}; };

Loading…
Cancel
Save