Resolved the Policy GUI Javascript issues 59/26059/1
authorrb7147 <rb7147@att.com>
Mon, 11 Dec 2017 21:25:23 +0000 (16:25 -0500)
committerrb7147 <rb7147@att.com>
Mon, 11 Dec 2017 21:27:04 +0000 (16:27 -0500)
Issue-ID: POLICY-440
Change-Id: I44d5304699da19bee7ae2997565802fc7d44cb0e
Signed-off-by: rb7147 <rb7147@att.com>
19 files changed:
POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/ImportDictionaryController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/BRMSParamDictController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/BRMSControllerDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/BRMSDependencyDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/BRMSParamDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLServiceDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLSiteDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWParentListDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWTagListDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWTagPickerListDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSModelDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/RiskTypeDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/actionPolicyDictGridController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js
POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html
POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html
POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/main.css
POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/modals.html

index 7d2fe23..a40b48a 100644 (file)
@@ -708,17 +708,25 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
                                                //The "." in the value determines if its a string or a user defined type.  
                                                if (!value.contains(".")){
                                                        //This is string
-                                                       constraints.add(keyValues.get(key));
+                                                       if(StringUtils.isNumeric(key) ){  //only integer key for the value of Constrains 
+                                                           constraints.add(keyValues.get(key));
+                                                       }
                                                }else{
-                                                       //This is userdefined string
+                                                       //This is user defined string
                                                        String trimValue=value.substring(value.lastIndexOf('.')+1);
                                                        StringBuilder referenceIndividualStringBuilder= new StringBuilder();
                                                        referenceIndividualStringBuilder.append(keySetString+"="+trimValue+":MANY-true");
                                                        referenceStringBuilder.append(referenceIndividualStringBuilder+",");
                                                }
-                                       }
+                                       }                               
+
                                }
 
+                               if(keyValues.get("type").equalsIgnoreCase(LIST)){
+                                       if(constraints == null || constraints.isEmpty()){
+                                               referenceStringBuilder.append(keySetString+"=MANY-true"+",");
+                                       }
+                               }
                        }else{
                                //User defined Datatype. 
                                String value=keyValues.get("type");
@@ -1014,7 +1022,7 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
                if(allkeys != null){
                        Iterator<String> iter = allkeys.iterator();
                        while(iter.hasNext()){
-                               //convert to array values for MANY-true keys
+                               //Convert to array values for MANY-true keys
                                finalJsonObject = convertToArrayElement(jsonObject, iter.next());
                        }
                }
@@ -1036,7 +1044,7 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
                        
                        if(finalJsonObject != null){
                            LOGGER.info(finalJsonObject.toString());
-                           jsonModel  = finalJsonObject.toString();
+                           jsonModel = finalJsonObject.toString();
                        }
                }
                
@@ -1562,10 +1570,7 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
                                                else {
                                                        this.newModel.setVersion(this.newFile.toString().split("-v")[1].replace(".xmi", ""));
                                                }
-                                       }else{
-                                               errorMsg = "Upload error: The file name should contain '-v', such as xxx-v1802.yml";
-                                       }
-                               
+                                       }                               
                                }catch(Exception e){
                                        LOGGER.error("Upload error : ", e);
                                        errorMsg = "Upload error:" + e.getMessage();
@@ -1573,6 +1578,21 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController {
                        }
                        
                }
+               
+               if(!errorMsg.isEmpty()){
+                       
+                       PrintWriter out = response.getWriter();
+                       
+                       response.setCharacterEncoding("UTF-8");
+                       response.setContentType("application / json");
+                       request.setCharacterEncoding("UTF-8");
+                       
+                       JSONObject j = new JSONObject();
+                       j.put("errorMsg", errorMsg);
+                       out.write(j.toString());
+                       return;
+               }
+               
                List<File> fileList = new ArrayList<>();
                this.directory = "model";
                if (zip){
index 5e3238b..2dfd545 100644 (file)
@@ -45,10 +45,14 @@ app.controller('importDictionaryController' ,  function ($scope, $modalInstance,
                        withCredentials: false,
                        headers: {'Content-Type': undefined},
                        transformRequest: angular.identity
-               }).success(function(){
-                       Notification.success("Dictionary Uploaded Successfully");
+               }).success(function(data){
+                       if(data.includes("Success")){
+                               Notification.success("Dictionary Uploaded Successfully");
+                       }else{
+                               Notification.error(data);
+                       }
                        $scope.importButton = true;
-               }).error(function(){
+               }).error(function(data){
                         Notification.error("Dictionary Upload Failed");
                });
        };
index df78f64..6789028 100644 (file)
@@ -74,7 +74,9 @@ app.controller('editBRMSParamController' , function ($scope, $modalInstance, mes
                             $scope.brmsParamDictionaryDatas=data.brmsParamDictionaryDatas;});
                                                if($scope.brmsParamDictionaryDatas == "Duplicate"){
                                                        Notification.error("BRMSParan Dictionary exists with Same Name.")
-                                               }else{      
+                                               }else if($scope.brmsParamDictionaryDatas == "Validation"){
+                                                       Notification.error("BRMSParan Dictionary failed rule Validation.")
+                                               }else {
                                                        console.log($scope.brmsParamDictionaryDatas);
                                                        $modalInstance.close({brmsParamDictionaryDatas:$scope.brmsParamDictionaryDatas});
                                                }
index 27c95a7..c80f53d 100644 (file)
@@ -63,6 +63,7 @@ appDS2.controller('brmsControllerDictGridController', function ($scope, PolicyAp
                        },
                        { field: 'controllerName', displayName : 'Controller Name', sort: { direction: 'asc', priority: 0 }},
                        { field: 'description'},
+                       { field: 'controller' , visible : false},
                        {field: 'userCreatedBy.userName', displayName : 'Created By'},
                        {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' },
                        {field: 'userModifiedBy.userName', displayName : 'Modified By'},
index a22b112..61a5012 100644 (file)
@@ -62,6 +62,7 @@ app.controller('brmsDependencyDictGridController', function ($scope, PolicyAppSe
                        },
                        { field: 'dependencyName', displayName : 'Dependency Name', sort: { direction: 'asc', priority: 0 }},
                        { field: 'description'},
+                       { field: 'dependency' , visible : false},
                        {field: 'userCreatedBy.userName', displayName : 'Created By'},
                        {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' },
                        {field: 'userModifiedBy.userName', displayName : 'Modified By'},
index 496a71a..50e14ea 100644 (file)
@@ -59,6 +59,7 @@ app.controller('brmsParamDictGridController', function ($scope, PolicyAppService
                        },
                        { field: 'ruleName', displayName : 'Rule Name', sort: { direction: 'asc', priority: 0 }},
                        { field: 'description'},
+                       { field: 'rule', visible : false},
                        {field: 'userCreatedBy.userName', displayName : 'Created By'},
                        {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }
                        ],
index e60b674..de692a4 100644 (file)
@@ -48,6 +48,9 @@ app.controller('serviceDictGridController', function ($scope, PolicyAppService,
        $scope.serviceDictionaryGrid = {
                        data : 'closedLoopServiceDictionaryDatas',
                        enableFiltering: true,
+                       exporterCsvFilename: 'ClosedLoopService.csv',
+                       enableGridMenu: true,
+                       enableSelectAll: true,
                        columnDefs: [{
                                field: 'id', enableFiltering: false, headerCellTemplate: '' +
                                '<button id=\'New\' ng-click="grid.appScope.createNewServiceDictWindow()" class="btn btn-success">' + 'Create</button>',
@@ -61,7 +64,35 @@ app.controller('serviceDictGridController', function ($scope, PolicyAppService,
                        {field: 'userModifiedBy.userName', displayName : 'Modified By'},
                        {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' },
                        {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }
-                       ]
+                       ],
+                       exporterMenuPdf: false,
+                       exporterPdfDefaultStyle: {fontSize: 9},
+                       exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
+                       exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
+                       exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
+                       exporterPdfFooter: function ( currentPage, pageCount ) {
+                               return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
+                       },
+                       exporterPdfCustomFormatter: function ( docDefinition ) {
+                               docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
+                               docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
+                               return docDefinition;
+                       },
+                       exporterFieldCallback: function(grid, row, col, input) {
+                if( col.name == 'createdDate' || col.name == 'modifiedDate') {
+                        var date = new Date(input);
+                        return date.toString("yyyy-MM-dd HH:MM:ss a");
+                } else {
+                        return input;
+                }
+            },
+                       exporterPdfOrientation: 'portrait',
+                       exporterPdfPageSize: 'LETTER',
+                       exporterPdfMaxGridWidth: 500,
+                       exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
+                       onRegisterApi: function(gridApi){
+                               $scope.gridApi = gridApi;
+                       }
        };
 
        $scope.editCLService = null;
index 62121d9..abf44f8 100644 (file)
@@ -48,6 +48,9 @@ app.controller('siteDictGridController', function ($scope, PolicyAppService, mod
        $scope.siteDictionaryGrid = {
                        data : 'closedLoopSiteDictionaryDatas',
                        enableFiltering: true,
+                       exporterCsvFilename: 'ClosedLoopSite.csv',
+                       enableGridMenu: true,
+                       enableSelectAll: true,
                        columnDefs: [{
                                field: 'id', enableFiltering: false, headerCellTemplate: '' +
                                '<button id=\'New\' ng-click="grid.appScope.createNewSiteDictWindow()" class="btn btn-success">' + 'Create</button>',
@@ -61,7 +64,35 @@ app.controller('siteDictGridController', function ($scope, PolicyAppService, mod
                        {field: 'userModifiedBy.userName', displayName : 'Modified By'},
                        {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' },
                        {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }
-                       ]
+                       ],
+                       exporterMenuPdf: false,
+                       exporterPdfDefaultStyle: {fontSize: 9},
+                       exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
+                       exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
+                       exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
+                       exporterPdfFooter: function ( currentPage, pageCount ) {
+                               return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
+                       },
+                       exporterPdfCustomFormatter: function ( docDefinition ) {
+                               docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
+                               docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
+                               return docDefinition;
+                       },
+                       exporterFieldCallback: function(grid, row, col, input) {
+                if( col.name == 'createdDate' || col.name == 'modifiedDate') {
+                        var date = new Date(input);
+                        return date.toString("yyyy-MM-dd HH:MM:ss a");
+                } else {
+                        return input;
+                }
+            },
+                       exporterPdfOrientation: 'portrait',
+                       exporterPdfPageSize: 'LETTER',
+                       exporterPdfMaxGridWidth: 500,
+                       exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
+                       onRegisterApi: function(gridApi){
+                               $scope.gridApi = gridApi;
+                       }
        };
 
        $scope.editCLSite = null;
index 546775c..5a90ca8 100644 (file)
@@ -49,7 +49,6 @@ app.controller('parentDictGridController', function ($scope, PolicyAppService,mo
                        data : 'fwDictListDictionaryDatas',
                        enableFiltering: true,
                        exporterCsvFilename: 'ParentList.csv',
-                       enableGridMenu: true,
                        enableSelectAll: true,
                        columnDefs: [{
                                field: 'id', enableFiltering: false, headerCellTemplate: '' +
index a5d3c34..be01696 100644 (file)
@@ -49,7 +49,6 @@ app.controller('tagListDictGridController', function ($scope, PolicyAppService,
         data : 'fwTagDictionaryDatas',
         enableFiltering: true,
         exporterCsvFilename: 'FWTag.csv',
-        enableGridMenu: true,
         enableSelectAll: true,
         columnDefs: [{
             field: 'id', enableFiltering: false, headerCellTemplate: '' +
index e4e2a14..dbc6c09 100644 (file)
@@ -49,7 +49,6 @@ app.controller('tagPickerListDictGridController', function ($scope, PolicyAppSer
         data : 'fwTagPickerDictionaryDatas',
         enableFiltering: true,
         exporterCsvFilename: 'SearchCriteria.csv',
-        enableGridMenu: true,
         enableSelectAll: true,
         columnDefs: [{
             field: 'id', enableFiltering: false, headerCellTemplate: '' +
index bbce9dd..007edd7 100644 (file)
@@ -46,19 +46,57 @@ app.controller('msModelsDictGridController', function ($scope, PolicyAppService,
     });
        
     $scope.msModelsDictionaryGrid = {
-        data : 'microServiceModelsDictionaryDatas',
-        enableFiltering: true,
-        columnDefs: [{
-            field: 'id', enableFiltering: false, headerCellTemplate: '' +
-            '<button id=\'New\' ng-click="grid.appScope.createNewMSModelsWindow()" class="btn btn-success">' + 'Create</button>',
-            cellTemplate:
-                '<button  type="button"  class="btn btn-danger"  ng-click="grid.appScope.deleteMSModels(row.entity)" ><i class="fa fa-trash-o"></i></button> ',  width: '8%'
-        },{ field: 'modelName', displayName : 'Micro Service Model', sort: { direction: 'asc', priority: 0 }},
-            { field: 'description' },
-            { field: 'version', displayName : 'Model Version' },
-            {field: 'userCreatedBy.userName', displayName : 'Imported By' }
-        ]
+            data : 'microServiceModelsDictionaryDatas',
+            enableFiltering: true,
+               exporterCsvFilename: 'MSPolicyDictionary.csv',
+               enableGridMenu: true,
+               enableSelectAll: true,
+            columnDefs: [{
+                field: 'id', 
+                enableFiltering: false, headerCellTemplate: '' +
+                '<button id=\'New\' ng-click="grid.appScope.createNewMSModelsWindow()" class="btn btn-success">' + 'Create</button>',
+                cellTemplate:
+                    '<button  type="button"  class="btn btn-danger"  ng-click="grid.appScope.deleteMSModels(row.entity)" ><i class="fa fa-trash-o"></i></button> ',  width: '8%'
+            },{ field: 'modelName', displayName : 'Micro Service Model', sort: { direction: 'asc', priority: 0 }},
+                { field: 'description' },
+                { field: 'version', displayName : 'Model Version' },
+                {field: 'userCreatedBy.userName', displayName : 'Imported By' },
+                {field: 'dependency', visible: false}, 
+                {field: 'attributes', visible: false},
+                {field: 'enumValues', visible: false},
+                {field: 'ref_attributes',visible: false},
+                {field: 'sub_attributes', visible: false}
+            ] ,
+               exporterMenuPdf: false,
+               exporterPdfDefaultStyle: {fontSize: 9},
+               exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
+               exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
+               exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
+               exporterPdfFooter: function ( currentPage, pageCount ) {
+                       return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
+               },
+               exporterPdfCustomFormatter: function ( docDefinition ) {
+                       docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
+                       docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
+                       return docDefinition;
+               },
+               exporterFieldCallback: function(grid, row, col, input) {
+                if( col.name == 'createdDate' || col.name == 'modifiedDate') {
+                        var date = new Date(input);
+                        return date.toString("yyyy-MM-dd HH:MM:ss a");
+                } else {
+                        return input;
+                }
+               },
+               exporterPdfOrientation: 'portrait',
+               exporterPdfPageSize: 'LETTER',
+               exporterPdfMaxGridWidth: 500,
+               exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
+               onRegisterApi: function(gridApi){
+                       $scope.gridApi = gridApi;
+               }
     };
+    
     $scope.editMSmodelName = null;
     $scope.createNewMSModelsWindow = function(){
         $scope.editMSmodelName = null;
index 4d1d075..34c472e 100644 (file)
@@ -48,8 +48,6 @@ app.controller('riskTypeDictGridController', function ($scope, PolicyAppService,
     $scope.riskTypeDictionaryGrid = {
         data : 'riskTypeDictionaryDatas',
         enableFiltering: true,
-        exporterCsvFilename: 'RiskType.csv',
-        enableGridMenu: true,
         enableSelectAll: true,
         columnDefs: [{
             field: 'id', enableFiltering: false, headerCellTemplate: '' +
@@ -66,36 +64,12 @@ app.controller('riskTypeDictGridController', function ($scope, PolicyAppService,
             {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\''}
         ],
         enableColumnResize : true,
-        exporterPdfDefaultStyle: {fontSize: 9},
-        exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
-        exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
-        exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
-        exporterPdfFooter: function ( currentPage, pageCount ) {
-                return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
-        },
-        exporterPdfCustomFormatter: function ( docDefinition ) {
-                docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
-                docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
-                return docDefinition;
-        },
-        exporterFieldCallback: function(grid, row, col, input) {
-                       if( col.name == 'createdDate' || col.name == 'modifiedDate') {
-                               var date = new Date(input);
-                               return date.toString("yyyy-MM-dd HH:MM:ss a");
-                       } else {
-                               return input;
-                       }
-               },
-        exporterPdfOrientation: 'portrait',
-        exporterPdfPageSize: 'LETTER',
-        exporterPdfMaxGridWidth: 500,
-        exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
         onRegisterApi: function(gridApi){
                $scope.gridApi = gridApi;
+               $scope.gridApi.core.refresh();
         }
     };
 
-
     $scope.editRiskType = null;
     $scope.createNewRiskType = function(){
         $scope.editRiskType = null;
index d8a7bf5..6545755 100644 (file)
@@ -68,6 +68,7 @@ app.controller('actionPolicyDictGridController', function ($scope,modalService,
                        {field: 'url'},
                        {field: 'method'},
                        {field: 'header', displayName: 'Headers'},
+                       {field: 'body', visible : false},
                        {field: 'description'},
                        {field: 'userCreatedBy.userName', displayName: 'Created By'},
                        {field: 'userModifiedBy.userName', displayName: 'Modified By'},
index f3974f8..de30fe0 100644 (file)
 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) {
index 5c0aa9f..11472b9 100644 (file)
                                        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>
index 5e9fdbd..6ae8d6b 100644 (file)
@@ -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
index ec19f0d..317efd9 100644 (file)
@@ -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;
index 7700600..1c33839 100644 (file)
@@ -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>
             </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>
             <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>
         </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>