From 87c95be02a8a4d77e165dede90777e811b59dcae Mon Sep 17 00:00:00 2001 From: Ravindra Bakkamanthala Date: Tue, 23 May 2017 14:56:12 -0400 Subject: Commit includes ControlLoopPolicy API and bugfixes Change-Id: I3e18bb8b4c31a0d908bb0cff4c85e2a3fb450a63 Signed-off-by: Ravindra Bakkamanthala --- .../main/webapp/app/policyApp/CSS/b2b-angular.css | 231 ++++++++++++++++++++- .../attributeDictController.js | 2 +- .../ActionPolicyController.js | 1 + .../BRMSParamPolicyController.js | 37 ++-- .../BRMSRawPolicyController.js | 1 + .../BaseConfigPolicyController.js | 1 + .../ClosedLoopFaultController.js | 1 + .../ClosedLoopPMController.js | 1 + .../DCAEMicroServicePolicyController.js | 1 + .../DecisionPolicyController.js | 1 + .../FirewallPolicyController.js | 1 + .../PolicyTemplates/BRMSParamPolicyTemplate.html | 8 + .../PolicyTemplates/BRMSShowParamRuleModal.html | 16 -- .../policy-models/Editor/templates/modals.html | 4 +- .../Editor/templates/search-main-table.html | 74 +++++++ .../policy-models/policy_SearchFilter.html | 2 +- 16 files changed, 336 insertions(+), 46 deletions(-) delete mode 100644 POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html create mode 100644 POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/search-main-table.html (limited to 'POLICY-SDK-APP/src/main/webapp/app') diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/b2b-angular.css b/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/b2b-angular.css index 284a8d4dc..a894691ca 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/b2b-angular.css +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/b2b-angular.css @@ -685,4 +685,233 @@ top: 4px; right: 3px; height: 16px; - width: 16px; } \ No newline at end of file + width: 16px; } + +.b2b-header-tabs .icon-primary-att-globe { + color: #0568ae; + font-size: 34px; } + +.b2b-header-tabs .globe-text { + margin-left: 20px; + font-size: 2rem; } + +.b2b-header-tabs .header__items { + width: 980px; + margin: 0 auto; + display: block; + list-style: none; + border-spacing: 30px 0; + padding: 3px 0px 0px 0px; } + +.b2b-header-tabs .header__item { + display: inline-block; + text-align: left; + width: auto; + font-size: 14px; + font-family: "Omnes-ECOMP-W02", Arial; + cursor: pointer; + padding: 0 15px 4px 15px; + /*margin-top:-3px;*/ + color: #fff; } + +.b2b-header-tabs .header__item.b2b-headermenu { + padding: 0; } + +.b2b-header-tabs .header__item.b2b-headermenu a.menu__item { + color: #fff; + text-decoration: none; + display: inline-block; + padding: 8px 15px 12px 15px; + font-size: 16px; } + +.b2b-header-tabs .header__item.active { + background-color: #fff; + border-radius: 2px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } + +.b2b-header-tabs .header__item.active a.menu__item { + color: #0578ae; } + +.b2b-header-tabs li:focus { + outline: 2px solid #0578ae; } + +/** profile pop Over **/ +.b2b-header-tabs .header__item.profile { + position: relative; + float: right; } + +/** Secondary Menu **/ +.b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper { + background-color: #fff; + position: absolute; + width: 100%; + left: 0; + top: 42px; + border-bottom: solid 1px #ccc; + -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16); + -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16); + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16); + display: none; + z-index: 111; } + +.b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary { + background-color: #fff; + width: 980px; + margin: 0 auto; } + +.b2b-header-tabs .header__item.active .header-secondary-wrapper, +.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary-wrapper { + display: block; } + +.b2b-header-tabs .header-secondary .header-subitem { + display: inline-block; + width: auto; + margin: 0 15px; } + +.b2b-header-tabs .header-secondary .header-subitem a.menu__item { + display: inline-block; + padding: 15px 0; + color: #333; + font-size: 14px; } + +.b2b-header-tabs .header-secondary .header-subitem a.menu__item:hover, .b2b-header-tabs .header-secondary .header-subitem a.menu__item:focus { + color: #0578ae; } + +.b2b-label-hide { + position: absolute; + clip: rect(1px, 1px, 1px, 1px); } + +/** Tertiary Level Menu **/ +.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after, +.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before { + content: ''; + border-left: 8px solid transparent; + border-right: 8px solid transparent; + position: absolute; + -webkit-transition: left .2s ease-out; + -moz-transition: left .2s ease-out; + transition: left .2s ease-out; } + +.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret { + position: absolute; + z-index: 111; + top: 25px; } + +.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after { + border-bottom: 8px solid #fff; + top: 10px; } + +.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before { + border-bottom: 8px solid #ccc; + top: 9px; } + +/** Tertiary Level Menu **/ +.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary { + border-top: solid 1px #ccc; } + +.b2b-header-tabs .header-tertiary:after { + content: ''; + clear: both; + display: block; } + +.b2b-header-tabs .header-tertiary li { + display: inline-block; + padding: 0; + float: left; } + +.b2b-header-tabs .header-tertiary li a { + color: #333; + display: block; + padding: 7px 15px; + max-width: 228px; } + +.b2b-header-tabs .header-tertiary li label { + text-align: left; + display: block; + font-size: 14px !important; + font-weight: bold; + color: #857B7B; + padding: 15px 0 0 15px; } + +/** Quarternary Level Menu **/ +.b2b-header-tabs .header-quarternary { + width: 100%; + float: left; } + +.b2b-header-tabs .header-quarternary li { + padding-left: 15px; + font-family: "Omnes-ECOMP-W02", Arial; + display: none; } + +.b2b-header-tabs .header-quarternary li.active { + display: block; } + +.b2b-header-tabs .header-quarternary li a { + color: #666666; + font-size: 14px; + padding: 0px 10px 10px 10px; } + +/** Skip Navigation**/ +.b2b-header-tabs .header__item.skip { + padding: 0; + display: inline-block; + cursor: default !important; } + +.b2b-header-tabs .header__item.skip a { + color: transparent; + font-size: 12px; + line-height: 15px; + text-decoration: none; } + +.b2b-header-tabs .header__item.skip a:focus { + color: #fff; + outline: 2px solid #0578ae; } + +/** Dropdown css inside Header ****/ +.b2b-header-tabs .selectWrap { + min-width: 150px; } + +.b2b-header-tabs .selectWrap button.awd-select, .b2b-header-tabs .selectWrap input.awd-select { + height: 36px; + line-height: 8px; + font-size: 1rem; + display: inline-block; } + +.b2b-header-tabs .selectWrap .awd-select-list { + background-color: #fff; + color: #333; + -webkit-transition: opacity .2s ease-out; + -moz-transition: opacity .2s ease-out; + transition: opacity .2s ease-out; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); } + +/* + * responsive header media queries + */ +@media screen and (max-width: 1100px) { + .b2b-header-tabs .globe-text { + display: none; } + .b2b-header-tabs .header__item.profile { + padding-left: 15px; + float: none; } + .b2b-header-tabs .header__items { + padding-top: 0px; } } + +@media screen and (max-width: 950px) { + .header__item.profile { + top: 20px; } + .b2b-header-tabs { + height: 90px; } + .selectWrap { + bottom: 15px; } + .b2b-header-tabs .header__items { + padding-top: 25px; } + .b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper { + top: 80px; } + .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret { + top: 35px; } + .b2b-header-tabs .header__item.b2b-headermenu a.menu__item { + padding-bottom: 30px; } + .b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary { + margin-top: -28px; } } \ No newline at end of file diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js index 51909162a..db81da0e5 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/attributeDictController.js @@ -27,7 +27,7 @@ app.controller('editAttributeController' ,function ($scope, $modalInstance, mess $scope.disableCd=true; var headers = message.attributeDictionaryData.attributeValue; var splitEqual = ','; - if(headers != null){ + if(headers != null && headers != ""){ if (headers.indexOf(splitEqual) >= 0) { var splitValue = headers.split(splitEqual); for(i = 0; i < splitValue.length; i++){ diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js index 6ca9dfd93..0bfcd3c01 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js @@ -29,6 +29,7 @@ app.controller('actionPolicyController', ['$scope', 'PolicyAppService', 'policyN $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js index b37685739..323a9bfa0 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js @@ -29,6 +29,7 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { @@ -106,6 +107,8 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo } }; + $scope.showbrmsrule = true; + $scope.ShowRule = function(policy){ console.log(policy); var uuu = "policyController/ViewBRMSParamPolicyRule.htm"; @@ -117,21 +120,10 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo contentType: 'application/json', data: JSON.stringify(postData), success : function(data){ + $scope.showbrmsrule = false; + $scope.validateSuccess = true; $scope.$apply(function(){ $scope.datarule = data.policyData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html', - controller: 'showrulecontroller', - resolve: { - message: function () { - var message = { - datas: $scope.datarule - }; - return message; - } - } - }); }); }, error : function(data){ @@ -140,6 +132,12 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo }); }; + $scope.hideRule = function(){ + $scope.showbrmsrule = true; + $scope.validateSuccess = false; + $scope.apply(); + }; + $scope.saveBrmsParamPolicy = function(policy){ if(policy.itemContent != undefined){ $scope.refreshCheck = true; @@ -247,15 +245,4 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo var lastItem = $scope.temp.policy.attributes.length-1; $scope.temp.policy.attributes.splice(lastItem); }; -}]); - -app.controller('showrulecontroller' , function ($scope, $modalInstance, message){ - if(message.datas!=null){ - $scope.datarule=message.datas; - } - - $scope.close = function() { - $modalInstance.close(); - }; - -}); \ No newline at end of file +}]); \ No newline at end of file diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js index 97f6d2997..ecf3dec30 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js @@ -29,6 +29,7 @@ angular.module('abs').controller('brmsRawPolicyController', ['$scope', '$window' $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { 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 20287baf1..9dc7e9247 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 @@ -30,6 +30,7 @@ app.controller('baseConfigController', ['$scope', 'PolicyAppService', 'policyNav $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { 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 11254742a..8f054edd1 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 @@ -29,6 +29,7 @@ angular.module("abs").controller('clFaultController', ['$scope', '$window', 'Pol $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js index 393780705..b74f1b39b 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js @@ -29,6 +29,7 @@ angular.module("abs").controller('clPMController', ['$scope', '$window', '$timeo $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { 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 b87299cbd..5e602ae12 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 @@ -30,6 +30,7 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js index d0c72682b..ce27e04e0 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js @@ -29,6 +29,7 @@ angular.module('abs').controller('decisionPolicyController', ['$scope', 'PolicyA $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js index 46b6711cd..2978a43fa 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js @@ -29,6 +29,7 @@ angular.module('abs').controller('fwPolicyController', ['$scope', '$window', 'Po $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { 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 2aa3b23d9..0e7a4b35d 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 @@ -124,6 +124,14 @@
+
+
+

Rule Preview:

+

+ + +
+

diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/search-main-table.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/search-main-table.html new file mode 100644 index 000000000..e72992180 --- /dev/null +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/search-main-table.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Name + + +
+
+
+ No Policy's in Scope... +
+ {{ policyNavigator.error }} +
+ + + + {{item.model.name | strLimit : 64}} + +
\ No newline at end of file diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_SearchFilter.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_SearchFilter.html index a4fe1af49..c8072a312 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_SearchFilter.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_SearchFilter.html @@ -27,7 +27,7 @@
- +
-- cgit 1.2.3-korg