diff options
author | Ravindra Bakkamanthala <rb7147@att.com> | 2017-05-23 14:56:12 -0400 |
---|---|---|
committer | Ravindra Bakkamanthala <rb7147@att.com> | 2017-05-23 16:49:56 -0400 |
commit | 87c95be02a8a4d77e165dede90777e811b59dcae (patch) | |
tree | 4712199fc3520b530dda0c4d3b074c327df547f2 /POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models | |
parent | 7e547eaa55920dfbc9691eab33bb728395b50cf2 (diff) |
Commit includes ControlLoopPolicy API and bugfixes
Change-Id: I3e18bb8b4c31a0d908bb0cff4c85e2a3fb450a63
Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models')
14 files changed, 105 insertions, 44 deletions
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 @@ </div> </div> <div id="validate" style="width: 70%"></div> + <div ng-hide="showbrmsrule"> + <div class="well"> + <h2 class="font-showcase-font-name"> Rule Preview: </h2> + <div class="divider-container"><hr> </div> + <textarea type="text" style="width: 100%; height: 800px" ng-bind="datarule" ng-disabled="true"></textarea> + <button class="btn btn-default" herf="javascript:void(0)" ng-click="hideRule();">Hide Rule</button> + </div> + </div> <br> <div class="modal-footer"> <div> diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html deleted file mode 100644 index 2e6b593de..000000000 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html +++ /dev/null @@ -1,16 +0,0 @@ -<div class="modal fade" role="dialog"> -<div class="modal-dialog modal-lg"> - <div class="modal-content"> - <div class="modal-header"> - <h2 class="font-showcase-font-name"> Rule Preview: </h2> - </div> - <div class="divider-container"><hr> </div> - <div> - <textarea type="text" style="width: 800px; height: 800px;" ng-bind="datarule" ng-disabled="true"></textarea> - </div> - <div class="modal-footer"> - <button class="btn btn-default" herf="javascript:void(0)" ng-click="close()">Close</button> - </div> - </div> -</div> -</div>
\ No newline at end of file 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 6bd9587ef..754f95bb5 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 @@ -67,7 +67,7 @@ <div ng-include data-src="'error-bar'" class="clearfix"></div> </div> <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="temp.inprocess">Cancel</button> + <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="refresh();" ng-disabled="temp.inprocess">Cancel</button> <button type="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Rename</button> </div> </form> @@ -111,7 +111,7 @@ <div ng-include data-src="'error-bar'" class="clearfix"></div> </div> <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="temp.inprocess">Cancel</button> + <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="refresh();" ng-disabled="temp.inprocess">Cancel</button> <button type="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Move</button> </div> </form> 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 @@ +<table class="table mb0 table-files"> + <thead> + <tr> + <th> + <a href="" ng-click="order('model.name')"> + Name + <span class="sortorder" ng-show="predicate[1] === 'model.name'" ng-class="{reverse:reverse}"></span> + </a> + </th> + <th class="hidden-sm hidden-xs"> + <a href="" ng-click="order('model.version')"> + Version + <span class="sortorder" ng-show="predicate[1] === 'model.version'" ng-class="{reverse:reverse}"></span> + </a> + </th> + <th class="hidden-sm hidden-xs"> + <a href="" ng-click="order('model.date')"> + Date + <span class="sortorder" ng-show="predicate[1] === 'model.date'" ng-class="{reverse:reverse}"></span> + </a> + </th> + <th class="hidden-sm hidden-xs"> + <a href="" ng-click="order('model.createdBy')"> + Created By + <span class="sortorder" ng-show="predicate[1] === 'model.createdBy'" ng-class="{reverse:reverse}"></span> + </a> + </th> + <th class="hidden-sm hidden-xs"> + <a href="" ng-click="order('model.modifiedBy')"> + Modified By + <span class="sortorder" ng-show="predicate[1] === 'model.modifiedBy'" ng-class="{reverse:reverse}"></span> + </a> + </th> + </tr> + </thead> + <tbody class="file-item"> + <tr ng-show="policyNavigator.requesting"> + <td colspan="5"> + <div ng-include="config.tplPath + '/spinner.html'"></div> + </td> + </tr> + <tr ng-show="!policyNavigator.requesting && policyNavigator.fileList.length < 1 && !policyNavigator.error"> + <td colspan="5"> + No Policy's in Scope... + </td> + </tr> + <tr ng-show="!policyNavigator.requesting && policyNavigator.error"> + <td colspan="5"> + {{ policyNavigator.error }} + </td> + </tr> + <tr ng-repeat="item in policyNavigator.fileList | filter: {model:{name: query}} | orderBy:predicate:reverse" ng-show="!policyNavigator.requesting"> + <td ng-right-click="touch(item)"> + <a href="" ng-click="smartClick(item)" title="{{item.model.name}} ({{item.model.sizeKb()}}kb)"> + <i class="glyphicon glyphicon-folder-close" ng-show="item.model.type === 'dir'"></i> + <i class="glyphicon glyphicon-file" ng-show="item.model.type === 'file'"></i> + {{item.model.name | strLimit : 64}} + </a> + </td> + <td class="hidden-xs"> + {{item.model.version}} + </td> + <td class="hidden-sm hidden-xs"> + {{item.model.date | formatDate }} + </td> + <td class="hidden-sm hidden-xs"> + {{item.model.createdBy}} + </td> + <td class="hidden-sm hidden-xs"> + {{item.model.modifiedBy}} + </td> + </tr> + </tbody> +</table>
\ 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 @@ <div> <div class="row"> <div ng-include="config.tplPath + '/current-folder-breadcrumb.html'" ng-show="config.breadcrumb"></div> - <div ng-include="config.tplPath + '/main-table.html'" class="main-navigation clearfix"></div> + <div ng-include="config.tplPath + '/search-main-table.html'" class="main-navigation clearfix"></div> </div> </div> |