From 1148834bc4b10d00c1b1830b087357e63af8293f Mon Sep 17 00:00:00 2001 From: rb7147 Date: Thu, 1 Feb 2018 12:07:13 -0500 Subject: Included Policy GUI Enhancements and validations Added hover messages for all policy templates. Resolved few sonar issues. Added fixes for Policy GUI Validations. Issue-ID: POLICY-597 Change-Id: I74abb92dd6ac8722d7869b6a316fad1d8db11d9c Signed-off-by: rb7147 --- .../BaseConfigPolicyController.js | 8 -- .../ClosedLoopFaultController.js | 57 ++++++---- .../DCAEMicroServicePolicyController.js | 114 +++++++++++--------- .../PolicyTemplates/ActionPolicyTemplate.html | 34 +++--- .../PolicyTemplates/BRMSParamPolicyTemplate.html | 37 +++---- .../PolicyTemplates/BRMSRawPolicyTemplate.html | 33 +++--- .../Editor/PolicyTemplates/BasePolicyTemplate.html | 38 ++++--- .../ClosedLoopFaultPolicyTemplate.html | 119 ++++++++++++--------- .../ClosedLoopPMPolicyTemplate.html | 30 +++--- .../DCAEMicroServicePolicyTemplate.html | 41 ++++--- .../PolicyTemplates/DecisionPolicyTemplate.html | 55 +++++----- .../PolicyTemplates/FirewallPolicyTemplate.html | 36 ++++--- .../policyApp/policy-models/Editor/css/main.css | 47 ++++++++ .../Editor/js/controllers/policySearchManager.js | 61 ++++++----- .../Editor/templates/item-context-menu.html | 2 +- .../policy-models/Editor/templates/modals.html | 63 +++++++---- .../policy-models/Editor/templates/navbar.html | 8 +- .../Editor/templates/searchNavbar.html | 30 +++--- .../policyApp/policy-models/policy_AdminTab.html | 2 +- .../policyApp/policy-models/policy_Dictionary.html | 6 +- .../policy-models/policy_PDPManagement.html | 8 +- 21 files changed, 483 insertions(+), 346 deletions(-) (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models') diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js index 7425c92d4..02e10bddd 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js @@ -82,14 +82,6 @@ app.controller('baseConfigController', ['$scope', 'PolicyAppService', 'policyNav }, function (error) { console.log("failed"); }); - - - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } $scope.savePolicy = function(policy){ if(policy.itemContent != undefined){ diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js index 1015e7aac..ebc9001ab 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js @@ -529,64 +529,73 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol } }; - $scope.saveFaultPolicy = function(policy){ - if(policy.itemContent != undefined){ - $scope.refreshCheck = true; - $scope.policyNavigator = policy.itemContent; - policy.itemContent = ""; - } - $scope.savebutton = false; + function trapData(){ var data = {}; - var faultData = {}; if($scope.temp.policy.triggerTrapSignatures.length == 1 || $scope.temp.policy.triggerTrapSignatures["Trap1"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1 } + data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1 } } if($scope.temp.policy.triggerTrapSignatures.length == 2 || $scope.temp.policy.triggerTrapSignatures["Trap2"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2} + data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2} } if($scope.temp.policy.triggerTrapSignatures.length == 3 || $scope.temp.policy.triggerTrapSignatures["Trap3"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, + data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3} } if($scope.temp.policy.triggerTrapSignatures.length == 4 || $scope.temp.policy.triggerTrapSignatures["Trap4"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, + data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3, trap4 : $scope.temp.policy.triggerTrapSignatures.Trap4} } if($scope.temp.policy.triggerTrapSignatures.length == 5 || $scope.temp.policy.triggerTrapSignatures["Trap5"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, + data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3, trap4 : $scope.temp.policy.triggerTrapSignatures.Trap4, trap5 : $scope.temp.policy.triggerTrapSignatures.Trap5} } if($scope.temp.policy.triggerTrapSignatures.length == 6 || $scope.temp.policy.triggerTrapSignatures["Trap6"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, + data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3, trap4 : $scope.temp.policy.triggerTrapSignatures.Trap4, trap5 : $scope.temp.policy.triggerTrapSignatures.Trap5, trap6 : $scope.temp.policy.triggerTrapSignatures.Trap6} - } - + } + return data; + } + + function faultDatas(){ + var faultData = {}; if($scope.temp.policy.triggerfaultSignatures.length == 1 || $scope.temp.policy.triggerfaultSignatures["Fault1"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1 } + faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1 } } if($scope.temp.policy.triggerfaultSignatures.length == 2 || $scope.temp.policy.triggerfaultSignatures["Fault2"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2} + faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2} } if($scope.temp.policy.triggerfaultSignatures.length == 3 || $scope.temp.policy.triggerfaultSignatures["Fault3"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, + faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3} } if($scope.temp.policy.triggerTrapSignatures.length == 4 || $scope.temp.policy.triggerfaultSignatures["Fault4"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, + faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3, trap4 : $scope.temp.policy.triggerfaultSignatures.Fault4} } if($scope.temp.policy.triggerfaultSignatures.length == 5 || $scope.temp.policy.triggerfaultSignatures["Fault5"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, + faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3, trap4 : $scope.temp.policy.triggerfaultSignatures.Fault4, trap5 : $scope.temp.policy.triggerfaultSignatures.Fault5} } if($scope.temp.policy.triggerfaultSignatures.length == 6 || $scope.temp.policy.triggerfaultSignatures["Fault6"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, + faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3, trap4 : $scope.temp.policy.triggerfaultSignatures.Fault4, trap5 : $scope.temp.policy.triggerfaultSignatures.Fault5, trap6 : $scope.temp.policy.triggerfaultSignatures.Fault6} } + return faultData; + } + + $scope.saveFaultPolicy = function(policy){ + if(policy.itemContent != undefined){ + $scope.refreshCheck = true; + $scope.policyNavigator = policy.itemContent; + policy.itemContent = ""; + } + $scope.savebutton = false; + var data = trapData(); + var faultData = faultDatas(); var uuu = "policycreation/save_policy"; var postData={policyData: policy, trapData : data, @@ -627,7 +636,9 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol console.log(policy); document.getElementById("validate").innerHTML = ""; var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; + var data = trapData(); + var faultData = faultDatas(); + var postData={policyData: policy, trapData : data, faultData : faultData}; $.ajax({ type : 'POST', url : uuu, diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js index 5ae453aef..2b3b743d4 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js @@ -165,7 +165,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind $scope.choices = []; $scope.attributeDatas = [{"attributes" : $scope.choices}]; - + $scope.isInitEditTemplate = true; //just initially create the edit template, didn't click add button yet. $scope.addNewChoice = function(value) { console.log(value); if(value != undefined){ @@ -176,12 +176,23 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var div = document.getElementById(value+"@0"); if(div != null){ var clone = div.cloneNode(true); - var addElement = parentElement.childElementCount + 1; + var addElement = parentElement.childElementCount; clone.id = ''+value+'@'+addElement; clone.value = ''; - clone.className += ' child_single'; //here cloned is single element - document.getElementById("div."+value).appendChild(clone); - plainAttributeKeys.push(''+value+'@'+addElement); + if($scope.temp.policy.editPolicy || $scope.temp.policy.readOnly){ //if it's view or edit + if($scope.temp.policy.ruleData[clone.id] || ($scope.temp.policy.editPolicy && !$scope.isInitEditTemplate)){ // Only append child if its value found in ruleData or edit mode + if($scope.temp.policy.ruleData[clone.id]){ + clone.value = $scope.temp.policy.ruleData[clone.id]; + } + clone.className += ' child_single'; //here cloned is single element + document.getElementById("div."+value).appendChild(clone); + plainAttributeKeys.push(''+value+'@'+addElement); + } + }else{ //not view or edit + clone.className += ' child_single'; //here cloned is single element + document.getElementById("div."+value).appendChild(clone); + plainAttributeKeys.push(''+value+'@'+addElement); + } }else{ div = document.getElementById("div."+value+"@0"); @@ -219,6 +230,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind plainAttributeKeys.push(inputs[i].id); } } else { +// removeValues.push(inputs[i].id); plainAttributeKeys.push(inputs[i].id); } }else { @@ -320,8 +332,9 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var plainAttributeKeys = []; $scope.dcaeModelData = data[0].dcaeModelData; $scope.dcaeJsonDate = data[0].jsonValue; - $scope.allManyTrueKeys = data[0].allManyTrueKeys; - console.log("$scope.allManyTrueKeys: " + $scope.allManyTrueKeys); + if(data[0].allManyTrueKeys){ + console.log("$scope.allManyTrueKeys: " + $scope.allManyTrueKeys); + } console.log("$scope.dcaeJsonDate: " + $scope.dcaeJsonDate); var attributes = $scope.dcaeModelData.attributes; var refAttributes = $scope.dcaeModelData.ref_attributes; @@ -371,9 +384,15 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind }); - if($scope.temp.policy.editPolicy || $scope.temp.policy.readOnly){ + if($scope.temp.policy.editPolicy || $scope.temp.policy.readOnly){ // If it's veiw or edit + + if($scope.temp.policy.editPolicy){ + $scope.isInitEditTemplate = true; + } + var checkData = []; var data = []; + // If ruleData contains extra elements created by clicked add button if($scope.temp.policy.ruleData != null){ var propNames = Object.getOwnPropertyNames($scope.temp.policy.ruleData); propNames.forEach(function(name) { @@ -383,32 +402,36 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var extraElements = data; if(plainAttributeKeys != null){ - for(b = 0; b < plainAttributeKeys.length; b++){ // remove already populated elements from extraElements array + for(b = 0; b < plainAttributeKeys.length; b++){ // Remove already populated elements from data array var newValue = plainAttributeKeys[b].split("*"); for(a = 0; a < data.length; a++){ - if(data[a] === newValue[0]){ + if(data[a] === newValue[0] || data[a] === (newValue[0]+"@0")){ extraElements.splice(a, 1); } } } - //--- populate these extral elements generated from clicking add button + //--- Populate these extra elements created by clicked add button for(a = 0; a < extraElements.length; a++){ if(extraElements[a].includes("@")){ var n = extraElements[a].lastIndexOf("@"); - var key = extraElements[a].substring(0, n+2); //include @x in key also by n+2 since x can be 1, or 2, or 3 - checkData.push(key); + if(n > 0){ + var key = extraElements[a].substring(0, n+2); //include @x in key also by n+2 since x can be 1, or 2, or 3 + checkData.push(key); + } } } var unique = checkData.filter(onlyUnique); for(i =0; i < unique.length; i++){ //remove @x and let addNewChoice add @1 or @2... var newKey = unique[i].substring(0, unique[i].length-2); + console.log("newKey: " + newKey); $scope.addNewChoice(newKey); } } } - + //After initially create the edit template, reset it to false. + $scope.isInitEditTemplate = false; } var ele = angular.element(document.getElementById("DynamicTemplate")); $compile(ele.contents())($scope); @@ -517,7 +540,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind if (lableList.length > 0){ array = true; } - if ( key=="0"){ + if ( key==="0"){ var newKey = lableList.pop(); $scope.labelLayout(baseLevel, newKey, array ); if (array){ @@ -597,7 +620,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind if (list.length===0){ //not dropdown element $scope.attributeBox(attributekey, array, attirbuteLabel, defaultValue, isRequired, "text"); }else{ - $scope.dropBoxLayout(attirbuteLabel, attributekey, array, dataTest[key], list); + $scope.dropBoxLayout(attirbuteLabel, attributekey, array, dataTest[key], list, isRequired); } break; } @@ -618,9 +641,9 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var labeltext = null; var requiredLabName = ""; if (matching.includes(attibuteKey)){ - labeltext = document.createTextNode(attibuteKey + "*!"); + labeltext = document.createTextNode(attibuteKey + "*!"); + isRequired = true; //set required as true for matching element }else { - //var labeltext = document.createTextNode(refattributeLabel); if(isRequired){ requiredLabName = attibuteKey + " *"; labeltext = document.createTextNode(requiredLabName); @@ -656,7 +679,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var checkKey; if(attributeManyKey){ checkKey = labelValue + attibuteKey+'@0'; - textField.setAttribute("id" , ''+labelValue + attibuteKey+'@0'+''); + textField.setAttribute("id" , ''+labelValue + attibuteKey+'@0'+''); var divTag = document.createElement("div"); divTag.setAttribute("id", "div."+ labelValue +attibuteKey); var addButton = document.createElement("BUTTON"); @@ -679,7 +702,10 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var divTag = document.createElement("div"); divTag.setAttribute("id", id); document.getElementById(divID).appendChild(divTag); - textField.className += ' first_child'; + textField.className += ' first_child'; + if(isRequired){ + textField.setAttribute("required", "true"); + } divTag.appendChild(textField); document.getElementById(divID).appendChild(divTag); @@ -720,18 +746,6 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind if (attributeManyKey){ var newCheckKey = checkKey.replace(attibuteKey + '@0',attibuteKey); document.getElementById(newCheckKey +'@0').value = $scope.temp.policy.ruleData[newCheckKey +'@0']; - var i =1 ; - while(true){ - var newValue = $scope.temp.policy.ruleData[newCheckKey+'@'+i]; - if(newValue==null){ - break; - }else{ - $scope.addNewChoice(newCheckKey); - document.getElementById(newCheckKey+'@'+i).value = newValue; - i = i+1; - } - } - }else{ document.getElementById(checkKey).value = $scope.temp.policy.ruleData[checkKey]; } @@ -807,24 +821,24 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var label = document.createElement("Label") + + var refAttributes = $scope.dcaeModelData.ref_attributes; + if(isRequired != true && refAttributes){ //check refAttributes also + var refAttributesList = refAttributes.split(splitComma); + for (k = 0; k < refAttributesList.length; k++){ + var refAttribute = refAttributesList[k].split(splitEqual); + if (attributeName == refAttribute[0].trim() && refAttribute[1].includes("required-true")){ + isRequired = true; + } + } + } + if (matching.includes(attributeName)){ var labeltext = document.createTextNode(attributeName + "*!"); label.appendChild(labeltext); + isRequired = true; //set required as true for matching element }else { - var labeltext = document.createTextNode(attributeName); - var isRequired = false; - var refAttributes = $scope.dcaeModelData.ref_attributes; - if(refAttributes){ - var refAttributesList = refAttributes.split(splitComma); - for (k = 0; k < refAttributesList.length; k++){ - var refAttribute = refAttributesList[k].split(splitEqual); - - if (attributeName == refAttribute[0].trim() && refAttribute[1].includes("required-true")){ - isRequired = true; - } - } - } - + var labeltext = document.createTextNode(attributeName); if(isRequired){ requiredLabName = attributeName+ " *"; labeltext = document.createTextNode(requiredLabName); @@ -844,9 +858,11 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind if(isRequired){ listField.setAttribute("required", true); } - var optionFirst = document.createElement('option'); - optionFirst.setAttribute('value', ""); - listField.appendChild(optionFirst); + if( many != true || isRequired != true){ // add an empty option for not required or not multiple select element + var optionFirst = document.createElement('option'); + optionFirst.setAttribute('value', ""); + listField.appendChild(optionFirst); + } for (i=0; i < listemunerateValues.length; i += 1) { option = document.createElement('option'); diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html index 313015d8e..3aa0508d5 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html @@ -7,12 +7,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _." />
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data."/>
@@ -20,7 +21,7 @@

@@ -31,18 +32,19 @@
+ placeholder="Attribute Value" title="Enter the Attribute Value without any spaces and special characters"/>
@@ -56,7 +58,7 @@
@@ -75,7 +77,7 @@ ng-disabled="temp.policy.readOnly" ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1" ng-options="option for option in attributeDictionaryDatas track by option" - name="dynamicRuleAlgorithmField1"> + name="dynamicRuleAlgorithmField1" title="Select the dropdown value driven from Attribute (common)Dictionary.">
@@ -84,7 +86,7 @@ ng-disabled="temp.policy.readOnly" ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo" ng-options="option for option in functionDefinitionDatas" - name="dynamicRuleAlgorithmCombo"> + name="dynamicRuleAlgorithmCombo" title="Select the dropdown value driven from FunctionDataType."> @@ -92,12 +94,12 @@ + name="dynamicRuleAlgorithmField2" title="Enter the Value without any spaces and special characters and for rule formation use A1, A2,..etc., based on above Rules."/>
@@ -110,7 +112,7 @@

@@ -120,7 +122,7 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.actionAttributeValue" - ng-options="option for option in actionPolicyDictionaryDatas track by option"> + ng-options="option for option in actionPolicyDictionaryDatas track by option" title="Select the dropdown value driven from Action (Action)Dictionary.">
@@ -129,11 +131,11 @@ diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html index d941c2404..24994d3da 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html @@ -8,12 +8,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _." />
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data."/>
@@ -22,13 +23,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.riskType" ng-options="option for option in riskTypeDictionaryDatas track by option" - required pattern="\S+" title="RiskType is required"> + required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary.">
+ required pattern="\S+" title="Select the dropdown Guard value.">
@@ -48,19 +49,19 @@
+ ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
+ ng-options="option for option in brmsControllerDatas track by option" title="Select the dropdown value driven from BRMS Controller (BRMS)Dictionary.">
+ ng-options="option for option in brmsDependencyDatas track by option" title="Select the dropdown value driven from BRMS Dependency (BRMS)Dictionary.">
@@ -69,7 +70,7 @@
@@ -79,17 +80,17 @@
@@ -104,7 +105,7 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.ruleName" ng-options="option for option in brmsParamDictionaryDatas track by option" - ng-click="addDataToFields(temp.policy.ruleName);"> + ng-click="addDataToFields(temp.policy.ruleName);" title="Select the dropdown value driven from BRMSParamTemplate (BRMS)Dictionary">
@@ -129,7 +130,7 @@

Rule Preview:


- +
@@ -137,14 +138,14 @@
+ ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate - + ng-click="saveBrmsParamPolicy(temp);" title="Save the Policy with validated data.">Save +
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html index 8751768c0..bb94f33c5 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html @@ -7,12 +7,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _." />
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data."/>
@@ -21,13 +22,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.riskType" ng-options="option for option in riskTypeDictionaryDatas track by option" - required pattern="\S+" title="RiskType is required"> + required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary.">
+ required pattern="\S+" title="Select the dropdown Guard value.">
@@ -47,19 +48,19 @@
+ ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
+ ng-options="option for option in brmsControllerDatas track by option" title="Select the dropdown value driven from BRMS Controller (BRMS)Dictionary.">
+ ng-options="option for option in brmsDependencyDatas track by option" title="Select the dropdown value driven from BRMS Dependency (BRMS)Dictionary.">
@@ -68,7 +69,7 @@
@@ -78,17 +79,17 @@
@@ -101,7 +102,7 @@
@@ -112,11 +113,11 @@
+ ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate - + ng-click="saveBrmsRawPolicy(temp);" title="Save the Policy with validated data.">Save +
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html index c81a98d9b..682abaada 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html @@ -7,12 +7,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _." />
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data." />
@@ -21,18 +22,20 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.onapName" ng-options="option for option in onapNameDictionaryDatas track by option" - required pattern="\S+" title="OnapName is required"> + required pattern="\S+" + title="Select the dropdown value driven from OnapName (common)Dictionary.">
+ title="Enter the Config Name without any spaces and special characters." />
+ ng-model="temp.policy.ttlDate" + title="Select the date from calender onclick on the field."/>
@@ -42,13 +45,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.riskType" ng-options="option for option in riskTypeDictionaryDatas track by option" - required pattern="\S+" title="RiskType is required"> + required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary.">
+ required pattern="\S+" title="Select the dropdown Guard value.">
@@ -70,7 +73,7 @@
@@ -81,18 +84,19 @@
+ ng-options="option for option in attributeDictionaryDatas track by option" + title="Select the dropdown value driven from Attribute (common)Dictionary.">
+ title="Enter the Attribute Value without any spaces and special characters" />
@@ -106,7 +110,7 @@ + required title="Enter the ConfigBody based on ConfigType Selection"> @@ -129,10 +133,10 @@ diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html index 0912ac2eb..d3700c94b 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html @@ -7,12 +7,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _." />
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data."/>
@@ -21,13 +22,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.riskType" ng-options="option for option in riskTypeDictionaryDatas track by option" - required pattern="\S+" title="RiskType is required"> + required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary.">
+ required pattern="\S+" title="Select the dropdown Guard value.">
@@ -47,7 +48,7 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.onapName" ng-options="option for option in onapNameDictionaryDatas track by option" - required pattern="\S+" title="OnapName is required"> + required pattern="\S+" title="Select the dropdown value driven from OnapName (common)Dictionary.">
@@ -55,7 +56,8 @@
@@ -63,7 +65,8 @@ @@ -84,7 +87,7 @@
+ ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
@@ -95,12 +98,14 @@
@@ -112,12 +117,14 @@
@@ -138,7 +145,8 @@ @@ -152,7 +160,8 @@ @@ -170,7 +179,7 @@
@@ -189,7 +198,8 @@
@@ -206,7 +216,8 @@
@@ -218,7 +229,7 @@
@@ -228,16 +239,15 @@
-
-
Trap Max Age:
+ ng-init="temp.policy.jsonBodyData.trapMaxAge='300'" value="300" title="Enter the Trap Max Age value and the value should be numeric."/>
@@ -248,7 +258,8 @@
@@ -256,25 +267,25 @@
+ class="form-control" required title="Enter the Time Interval value and the value should be numeric."/>

+ class="form-control" required title="Enter the App-C Timeout value and the value should be numeric."/>

+ class="form-control" required title="Enter the Timeout for Ruby value and the value should be numeric."/>

+ required title="Enter the Number of retries value and the value should be numeric."/>
@@ -282,20 +293,20 @@
+ class="form-control" required title="Enter the Aging Window value and the value should be numeric."/>

+ required title="Enter the UEB Message value."/>

+ class="form-control" required title="Enter the email address for multiple use comma seperated value."/>
@@ -307,7 +318,8 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.jsonBodyData.pepName" ng-options="option for option in pepOptionsDictionaryDatas track by option" - ng-change="getPepActionValues(temp.policy.jsonBodyData.pepName)"> + ng-change="getPepActionValues(temp.policy.jsonBodyData.pepName)" + title="Select the dropdown value driven from PEP Options (ClosedLoop)Dictionary."> @@ -315,7 +327,8 @@
@@ -329,12 +342,14 @@
@@ -346,12 +361,14 @@ @@ -372,7 +389,8 @@ @@ -386,7 +404,8 @@ @@ -403,7 +422,7 @@
@@ -422,7 +441,8 @@
@@ -439,7 +459,8 @@
@@ -451,7 +472,7 @@
@@ -461,11 +482,11 @@
-
Clear TimeOut:
+ class="form-control" required title="Enter the Cleartimeout value and the value should be numeric."/>
@@ -493,11 +514,11 @@ \ No newline at end of file diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html index 4e7cad3fd..b743224fb 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html @@ -7,12 +7,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _."/>
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data."/>
@@ -21,18 +22,18 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.onapName" ng-options="option for option in onapNameDictionaryDatas track by option" - required pattern="\S+" title="OnapName is required"> + required pattern="\S+" title="Select the dropdown value driven from OnapName (common)Dictionary.">
+ ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
@@ -41,7 +42,7 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.riskType" ng-options="option for option in riskTypeDictionaryDatas track by option" - required pattern="\S+" title="RiskType is required"> + required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary.">
@@ -49,7 +50,7 @@ + ng-click="addDataToFields(temp.policy.serviceTypePolicyName);" + title="Select the Service Type PolicyName from dropdown value.">
@@ -125,7 +127,8 @@
+ ng-model="temp.policy.jsonBodyData.geoLink" + title="Enter the UEB Message value."/>
@@ -133,7 +136,8 @@
+ ng-model="temp.policy.jsonBodyData.emailAddress" + title="Enter the email address and for multiple use comma seperated value."/>
@@ -144,11 +148,11 @@
+ ng-click="validatePolicy(temp.policy);" title="Validate the data entered in the Policy fields.">Validate - + ng-click="saveCLPMPolicy(temp);" title="Save the Policy with validated data.">Save +
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html index 11472b96a..9ce936e4e 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html @@ -7,12 +7,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _." />
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data."/>
@@ -21,18 +22,18 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.onapName" ng-options="option for option in onapNameDictionaryDatas track by option" - required pattern="\S+" title="OnapName is required"> + required pattern="\S+" title="Select the dropdown value driven from OnapName (common)Dictionary.">
+ ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
@@ -41,7 +42,7 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.riskType" ng-options="option for option in riskTypeDictionaryDatas track by option" - required pattern="\S+" title="RiskType is required"> + required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary.">
@@ -49,7 +50,7 @@ + ng-options="option for option in priorityDatas track by option" title="Select the dropdown Priority value.">
@@ -70,7 +71,8 @@ ng-model="temp.policy.serviceType" ng-options="option for option in microServiceModelsDictionaryDatas track by option" ng-init="pullVersion(temp.policy.serviceType);" - ng-click="pullVersion(temp.policy.serviceType);"> + ng-click="pullVersion(temp.policy.serviceType);" + title="Select the dropdown value driven from MicroService Models (MicroService Policy)Dictionary.">
+ ng-click="addDataToFields(temp.policy.serviceType, temp.policy.version);" + title="Select the dropdown value driven based on MicroService Models (MicroService Policy)Dictionary selection.">
@@ -93,26 +96,30 @@ class="form-control" class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.configName" - ng-options="option for option in microServiceCongigNameDictionaryDatas track by option" required="true"> + ng-options="option for option in microServiceCongigNameDictionaryDatas track by option" required="true" + title="Select the dropdown value driven from MicroService ConfigName (MicroService Policy)Dictionary.">

+ ng-options="option for option in microServiceLocationDictionaryDatas track by option" required="true" + title="Select the dropdown value driven from MicroService Location (MicroService Policy)Dictionary.">

+ ng-options="option for option in dcaeUUIDDictionaryDatas track by option" required="true" + title="Select the dropdown value driven from DCAE UUID (MicroService Policy)Dictionary.">

+ ng-options="option for option in groupPolicyScopeListDatas track by option" required="true" + title="Select the dropdown value driven from Group Policy Scope (Policy Scope)Dictionary.">
@@ -122,11 +129,11 @@ diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html index 60f3e6dc1..95bf68964 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html @@ -7,12 +7,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _." />
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data."/>
@@ -21,7 +22,7 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.onapName" ng-options="option for option in onapNameDictionaryDatas track by option" - required pattern="\S+" title="OnapName is required"> + required pattern="\S+" title="Select the dropdown value driven from OnapName (common)Dictionary.">
+ placeholder="Service Type" title="Enter Service Type value."/>
@@ -56,7 +57,7 @@
+ placeholder="VNF Type" title="Enter VNF Type value."/>
@@ -66,7 +67,7 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.rainyday.bbid" ng-options="option for option in rainyDayDictionaryDatas track by option" - ng-change="getWorkstepValues(temp.policy.rainyday.bbid)"> + ng-change="getWorkstepValues(temp.policy.rainyday.bbid)" title="Select the dropdown value driven from Rainday Allowed Treatments (Decision)Dictionary.">
@@ -289,7 +290,7 @@
+ placeholder="Limit" title="Enter time limit value."/>
@@ -299,11 +300,11 @@
+ placeholder="Time Window" title="Enter time window value."/>
@@ -329,7 +330,7 @@
@@ -344,7 +345,7 @@

@@ -355,18 +356,18 @@
+ placeholder="Attribute Value" title="Enter the Attribute Value without any spaces and special characters"/>
@@ -383,7 +384,7 @@
@@ -394,19 +395,19 @@
+ ng-model="settingschoice.value" placeholder="Settings Value" title="Enter the Settings Attribute Value without any spaces and special characters"/>
@@ -423,7 +424,7 @@
@@ -442,7 +443,7 @@ ng-disabled="temp.policy.readOnly" ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1" ng-options="option for option in attributeDictionaryDatas track by option" - name="dynamicRuleAlgorithmField1"> + name="dynamicRuleAlgorithmField1" title="Select the dropdown value driven from Attribute (common)Dictionary or Settings (Decision)Dictionary."> @@ -451,18 +452,18 @@ ng-disabled="temp.policy.readOnly" ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo" ng-options="option for option in functionDefinitionDatas track by option" - name="dynamicRuleAlgorithmCombo"> + name="dynamicRuleAlgorithmCombo" title="Select the dropdown value driven from FunctionDataType.">
+ name="dynamicRuleAlgorithmField2" title="Enter the Value without any spaces and special characters and for rule formation use A1, A2,..etc., based on above Rules."/>
@@ -477,11 +478,11 @@ \ No newline at end of file diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html index 7f6a36b39..af1bea1d6 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html @@ -7,12 +7,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-readonly="temp.policy.editPolicy" ng-model="temp.policy.policyName" required pattern="\S+" - title="Enter the Policy Name without any spaces" /> + title="Enter Policy Name without any spaces and special characters and will accept _." />
+ ng-model="temp.policy.policyDescription" + title="Description field will accept any type of data."/>
@@ -21,13 +22,13 @@ class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.riskType" ng-options="option for option in riskTypeDictionaryDatas track by option" - required pattern="\S+" title="RiskType is required"> + required pattern="\S+" title="Select the dropdown value driven from RiskType (Safe Policy)Dictionary.">
+ required pattern="\S+" title="Select the dropdown Guard value.">
@@ -47,18 +48,19 @@
+ ng-model="temp.policy.configName" required title="Enter the Config Name without any spaces and special characters." />
+ ng-model="temp.policy.ttlDate" title="Select the date from calender onclick on the field."/>
+ ng-options="option for option in securityZoneDictionaryDatas track by option" + title="Select the dropdown value driven from Security Zone (Firewall Policy)Dictionary.">
@@ -67,7 +69,7 @@

@@ -78,19 +80,21 @@
@@ -103,15 +107,15 @@
\ No newline at end of file diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/main.css b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/main.css index 317efd9fa..078e8297a 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/main.css +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/main.css @@ -373,4 +373,51 @@ table th > a:focus { .table.table-files .btn { display: none; } +} + +/* Tooltip container */ +.tooltip { + position: relative; + display: inline-block; + border-bottom: 1px dotted black; /* If you want dots under the hoverable text */ +} + +/* Tooltip text */ +.tooltip .tooltiptext { + visibility: hidden; + width: 120px; + background-color: #555; + color: #fff; + text-align: center; + padding: 5px 0; + border-radius: 6px; + + /* Position the tooltip text */ + position: absolute; + z-index: 1; + bottom: 125%; + left: 50%; + margin-left: -60px; + + /* Fade in tooltip */ + opacity: 0; + transition: opacity 1s; +} + +/* Tooltip arrow */ +.tooltip .tooltiptext::after { + content: ""; + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; +} + +/* Show the tooltip text when you mouse over the tooltip container */ +.tooltip:hover .tooltiptext { + visibility: visible; + opacity: 1; } \ No newline at end of file diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js index f973a236a..42e6796cd 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policySearchManager.js @@ -157,35 +157,38 @@ app.controller('PolicySearchController', [ return currentPath.indexOf(path) !== -1; }; - $scope.searchPolicy = function(searchContent){ - var deferred = $q.defer(); - var uuu = "searchPolicy"; - var postData = {searchdata : searchContent}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - var searchdata = data.result; - if(searchdata.length > 0){ - if(searchdata[0] == "Elastic Search Server is down"){ - alert("Elastic Search Server is down."); - }else{ - $scope.policyNavigator.searchrefresh(searchdata); - } - }else{ - Notification.info("No Matches Found with your Search"); - } - }); - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; + $scope.searchPolicy = function(searchContent){ + if(searchContent != undefined){ + var uuu = "searchPolicy"; + var postData = {searchdata : searchContent}; + $.ajax({ + type : 'POST', + url : uuu, + dataType: 'json', + contentType: 'application/json', + data: JSON.stringify(postData), + success : function(data){ + $scope.$apply(function(){ + var searchdata = data.result; + if(searchdata.length > 0){ + if(searchdata[0] == "Exception"){ + Notification.error(searchdata[1]); + }else{ + $scope.policyNavigator.searchrefresh(searchdata); + } + }else{ + Notification.info("No Matches Found with your Search"); + } + }); + }, + error : function(data){ + Notification.error("Error while Searching."); + } + }); + }else{ + Notification.error("No data has been entered or selected to search"); + } + }; $scope.refresh = function(searchData){ $scope.policyNavigator.searchrefresh(null); diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-context-menu.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-context-menu.html index 3c41fbc1d..732b99baa 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-context-menu.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-context-menu.html @@ -27,7 +27,7 @@
  • - + Move Scope
  • diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/modals.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/modals.html index 1c33839f2..e50802090 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/modals.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/modals.html @@ -13,8 +13,8 @@
    @@ -42,8 +42,8 @@
    @@ -62,7 +62,7 @@ @@ -119,6 +119,29 @@ + + @@ -183,12 +206,12 @@ @@ -207,12 +230,12 @@ @@ -236,8 +259,8 @@