diff options
author | rb7147 <rb7147@att.com> | 2017-12-11 16:25:23 -0500 |
---|---|---|
committer | rb7147 <rb7147@att.com> | 2017-12-11 16:27:04 -0500 |
commit | 0368cb99d6108970d172d4dc7145c67e4524b4a9 (patch) | |
tree | 76c4d303c34d4b1146835bf520dcd776badcfc53 /POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models | |
parent | 428150834ee60899b9a8da019bae3c8bf009adf1 (diff) |
Resolved the Policy GUI Javascript issues
Issue-ID: POLICY-440
Change-Id: I44d5304699da19bee7ae2997565802fc7d44cb0e
Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models')
5 files changed, 33 insertions, 28 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js index f3974f863..de30fe011 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js @@ -20,21 +20,22 @@ var app = appDS2; app.controller('exportPolicyController', function ($scope, $window, PolicyAppService, modalService, $modal, Notification){ $( "#dialog" ).hide(); + $scope.policydatas = []; $scope.linkEnable = true; - $scope.gridOptions = { - data : 'policydatas', - onRegisterApi: function(gridApi) { - $scope.gridPolicyApi = gridApi; - }, - enableSorting: true, - enableFiltering: true, - showTreeExpandNoChildren: true, - paginationPageSizes: [10, 20, 50, 100], - paginationPageSize: 20, - columnDefs: [{name: 'policyName', displayName : 'Policy Name', sort: { direction: 'asc', priority: 0 }}, - {name: 'activeVersion', displayName : 'Version'}, - {name: 'modifiedDate', displayName : 'Last Modified',type: 'date', cellFilter: 'date:\'yyyy-MM-dd HH:MM:ss a\'' }] - }; + $scope.gridExportOptions = { + data : 'policydatas', + onRegisterApi: function(gridApi) { + $scope.gridPolicyApi = gridApi; + }, + enableSorting: true, + enableFiltering: true, + showTreeExpandNoChildren: true, + paginationPageSizes: [10, 20, 50, 100], + paginationPageSize: 20, + columnDefs: [{name: 'policyName', displayName : 'Policy Name', sort: { direction: 'asc', priority: 0 }}, + {name: 'activeVersion', displayName : 'Version'}, + {name: 'modifiedDate', displayName : 'Last Modified',type: 'date', cellFilter: 'date:\'yyyy-MM-dd HH:MM:ss a\'' }] + }; $scope.files; PolicyAppService.getData('get_AutoPushPoliciesContainerData').then(function (data) { 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 5c0aa9fbd..11472b96a 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 @@ -93,26 +93,26 @@ 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"></select> + ng-options="option for option in microServiceCongigNameDictionaryDatas track by option" required="true"></select> </div> <div class="form-group col-sm-3" ng-show="isCheck"> <label>Location:<sup><b>*!</b></sup></label><br> <select class="form-control" class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.location" - ng-options="option for option in microServiceLocationDictionaryDatas track by option"></select> + ng-options="option for option in microServiceLocationDictionaryDatas track by option" required="true"></select> </div> <div class="form-group col-sm-3" ng-show="isCheck"> <label>UUID:<sup><b>*!</b></sup></label><br> <select class="form-control" class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.uuid" - ng-options="option for option in dcaeUUIDDictionaryDatas track by option"></select> + ng-options="option for option in dcaeUUIDDictionaryDatas track by option" required="true"></select> </div> <div class="form-group col-sm-3" ng-show="isCheck"> <label>Policy Scope:<sup><b>*</b></sup></label><br> <select class="form-control" class="form-control" ng-disabled="temp.policy.readOnly" ng-model="temp.policy.policyScope" - ng-options="option for option in groupPolicyScopeListDatas track by option"></select> + ng-options="option for option in groupPolicyScopeListDatas track by option" required="true"></select> </div> </div> </div> diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html index 5e9fdbd6c..6ae8d6b54 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html @@ -1,16 +1,14 @@ -<div class="modal fadeIn" id="exportPolicy" +<div class="modal" id="exportPolicy" style="margin-bottom: 20px; width: 100%; height: 100%" ng-controller="exportPolicyController" data-toggle="modal" data-backdrop="static" data-keyboard="false"> - <div class="modal-dialog modal-lg"> + <div class="modal-dialog-lg"> <div class="modal-content"> <div class="modal-header"> - <h2 style="text-align: left; color: #157bb2">Export Policies</h2> - </div> - <div class="divider-container"> - <hr> + <h2 class="modal-title" style="color: #157bb2">Export Policies</h2> </div> + <div class="well"> <div> - <div id="grid1" style="width: 100%; height: 500px;" ui-grid="gridOptions" + <div id="grid1" ui-grid="gridExportOptions" ui-grid-pagination ui-grid-selection ui-grid-resize-columns class="grid"></div> </div> <div class="modal-footer"> @@ -19,6 +17,7 @@ <button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="temp.inprocess">Close</button> </div> + </div> </div> </div> </div>
\ 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 ec19f0d7f..317efd9fa 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 @@ -99,6 +99,10 @@ body { border-radius: 4px; } +.first_child { + margin-top: 10px; +} + .btn { box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .26); font-weight: 500; 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 77006002c..1c33839f2 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 @@ -43,7 +43,7 @@ </div> <div class="modal-footer"> <button type="button" class="btn btn-pedefault" data-dismiss="modal" ng-click="refresh();" ng-disabled="temp.inprocess">Cancel</button> - <button type="submit" class="btn btn-primary" ng-disabled="temp.inprocess" autofocus="autofocus">Delete</button> + <button type="submit" class="btn btn-primary" ng-disabled="!temp.model.versions" autofocus="autofocus">Delete</button> </div> </form> </div> @@ -140,7 +140,7 @@ </div> <div class="modal-footer"> <button type="button" class="btn btn-pedefault" data-dismiss="modal" ng-disabled="temp.inprocess">Cancel</button> - <button type="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Save</button> + <button type="submit" class="btn btn-primary" ng-disabled="temp.tempModel.content.highestVersion === temp.tempModel.content.activeVersion">Save</button> </div> </form> </div> @@ -160,6 +160,7 @@ <div class="modal-body"> <label class="radio">Enter new Policy Name to Clone <b>{{temp.model.name}}</b></label> <input class="form-control" ng-model="temp.tempModel.name" autofocus="autofocus"> + <div ng-include data-src="'error-bar'" class="clearfix"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-pedefault" data-dismiss="modal" ng-disabled="temp.inprocess">Cancel</button> @@ -277,7 +278,7 @@ </div> <div class="detail-sources"> <code class="mr5"><b>Destination:</b>{{temp.tempModel.fullPath()}}</code> - <a href="" ng-click="openNavigator(temp)"><span class="label label-primary">move</span></a> + <a href="" ng-click="openNavigator(temp)"><span class="label label-primary">change</span></a> </div> </div> </div> |