summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models
diff options
context:
space:
mode:
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models')
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/ActionPolicyDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/AttributeDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSControllerDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSDependencyDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSParamDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLPepOptionsDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLServiceDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLSiteDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVNFTypeDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVSCLActionDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVarbindDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/DecisionSettingsDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/DescriptiveScopeDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/EcompNameDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/EnforcerTypeDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWActionLisdtDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWActionListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWAddressGroupDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWParentListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWPortListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWPrefixListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWProtocolListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWSecurityZoneDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWServiceGroupDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWServiceListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTagListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTagPickerListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTermListDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWZoneDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSConfigNameDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSDcaeUUIDDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSLocationDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSModelDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/ModelAttributeDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSClosedLoopDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSGroupPolicyScopeDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSResourceDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSServiceDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSTypeDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/RiskTypeDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/SafePolicyWarningDictionary.html22
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js173
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js245
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js152
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js154
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js783
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js163
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js929
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js209
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js87
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js227
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html142
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html146
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html126
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html18
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html139
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html500
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html158
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html134
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html187
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html30
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html24
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html119
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html84
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/animations.css183
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/dialogs.css85
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/main.css336
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize-legacy.css545
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize.css439
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/styles.css86
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/app.js58
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policyManager.js385
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/selector-controller.js46
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/directives/directives.js52
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js347
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/filters/filters.js40
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/providers/config.js78
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/RolesService.js37
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/policynavigator.js235
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/policyuploader.js72
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/current-folder-breadcrumb.html14
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-context-menu.html82
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-toolbar.html5
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-icons.html23
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-table-modal.html46
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-table.html85
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/modals.html306
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/navbar.html20
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/policyEditor.html20
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/searchNavbar.html187
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/spinner.html5
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_AdminTab.html41
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_AutoPush.html91
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_DashboardHealth.html49
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_DashboardLogging.html46
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html134
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_PDPManagement.html119
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Roles.html53
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_SearchFilter.html38
99 files changed, 10219 insertions, 0 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/ActionPolicyDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/ActionPolicyDictionary.html
new file mode 100644
index 000000000..6c5348c4d
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/ActionPolicyDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "actionPolicyDictGridController">
+<div ui-grid = "actionPolicyDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div>
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/AttributeDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/AttributeDictionary.html
new file mode 100644
index 000000000..01f5cfb30
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/AttributeDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-controller = "attributeDictGridController">
+ <div ui-grid = "attributeDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSControllerDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSControllerDictionary.html
new file mode 100644
index 000000000..d2c4958fb
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSControllerDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller= "brmsControllerDictGridController">
+ <div ui-grid = "brmsControllerDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSDependencyDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSDependencyDictionary.html
new file mode 100644
index 000000000..e4395b5d8
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSDependencyDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller= "brmsDependencyDictGridController">
+ <div ui-grid = "brmsDependencyDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSParamDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSParamDictionary.html
new file mode 100644
index 000000000..2357d3bf6
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/BRMSParamDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "brmsParamDictGridController">
+ <div ui-grid = "brmsParamDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLPepOptionsDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLPepOptionsDictionary.html
new file mode 100644
index 000000000..713263601
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLPepOptionsDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "pepOptionsDictGridController">
+ <div ui-grid = "pepOptionsDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLServiceDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLServiceDictionary.html
new file mode 100644
index 000000000..93a11ea48
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLServiceDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "serviceDictGridController">
+ <div ui-grid = "serviceDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLSiteDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLSiteDictionary.html
new file mode 100644
index 000000000..bb2b2ea7e
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLSiteDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "siteDictGridController">
+ <div ui-grid = "siteDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVNFTypeDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVNFTypeDictionary.html
new file mode 100644
index 000000000..dc6e49f1e
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVNFTypeDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "vnfTypeDictGridController">
+ <div ui-grid = "vnfTypeDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVSCLActionDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVSCLActionDictionary.html
new file mode 100644
index 000000000..7b5c9a183
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVSCLActionDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "vsclActionDictGridController">
+ <div ui-grid = "vsclActionDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVarbindDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVarbindDictionary.html
new file mode 100644
index 000000000..3ac1e42ca
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/CLVarbindDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "varbindDictGridController">
+ <div ui-grid = "varbindDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/DecisionSettingsDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/DecisionSettingsDictionary.html
new file mode 100644
index 000000000..74b7672de
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/DecisionSettingsDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "decisionSettingsDictGridController">
+ <div ui-grid = "decisionSettingsDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/DescriptiveScopeDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/DescriptiveScopeDictionary.html
new file mode 100644
index 000000000..7a162bd1f
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/DescriptiveScopeDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "descriptiveDictGridController">
+ <div ui-grid = "descriptiveDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/EcompNameDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/EcompNameDictionary.html
new file mode 100644
index 000000000..cc674bac1
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/EcompNameDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "ecompNameDictGridController">
+ <div ui-grid = "ecompNameDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/EnforcerTypeDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/EnforcerTypeDictionary.html
new file mode 100644
index 000000000..df514bf17
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/EnforcerTypeDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "enforcerDictGridController">
+ <div ui-grid = "enforcerDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWActionLisdtDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWActionLisdtDictionary.html
new file mode 100644
index 000000000..544dc6f2f
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWActionLisdtDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "actionListDictGridController">
+ <div ui-grid = "actionListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWActionListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWActionListDictionary.html
new file mode 100644
index 000000000..544dc6f2f
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWActionListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "actionListDictGridController">
+ <div ui-grid = "actionListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWAddressGroupDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWAddressGroupDictionary.html
new file mode 100644
index 000000000..7d750f8ca
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWAddressGroupDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "addressGroupDictGridController">
+ <div ui-grid = "addressGroupDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWParentListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWParentListDictionary.html
new file mode 100644
index 000000000..3da917b8d
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWParentListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "parentDictGridController">
+ <div ui-grid = "parentDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWPortListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWPortListDictionary.html
new file mode 100644
index 000000000..1347963a1
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWPortListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "portListDictGridController">
+ <div ui-grid = "portListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWPrefixListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWPrefixListDictionary.html
new file mode 100644
index 000000000..ec47506b8
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWPrefixListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "prefixListDictGridController">
+ <div ui-grid = "prefixListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWProtocolListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWProtocolListDictionary.html
new file mode 100644
index 000000000..705d300f1
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWProtocolListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "protocolListDictGridController">
+ <div ui-grid = "protocolListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWSecurityZoneDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWSecurityZoneDictionary.html
new file mode 100644
index 000000000..900936dcd
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWSecurityZoneDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "securityZoneDictGridController">
+ <div ui-grid = "securityZoneDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWServiceGroupDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWServiceGroupDictionary.html
new file mode 100644
index 000000000..878b21f35
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWServiceGroupDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "serviceGroupDictGridController">
+ <div ui-grid = "serviceGroupDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWServiceListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWServiceListDictionary.html
new file mode 100644
index 000000000..f0ba13853
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWServiceListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "serviceListDictGridController">
+ <div ui-grid = "serviceListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTagListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTagListDictionary.html
new file mode 100644
index 000000000..aebf43172
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTagListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "tagListDictGridController">
+ <div ui-grid = "tagListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-resize-columns class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTagPickerListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTagPickerListDictionary.html
new file mode 100644
index 000000000..072699348
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTagPickerListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "tagPickerListDictGridController">
+ <div ui-grid = "tagPickerListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTermListDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTermListDictionary.html
new file mode 100644
index 000000000..2e3e03315
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWTermListDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "termListDictGridController">
+ <div ui-grid = "termListDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter ui-grid-resize-columns class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWZoneDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWZoneDictionary.html
new file mode 100644
index 000000000..6878e1f30
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/FWZoneDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "zoneDictGridController">
+ <div ui-grid = "zoneDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSConfigNameDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSConfigNameDictionary.html
new file mode 100644
index 000000000..bd1888850
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSConfigNameDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "msConfigNameDictGridController">
+ <div ui-grid = "msConfigNameDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSDcaeUUIDDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSDcaeUUIDDictionary.html
new file mode 100644
index 000000000..1948b5bb5
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSDcaeUUIDDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "msDCAEUUIDDictGridController">
+ <div ui-grid = "dcaeUUIDDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSLocationDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSLocationDictionary.html
new file mode 100644
index 000000000..0f6b75a33
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSLocationDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "msLocationDictGridController">
+ <div ui-grid = "msLocationDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSModelDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSModelDictionary.html
new file mode 100644
index 000000000..268130ced
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/MSModelDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "msModelsDictGridController">
+ <div ui-grid = "msModelsDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/ModelAttributeDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/ModelAttributeDictionary.html
new file mode 100644
index 000000000..fcf4ce9df
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/ModelAttributeDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "modelAttributeDictGridController">
+ <div ui-grid = "modelAttributeDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSClosedLoopDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSClosedLoopDictionary.html
new file mode 100644
index 000000000..f50f317e5
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSClosedLoopDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "psClosedLoopDictGridController">
+ <div ui-grid = "psClosedLoopDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSGroupPolicyScopeDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSGroupPolicyScopeDictionary.html
new file mode 100644
index 000000000..6f4fd34aa
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSGroupPolicyScopeDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "psGroupPolicyScopeDictGridController">
+ <div ui-grid = "psGroupPolicyScopeDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSResourceDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSResourceDictionary.html
new file mode 100644
index 000000000..53318384a
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSResourceDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "psResourceDictGridController">
+ <div ui-grid = "psResourceDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSServiceDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSServiceDictionary.html
new file mode 100644
index 000000000..1c5037d5c
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSServiceDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "psServiceDictGridController">
+ <div ui-grid = "psServiceDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSTypeDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSTypeDictionary.html
new file mode 100644
index 000000000..7584adb14
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/PSTypeDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "psTypeDictGridController">
+ <div ui-grid = "psTypeDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-exporter class= "grid"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/RiskTypeDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/RiskTypeDictionary.html
new file mode 100644
index 000000000..71108994f
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/RiskTypeDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "riskTypeDictGridController">
+ <div ui-grid = "riskTypeDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/SafePolicyWarningDictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/SafePolicyWarningDictionary.html
new file mode 100644
index 000000000..c80f1b72f
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Dictionary/SafePolicyWarningDictionary.html
@@ -0,0 +1,22 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div ng-app ng-controller = "safePolicyWarningDictGridController">
+ <div ui-grid = "safePolicyWarningDictionaryGrid" ui-grid-pagination ui-grid-selection ui-grid-resize-columns ui-grid-exporter></div>
+</div> \ No newline at end of file
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
new file mode 100644
index 000000000..fde8d4e9e
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js
@@ -0,0 +1,173 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module('abs').controller('actionPolicyController', function ($scope, PolicyAppService, modalService, $modal, Notification) {
+ $("#dialog").hide();
+
+ $scope.savebutton = true;
+ $scope.finalPath = null;
+
+ PolicyAppService.getData('getDictionary/get_ActionPolicyDictDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.actionPolicyDictionaryDatas = JSON.parse($scope.data.actionPolicyDictionaryDatas);
+ console.log($scope.actionPolicyDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_AttributeDatabyAttributeName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.attributeDictionaryDatas = JSON.parse($scope.data.attributeDictionaryDatas);
+ console.log($scope.attributeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('get_FunctionDefinitionDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.functionDefinitionDatas = JSON.parse($scope.data.functionDefinitionDatas);
+ console.log($scope.functionDefinitionDatas);
+ }, 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.saveActionPolicy = function(policy){
+ console.log(policy);
+ $scope.savebutton = false;
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ $scope.validatePolicy = function(policy){
+ console.log(policy);
+ document.getElementById("validate").innerHTML = "";
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data;
+ if($scope.data == '"success"'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
+ $scope.temp.policy.attributes = [];
+ $scope.temp.policy.ruleAlgorithmschoices = [];
+ }else{
+ if($scope.temp.policy.attributes.length == 0){
+ $scope.temp.policy.attributes = [];
+ }
+ if($scope.temp.policy.ruleAlgorithmschoices.length == 0){
+ $scope.temp.policy.ruleAlgorithmschoices = [];
+ }
+ }
+
+ $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}];
+ $scope.addNewChoice = function() {
+ var newItemNo = $scope.temp.policy.attributes .length+1;
+ $scope.temp.policy.attributes.push({'id':'choice'+newItemNo});
+ };
+ $scope.removeChoice = function() {
+ var lastItem = $scope.temp.policy.attributes.length-1;
+ $scope.temp.policy.attributes.splice(lastItem);
+ };
+
+
+ $scope.ItemNo = 0;
+ $scope.ruleAlgorithmDatas = [{"ruleAlgorithms" : $scope.temp.policy.ruleAlgorithmschoices}];
+
+ $scope.addNewRuleAlgorithm = function(){
+ var newItemNo = $scope.temp.policy.ruleAlgorithmschoices.length+1;
+ $scope.ItemNo = newItemNo;
+ if(newItemNo > 1){
+ var value = newItemNo-1;
+ $scope.attributeDictionaryDatas.push('A'+value);
+ }
+ $scope.temp.policy.ruleAlgorithmschoices.push({'id':'A'+newItemNo});
+
+ };
+
+ $scope.removeRuleAlgorithm = function() {
+ var lastItem = $scope.temp.policy.ruleAlgorithmschoices.length-1;
+ $scope.ItemNo = lastItem;
+ $scope.temp.policy.ruleAlgorithmschoices.splice(lastItem);
+ };
+
+}); \ No newline at end of file
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
new file mode 100644
index 000000000..c5160e741
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js
@@ -0,0 +1,245 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module('abs').controller('brmsParamPolicyController', function ($scope, $window, PolicyAppService, modalService, $modal, Notification) {
+ $("#dialog").hide();
+
+ $scope.savebutton = true;
+ $scope.finalPath = null;
+
+ $scope.validateSuccess = true;
+ var readValue = $scope.temp.policy.readOnly;
+ if(readValue){
+ $scope.validateSuccess = false;
+ }
+
+ PolicyAppService.getData('getDictionary/get_BRMSControllerDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.brmsControllerDatas = JSON.parse($scope.data.brmsControllerDictionaryDatas);
+ console.log($scope.brmsControllerDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_BRMSDependencyDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.brmsDependencyDatas = JSON.parse($scope.data.brmsDependencyDictionaryDatas);
+ console.log($scope.brmsDependencyDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_BRMSParamDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.brmsParamDictionaryDatas = JSON.parse($scope.data.brmsParamDictionaryDatas);
+ console.log($scope.brmsParamDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_RiskTypeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.riskTypeDictionaryDatas = JSON.parse($scope.data.riskTypeDictionaryDatas);
+ console.log($scope.riskTypeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ $scope.temp.policy.dynamicLayoutMap = {};
+ $scope.addDataToFields = function(ruleName){
+ console.log(ruleName);
+ if(ruleName != null){
+ var uuu = "policyController/getBRMSTemplateData.htm";
+ var postData={policyData: ruleName};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.temp.policy.dynamicLayoutMap = data.policyData;
+ });
+ console.log( $scope.temp.policy.dynamicLayoutMap);
+ },
+ error : function(data){
+ alert("Error While Retriving the Template Layout Pattren.");
+ }
+ });
+ }
+ };
+
+ $scope.ShowRule = function(policy){
+ console.log(policy);
+ var uuu = "policyController/ViewBRMSParamPolicyRule.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.datarule = data.policyData;
+ var modalInstance = $modal.open({
+ backdrop: 'static', keyboard: false,
+ templateUrl : 'brmsshowrule',
+ controller: 'showrulecontroller',
+ resolve: {
+ message: function () {
+ var message = {
+ datas: $scope.datarule
+ };
+ return message;
+ }
+ }
+ });
+ });
+ },
+ error : function(data){
+ Notification.error("Error Occured while Showing Rule.");
+ }
+ });
+ };
+
+ $scope.saveBrmsParamPolicy = function(policy){
+ console.log(policy);
+ $scope.savebutton = false;
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ $scope.safetyChecker = data.policyData.split("#")[2];
+ if ($scope.safetyChecker!=undefined) {
+ Notification.success($scope.safetyChecker);
+ }
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ $scope.validatePolicy = function(policy){
+ console.log(policy);
+ document.getElementById("validate").innerHTML = "";
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data.substring(1,8);
+ var size = data.data.length;
+ if($scope.data == 'success'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ if (size > 18){
+ var displayWarning = data.data.substring(19,size);
+ document.getElementById("validate").innerHTML = "Safe Policy Warning Message : "+displayWarning;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "skyblue";
+ }
+ $scope.validateSuccess = false;
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ function extend(obj, src) {
+ for (var key in src) {
+ if (src.hasOwnProperty(key)) obj[key] = src[key];
+ }
+ return obj;
+ }
+
+ if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
+ $scope.temp.policy.attributes = [];
+ }else{
+ if($scope.temp.policy.attributes.length == 0){
+ $scope.temp.policy.attributes = [];
+ }
+ }
+
+ $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}];
+ $scope.addNewChoice = function() {
+ var newItemNo = $scope.temp.policy.attributes.length+1;
+ $scope.temp.policy.attributes.push({'id':'choice'+newItemNo});
+ };
+ $scope.removeChoice = function() {
+ 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
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
new file mode 100644
index 000000000..5b78193ee
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js
@@ -0,0 +1,152 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module('abs').controller('brmsRawPolicyController', function ($scope, $window, PolicyAppService, modalService, $modal, Notification) {
+ $("#dialog").hide();
+
+ $scope.savebutton = true;
+ $scope.finalPath = null;
+
+ PolicyAppService.getData('getDictionary/get_BRMSControllerDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.brmsControllerDatas = JSON.parse($scope.data.brmsControllerDictionaryDatas);
+ console.log($scope.brmsControllerDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_BRMSDependencyDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.brmsDependencyDatas = JSON.parse($scope.data.brmsDependencyDictionaryDatas);
+ console.log($scope.brmsDependencyDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_RiskTypeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.riskTypeDictionaryDatas = JSON.parse($scope.data.riskTypeDictionaryDatas);
+ console.log($scope.riskTypeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ $scope.saveBrmsRawPolicy = function(policy){
+ console.log(policy);
+ $scope.savebutton = false;
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ $scope.validatePolicy = function(policy){
+ console.log(policy);
+ document.getElementById("validate").innerHTML = "";
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data.substring(1,8);
+ var size = data.data.length;
+ if($scope.data == 'success'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ if (size > 18){
+ var displayWarning = data.data.substring(19,size);
+ document.getElementById("validate").innerHTML = "Safe Policy Warning Message : "+displayWarning;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "skyblue";
+ }
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ }
+ });
+ };
+
+ function extend(obj, src) {
+ for (var key in src) {
+ if (src.hasOwnProperty(key)) obj[key] = src[key];
+ }
+ return obj;
+ }
+
+ if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
+ $scope.temp.policy.attributes = [];
+ }else{
+ if($scope.temp.policy.attributes.length == 0){
+ $scope.temp.policy.attributes = [];
+ }
+ }
+ $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}];
+ $scope.addNewChoice = function() {
+ var newItemNo = $scope.temp.policy.attributes.length+1;
+ $scope.temp.policy.attributes.push({'id':'choice'+newItemNo});
+ };
+ $scope.removeChoice = function() {
+ var lastItem = $scope.temp.policy.attributes.length-1;
+ $scope.temp.policy.attributes.splice(lastItem);
+ };
+}); \ No newline at end of file
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
new file mode 100644
index 000000000..9f2863579
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js
@@ -0,0 +1,154 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+app.controller('baseConfigController', function ($scope, PolicyAppService, modalService, $modal, Notification) {
+ $("#dialog").hide();
+
+ $scope.savebutton = true;
+
+ PolicyAppService.getData('getDictionary/get_EcompNameDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.ecompNameDictionaryDatas = JSON.parse($scope.data.ecompNameDictionaryDatas);
+ console.log($scope.ecompNameDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_AttributeDatabyAttributeName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.attributeDictionaryDatas = JSON.parse($scope.data.attributeDictionaryDatas);
+ console.log($scope.attributeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_RiskTypeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.riskTypeDictionaryDatas = JSON.parse($scope.data.riskTypeDictionaryDatas);
+ console.log($scope.riskTypeDictionaryDatas);
+ }, 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){
+ $scope.savebutton = false;
+ console.log(policy);
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+
+ $scope.validatePolicy = function(policy){
+ console.log(policy);
+ document.getElementById("validate").innerHTML = "";
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data.substring(1,8);
+ var size = data.data.length;
+ if($scope.data == 'success'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ if (size > 18){
+ var displayWarning = data.data.substring(19,size);
+ document.getElementById("validate").innerHTML = "Safe Policy Warning Message : "+displayWarning;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "skyblue";
+ }
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+ });
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
+ $scope.temp.policy.attributes = [];
+ }else{
+ if($scope.temp.policy.attributes.length == 0){
+ $scope.temp.policy.attributes = [];
+ }
+ }
+
+
+ $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}];
+ $scope.addNewChoice = function() {
+ var newItemNo = $scope.temp.policy.attributes .length+1;
+ $scope.temp.policy.attributes.push({'id':'choice'+newItemNo});
+ };
+ $scope.removeChoice = function() {
+ var lastItem = $scope.temp.policy.attributes.length-1;
+ $scope.temp.policy.attributes.splice(lastItem);
+ };
+
+}); \ No newline at end of file
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
new file mode 100644
index 000000000..a8dcd7b0a
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js
@@ -0,0 +1,783 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module("abs").controller('clFaultController', function($scope, $window, PolicyAppService, modalService, $modal, Notification){
+ $("#dialog").hide();
+
+ $scope.savebutton = true;
+ $scope.finalPath = null;
+
+ if($scope.temp.policy.triggerTrapSignatures == undefined){
+ $scope.temp.policy.triggerTrapSignatures = [];
+ $scope.temp.policy.triggerfaultSignatures = [];
+ }
+ var trapCollection = [];
+ var faultCollection = [];
+ if($scope.varbindDictionaryDatas == undefined){
+ $scope.varbindDictionaryDatas = [];
+ }
+
+ $scope.init = function(data){
+ if(data != undefined && $scope.temp.policy.triggerTrapSignatures.length == 0){
+ $scope.jsonData = data;
+ if($scope.jsonData.triggerSignaturesUsedForUI != null){
+ if($scope.jsonData.triggerSignaturesUsedForUI.signatures != null){
+ $scope.temp.policy.triggerTrapSignatures = {Trap1 : [], Trap2 : [], Trap3 : [], Trap4 : [], Trap5 : [], Trap6 : []};
+ var splitTraps = $scope.jsonData.triggerSignaturesUsedForUI.signatures.split("#!?!");
+ if(splitTraps.length > 1){
+ $scope.triggerdisabled = false;
+ var indexId = "Trap1";
+ trapCollection.push(indexId);
+ $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+1});
+ var splitTrap1 = splitTraps[0];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerTrapSignatures["Trap1"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 2){
+ var indexId = "Trap2";
+ trapCollection.push(indexId);
+ $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+2});
+ var splitTrap1 = splitTraps[1];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] == ''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerTrapSignatures["Trap2"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 3){
+ var indexId = "Trap3";
+ trapCollection.push(indexId);
+ $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+3});
+ var splitTrap1 = splitTraps[2];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerTrapSignatures["Trap3"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 4){
+ var indexId = "Trap4";
+ trapCollection.push(indexId);
+ $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+4});
+ var splitTrap1 = splitTraps[3];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerTrapSignatures["Trap4"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 5){
+ var indexId = "Trap5";
+ trapCollection.push(indexId);
+ $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+5});
+ var splitTrap1 = splitTraps[4];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerTrapSignatures["Trap5"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 6){
+ var indexId = "Trap6";
+ trapCollection.push(indexId);
+ $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+6});
+ var splitTrap1 = splitTraps[5];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerTrapSignatures["Trap6"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if($scope.jsonData.triggerSignaturesUsedForUI.connectSignatures != null){
+ var splitConnectTraps = $scope.jsonData.triggerSignaturesUsedForUI.connectSignatures.split("#!?!");
+ for(i=0; i < splitConnectTraps.length; i++){
+ if(splitConnectTraps[i] != ""){
+ var newConnectTrapItemNo = i+1;
+ var connects = splitConnectTraps[i].split("@!");
+ if(connects[0] == 'NOT' || connects[0] ==''){
+ var notBox = connects[0];
+ var connectTrap1 = connects[1];
+ var trapCount1 = connects[2];
+ var operatorBox = connects[3];
+ var connectTrap2 = connects[4];
+ var trapCount2 = connects[5];
+ }else{
+ var notBox = '';
+ var connectTrap1 = connects[0];
+ var trapCount1 = connects[1];
+ var operatorBox = connects[2];
+ var connectTrap2 = connects[3];
+ var trapCount2 = connects[4];
+ }
+ $scope.temp.policy.connecttriggerSignatures.push({'id':'C'+newConnectTrapItemNo,'notBox' : notBox , 'connectTrap1': connectTrap1,'trapCount1' : trapCount1,
+ 'operatorBox': operatorBox, 'connectTrap2': connectTrap2,'trapCount2' : trapCount2});
+ }
+ }
+ }
+ }
+ }
+ if($scope.jsonData.verificationSignaturesUsedForUI != null){
+ if($scope.jsonData.verificationSignaturesUsedForUI.signatures != null){
+ $scope.temp.policy.triggerfaultSignatures = {Fault1 : [], Fault2 : [], Fault3 : [], Fault4 : [], Fault5 : [], Fault6 : [],};
+ var splitTraps = $scope.jsonData.verificationSignaturesUsedForUI.signatures.split("#!?!");
+ if(splitTraps.length > 1){
+ $scope.verificationdisabled = false;
+ var indexId = "Fault1";
+ faultCollection.push(indexId);
+ $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+1});
+ var splitTrap1 = splitTraps[0];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerfaultSignatures["Fault1"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 2){
+ var indexId = "Fault2";
+ faultCollection.push(indexId);
+ $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+2});
+ var splitTrap1 = splitTraps[1];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] == ''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerfaultSignatures["Fault2"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 3){
+ var indexId = "Fault3";
+ faultCollection.push(indexId);
+ $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+3});
+ var splitTrap1 = splitTraps[2];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerfaultSignatures["Fault3"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 4){
+ var indexId = "Fault4";
+ faultCollection.push(indexId);
+ $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+4});
+ var splitTrap1 = splitTraps[3];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerfaultSignatures["Fault4"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 5){
+ var indexId = "Fault5";
+ faultCollection.push(indexId);
+ $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+5});
+ var splitTrap1 = splitTraps[4];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerfaultSignatures["Fault5"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+ if(splitTraps.length > 6){
+ var indexId = "Fault6";
+ faultCollection.push(indexId);
+ $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = [];
+ $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+6});
+ var splitTrap1 = splitTraps[5];
+ var splitEachTrap = splitTrap1.split("#!");
+ for(i = 0 ; i < splitEachTrap.length; i++){
+ var splitEachRow = splitEachTrap[i].split("@!");
+ var count = i +1;
+ if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){
+ var notBox = splitEachRow[0];
+ var trigger1 = splitEachRow[1];
+ var operatorBox = splitEachRow[2];
+ var trigger2 = splitEachRow[3];
+ }else{
+ var notBox = '';
+ var trigger1 = splitEachRow[0];
+ var operatorBox = splitEachRow[1];
+ var trigger2 = splitEachRow[2];
+ }
+ $scope.varbindDictionaryDatas.push('A'+count);
+ $scope.temp.policy.triggerfaultSignatures["Fault6"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2});
+ }
+ }
+
+ if($scope.jsonData.verificationSignaturesUsedForUI.connectSignatures != null){
+ var splitConnectTraps = $scope.jsonData.verificationSignaturesUsedForUI.connectSignatures.split("#!?!");
+ for(i=0; i < splitConnectTraps.length; i++){
+ if(splitConnectTraps[i] != ""){
+ var newConnectTrapItemNo = i+1;
+ var connects = splitConnectTraps[i].split("@!");
+ if(connects[0] == 'NOT' || connects[0] ==''){
+ var notBox = connects[0];
+ var connectTrap1 = connects[1];
+ var trapCount1 = connects[2];
+ var operatorBox = connects[3];
+ var connectTrap2 = connects[4];
+ var trapCount2 = connects[5];
+ }else{
+ var notBox = '';
+ var connectTrap1 = connects[0];
+ var trapCount1 = connects[1];
+ var operatorBox = connects[2];
+ var connectTrap2 = connects[3];
+ var trapCount2 = connects[4];
+ }
+ $scope.temp.policy.connectVerificationSignatures.push({'id':'C'+newConnectTrapItemNo,'notBox' : notBox , 'connectTrap1': connectTrap1,'trapCount1' : trapCount1,
+ 'operatorBox': operatorBox, 'connectTrap2': connectTrap2,'trapCount2' : trapCount2});
+ }
+ }
+ }
+ }
+ }
+ }
+
+ };
+
+ if($scope.temp.policy.readOnly){
+ $scope.triggerdisabled = true;
+ $scope.verificationdisabled = true;
+ }else{
+ $scope.triggerdisabled = false;
+ $scope.verificationdisabled = false;
+ }
+
+
+ PolicyAppService.getData('getDictionary/get_EcompNameDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.ecompNameDictionaryDatas = JSON.parse($scope.data.ecompNameDictionaryDatas);
+ console.log($scope.ecompNameDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_PEPOptionsDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.pepOptionsDictionaryDatas = JSON.parse($scope.data.pepOptionsDictionaryDatas);
+ console.log($scope.pepOptionsDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_PEPOptionsData').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.pepOptionsDictionaryDataEntity = JSON.parse($scope.data.pepOptionsDictionaryDatas);
+ console.log($scope.pepOptionsDictionaryDataEntity);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_VarbindDictionaryDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.varbindDictionaryDatas = JSON.parse($scope.data.varbindDictionaryDatas);
+ console.log($scope.varbindDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_VNFTypeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.vnfTypeDictionaryDatas = JSON.parse($scope.data.vnfTypeDictionaryDatas);
+ console.log($scope.vnfTypeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_VSCLActionDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.vsclActionDictionaryDatas = JSON.parse($scope.data.vsclActionDictionaryDatas);
+ console.log($scope.vsclActionDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_RiskTypeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.riskTypeDictionaryDatas = JSON.parse($scope.data.riskTypeDictionaryDatas);
+ console.log($scope.riskTypeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ $scope.pepActionDictionaryDatas = [];
+
+ $scope.getPepActionValues = function(pepOptionValue){
+ for (var i = 0; i < $scope.pepOptionsDictionaryDataEntity.length; ++i) {
+ var obj = $scope.pepOptionsDictionaryDataEntity[i];
+ if (obj.pepName == pepOptionValue){
+ var splitAlarm = obj.actions.split(':#@');
+ for (var j = 0; j < splitAlarm.length; ++j) {
+ $scope.pepActionDictionaryDatas.push(splitAlarm[j].split('=#@')[0]);
+ }
+ }
+ }
+ };
+
+ $scope.saveFaultPolicy = function(policy){
+ console.log(policy);
+ $scope.savebutton = false;
+ 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 }
+ }
+ 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}
+ }
+ 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,
+ trap2 : $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,
+ 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,
+ 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,
+ trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3, trap4 : $scope.temp.policy.triggerTrapSignatures.Trap4,
+ trap5 : $scope.temp.policy.triggerTrapSignatures.Trap5, trap6 : $scope.temp.policy.triggerTrapSignatures.Trap6}
+ }
+
+ if($scope.temp.policy.triggerfaultSignatures.length == 1 || $scope.temp.policy.triggerfaultSignatures["Fault1"] != null){
+ var 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}
+ }
+ 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,
+ trap2 : $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,
+ 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,
+ 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,
+ trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3, trap4 : $scope.temp.policy.triggerfaultSignatures.Fault4,
+ trap5 : $scope.temp.policy.triggerfaultSignatures.Fault5, trap6 : $scope.temp.policy.triggerfaultSignatures.Fault6}
+ }
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy,
+ trapData : data,
+ faultData : faultData
+ };
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ $scope.pushStatus=data.policyData.split("&")[1];
+ if($scope.pushStatus=="successPush"){
+ Notification.success("Policy pushed successfully");
+ }
+ $scope.triggerdisabled = true;
+ $scope.verificationdisabled = true;
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ }
+ });
+ };
+
+ $scope.validatePolicy = function(policy){
+ console.log(policy);
+ document.getElementById("validate").innerHTML = "";
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data.substring(1,8);
+ var size = data.data.length;
+ if($scope.data == 'success'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ if (size > 18){
+ var displayWarning = data.data.substring(19,size);
+ document.getElementById("validate").innerHTML = "Safe Policy Warning Message : "+displayWarning;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "skyblue";
+ }
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+ if($scope.connectTriggerTrapsList == undefined){
+ $scope.connectTriggerTrapsList = [];
+ }
+ if($scope.temp.policy.traptriggerSignatures == undefined){
+ $scope.temp.policy.traptriggerSignatures = [];
+ }
+
+ $scope.ItemNo = 0;
+ $scope.TriggerSignatureDatas = [{"triggerSignatures" : $scope.temp.policy.traptriggerSignatures}];
+ $scope.addTriggerButton = function() {
+ $scope.triggerdisabled = false;
+ var newItemNo = $scope.temp.policy.traptriggerSignatures.length+1;
+ $scope.ItemNo = newItemNo;
+ $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+newItemNo});
+ $scope.connectTriggerTrapsList.push('Trap'+newItemNo);
+ };
+ $scope.removeTriggerButton = function() {
+ var lastItem = $scope.temp.policy.traptriggerSignatures.length-1;
+ $scope.temp.policy.traptriggerSignatures.splice(lastItem);
+ $scope.connectTriggerTrapsList.splice('Trap'+lastItem);
+ };
+
+
+ $scope.trapItemNo = 0;
+ $scope.TrapTriggerSignatureDatas = [{"triggermainSignatures" : $scope.temp.policy.triggerTrapSignatures}];
+ $scope.addTrapTriggerButton = function(indexId) {
+ if(trapCollection.indexOf(indexId) !== -1){
+
+ }else{
+ $scope.temp.policy.triggerTrapSignatures[indexId] = [];
+ trapCollection.push(indexId);
+ }
+ var newTrapItemNo = $scope.temp.policy.triggerTrapSignatures[indexId].length+1;
+ $scope.trapItemNo = newTrapItemNo;
+ $scope.temp.policy.triggerTrapSignatures.push($scope.temp.policy.triggerTrapSignatures[indexId].push({'id':'A'+newTrapItemNo}));
+ if(newTrapItemNo > 1){
+ var count = newTrapItemNo-1;
+ $scope.varbindDictionaryDatas.push('A'+count);
+ }
+ };
+ $scope.removeTrapTriggerButton = function(indexId) {
+ var lastTrapItem = $scope.temp.policy.triggerTrapSignatures[indexId].length-1;
+ var checkLastTrapItem = lastTrapItem;
+ if(checkLastTrapItem == 0){
+ trapCollection.splice(indexId);
+ }
+ $scope.temp.policy.triggerTrapSignatures[indexId].splice(lastTrapItem);
+ };
+
+ if($scope.temp.policy.connecttriggerSignatures == undefined){
+ $scope.temp.policy.connecttriggerSignatures = [];
+ }
+
+ $scope.connecttrapItemNo = 0;
+ $scope.TrapConnectTriggerSignatureDatas = [{"connecttriggerSignatures" : $scope.temp.policy.connecttriggerSignatures}];
+ $scope.addTriggerConnectButton = function() {
+ var newConnectTrapItemNo = $scope.temp.policy.connecttriggerSignatures.length+1;
+ $scope.connecttrapItemNo = newConnectTrapItemNo;
+ $scope.temp.policy.connecttriggerSignatures.push({'id':'C'+newConnectTrapItemNo});
+ if(newConnectTrapItemNo >1){
+ var count = newConnectTrapItemNo-1;
+ $scope.connectTriggerTrapsList.push('C'+count);
+ }
+ };
+ $scope.removeTriggerConnectButton = function() {
+ var lastConnectTrapItem = $scope.temp.policy.connecttriggerSignatures.length-1;
+ $scope.temp.policy.connecttriggerSignatures.splice(lastConnectTrapItem);
+ if(lastConnectTrapItem < 1){
+ var count = lastConnectTrapItem-1;
+ $scope.connectTriggerTrapsList.splice('C'+count);
+ }
+ };
+ if($scope.connectTriggerFaultsList == undefined){
+ $scope.connectTriggerFaultsList = [];
+ }
+ if($scope.temp.policy.faulttriggerSignatures == undefined){
+ $scope.temp.policy.faulttriggerSignatures = [];
+ }
+
+ $scope.FaultItemNo = 0;
+ $scope.FaultSignatureDatas = [{"verificationmainSignatures" : $scope.temp.policy.faulttriggerSignatures}];
+ $scope.addVerFaultButton = function() {
+ var newFaultItemNo = $scope.temp.policy.faulttriggerSignatures.length+1;
+ $scope.FaultItemNo = newFaultItemNo;
+ $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+newFaultItemNo});
+ $scope.connectTriggerFaultsList.push('Fault'+newFaultItemNo);
+ };
+ $scope.removeVerFaultButton = function() {
+ var lastFaultItem = $scope.temp.policy.faulttriggerSignatures.length-1;
+ $scope.temp.policy.faulttriggerSignatures.splice(lastFaultItem);
+ $scope.connectTriggerFaultsList.splice('Fault'+lastFaultItem);
+ };
+ if($scope.temp.policy.triggerfaultSignatures == undefined){
+ $scope.temp.policy.triggerfaultSignatures = [];
+ }
+
+ $scope.faultItemNo1 = 0;
+ $scope.FaultTriggerSignatureDatas = [{"verificationSignatures" : $scope.temp.policy.triggerfaultSignatures}];
+ $scope.addVerTriggerButton = function(indexId) {
+ $scope.verificationdisabled = false;
+ if(faultCollection.indexOf(indexId) !== -1){
+
+ }else{
+ $scope.temp.policy.triggerfaultSignatures[indexId] = [];
+ faultCollection.push(indexId);
+ }
+ var newFaultItemNo1 = $scope.temp.policy.triggerfaultSignatures[indexId].length+1;
+ $scope.faultItemNo1 = newFaultItemNo1;
+ $scope.temp.policy.triggerfaultSignatures.push($scope.temp.policy.triggerfaultSignatures[indexId].push({'id':'A'+newFaultItemNo1}));
+ if(newFaultItemNo1 > 1){
+ var count = newFaultItemNo1-1;
+ $scope.varbindDictionaryDatas.push('A'+count);
+ }
+ };
+ $scope.removeVerTriggerButton = function(indexId) {
+ var lastFaultItem1 = $scope.temp.policy.triggerfaultSignatures[indexId].length-1;
+ var checkLastFaultItem = lastFaultItem1;
+ if(checkLastFaultItem == 0){
+ faultCollection.splice(indexId);
+ }
+ $scope.temp.policy.triggerfaultSignatures[indexId].splice(lastFaultItem1);
+ };
+
+ if($scope.temp.policy.connectVerificationSignatures == undefined){
+ $scope.temp.policy.connectVerificationSignatures = [];
+ }
+
+ $scope.connectFaultItemNo = 0;
+ $scope.FaultConnectTriggerSignatureDatas = [{"connectVerificationSignatures" : $scope.temp.policy.connectVerificationSignatures}];
+ $scope.addFaultConnectButton = function() {
+ var newConnectFaultItemNo = $scope.temp.policy.connectVerificationSignatures.length+1;
+ $scope.connectFaultItemNo = newConnectFaultItemNo;
+ $scope.temp.policy.connectVerificationSignatures.push({'id':'C'+newConnectFaultItemNo});
+ if(newConnectFaultItemNo >1){
+ var count = newConnectFaultItemNo-1;
+ $scope.connectTriggerFaultsList.push('C'+count);
+ }
+ };
+ $scope.removeFaultConnectButton = function() {
+ var lastConnectFaultItem = $scope.temp.policy.connectVerificationSignatures.length-1;
+ $scope.temp.policy.connectVerificationSignatures.splice(lastConnectFaultItem);
+ if(lastConnectFaultItem < 1){
+ var count = lastConnectFaultItem-1;
+ $scope.connectTriggerFaultsList.splice('C'+count);
+ }
+ };
+
+
+}); \ No newline at end of file
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
new file mode 100644
index 000000000..2f709a716
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js
@@ -0,0 +1,163 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module("abs").controller('clPMController', function($scope, $window, $timeout, PolicyAppService, modalService, $modal, Notification){
+ $("#dialog").hide();
+
+ $scope.savebutton = true;
+ $scope.finalPath = null;
+
+ PolicyAppService.getData('getDictionary/get_EcompNameDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.ecompNameDictionaryDatas = JSON.parse($scope.data.ecompNameDictionaryDatas);
+ console.log($scope.ecompNameDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_RiskTypeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.riskTypeDictionaryDatas = JSON.parse($scope.data.riskTypeDictionaryDatas);
+ console.log($scope.riskTypeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+
+ PolicyAppService.getData('app/policyApp/JSONDataFiles/JSONConfig.json').then(function(data){
+ var j = data;
+ $scope.PMData = j;
+ });
+
+ if($scope.temp.policy.readOnly && $scope.temp.policy.editPolicy){
+ $scope.temp.policy.verticaMetrics = [];
+ $scope.temp.policy.description = [];
+ $scope.temp.policy.attributes = [];
+ }
+
+ $scope.addDataToFields = function(serviceType){
+ if($scope.PMData == undefined){
+ $scope.temp.policy.verticaMetrics = [];
+ $scope.temp.policy.description = [];
+ $scope.temp.policy.attributes = [];
+ PolicyAppService.getData('app/policyApp/JSONDataFiles/JSONConfig.json').then(function(data){
+ var j = data;
+ $scope.PMData = j;
+ if(serviceType.serviceTypePolicyName == 'Registration Failure(Trinity)'){
+ var myNewData = $scope.PMData[0];
+ }else if(serviceType.serviceTypePolicyName == 'International Fraud(Trinity)'){
+ var myNewData = $scope.PMData[1];
+ }else if(serviceType.serviceTypePolicyName == 'No dial tone(Trinity)'){
+ var myNewData = $scope.PMData[2];
+ }else if(serviceType.serviceTypePolicyName == 'Call storm(Trinity)'){
+ var myNewData = $scope.PMData[3];
+ }else if(serviceType.serviceTypePolicyName == 'Registration storm(Trinity)'){
+ var myNewData = $scope.PMData[4];
+ }
+
+ $scope.temp.policy.verticaMetrics = myNewData;
+ $scope.temp.policy.description = myNewData;
+ $scope.temp.policy.attributeFields = myNewData;
+ });
+ }else{
+ $scope.temp.policy.verticaMetrics = serviceType;
+ $scope.temp.policy.description = serviceType;
+ $scope.temp.policy.attributeFields = serviceType;
+ }
+
+ };
+
+ $scope.saveCLPMPolicy = function(policy){
+ console.log(policy);
+ $scope.savebutton = false;
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ }
+ });
+ };
+
+ $scope.validatePolicy = function(policy){
+ console.log(policy);
+ document.getElementById("validate").innerHTML = "";
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data.substring(1,8);
+ var size = data.data.length;
+ if($scope.data == 'success'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ if (size > 18){
+ var displayWarning = data.data.substring(19,size);
+ document.getElementById("validate").innerHTML = "Safe Policy Warning Message : "+displayWarning;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "skyblue";
+ }
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+}) \ No newline at end of file
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
new file mode 100644
index 000000000..d0f44d46e
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
@@ -0,0 +1,929 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module('abs').controller('dcaeMicroServiceController', function ($scope, $window, $compile, PolicyAppService, modalService, $modal, Notification) {
+ $("#dialog").hide();
+ $scope.isCheck = false;
+ $scope.savebutton = true;
+ $scope.finalPath = null;
+
+// $scope.temp.policy.ttlDate = "2016-12-31";
+ if ($scope.temp.policy.editPolicy != undefined|| $scope.temp.policy.readOnly != undefined){
+ if ($scope.temp.policy.configName == undefined){
+ $scope.isCheck = false;
+ }else{
+ $scope.isCheck = true;
+ }
+ }else {
+ $scope.isCheck = false;
+ }
+
+ PolicyAppService.getData('getDictionary/get_EcompNameDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.ecompNameDictionaryDatas = JSON.parse($scope.data.ecompNameDictionaryDatas);
+ console.log($scope.ecompNameDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('get_DCAEPriorityValues').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.priorityDatas = JSON.parse($scope.data.priorityDatas);
+ console.log($scope.priorityDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_GroupPolicyScopeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.groupPolicyScopeListDatas = JSON.parse($scope.data.groupPolicyScopeListDatas);
+ console.log($scope.groupPolicyScopeListDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_MicroServiceConfigNameDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.microServiceCongigNameDictionaryDatas = JSON.parse($scope.data.microServiceCongigNameDictionaryDatas);
+ console.log($scope.microServiceCongigNameDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_MicroServiceLocationDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.microServiceLocationDictionaryDatas = JSON.parse($scope.data.microServiceLocationDictionaryDatas);
+ console.log($scope.microServiceLocationDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_MicroServiceModelsDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ var inputModelList = JSON.parse($scope.data.microServiceModelsDictionaryDatas);
+ var unique = {};
+ var uniqueList = [];
+ for(var i = 0; i < inputModelList.length; i++){
+ if(typeof unique[inputModelList[i]] == "undefined"){
+ unique[inputModelList[i]] = "";
+ uniqueList.push(inputModelList[i]);
+ }
+ }
+ $scope.microServiceModelsDictionaryDatas = uniqueList;
+ console.log($scope.microServiceModelsDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_DCAEUUIDDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.dcaeUUIDDictionaryDatas = JSON.parse($scope.data.dcaeUUIDDictionaryDatas);
+ console.log($scope.dcaeUUIDDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_RiskTypeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.riskTypeDictionaryDatas = JSON.parse($scope.data.riskTypeDictionaryDatas);
+ console.log($scope.riskTypeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_MicroServiceAttributeData').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.microServiceAttributeDictionaryDatas = JSON.parse($scope.data.microServiceAttributeDictionaryDatas);
+ console.log($scope.microServiceAttributeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+
+ $scope.choices = [];
+ $scope.attributeDatas = [{"attributes" : $scope.choices}];
+
+ $scope.addNewChoice = function(value) {
+ console.log(value);
+ if(value != undefined){
+ if (value.startsWith('div.')){
+ value = value.replace('div.','');
+ }
+ var parentElement = document.getElementById("div."+value);
+ var div = document.getElementById(value+"@0");
+ if(div != null){
+ var clone = div.cloneNode(true);
+ var addElement = parentElement.childElementCount + 1;
+ clone.id = ''+value+'@'+addElement;
+ clone.value = '';
+ document.getElementById("div."+value).appendChild(clone);
+ plainAttributeKeys.push(''+value+'@'+addElement);
+ }else{
+ div = document.getElementById("div."+value+"@0");
+ var childElement = parentElement.firstElementChild;
+ var countParent = parentElement.childElementCount;
+ var childElementString = childElement.innerHTML;
+ var find = value+"@0";
+ var re = new RegExp(find, 'g');
+ childElementString = childElementString.replace(re,value+'@' + countParent);
+ var clone = childElement.cloneNode(true);
+ for (var ii = 0; ii < parentElement.childNodes.length; ii++){
+ var childId = parentElement.childNodes[ii].id;
+ if(ii = parentElement.childNodes.length){
+ var childnewId = childId.slice(0, -1);
+ var count = childId.slice(-1);
+ }
+ }
+ var countvalue = parseInt(count) + 1;
+ clone.id = childnewId+countvalue;
+ clone.value = '';
+ clone.innerHTML=childElementString;
+ document.getElementById("div."+value).appendChild(clone);
+ var selects = clone.getElementsByTagName("select");
+ var inputs = clone.getElementsByTagName("input");
+ var removeValues = [];
+ for(var i=0; i<inputs.length; i++){
+ if ($scope.temp.policy.ruleData!=undefined){
+ var checkValue = $scope.temp.policy.ruleData[inputs[i].id];
+ if (checkValue!=undefined){
+ if($scope.temp.policy.ruleData != null){
+ var checkValue = $scope.temp.policy.ruleData[inputs[i].id];
+ document.getElementById(inputs[i].id).value = $scope.temp.policy.ruleData[inputs[i].id];
+ plainAttributeKeys.push(inputs[i].id);
+ }
+ } else {
+// removeValues.push(inputs[i].id);
+ plainAttributeKeys.push(inputs[i].id);
+ }
+ }else {
+ plainAttributeKeys.push(inputs[i].id);
+ }
+ }
+
+ for(var i=0; i<selects.length; i++){
+ if ($scope.temp.policy.ruleData!=undefined){
+ var checkValue = $scope.temp.policy.ruleData[selects[i].id];
+ if (checkValue!=undefined){
+ if($scope.temp.policy.ruleData != null){
+ var checkValue = $scope.temp.policy.ruleData[selects[i].id];
+ document.getElementById(selects[i].id).value = $scope.temp.policy.ruleData[selects[i].id];
+ plainAttributeKeys.push(selects[i].id);
+ }
+ } else {
+ plainAttributeKeys.push(selects[i].id);
+ }
+ }else {
+ plainAttributeKeys.push(selects[i].id);
+ }
+ }
+
+ for (var k=0; k<removeValues.length; k++){
+ var elem = document.getElementById(removeValues[k]);
+ elem.parentNode.removeChild(elem);
+ }
+ var ele = angular.element(document.getElementById("div."+value));
+ $compile(ele.contents())($scope);
+ $scope.$apply();
+ }
+ }
+ };
+
+ $scope.removeChoice = function(value) {
+ console.log(value);
+ if(value != undefined){
+ document.getElementById("div."+value).removeChild(document.getElementById("div."+value).lastChild);
+ }
+ };
+
+ $scope.pullVersion = function(serviceName) {
+ console.log(serviceName);
+ if(serviceName != undefined){
+ var uuu = "policyController/getModelServiceVersioneData.htm";
+ var postData={policyData: serviceName};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.microServiceModelsDictionaryVersionDatas = data[0].dcaeModelVersionData;
+ });
+ },
+ error : function(data){
+ alert("Error While Retriving the Template Layout Pattren.");
+ }
+ });
+ }
+ };
+
+ var splitDash = '-';
+ var splitEqual = '=';
+ var splitComma = ',';
+ var splitcolon = ':';
+ var splitsemicolon = ";";
+ var splitEnum = "],";
+ var plainAttributeKeys = [];
+ var matching = [];
+ var enumKeyList = [];
+ var dictionaryList = [];
+ var dictionaryNameList = [];
+ $scope.addDataToFields = function(serviceName, version){
+ if(serviceName != null && version !=null){
+ var service=serviceName+"-v"+version;
+ var myNode = document.getElementById("DynamicTemplate");
+ myNode.innerHTML = '';
+ var uuu = "policyController/getDCAEMSTemplateData.htm";
+ var postData={policyData: service};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.addNewChoice();
+ var plainAttributeKeys = [];
+ $scope.dcaeModelData = data[0].dcaeModelData;
+ $scope.dcaeJsonDate = data[0].jsonValue;
+ var attributes = $scope.dcaeModelData.attributes;
+ var refAttributes = $scope.dcaeModelData.ref_attributes;
+ var subAttributes = $scope.dcaeModelData.sub_attributes;
+ var enumAttributes = $scope.dcaeModelData.enumValues;
+ var annotation = $scope.dcaeModelData.annotation;
+ var dictionary = $scope.microServiceAttributeDictionaryDatas;
+
+ if (annotation == null || annotation.length<1){
+ $scope.isCheck = true;
+ }else {
+ $scope.isCheck = false;
+ var annoationList = annotation.split(splitComma);
+ for (k = 0; k < annoationList.length; k++){
+ var splitAnnotation = annoationList[k].split(splitEqual);
+ if (splitAnnotation[1].includes("matching-true")){
+ matching.push(splitAnnotation[0].trim());
+ }
+ }
+
+ }
+
+ if (dictionary!= null || dictionary>1){
+ if (dictionary!= null || dictionary.length>1){
+ for (m=0; m < dictionary.length; m += 1){
+ var keyCompare = dictionary[m].name;
+ var valueCompare = dictionary[m].value;
+ var valueModel = dictionary[m].modelName;
+ var conpairService = serviceName;
+ if (valueModel.includes('-v')){
+ conpairService = service;
+ }
+ if(valueModel.localeCompare(conpairService) == 0){
+ console.log(valueCompare);
+ dictionaryList.push(dictionary[m]);
+ if (!dictionaryNameList.includes(dictionary[m].name)){
+ dictionaryNameList.push(dictionary[m].name)
+ }
+ }
+ }
+ }
+ }
+
+ $scope.temp.policy.ruleGridData = [];
+
+ $scope.jsonLayout($scope.dcaeJsonDate);
+
+ });
+ if($scope.temp.policy.editPolicy || $scope.temp.policy.readOnly){
+ var checkData = [];
+ var data = [];
+ if($scope.temp.policy.ruleData != null){
+ var propNames = Object.getOwnPropertyNames($scope.temp.policy.ruleData);
+ propNames.forEach(function(name) {
+ data.push(name);
+ });
+ for(a = 0; a < data.length; a++){
+ var splitPlainAttributeKey1 = data[a].split(".");
+ if(splitPlainAttributeKey1[0].indexOf("@") != -1){
+ var key = splitPlainAttributeKey1[0];
+ checkData.push(key);
+ }
+ }
+ var unique = checkData.filter(onlyUnique);
+ for(i =0; i < unique.length; i++){
+ if(unique[i].indexOf("@0") == -1){
+ var finalkey = unique[i].split("@")[0];
+ $scope.addNewChoice(finalkey);
+ }
+ }
+ }
+ }
+ var ele = angular.element(document.getElementById("DynamicTemplate"));
+ $compile(ele.contents())($scope);
+ $scope.$apply();
+ },
+ error : function(data){
+ alert("Error While Retriving the Template Layout Pattren.");
+ }
+ });
+ }
+ };
+
+ function getDictionary(attribute){
+ var dicName = attribute;
+ if(attribute){
+ if(attribute.includes(":")){
+ dicName = attribute.split(":")[0];
+ }
+ }
+ var dictionaryRegExp = new RegExp(dicName);
+ listemunerateValues = [];
+ if (dictionaryRegExp.test(dictionaryNameList)) {
+ for (p=0; p < dictionaryList.length; p += 1) {
+ if (dicName == dictionaryList[p].name) {
+ listemunerateValues.push(dictionaryList[p].value);
+ }
+ }
+ }
+ return listemunerateValues;
+ }
+
+ function getList(attribute) {
+
+ var baseEnum = $scope.dcaeModelData.enumValues;
+ var enumList = baseEnum.split(splitEnum);
+ var enumAttributes;
+ var patternTest = new RegExp(attribute);
+ for (k=0; k < enumList.length; k += 1){
+ if(patternTest.test(enumList[k]) == true){
+ enumAttributes = enumList[k].trim();
+ }
+ }
+
+ if(enumAttributes){
+ enumAttributes = enumAttributes.replace("[", "");
+ enumAttributes = enumAttributes.replace("]", "");
+ enumAttributes = enumAttributes.replace(/ /g, '');
+
+ var dropListAfterCommaSplit = enumAttributes.split(splitEqual);
+ listemunerateValues = dropListAfterCommaSplit[1].split(splitComma);
+
+ enumKeyList.push(attribute);
+
+ return listemunerateValues;
+ }
+
+ return [];
+ }
+
+ function getBooleanList(){
+ var booleanList = [];
+ booleanList.push(true);
+ booleanList.push(false);
+ return booleanList;
+ }
+
+
+ function isArray(arrayTest) {
+ return Object.prototype.toString.call(arrayTest) === '[object Array]';
+ }
+ var lableList = [];
+
+ function deconstructJSON(dataTest, level , name) {
+ var array = false;
+ var label = level;
+ var stringValue = "java.lang.String";
+ var intValue = "int";
+ var double = "double";
+ var boolean = "boolean";
+ var baseLevel = level;
+
+ if (name.length > 1){
+ label = label + name + '.';
+ }
+
+ for (key in dataTest) {
+ array = isArray(dataTest[key]);
+ console.log(key , dataTest[key]);
+ if (!!dataTest[key] && typeof(dataTest[key])=="object") {
+ if (array==false && key!=="0"){
+ $scope.labelLayout(label, key, array );
+ }
+
+ if (array == true && key!=0){
+ lableList.push(key);
+ }
+
+ if (lableList.length > 0){
+ array = true;
+ }
+ if ( key=="0"){
+ var newKey = lableList.pop();
+ $scope.labelLayout(baseLevel, newKey, array );
+ if (array){
+ label = baseLevel + newKey + '@0.';
+ } else {
+ label = baseLevel + newKey + '.';
+ }
+ }
+ deconstructJSON(dataTest[key] , label, key);
+ } else {
+ var attirbuteLabel = label;
+ var defaultValue='';
+ var isRequired = false;
+ if (dataTest[key].includes('defaultValue-')){
+ defaultValue = dataTest[key].split('defaultValue-')[1];
+ }
+
+ if (key==="0"){
+ array = true;
+ attributekey = lableList.pop();
+ attirbuteLabel = baseLevel;
+ } else {
+ attributekey = key.split();
+ }
+
+ if (dataTest[key].includes('required-true')){
+ isRequired = true;
+ }
+ console.log("attirbuteLabel = " + attirbuteLabel);
+ switch (dataTest[key].split(splitcolon)[0]){
+ case stringValue:
+ $scope.attributeBox(attributekey, array, attirbuteLabel, defaultValue, isRequired);
+ break;
+ case intValue:
+ $scope.attributeBox(attributekey, array, attirbuteLabel, defaultValue, isRequired);
+ break;
+ case double:
+ $scope.attributeBox(attributekey, array, attirbuteLabel, defaultValue, isRequired);
+ break;
+ case boolean:
+ $scope.dropBoxLayout(attirbuteLabel, attributekey, array, dataTest[key], getBooleanList());
+ break;
+ default:
+ if (dataTest[key].includes('dictionary-')){
+ var list = getDictionary(dataTest[key].split('dictionary-')[1]);
+ }else{
+ var list = getList(dataTest[key]);
+ }
+ if (list.length===0){
+ $scope.attributeBox(attributekey, array, attirbuteLabel, defaultValue, isRequired);
+ }else{
+ $scope.dropBoxLayout(attirbuteLabel, attributekey, array, dataTest[key], list);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ $scope.jsonLayout = function(dataTest){
+ deconstructJSON(dataTest , "", "");
+ }
+
+
+ $scope.attributeBox = function(attibuteKey, attributeManyKey, labelValue, defaultValue, isRequired){
+ $scope.temp.policy.ruleGridData.push(attibuteKey);
+ var br = document.createElement("BR");
+
+ var label = document.createElement("Label");
+ var labeltext = null;
+ var requiredLabName = "";
+ if (matching.includes(attibuteKey)){
+ labeltext = document.createTextNode(attibuteKey + "*!");
+ }else {
+ //var labeltext = document.createTextNode(refattributeLabel);
+ if(isRequired){
+ requiredLabName = attibuteKey + " *";
+ labeltext = document.createTextNode(requiredLabName);
+ }else{
+ labeltext = document.createTextNode(attibuteKey);
+ }
+ }
+
+
+ var divID = labelValue;
+
+ if (labelValue.length < 1){
+ divID = "DynamicTemplate";
+ }else if (labelValue.endsWith('.')){
+ var divID = 'div.'+ labelValue.substring(0, labelValue.length-1);
+ }
+
+ label.appendChild(labeltext);
+
+ var textField = document.createElement("INPUT");
+
+ textField.setAttribute("class" , "form-control");
+ textField.setAttribute("type" , "text");
+ textField.setAttribute("style" , "width:300px;");
+ textField.setAttribute("ng-disabled" , "temp.policy.readOnly");
+ var checkKey;
+ if(attributeManyKey){
+ checkKey = 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");
+ var buttonaddLabel = document.createTextNode("+");
+ addButton.appendChild(buttonaddLabel);
+ addButton.setAttribute("id", labelValue + attibuteKey);
+ addButton.setAttribute("class", "btn btn-default");
+ addButton.setAttribute("ng-click" , 'addNewChoice("'+labelValue + attibuteKey+'");');
+ addButton.setAttribute("ng-disabled" , "temp.policy.readOnly");
+ var removeButton = document.createElement("BUTTON");
+ var buttonremoveLabel = document.createTextNode("-");
+ removeButton.appendChild(buttonremoveLabel);
+ removeButton.setAttribute("class", "btn btn-default");
+ removeButton.setAttribute("ng-click" , 'removeChoice("'+labelValue + attibuteKey+'");');
+ removeButton.setAttribute("ng-disabled" , "temp.policy.readOnly");
+ document.getElementById(divID).appendChild(addButton);
+ document.getElementById(divID).appendChild(removeButton);
+ document.getElementById(divID).appendChild(label);
+ document.getElementById(divID).appendChild(textField);
+ document.getElementById(divID).appendChild(br);
+ document.getElementById(divID).appendChild(divTag);
+ }else{
+ checkKey = labelValue + attibuteKey;
+ textField.setAttribute("id" , ''+labelValue +attibuteKey+'');
+ if(requiredLabName.includes("*")){
+ textField.setAttribute("required", "true");
+ }
+ document.getElementById(divID).appendChild(label);
+ document.getElementById(divID).appendChild(textField);
+ document.getElementById(divID).appendChild(br);
+
+ }
+
+ if (defaultValue.length > 0){
+ if(defaultValue.includes(":")){
+ defaultValue = defaultValue.split(":")[0];
+ if(defaultValue === "NA") {
+ defaultValue = "";
+ }
+ }
+ document.getElementById(checkKey).value = defaultValue;
+ }
+
+ if($scope.temp.policy.ruleData != null){
+ //document.getElementById(checkKey).value = $scope.temp.policy.ruleData[checkKey];
+ 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];
+ }
+ }
+ plainAttributeKeys.push(labelValue + attibuteKey+'*'+attributeManyKey);
+ };
+
+ $scope.labelLayout = function(labelValue, lableName, labelManyKey ){
+ var label = document.createElement("Label")
+ var divID = labelValue;
+ if (labelValue.endsWith('.')){
+ var workingLabel = labelValue.substring(0, labelValue.length-1);
+ }else {
+ var workingLabel = labelValue;
+ }
+
+ if (labelValue.length < 1){
+ divID = "DynamicTemplate";
+ } else if (labelValue.endsWith('.')){
+ var divID = 'div.'+ labelValue.substring(0, labelValue.length-1);
+ }
+
+ var labeltext = document.createTextNode(lableName);
+
+ label.appendChild(labeltext);
+
+ if(labelManyKey){
+ var addButton = document.createElement("BUTTON");
+ var buttonLabel = document.createTextNode("+");
+ addButton.appendChild(buttonLabel);
+ addButton.setAttribute("class", "btn btn-default");
+ addButton.setAttribute("ng-click" , 'addNewChoice("'+labelValue + lableName+'");');
+ addButton.setAttribute("ng-disabled" , "temp.policy.readOnly");
+ var removeButton = document.createElement("BUTTON");
+ var buttonremoveLabel = document.createTextNode("-");
+ removeButton.appendChild(buttonremoveLabel);
+ removeButton.setAttribute("class", "btn btn-default");
+ removeButton.setAttribute("ng-click" , 'removeChoice("'+labelValue +lableName+'");');
+ removeButton.setAttribute("ng-disabled" , "temp.policy.readOnly");
+ document.getElementById(divID).appendChild(addButton);
+ document.getElementById(divID).appendChild(removeButton);
+ document.getElementById(divID).appendChild(label);
+ var id = "div."+labelValue+lableName;
+ var divTag = document.createElement("div");
+ divTag.setAttribute("id", id);
+ document.getElementById(divID).appendChild(divTag);
+
+ var divTag = document.createElement("div");
+ divTag.setAttribute("id", id +'@0');
+ document.getElementById(id).appendChild(divTag);
+ }else{
+ var divTag = document.createElement("div");
+ divTag.setAttribute("id", "div."+labelValue+lableName);
+ document.getElementById(divID).appendChild(label);
+ document.getElementById(divID).appendChild(divTag);
+ }
+ };
+
+ $scope.dropBoxLayout = function(labelLevel, attributeName, many , refValue, listemunerateValues){
+ var br = document.createElement("BR");
+
+ if (labelLevel.length < 1){
+ var divID = "DynamicTemplate";
+ } else if (labelLevel.endsWith('.')){
+ var divID = 'div.'+ labelLevel.substring(0, labelLevel.length-1);
+ }
+
+
+ var label = document.createElement("Label")
+ if (matching.includes(attributeName)){
+ var labeltext = document.createTextNode(attributeName + "*!");
+ }else {
+ var labeltext = document.createTextNode(attributeName);
+ }
+ label.appendChild(labeltext);
+
+ var listField = document.createElement("SELECT");
+ listField.setAttribute("class" , "form-control");
+ listField.setAttribute("style" , "width:300px;");
+ listField.setAttribute("ng-disabled" , "temp.policy.readOnly");
+
+ for (i=0; i < listemunerateValues.length; i += 1) {
+ option = document.createElement('option');
+ option.setAttribute('value', listemunerateValues[i]);
+ option.appendChild(document.createTextNode(listemunerateValues[i]));
+ listField.appendChild(option);
+ }
+ listField.setAttribute("id" , ''+ labelLevel + attributeName + '');;
+ document.getElementById(divID).appendChild(label);
+ document.getElementById(divID).appendChild(br);
+
+ if(many == true){
+ document.getElementById(divID).appendChild(listField).multiple = true;
+ plainAttributeKeys.push(labelLevel + attributeName+'*'+true);
+ }else {
+ document.getElementById(divID).appendChild(listField).multiple = false;
+ plainAttributeKeys.push(labelLevel + attributeName+'*'+false);
+ }
+
+ if($scope.temp.policy.ruleData != null){
+ if (many == true){
+ document.getElementById(labelLevel +attributeName).options[0].selected = false;
+ for (i=0; i < listemunerateValues.length; i += 1) {
+ var testValue = $scope.temp.policy.ruleData[labelLevel +attributeName+'@' + i];
+ if (testValue === undefined){
+ testValue = $scope.temp.policy.ruleData[labelLevel +attributeName];
+ }
+ var location = listemunerateValues.indexOf(testValue);
+ if (location!=-1){
+ document.getElementById(labelLevel +attributeName).options[location].selected = true;
+ }
+ }
+ }else {
+ document.getElementById(labelLevel + attributeName).value = $scope.temp.policy.ruleData[labelLevel + attributeName];
+
+ }
+ }
+ };
+
+ function onlyUnique(value, index, self) {
+ return self.indexOf(value) === index;
+ };
+
+
+ function checkDictionary(value){
+ for (i = 0; i < $scope.microServiceAttributeDictionaryDatas.length; i++) {
+ if ($scope.microServiceAttributeDictionaryDatas[i].name.localeCompare(value)){
+ return true;
+ }
+ }
+
+ }
+ $scope.savePolicy = function(policy){
+ $scope.savebutton = false;
+ var splitAt = '*';
+ var dot ='.';
+ var jsonPolicy = {};
+ if(plainAttributeKeys != null){
+ for(a = 0; a < plainAttributeKeys.length; a++){
+ var splitPlainAttributeKey = plainAttributeKeys[a].split(splitAt);
+ console.log(splitPlainAttributeKey[1]);
+ var searchElement = document.getElementById(splitPlainAttributeKey[0]);
+ var key = splitPlainAttributeKey[0];
+ if(searchElement == null){
+ searchElement = document.getElementById(splitPlainAttributeKey[0]+'@0');
+ key = splitPlainAttributeKey[0]+'@0';
+ }else if (searchElement.nodeName == 'BUTTON'){
+ searchElement = document.getElementById(splitPlainAttributeKey[0]+'@0');
+ key = splitPlainAttributeKey[0]+'@0';
+ }
+ if(searchElement != null){
+ var keySplit = key.split(dot);
+ var elumentLocation = keySplit.length;
+ var enumKey = key;
+ if (elumentLocation > 1){
+ enumKey = keySplit[keySplit.length - 1];
+ }
+ var aWhiteSpace = " ";
+ if (enumKeyList.indexOf(enumKey) != -1){
+ if (splitPlainAttributeKey[1].indexOf("true") !== -1){
+ var multiSlect = [];
+ for ( var i = 0; i < searchElement.selectedOptions.length; i++) {
+ multiSlect.push(searchElement.selectedOptions[i].value);
+ }
+ jsonPolicy[key]= multiSlect;
+ }else{
+ //set a space due to empty value caused JSON format error in PolicyRestAdapter and remove it in back-end.
+ if(searchElement.value == ""){
+ searchElement.value = aWhiteSpace;
+ }
+ console.log(" searchElement.value = > " + searchElement.value);
+ jsonPolicy[key]= searchElement.value;
+ }
+ } else {
+ if(searchElement.value != null){
+ //set a default value due to empty value caused JSON format error in PolicyRestAdapter
+ if(searchElement.value == ""){
+ searchElement.value = aWhiteSpace;
+ }
+ console.log(" searchElement.value = > " + searchElement.value);
+ jsonPolicy[key]= searchElement.value;
+ }
+ }
+ }
+ }
+ }
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy, policyJSON : jsonPolicy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ $scope.safetyChecker = data.policyData.split("#")[2];
+ if ($scope.safetyChecker!=undefined) {
+ Notification.success($scope.safetyChecker);
+ }
+ $scope.pushStatus=data.policyData.split("&")[1];
+ if($scope.pushStatus=="successPush"){
+ Notification.success("Policy pushed successfully");
+ }
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ }
+ });
+ };
+
+ $scope.validatePolicy = function(policy){
+ document.getElementById("validate").innerHTML = "";
+ var splitAt = '*';
+ var dot ='.';
+ var jsonPolicy = {};
+ if(plainAttributeKeys != null){
+ for(a = 0; a < plainAttributeKeys.length; a++){
+ var splitPlainAttributeKey = plainAttributeKeys[a].split(splitAt);
+ console.log(splitPlainAttributeKey[1]);
+ var searchElement = document.getElementById(splitPlainAttributeKey[0]);
+ var key = splitPlainAttributeKey[0];
+ if(searchElement == null){
+ searchElement = document.getElementById(splitPlainAttributeKey[0]+'@0');
+ key = splitPlainAttributeKey[0]+'@0';
+ }else if (searchElement.nodeName == 'BUTTON'){
+ searchElement = document.getElementById(splitPlainAttributeKey[0]+'@0');
+ key = splitPlainAttributeKey[0]+'@0';
+ }
+ if(searchElement != null){
+ if (enumKeyList.indexOf(key) != -1){
+ if (splitPlainAttributeKey[1].indexOf("true") !== -1){
+ var multiSlect = [];
+ for ( var i = 0; i < searchElement.selectedOptions.length; i++) {
+ multiSlect.push(searchElement.selectedOptions[i].value);
+ }
+ jsonPolicy[key]= multiSlect;
+ }else{
+ jsonPolicy[key]= searchElement.value;
+ }
+ } else {
+ if(searchElement.value != null){
+ jsonPolicy[key]= searchElement.value;
+ if(searchElement.getAttribute("required")){
+ if(!searchElement.value){
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy, policyJSON : jsonPolicy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data.substring(1,8);
+ var size = data.data.length;
+ if($scope.data == 'success'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ if (size > 18){
+ var displayWarning = data.data.substring(19,size - 1);
+ document.getElementById("validate").innerHTML = "Safe Policy Warning Message : "+displayWarning;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "skyblue";
+ }
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ function extend(obj, src) {
+ for (var key in src) {
+ if (src.hasOwnProperty(key)) obj[key] = src[key];
+ }
+ return obj;
+ }
+}); \ No newline at end of file
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
new file mode 100644
index 000000000..f5932e2f4
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js
@@ -0,0 +1,209 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module('abs').controller('decisionPolicyController', function ($scope, PolicyAppService, modalService, $modal, Notification) {
+ $("#dialog").hide();
+ $scope.savebutton = true;
+ $scope.finalPath = null;
+
+ if($scope.temp.policy.ruleProvider==undefined){
+ $scope.temp.policy.ruleProvider="Custom";
+ }
+
+ PolicyAppService.getData('getDictionary/get_EcompNameDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.ecompNameDictionaryDatas = JSON.parse($scope.data.ecompNameDictionaryDatas);
+ console.log($scope.ecompNameDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_SettingsDictionaryDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.settingsDictionaryDatas = JSON.parse($scope.data.settingsDictionaryDatas);
+ console.log($scope.settingsDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('get_FunctionDefinitionDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.functionDefinitionDatas = JSON.parse($scope.data.functionDefinitionDatas);
+ console.log($scope.functionDefinitionDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_AttributeDatabyAttributeName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.attributeDictionaryDatas = JSON.parse($scope.data.attributeDictionaryDatas);
+ console.log($scope.attributeDictionaryDatas);
+ }, 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.saveDecisionPolicy = function(policy){
+ $scope.savebutton = false;
+ console.log(policy);
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ console.log($scope.data);
+
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ }
+ });
+ };
+
+ $scope.validatePolicy = function(policy){
+ console.log(policy);
+ document.getElementById("validate").innerHTML = "";
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data;
+ if($scope.data == '"success"'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
+ $scope.temp.policy.attributes = [];
+ $scope.temp.policy.settings = [];
+ $scope.temp.policy.ruleAlgorithmschoices = [];
+ }else{
+ if($scope.temp.policy.attributes.length == 0){
+ $scope.temp.policy.attributes = [];
+ }
+ if($scope.temp.policy.settings.length == 0){
+ $scope.temp.policy.settings = [];
+ }
+ if($scope.temp.policy.ruleAlgorithmschoices.length == 0){
+ $scope.temp.policy.ruleAlgorithmschoices = [];
+ }
+ }
+ $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}];
+ $scope.addNewChoice = function() {
+ var newItemNo = $scope.temp.policy.attributes.length+1;
+ $scope.temp.policy.attributes.push({'id':'choice'+newItemNo});
+ };
+ $scope.removeChoice = function() {
+ var lastItem = $scope.temp.policy.attributes.length-1;
+ $scope.temp.policy.attributes.splice(lastItem);
+ };
+
+
+ $scope.settingsDatas = [{"settings" : $scope.temp.policy.settings}];
+ $scope.addNewSettingsChoice = function() {
+ var newItemNo = $scope.temp.policy.settings.length+1;
+ $scope.temp.policy.settings.push({'id':'choice'+newItemNo});
+ };
+ $scope.removeSettingsChoice = function() {
+ var lastItem = $scope.temp.policy.settings.length-1;
+ $scope.temp.policy.settings.splice(lastItem);
+ };
+
+ $scope.ItemNo = 0;
+ $scope.ruleAlgorithmDatas = [{"ruleAlgorithms" : $scope.temp.policy.ruleAlgorithmschoices }];
+
+ $scope.addNewRuleAlgorithm = function() {
+ if($scope.temp.policy.ruleAlgorithmschoices != null){
+ var newItemNo = $scope.temp.policy.ruleAlgorithmschoices.length+1;
+ }else{
+ var newItemNo = 1;
+ }
+ if(newItemNo > 1){
+ var value = newItemNo-1;
+ $scope.attributeDictionaryDatas.push('A'+value);
+ }
+ $scope.temp.policy.ruleAlgorithmschoices.push({'id':'A'+newItemNo});
+ };
+
+ $scope.removeRuleAlgorithm = function() {
+ var lastItem = $scope.temp.policy.ruleAlgorithmschoices.length-1;
+ $scope.temp.policy.ruleAlgorithmschoices.splice(lastItem);
+ };
+
+ $scope.providerListener = function(ruleProvider) {
+ if (ruleProvider!="Custom"){
+ $scope.temp.policy.ruleAlgorithmschoices = [];
+ $scope.temp.policy.settings = [];
+ $scope.temp.policy.attributes = [];
+ }
+ };
+}); \ No newline at end of file
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
new file mode 100644
index 000000000..7c0300c9f
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js
@@ -0,0 +1,87 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+var app = appDS2;
+app.controller('exportPolicyController', function ($scope, $window, PolicyAppService, modalService, $modal, Notification){
+ $( "#dialog" ).hide();
+ $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.files;
+ PolicyAppService.getData('get_AutoPushPoliciesContainerData').then(function (data) {
+ $scope.loading = false;
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.policydatas =JSON.parse($scope.data.policydatas);
+ console.log($scope.policydatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ $scope.urlLink;
+ $scope.download = function(){
+ var policySelection = $scope.gridPolicyApi.selection.getSelectedRows();
+ console.log(policySelection);
+ var finalData = {
+ "policyDatas": policySelection
+ };
+ console.log(finalData);
+ var uuu = "policy_download/exportPolicy.htm";
+ var postData={exportData: finalData};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.data;
+ var url = '../' + $scope.data;
+ window.location = url;
+ Notification.success("Policies Exported Successfully");
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Error Occured while Exporting Policy.");
+ }
+ });
+
+ };
+
+ $scope.close = function() {
+ $modalInstance.close();
+ };
+
+});
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
new file mode 100644
index 000000000..cc051769c
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js
@@ -0,0 +1,227 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module('abs').controller('fwPolicyController', function ($scope, $window, PolicyAppService, modalService, $modal, Notification) {
+ $("#dialog").hide();
+
+ $scope.savebutton = true;
+ $scope.finalPath = null;
+
+ PolicyAppService.getData('getDictionary/get_SecurityZoneDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.securityZoneDictionaryDatas = JSON.parse($scope.data.securityZoneDictionaryDatas);
+ console.log($scope.securityZoneDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_TermListDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.termListDictionaryDatas = JSON.parse($scope.data.termListDictionaryDatas);
+ console.log($scope.termListDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_FWDictionaryListDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.fwDictListDictionaryDatas = JSON.parse($scope.data.fwDictListDictionaryDatas);
+ console.log($scope.fwDictListDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_FWParentListDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.fwParentListDictionaryDatas = JSON.parse($scope.data.fwParentListDictionaryDatas);
+ console.log($scope.fwParentListDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_TagPickerNameByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.fwTagPickerDictionaryDatas = JSON.parse($scope.data.fwTagPickerDictionaryDatas);
+ console.log($scope.fwTagPickerDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_RiskTypeDataByName').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.riskTypeDictionaryDatas = JSON.parse($scope.data.riskTypeDictionaryDatas);
+ console.log($scope.riskTypeDictionaryDatas);
+ }, 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.viewFWRule = function(policy){
+ console.log(policy);
+ var uuu = "policyController/ViewFWPolicyRule.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ window.alert(data.policyData);
+ });
+ },
+ error : function(data){
+ Notification.error("Error Occured while Showing Rule.");
+ }
+ });
+ };
+
+
+ $scope.saveFWPolicy = function(policy){
+ $scope.savebutton = false;
+ console.log(policy);
+ var uuu = "policycreation/save_policy";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.data=data.policyData;
+ if($scope.data == 'success'){
+ $scope.temp.policy.readOnly = 'true';
+ $scope.pushStatus=data.policyData.split("&")[1];
+ if($scope.pushStatus=="successPush"){
+ Notification.success("Policy pushed successfully");
+ }
+ Notification.success("Policy Saved Successfully.");
+ }else if ($scope.data == 'PolicyExists'){
+ $scope.savebutton = true;
+ Notification.error("Policy Already Exists with Same Name in Scope.");
+ }
+ });
+ console.log($scope.data);
+ },
+ error : function(data){
+ Notification.error("Error Occured while saving Policy.");
+ }
+ });
+ };
+
+ $scope.validatePolicy = function(policy){
+ console.log(policy);
+ document.getElementById("validate").innerHTML = "";
+ var uuu = "policyController/validate_policy.htm";
+ var postData={policyData: policy};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.validateData = data.data.replace(/\"/g, "");
+ $scope.data=data.data.substring(1,8);
+ var size = data.data.length;
+ if($scope.data == 'success'){
+ Notification.success("Validation Success.");
+ $scope.savebutton = false;
+ if (size > 18){
+ var displayWarning = data.data.substring(19,size);
+ document.getElementById("validate").innerHTML = "Safe Policy Warning Message : "+displayWarning;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "skyblue";
+ }
+ }else{
+ Notification.error("Validation Failed.");
+ document.getElementById("validate").innerHTML = $scope.validateData;
+ document.getElementById("validate").style.color = "white";
+ document.getElementById("validate").style.backgroundColor = "red";
+ $scope.savebutton = true;
+ }
+
+ });
+ console.log($scope.data);
+
+ },
+ error : function(data){
+ Notification.error("Validation Failed.");
+ $scope.savebutton = true;
+ }
+ });
+ };
+
+ if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){
+ $scope.temp.policy.attributes = [];
+ $scope.temp.policy.fwattributes = [];
+ }else{
+ if($scope.temp.policy.attributes.length == 0){
+ $scope.temp.policy.attributes = [];
+ }
+ if($scope.temp.policy.fwPolicyType == 'Parent Policy'){
+ if($scope.temp.policy.fwattributes.length == 0){
+ $scope.temp.policy.fwattributes = [];
+ }
+ }
+ }
+
+ $scope.attributeDatas = [{"ruleSetup" : $scope.temp.policy.attributes}];
+ $scope.addNewChoice = function() {
+ var newItemNo = $scope.temp.policy.attributes.length+1;
+ $scope.temp.policy.attributes.push({'id':'choice'+newItemNo});
+ };
+ $scope.removeChoice = function() {
+ var lastItem = $scope.temp.policy.attributes.length-1;
+ $scope.temp.policy.attributes.splice(lastItem);
+ };
+
+ $scope.fwattributeDatas = [{"parentSetup" : $scope.temp.policy.fwattributes}];
+ $scope.addNewFWDictList = function() {
+ var newItemNo = $scope.temp.policy.fwattributes.length+1;
+ $scope.temp.policy.fwattributes.push({'id':'choice'+newItemNo});
+ };
+ $scope.removefwDictChoice = function() {
+ var lastItem = $scope.temp.policy.fwattributes.length-1;
+ $scope.temp.policy.fwattributes.splice(lastItem);
+ };
+
+}); \ No newline at end of file
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
new file mode 100644
index 000000000..3b60c9b19
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html
@@ -0,0 +1,142 @@
+<div ng-controller="actionPolicyController">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-2">
+ <label>Component Attributes:</label><br>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div data-ng-repeat="choice in temp.policy.attributes">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <select class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.key"
+ ng-options="option for option in attributeDictionaryDatas track by option">
+ <option value="">{{choice.key}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.value"
+ placeholder="Attribute Value" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default" ng-show="$last"
+ ng-disabled="temp.policy.readOnly" ng-click="removeChoice()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <label>Rule Algorithms:<sup><b>*</b></sup></label><br>
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="addNewRuleAlgorithm()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div
+ data-ng-repeat="ruleAlgorithmschoice in temp.policy.ruleAlgorithmschoices">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-1">
+ <label ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmLabels"
+ ng-disabled="temp.policy.readOnly"
+ name="dynamicRuleAlgorithmLabels">{{ruleAlgorithmschoice.id}}</label>
+ </div>
+ <div class="form-group col-sm-3">
+ <select type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1"
+ ng-options="option for option in attributeDictionaryDatas track by option"
+ name="dynamicRuleAlgorithmField1">
+ <option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmField1}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-3">
+ <select type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo"
+ ng-options="option for option in functionDefinitionDatas"
+ name="dynamicRuleAlgorithmCombo">
+ <option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmCombo}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField2"
+ name="dynamicRuleAlgorithmField2" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default" ng-show="$last"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeRuleAlgorithm()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Action Performer:<sup><b>*</b></sup></label><BR> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.actionPerformer">
+ <option>PEP</option>
+ <option>PDP</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Action Attribute:<sup><b>*</b></sup></label><br> <select
+ class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.actionAttributeValue"
+ ng-options="option for option in actionPolicyDictionaryDatas track by option"></select>
+ </div>
+ </div>
+ </div>
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <button class="btn btn-primary" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-success" ng-disabled="savebutton"
+ herf="javascript:void(0)" ng-disabled="temp.policy.readOnly"
+ ng-click="saveActionPolicy(temp);">Save</button>
+ <button class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess" ng-model="finalPath"
+ ng-controller="FileManagerCtrl"
+ ng-click="closefunction(finalPath);">Close</button>
+ </div>
+ </form>
+</div>
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
new file mode 100644
index 000000000..6989a8509
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html
@@ -0,0 +1,146 @@
+<div ng-controller="brmsParamPolicyController"
+ ng-init="addDataToFields(temp.policy.ruleName);">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Risk Type:<sup><b>*</b></sup></label> <select
+ 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"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Risk Level:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.riskLevel"
+ required pattern="\S+" title="RiskLevel is required">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Guard:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.guard"
+ required pattern="\S+" title="Guard is required">
+ <option>True</option>
+ <option>False</option></select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Time to Live Date:</label> <input type="date"
+ class="form-control" name="ttlDate" class="date"
+ ng-model="temp.policy.ttlDate" />
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Controller:<sup></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.brmsController"
+ ng-options="option for option in brmsControllerDatas track by option"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Dependencies:<sup></sup></label> <select
+ class="form-control" multiple ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.brmsDependency"
+ ng-options="option for option in brmsDependencyDatas track by option"></select>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-2">
+ <label>Rule Attributes:<sup><b></b></sup></label>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div data-ng-repeat="choice in temp.policy.attributes">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.key"
+ placeholder="Attribute Key" />
+ </div>
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.value"
+ placeholder="Attribute Value" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default" ng-show="$last"
+ ng-disabled="temp.policy.readOnly" ng-click="removeChoice()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>BRMS Template:<sup><b>*</b></sup></label> <select
+ 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);">
+ <option value="">{{temp.policy.ruleName}}</option>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <div ng-repeat="(key, data) in temp.policy.dynamicLayoutMap">
+ <div class="form-group row" style="margin-left: 2%">
+ <label class="control-label col-md-3">{{key}}:</label>
+ <div class="form-group col-sm-6">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.ruleData[key]" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <div>
+ <button class="btn btn-primary" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-default" herf="javascript:void(0)"
+ ng-disabled="validateSuccess" ng-click="ShowRule(temp);">Show
+ Rule</button>
+ <button class="btn btn-success" herf="javascript:void(0)"
+ ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
+ ng-click="saveBrmsParamPolicy(temp);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal"
+ ng-model="finalPath"
+ ng-controller="FileManagerCtrl"
+ ng-click="closefunction(finalPath);">Close</button>
+ </div>
+ </div>
+ </form>
+</div> \ No newline at end of file
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
new file mode 100644
index 000000000..75b8c3ba2
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html
@@ -0,0 +1,126 @@
+<div ng-controller="brmsRawPolicyController">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Risk Type:<sup><b>*</b></sup></label> <select
+ 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"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Risk Level:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.riskLevel"
+ required pattern="\S+" title="RiskLevel is required">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Guard:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.guard"
+ required pattern="\S+" title="Guard is required">
+ <option>True</option>
+ <option>False</option></select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Time to Live Date:</label> <input type="date"
+ class="form-control" name="ttlDate" class="date"
+ ng-model="temp.policy.ttlDate" />
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Controller:<sup></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.brmsController"
+ ng-options="option for option in brmsControllerDatas track by option"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Dependencies:<sup></sup></label> <select
+ class="form-control" multiple ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.brmsDependency"
+ ng-options="option for option in brmsDependencyDatas track by option"></select>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-2">
+ <label>Rule Attributes:<sup><b>*</b></sup></label>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div data-ng-repeat="choice in temp.policy.attributes">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.key"
+ placeholder="Attribute Key" />
+ </div>
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.value"
+ placeholder="Attribute Value" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default" ng-show="$last"
+ ng-disabled="temp.policy.readOnly" ng-click="removeChoice()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-12">
+ <label>Raw Rule:<sup><b>*</b></sup></label>
+ <textarea class="form-control"
+ ng-model="temp.policy.configBodyData"
+ ng-disabled="temp.policy.readOnly" style="height: 400px;" required></textarea>
+ </div>
+ </div>
+ </div>
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <div>
+ <button class="btn btn-primary" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-success" herf="javascript:void(0)"
+ ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
+ ng-click="saveBrmsRawPolicy(temp);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess" ng-model="finalPath"
+ ng-controller="FileManagerCtrl"
+ ng-click="closefunction(finalPath);">Close</button>
+ </div>
+ </div>
+ </form>
+</div> \ No newline at end of file
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
new file mode 100644
index 000000000..45e482454
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html
@@ -0,0 +1,18 @@
+<script type="text/ng-template" id="brmsshowrule">
+<div>
+<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>
+</script> \ No newline at end of file
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
new file mode 100644
index 000000000..16b8cad9a
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html
@@ -0,0 +1,139 @@
+<div ng-controller="baseConfigController">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Ecomp Name:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.ecompName"
+ ng-options="option for option in ecompNameDictionaryDatas track by option"
+ required pattern="\S+" title="EcompName is required"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Config Name:<sup><b>*</b></sup></label> <input type="text"
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.configName" required pattern="\S+"
+ title="Enter the Config Name without any spaces" />
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Time to Live Date:</label> <input type="date"
+ class="form-control" name="ttlDate" class="date"
+ ng-model="temp.policy.ttlDate" />
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Risk Type:<sup><b>*</b></sup></label> <select
+ 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"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Risk Level:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.riskLevel"
+ required pattern="\S+" title="RiskLevel is required">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Guard:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.guard"
+ required pattern="\S+" title="Guard is required">
+ <option>True</option>
+ <option>False</option></select>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <label>Attributes:</label>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div ng-repeat="choice in temp.policy.attributes">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <select class="form-control" required
+ ng-disabled="temp.policy.readOnly" ng-model="choice.key"
+ ng-options="option for option in attributeDictionaryDatas track by option"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.value"
+ placeholder="Attribute Value" required pattern="\S+"
+ title="Enter the Attribute Value without any spaces" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-show="$last"
+ ng-click="removeChoice()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Config Type:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.configType" required pattern="\S+"
+ title="ConfigType is required">
+ <option>JSON</option>
+ <option>XML</option>
+ <option>PROPERTIES</option>
+ <option>OTHER</option>
+ </select>
+ </div>
+ <!-- <p><span ng-show="validateConfigType" style="color:red">Config Type Field shouldn't be Empty</span></p> -->
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-12">
+ <label>Body:<sup><b>*</b></sup></label>
+ <textarea class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.configBodyData" style="height: 400px;"
+ required title="ConfigBody is required"></textarea>
+ </div>
+ </div>
+ </div>
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <div>
+ <button class="btn btn-primary" ng-disabled="temp.policy.readOnly"
+ herf="javascript:void(0)" ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-success" ng-disabled="savebutton"
+ herf="javascript:void(0)" ng-click="savePolicy(temp);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ </div>
+ </div>
+ </form>
+</div> \ No newline at end of file
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
new file mode 100644
index 000000000..6590d2690
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html
@@ -0,0 +1,500 @@
+<div ng-controller="clFaultController">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Risk Type:<sup><b>*</b></sup></label> <select
+ 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"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Risk Level:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.riskLevel"
+ required pattern="\S+" title="RiskLevel is required">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Guard:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.guard"
+ required pattern="\S+" title="Guard is required">
+ <option>True</option>
+ <option>False</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Ecomp Name:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.ecompName"
+ ng-options="option for option in ecompNameDictionaryDatas track by option"
+ required pattern="\S+" title="EcompName is required"></select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Vnf Type:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.vnfType"
+ ng-options="option for option in vnfTypeDictionaryDatas track by option">
+ <option value="">{{temp.policy.jsonBodyData.vnfType}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Policy Status:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-init="init(temp.policy.jsonBodyData);"
+ ng-model="temp.policy.jsonBodyData.closedLoopPolicyStatus">
+ <option value="Active">Active</option>
+ <option>InActive</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-6">
+ <label>D2/Virtualized Services(s):<sup><b>*</b></sup></label><br>
+ <input type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.trinity"> Hosted Voice
+ (Trinity)</input> <input type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.vUSP"> vUSP</input> <input
+ type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.mcr"> MCR</input> <input
+ type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.gamma"> Gamma</input> <input
+ type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.vDNS"> vDNS</input>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div>
+ <label>Trigger Signature:</label><br>
+ <form>
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-click="addTriggerButton()">
+ <i class="fa fa-plus"></i>
+ </button>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeTriggerButton()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div data-ng-repeat="choice in temp.policy.traptriggerSignatures">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <label ng-model="choice.label" name="label">{{choice.id}}</label>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="addTrapTriggerButton(choice.id)">
+ <i class="fa fa-plus"></i>
+ </button>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeTrapTriggerButton(choice.id)">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div
+ data-ng-repeat="choice in temp.policy.triggerTrapSignatures[choice.id]">
+ <div class="form-group row" style="margin-left: 4%">
+ <div class="form-group col-sm-1">
+ <label ng-model="choice.label" name="label">{{choice.id}}</label>
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.notBox"
+ name="notBox"><option>NOT</option></select>
+ </div>
+ <div class="form-group col-sm-4">
+ <select class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="choice.trigger1"
+ ng-options="option for option in varbindDictionaryDatas track by option">
+ <option value="">{{choice.trigger1}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="choice.operatorBox" name="operatorBox"><option>AND</option>
+ <option>OR</option></select>
+ </div>
+ <div class="form-group col-sm-4">
+ <select class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="choice.trigger2"
+ ng-options="option for option in varbindDictionaryDatas track by option">
+ <option value="">{{choice.trigger2}}</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </br>
+ <div>
+ <label>Connect Traps:</label><br>
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="addTriggerConnectButton()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div
+ data-ng-repeat="choice in temp.policy.connecttriggerSignatures">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-1">
+ <label ng-model="choice.label" name="label">{{choice.id}}</label>
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.notBox" name="notBox"><option>NOT</option></select>
+ </div>
+ <div class="form-group col-sm-1">
+ <select ng-disabled="temp.policy.readOnly"
+ ng-model="choice.connectTrap1" class="form-control"
+ ng-options="option for option in connectTriggerTrapsList track by option">
+ <option value="">{{choice.connectTrap1}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-1">
+ <input type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.trapCount1" name="trapCount1"
+ class="form-control" />
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.operatorBox" name="operatorBox"><option>AND</option>
+ <option>OR</option></select>
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.connectTrap2"
+ ng-options="option for option in connectTriggerTrapsList track by option">
+ <option value="">{{choice.connectTrap2}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-1">
+ <input type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.trapCount2" name="trapCount1"
+ class="form-control" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default" ng-show="$last"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeTriggerConnectButton()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-2">
+ <label>Clear TimeOut:<sup><b>*</b></sup>
+ </label><br> <input type="text" ng-disabled="triggerdisabled"
+ ng-model="temp.policy.clearTimeOut" class="form-control" required />
+ </div>
+ <div class="form-group col-sm-2">
+ <label>Trap Max Age:<sup><b>*</b></sup></label><br> <input
+ type="text" ng-disabled="triggerdisabled"
+ ng-model="temp.policy.trapMaxAge" class="form-control"
+ ng-init="temp.policy.jsonBodyData.trapMaxAge='300'" value="300"
+ required />
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <label>VSCL Action:<sup><b>*</b></sup></label><br>
+ <div class="form-group col-sm-4">
+ <label>vPRO Actions:<sup><b>*</b></sup></label><br> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.actions"
+ ng-options="option for option in vsclActionDictionaryDatas track by option">
+ <option value="">{{temp.policy.jsonBodyData.actions}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-2">
+ <label>Time Interval:<sup><b>*</b></sup>
+ </label><br> <input type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.timeInterval"
+ class="form-control" required />
+ </div>
+ <div class="form-group col-sm-2">
+ <label>App-C TimeOut:<sup><b>*</b></sup></label><br> <input
+ type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.timeOutvPRO"
+ class="form-control" required />
+ </div>
+ <div class="form-group col-sm-2">
+ <label>TimeOut for Ruby:<sup><b>*</b></sup></label><br> <input
+ type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.timeOutRuby"
+ class="form-control" required />
+ </div>
+ <div class="form-group col-sm-2">
+ <label>Number of Retries:<sup><b>*</b></sup></label><br> <input
+ type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.retrys" class="form-control"
+ required />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-4">
+ <label>Aging Window:<sup><b>*</b></sup>
+ </label><br> <input type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.agingWindow"
+ class="form-control" required />
+ </div>
+ <div class="form-group col-sm-4">
+ <label>Text to Include in UEB messages for AOTS ticket and
+ Geo Link:</label><br> <input type="text"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.geoLink" class="form-control"
+ required />
+ </div>
+ <div class="form-group col-sm-4">
+ <label>Email Address:</label><br> <input type="text"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.emailAddress"
+ class="form-control" required />
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <label>PEP:<sup><b>*</b></sup></label><br>
+ <div class="form-group col-sm-3">
+ <label>PEP Options:<sup><b></b></sup></label><br> <select
+ 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)">
+ <option value="">{{temp.policy.jsonBodyData.pepName}}</option>
+ </select></select></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Actions:<sup><b></b></sup></label><br> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.pepAction"
+ ng-options="option for option in pepActionDictionaryDatas track by option">
+ <option value="">{{temp.policy.jsonBodyData.pepAction}}</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div>
+ <label>Verification Signature:</label><br>
+ <form>
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="addVerFaultButton()">
+ <i class="fa fa-plus"></i>
+ </button>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeVerFaultButton()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div data-ng-repeat="choice in temp.policy.faulttriggerSignatures">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <label ng-model="choice.label" name="label">{{choice.id}}</label>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="addVerTriggerButton(choice.id)">
+ <i class="fa fa-plus"></i>
+ </button>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeVerTriggerButton(choice.id)">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div
+ data-ng-repeat="choice in temp.policy.triggerfaultSignatures[choice.id]">
+ <div class="form-group row" style="margin-left: 4%">
+ <div class="form-group col-sm-1">
+ <label ng-model="choice.label" name="label">{{choice.id}}</label>
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.notBox"
+ name="notBox"><option>NOT</option></select>
+ </div>
+ <div class="form-group col-sm-4">
+ <select class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="choice.trigger1"
+ ng-options="option for option in varbindDictionaryDatas track by option">
+ <option value="">{{choice.trigger1}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="choice.operatorBox" name="operatorBox"><option>AND</option>
+ <option>OR</option></select>
+ </div>
+ <div class="form-group col-sm-4">
+ <select class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="choice.trigger2"
+ ng-options="option for option in varbindDictionaryDatas track by option">
+ <option value="">{{choice.trigger2}}</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </br>
+ <div>
+ <label>Connect All Faults:</label><br>
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="addFaultConnectButton()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div
+ data-ng-repeat="choice in temp.policy.connectVerificationSignatures">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-1">
+ <label ng-model="choice.label" name="label">{{choice.id}}</label>
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.notBox" name="notBox"><option>NOT</option></select>
+ </div>
+ <div class="form-group col-sm-1">
+ <select ng-disabled="temp.policy.readOnly"
+ ng-model="choice.connectTrap1" class="form-control"
+ ng-options="option for option in connectTriggerFaultsList track by option">
+ <option value="">{{choice.connectTrap1}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-1">
+ <input type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.trapCount1" name="trapCount1"
+ class="form-control" />
+ </div>
+ <div class="form-group col-sm-1">
+ <select class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.operatorBox" name="operatorBox"><option>AND</option>
+ <option>OR</option></select>
+ </div>
+ <div class="form-group col-sm-1">
+ <select ng-disabled="temp.policy.readOnly"
+ ng-model="choice.connectTrap2" class="form-control"
+ ng-options="option for option in connectTriggerFaultsList track by option">
+ <option value="">{{choice.connectTrap2}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-1">
+ <input type="text" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.trapCount2" name="trapCount1"
+ class="form-control" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default" ng-show="$last"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeFaultConnectButton()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-2">
+ <label>Clear TimeOut:<sup><b>*</b></sup></label><br> <input
+ type="text" ng-disabled="verificationdisabled"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.verificationclearTimeOut"
+ class="form-control" required />
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div>
+ <label>Additional Conditions: If current VM status in A&AI
+ is in Maintenance then the Control Loop will not execute the Action
+ and shall<sup><b>*</b></sup>
+ </label><br>
+ <p>
+ <input type="radio" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.conditions" name="radSize"
+ id="sizeSmall" value="SEND" checked="checked" /><label
+ for="sizeSmall">DCAE should send event notification</label> <input
+ type="radio" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.conditions" name="radSize"
+ id="sizeMed" value="NOTSEND" /><label for="sizeMed">DCAE
+ should not send event notification</label>
+ </p>
+ </div>
+ </div>
+ <br />
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <button class="btn btn-primary" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-success" herf="javascript:void(0)"
+ ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
+ ng-click="saveFaultPolicy(temp);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess" ng-model="finalPath"
+ ng-controller="FileManagerCtrl" ng-click="closefunction(finalPath);">Close</button>
+ </div>
+ </form>
+</div> \ 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
new file mode 100644
index 000000000..e22070308
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html
@@ -0,0 +1,158 @@
+<div ng-controller="clPMController">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Ecomp Name:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.ecompName"
+ ng-options="option for option in ecompNameDictionaryDatas track by option"
+ required pattern="\S+" title="EcompName is required"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Time to Live Date:</label> <input type="date"
+ class="form-control" name="ttlDate" class="date"
+ ng-model="temp.policy.ttlDate" />
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Guard:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.guard"
+ required pattern="\S+" title="Guard is required">
+ <option>True</option>
+ <option>False</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Risk Type:<sup><b>*</b></sup></label> <select
+ 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"></select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Risk Level:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.riskLevel"
+ required pattern="\S+" title="RiskLevel is required">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option></select>
+ </div>
+ <div class="form-group col-sm-5">
+ <label>D2/Virtualized Services(s):<sup><b>*</b></sup></label><br>
+ <input type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.trinity"> Hosted Voice
+ (Trinity)</input> <input type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.vUSP"> vUSP</input> <input
+ type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.mcr"> MCR</input> <input
+ type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.gamma"> Gamma</input> <input
+ type="checkbox" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.vDNS"> vDNS</input>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Service Type PolicyName:<sup><b>*</b></sup></label><br>
+ <select style="width: 400px;" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.serviceTypePolicyName" class="form-control"
+ ng-options="option.serviceTypePolicyName for option in PMData track by option.serviceTypePolicyName"
+ ng-click="addDataToFields(temp.policy.serviceTypePolicyName);"></select>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <label>Vertica Metrics:<sup><b>*</b></sup></label>
+ <div>
+ <textarea class="form-control"
+ ng-model="temp.policy.verticaMetrics.verticaMetrics"
+ ng-disabled="true" style="height: 150px;"></textarea>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <label>Attributes:<sup><b>*</b></sup></label>
+ <div
+ ng-repeat="(key, data) in temp.policy.attributeFields.attributes">
+ <div class="well">
+ <div class="form-group row" style="margin-left: 2%">
+ <label class="control-label col-md-3">{{key}}</label>
+ <div ng-repeat="(key, data) in data">
+ <div class="form-group col-sm-3">
+ <label>{{key}}</label><br /> <input type="text"
+ class="form-control" title={{data}}
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.attributes[key]" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label>Policy Description:<sup><b>*</b></sup></label>
+ <div>
+ <textarea class="form-control" ng-disabled="true"
+ ng-model="temp.policy.description.policyDescription"
+ style="height: 150px;"></textarea>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Text to Include in UEB messages for AOTS ticket and
+ Geo Link:</label>
+ <div>
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.geoLink" />
+ </div>
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Email Address:</label>
+ <div>
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.jsonBodyData.emailAddress" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <div>
+ <button class="btn btn-primary" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-success" herf="javascript:void(0)"
+ ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
+ ng-click="saveCLPMPolicy(temp);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess" ng-model="finalPath"
+ ng-controller="FileManagerCtrl"
+ ng-click="closefunction(finalPath);">Close</button>
+ </div>
+ </div>
+ </form>
+</div> \ No newline at end of file
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
new file mode 100644
index 000000000..945e8655a
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html
@@ -0,0 +1,134 @@
+<div ng-controller="dcaeMicroServiceController">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Ecomp Name:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.ecompName"
+ ng-options="option for option in ecompNameDictionaryDatas track by option"
+ required pattern="\S+" title="EcompName is required"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Time to Live Date:</label> <input type="date"
+ class="form-control" name="ttlDate" class="date"
+ ng-model="temp.policy.ttlDate" />
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Guard:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.guard"
+ required pattern="\S+" title="Guard is required">
+ <option>True</option>
+ <option>False</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Risk Type:<sup><b>*</b></sup></label> <select
+ 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"></select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Risk Level:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.riskLevel"
+ required pattern="\S+" title="RiskLevel is required">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Priority:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.priority"
+ ng-options="option for option in priorityDatas track by option">
+ <option value="">{{temp.policy.priority}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Micro Service:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ 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);"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Micro Service Version:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.version"
+ ng-options="option for option in microServiceModelsDictionaryVersionDatas track by option"
+ ng-init="addDataToFields(temp.policy.serviceType, temp.policy.version);"
+ ng-click="addDataToFields(temp.policy.serviceType, temp.policy.version);"></select>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group col-sm-3" id="DynamicTemplate">
+ <label>Micro Service Attributes:<sup><b>*</b></sup></label><br>
+ </div>
+ </br>
+ <div class="form-group row">
+ <div class="form-group col-sm-3" ng-show="isCheck">
+ <label>Configuration Name:<sup><b>*!</b></sup></label><br> <select
+ 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>
+ </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>
+ </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>
+ </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>
+ </div>
+ </div>
+ </div>
+ <br />
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <button class="btn btn-primary" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-success" herf="javascript:void(0)"
+ ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
+ ng-click="savePolicy(temp);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess" ng-model="finalPath"
+ ng-controller="FileManagerCtrl" ng-click="closefunction(finalPath);">Close</button>
+ </div>
+ </form>
+</div>
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
new file mode 100644
index 000000000..d386770b9
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html
@@ -0,0 +1,187 @@
+<div ng-controller="decisionPolicyController">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Ecomp Name:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.ecompName"
+ ng-options="option for option in ecompNameDictionaryDatas track by option"
+ required pattern="\S+" title="EcompName is required"></select>
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Rule Provider:<sup><b>*</b></sup></label><select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.ruleProvider"
+ ng-init="providerListener(temp.policy.ruleProvider);"
+ ng-click="providerListener(temp.policy.ruleProvider);">
+ <option>Custom</option>
+ <option>AAF</option>
+ </select>
+ </div>
+ </div>
+ </div>
+
+ <div ng-if="temp.policy.ruleProvider == 'Custom'">
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <label>Component Attributes:</label><br>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div data-ng-repeat="choice in temp.policy.attributes">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <select class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="choice.key"
+ ng-options="option for option in attributeDictionaryDatas track by option">
+ <option value="">{{choice.key}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly" ng-model="choice.value"
+ placeholder="Attribute Value" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default" ng-show="$last"
+ ng-disabled="temp.policy.readOnly" ng-click="removeChoice()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div ng-if="temp.policy.ruleProvider == 'Custom'">
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <label>Settings Attributes:</label><br>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="addNewSettingsChoice()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div data-ng-repeat="settingschoice in temp.policy.settings">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <select class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="settingschoice.key"
+ ng-options="option for option in settingsDictionaryDatas track by option">
+ <option value="">{{settingschoice.key}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="settingschoice.value" placeholder="Settings Value" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default" ng-show="$last"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeSettingsChoice()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div ng-if="temp.policy.ruleProvider == 'Custom'">
+ <div class="well">
+ <label>Decision Rule Algorithms:<sup><b>*</b></sup></label><br>
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="addNewRuleAlgorithm()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div
+ data-ng-repeat="ruleAlgorithmschoice in temp.policy.ruleAlgorithmschoices">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-1">
+ <label
+ ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmLabels"
+ name="dynamicRuleAlgorithmLabels">{{ruleAlgorithmschoice.id}}</label>
+ </div>
+ <div class="form-group col-sm-3">
+ <select class="form-control" id="mySelect"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField1"
+ ng-options="option for option in attributeDictionaryDatas track by option"
+ name="dynamicRuleAlgorithmField1">
+ <option value="">{{ruleAlgorithmschoice.dynamicRuleAlgorithmField1}}</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-3">
+ <select type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmCombo"
+ ng-options="option for option in functionDefinitionDatas track by option"
+ name="dynamicRuleAlgorithmCombo"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="ruleAlgorithmschoice.dynamicRuleAlgorithmField2"
+ name="dynamicRuleAlgorithmField2" />
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="removeRuleAlgorithm()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <br>
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <button class="btn btn-primary" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-success" herf="javascript:void(0)"
+ ng-disabled="savebutton" ng-disabled="temp.policy.readOnly"
+ ng-click="saveDecisionPolicy(temp);">Save</button>
+ <button class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess" ng-model="finalPath"
+ ng-controller="FileManagerCtrl" ng-click="closefunction(finalPath);">Close</button>
+ </div>
+ </form>
+</div>
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html
new file mode 100644
index 000000000..d3a6d439f
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html
@@ -0,0 +1,30 @@
+<div class="modal fadeIn" id="describePolicy"
+ style="margin-bottom: 20px; width: 100%" data-toggle="modal"
+ data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ </button>
+ <h2 class="modal-title" style="color: #157bb2">Describe Policy</h2>
+ </div>
+ <div class="well">
+ <form>
+ <div class="form-group" style="margin-right: 2%; margin-left: 2%">
+ <div ng-bind-html="temp.tempModel.content"></div>
+ <div>
+ <span class="label label-warning" ng-show="temp.inprocess">{{'loading'
+ | translate}} ...</span>
+ <div ng-show="!temp.inprocess" autofocus="autofocus"></div>
+ <div ng-include data-src="'error-bar'" class="clearfix"></div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess">{{'close' | translate}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file
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
new file mode 100644
index 000000000..5e9fdbd6c
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html
@@ -0,0 +1,24 @@
+<div class="modal fadeIn" id="exportPolicy"
+ ng-controller="exportPolicyController" data-toggle="modal"
+ data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog modal-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>
+ </div>
+ <div>
+ <div id="grid1" style="width: 100%; height: 500px;" ui-grid="gridOptions"
+ ui-grid-pagination ui-grid-selection ui-grid-resize-columns class="grid"></div>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-success" herf="javascript:void(0)"
+ ng-click="download();">Download</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess">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/PolicyTemplates/FirewallPolicyTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html
new file mode 100644
index 000000000..85ffbf7ab
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html
@@ -0,0 +1,119 @@
+<div ng-controller="fwPolicyController">
+ <form>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>Policy Name:<sup><b>*</b></sup></label> <input type="text"
+ 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" />
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Description:</label> <input type="text" class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.policyDescription" />
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Risk Type:<sup><b>*</b></sup></label> <select
+ 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"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Risk Level:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.riskLevel"
+ required pattern="\S+" title="RiskLevel is required">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Guard:<sup><b>*</b></sup></label> <select
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.guard"
+ required pattern="\S+" title="Guard is required">
+ <option>True</option>
+ <option>False</option></select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Config Name:<sup><b>*</b></sup></label> <input type="text"
+ class="form-control" ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.configName" required />
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Time to Live Date:</label> <input type="date"
+ class="form-control" name="ttlDate" class="date"
+ ng-model="temp.policy.ttlDate" />
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Security Zone:</label> <select class="form-control"
+ ng-disabled="temp.policy.readOnly"
+ ng-model="temp.policy.securityZone"
+ ng-options="option for option in securityZoneDictionaryDatas track by option"></select>
+ </div>
+ </div>
+ </div>
+ <div class="well">
+ <div class="form-group row">
+ <div class="form-group col-sm-1">
+ <label>Rule Setup:</label><br>
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-click="addNewChoice()">
+ <i class="fa fa-plus"></i>
+ </button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div data-ng-repeat="choice in temp.policy.attributes">
+ <div class="form-group row" style="margin-left: 2%">
+ <div class="form-group col-sm-3">
+ <select class="form-control" ng-model="choice.key"
+ ng-disabled="temp.policy.readOnly"
+ ng-options="option for option in termListDictionaryDatas track by option"><option
+ value="">{{choice.key}}</option></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <select class="form-control" ng-model="choice.value"
+ ng-disabled="temp.policy.readOnly"
+ ng-options="option for option in fwTagPickerDictionaryDatas track by option"><option
+ value="">{{choice.value}}</option></select>
+ </div>
+ <div class="form-group col-sm-1">
+ <button type="button" class="btn btn-default"
+ ng-disabled="temp.policy.readOnly" ng-show="$last"
+ ng-click="removeChoice()">
+ <i class="fa fa-minus"></i>
+ </button>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ <div id="validate" style="width: 70%"></div>
+ <br>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default"
+ herf="javascript:void(0)" ng-click="viewFWRule(temp.policy);">Rule
+ Preview</button>
+ <button class="btn btn-primary" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly"
+ ng-click="validatePolicy(temp.policy);">Validate</button>
+ <button class="btn btn-success" herf="javascript:void(0)"
+ ng-disabled="temp.policy.readOnly" ng-disabled="savebutton"
+ ng-click="saveFWPolicy(temp);">Save</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal"
+ ng-disabled="temp.inprocess" ng-model="finalPath"
+ ng-controller="FileManagerCtrl" ng-click="closefunction(finalPath);">Close</button>
+ </div>
+ </form>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html
new file mode 100644
index 000000000..568387827
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html
@@ -0,0 +1,84 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<div class="modal" id="createNewPolicy"
+ style="margin-bottom: 20px; width: 100%" data-backdrop="static"
+ data-keyboard="false">
+ <div class="modal-dialog-lg">
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span> <span class="sr-only">{{"close"
+ | translate}}</span>
+ </button>
+ <form>
+ <div class="form-group" style="width: 300px">
+ <label>Policy Type:</label>
+ <div>
+ <select class="form-control" ng-model="temp.policy.policyType"
+ ng-disabled="temp.policy.readOnly || temp.policy.editPolicy">
+ <option>Action</option>
+ <option>Config</option>
+ <option>Decision</option>
+ </select>
+ </div>
+ </div>
+ <div ng-if="temp.policy.policyType == 'Action'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html'"></div>
+ <div ng-if="temp.policy.policyType == 'Decision'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html'"></div>
+ <div ng-if="temp.policy.policyType == 'Config'">
+ <div class="form-group" style="width: 300px">
+ <label>Config Policy Type:</label>
+ <div>
+ <select class="form-control"
+ ng-model="temp.policy.configPolicyType"
+ ng-disabled="temp.policy.readOnly || temp.policy.editPolicy">
+ <option>Base</option>
+ <option>BRMS_Param</option>
+ <option>BRMS_Raw</option>
+ <option>ClosedLoop_Fault</option>
+ <option>ClosedLoop_PM</option>
+ <option>Micro Service</option>
+ <option>Firewall Config</option>
+ </select>
+ </div>
+ </div>
+ <div ng-if="temp.policy.configPolicyType == 'Base'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html'"></div>
+ <div ng-if="temp.policy.configPolicyType == 'BRMS_Param'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html'"></div>
+ <div ng-if="temp.policy.configPolicyType == 'BRMS_Raw'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html'"></div>
+ <div ng-if="temp.policy.configPolicyType == 'ClosedLoop_Fault'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html'"></div>
+ <div ng-if="temp.policy.configPolicyType == 'ClosedLoop_PM'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html'"></div>
+ <div ng-if="temp.policy.configPolicyType == 'Micro Service'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html'"></div>
+ <div ng-if="temp.policy.configPolicyType == 'Firewall Config'"
+ ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html'"></div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/animations.css b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/animations.css
new file mode 100644
index 000000000..50db9b001
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/animations.css
@@ -0,0 +1,183 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+@-webkit-keyframes fadeIn {
+ 0% {
+ opacity: 0;
+ }
+
+ 100% {
+ opacity: 1;
+ };
+}
+
+@keyframes fadeIn {
+ 0% {
+ opacity: 0;
+ }
+
+ 100% {
+ opacity: 1;
+ };
+}
+
+@-webkit-keyframes fadeInDown {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translate3d(0, -100%, 0);
+ transform: translate3d(0, -100%, 0);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: none;
+ transform: none;
+ };
+}
+
+@keyframes fadeInDown {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translate3d(0, -100%, 0);
+ transform: translate3d(0, -100%, 0);
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: none;
+ transform: none;
+ };
+}
+
+@keyframes rotate {
+ 100% {
+ transform: rotate(360deg);
+ };
+}
+
+@-webkit-keyframes rotate {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ };
+}
+
+@keyframes colors {
+ 0% {
+ stroke: #4285F4;
+ }
+
+ 25% {
+ stroke: #DE3E35;
+ }
+
+ 50% {
+ stroke: #F7C223;
+ }
+
+ 75% {
+ stroke: #1B9A59;
+ }
+
+ 100% {
+ stroke: #4285F4;
+ };
+}
+
+@keyframes dash {
+ 0% {
+ stroke-dasharray: 1,150;
+ stroke-dashoffset: 0;
+ stroke: red;
+ }
+
+ 50% {
+ stroke-dasharray: 90,150;
+ stroke-dashoffset: -35;
+ stroke: yellow;
+ }
+
+ 100% {
+ stroke-dasharray: 90,150;
+ stroke-dashoffset: -124;
+ stroke: green;
+ };
+}
+
+@-webkit-keyframes dash {
+ 0% {
+ stroke-dasharray: 1,150;
+ stroke-dashoffset: 0;
+ }
+
+ 50% {
+ stroke-dasharray: 90,150;
+ stroke-dashoffset: -35;
+ }
+
+ 100% {
+ stroke-dasharray: 90,150;
+ stroke-dashoffset: -124;
+ };
+}
+
+.animated {
+ -webkit-animation-duration: .7s;
+ animation-duration: .7s;
+ -webkit-animation-fill-mode: both;
+ animation-fill-mode: both;
+}
+
+.modal.animated,
+.animated.fast {
+ -webkit-animation-duration: .2s;
+ animation-duration: .2s;
+}
+
+.animated.slow {
+ -webkit-animation-duration: 1.1s;
+ animation-duration: 1.1s;
+}
+
+.animated.fadeInDown {
+ -webkit-animation-name: fadeInDown;
+ animation-name: fadeInDown;
+}
+
+.animated.fadeIn {
+ -webkit-animation-name: fadeIn;
+ animation-name: fadeIn;
+}
+
+.spinner-container {
+ -webkit-animation: rotate 2s linear infinite;
+ animation: rotate 2s linear infinite;
+ z-index: 2;
+ width: 65px;
+ height: 65px;
+}
+
+.spinner-container .path {
+ stroke-dasharray: 1,150;
+ stroke-dashoffset: 0;
+ stroke: #2196F3;
+ stroke-linecap: round;
+ -webkit-animation: dash 1.5s ease-in-out infinite, colors 5.6s ease-in-out infinite;
+ animation: dash 1.5s ease-in-out infinite, colors 5.6s ease-in-out infinite;
+} \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/dialogs.css b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/dialogs.css
new file mode 100644
index 000000000..60690c4fe
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/dialogs.css
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+.modal {
+ word-wrap: break-word;
+}
+
+.modal .label.error-msg {
+ display: block;
+ font-size: 12px;
+ margin-top: 5px;
+ padding: 0;
+ padding: 5px;
+ margin-top: 10px;
+ text-align: left;
+}
+
+.modal .label.error-msg > span {
+ white-space: pre-wrap;
+}
+
+.modal .modal-header {
+ padding-bottom: 0;
+}
+
+.modal .breadcrumb {
+ margin-bottom: 10px;
+}
+
+.modal-fullscreen .modal-dialog,
+.modal-fullscreen .modal-content {
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+.modal-fullscreen .modal-dialog {
+ margin: 0;
+ width: 100%;
+}
+
+.modal-fullscreen .modal-content {
+ border: none;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ -webkit-box-shadow: inherit;
+ -moz-box-shadow: inherit;
+ -o-box-shadow: inherit;
+ box-shadow: inherit;
+}
+
+.modal-fullscreen textarea.code {
+ min-height: 450px;
+}
+
+.modal img.preview {
+ max-width: 100%;
+ max-height: 640px;
+ border-radius: 3px;
+}
+
+.modal img.preview.loading {
+ width: 100%;
+ height: 1px;
+ opacity: 0;
+} \ 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
new file mode 100644
index 000000000..78001f400
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/main.css
@@ -0,0 +1,336 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+body {
+ padding-top: 55px;
+ font-size: 14px;
+}
+
+*,
+*:focus {
+ outline: 0!important;
+}
+
+.navbar {
+ min-height: 32px;
+}
+
+.navbar .navbar-toggle {
+ padding: 5px 10px;
+}
+
+.navbar .navbar-brand {
+ font-size: inherit;
+ height: 55px;
+ line-height: 100%;
+}
+
+.navbar .navbar-form {
+ border-bottom: none;
+ border-top: none;
+ box-shadow: none;
+ padding: 0 10px;
+ margin-top: 10px;
+}
+
+.breadcrumb {
+ border-radius: 0;
+}
+
+.breadcrumb .btn {
+ margin-top: -5px;
+}
+
+.btn.btn-default {
+ color: #444;
+ background-color: #FAFAFA;
+}
+
+.btn {
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .26);
+ font-weight: 500;
+ letter-spacing: .01em;
+ border: none;
+}
+
+textarea.code {
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+ font-size: 13px;
+ min-height: 250px;
+ resize: vertical;
+ color: #000;
+}
+
+.sub-header {
+ padding-bottom: 10px;
+ border-bottom: 1px solid #eee;
+}
+
+.navbar-fixed-top {
+ border: 0;
+}
+
+.sidebar {
+ display: none;
+}
+
+.btn-go-back {
+ margin-top: -5px;
+}
+
+a:hover {
+ text-decoration: none;
+}
+
+.nav-sidebar {
+ margin-right: -21px;
+ margin-bottom: 20px;
+ margin-left: -20px;
+}
+
+.nav-sidebar > li > a {
+ padding-right: 20px;
+ padding-left: 20px;
+}
+
+.nav-sidebar > .active > a,
+.nav-sidebar > .active > a:hover,
+.nav-sidebar > .active > a:focus {
+ color: #fff;
+ background-color: #2196F3;
+}
+
+.main {
+ padding: 0;
+}
+
+.main .page-header {
+ margin-top: 0;
+}
+
+.file-tree ul.nav.nav-sidebar {
+ margin: 0;
+ padding: 0;
+ padding-left: 12px;
+}
+
+.file-tree ul.nav.nav-sidebar > li {
+ border-left: 1px solid #ddd;
+ padding-left: 4px;
+}
+
+.file-tree ul.nav.nav-sidebar > li > a {
+ padding: 2px 2px 2px 4px;
+}
+
+.file-tree ul.nav.nav-sidebar:first-child {
+ padding-left: 0;
+}
+
+.file-tree ul.nav.nav-sidebar.file-tree-root > li {
+ border-left: none;
+ padding-left: 0px;
+}
+
+.table td {
+ vertical-align: middle;
+}
+
+#context-menu {
+ position: absolute;
+ display: none;
+ z-index: 9999;
+}
+
+.iconset {
+ padding: 10px;
+}
+
+.col-120 {
+ width: 100px;
+ max-height: 100px;
+ float: left;
+ margin-bottom: 9px;
+ margin-right: 9px;
+}
+
+.col-120:last-child {
+ margin-right: 0;
+}
+
+.iconset .thumbnail {
+ border-radius: 0;
+ overflow: hidden;
+ margin: 0;
+ padding: 0;
+ padding: 10px 0;
+ border: none;
+}
+
+.iconset .thumbnail .item-icon {
+ font-size: 32px;
+}
+
+.detail-sources {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ word-wrap: break-word;
+}
+
+::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+ background-color: #fff;
+ box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset -1px -1px 0 rgba(0, 0, 0, .07);
+}
+
+::-webkit-scrollbar:hover {
+ background-color: #eee;
+}
+
+::-webkit-scrollbar-thumb {
+ min-height: 0.8em;
+ min-width: 0.8em;
+ background-color: rgba(0, 0, 0, .2);
+ box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset -1px -1px 0 rgba(0, 0, 0, .07);
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background-color: #bbb;
+}
+
+::-webkit-scrollbar-thumb:active {
+ background-color: #888;
+}
+
+.dropdown-menu.dropdown-right-click {
+ display: block;
+ position: static;
+ margin-bottom: 5px;
+ font-size: 1em;
+}
+
+.dropdown-menu.dropdown-right-click>li>a {
+ padding: 5px 12px;
+}
+
+.dropdown-menu.dropdown-right-click>li>a>i {
+ font-size: .9em;
+ margin-right: 1px;
+}
+
+.dropdown-menu.dropdown-right-click .divider {
+ margin: 3px 0;
+}
+
+.spinner-wrapper {
+ margin: 0 auto;
+ text-align: center;
+ margin-top: 8%;
+}
+
+table th > a:hover,
+table th > a:active,
+table th > a:focus {
+ text-decoration: none;
+}
+
+.sortorder:after {
+ color: #2196f3;
+ content: '\25bc';
+}
+
+.sortorder.reverse:after {
+ color: #2196f3;
+ content: '\25b2';
+}
+
+[ng\:cloak], [ng-cloak],
+[data-ng-cloak], [x-ng-cloak],
+.ng-cloak, .x-ng-cloak {
+ display: none !important;
+}
+
+.mr2 {
+ margin-right: 2px;
+}
+
+.mr5 {
+ margin-right: 5px;
+}
+
+.mt10 {
+ margin-top: 10px;
+}
+
+.mb0 {
+ margin-bottom: 0;
+}
+
+.pointer {
+ cursor: pointer;
+}
+
+.block {
+ display: block;
+}
+
+.ellipsis {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.bold {
+ font-weight: bold;
+}
+
+@media (min-width: 768px) {
+ .main {
+ padding-right: 0;
+ padding-left: 0;
+ }
+
+ .sidebar {
+ position: fixed;
+ top: 50px;
+ bottom: 0;
+ left: 0;
+ z-index: 1000;
+ display: block;
+ padding: 5px 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ background-color: #f5f5f5;
+ border-right: 1px solid #eee;
+ }
+}
+
+@media (max-width: 768px) {
+ .navbar-form .btn {
+ margin-top: 5px;
+ }
+}
+
+@media (max-width: 475px) {
+ .table.table-files .btn {
+ display: none;
+ }
+} \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize-legacy.css b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize-legacy.css
new file mode 100644
index 000000000..021e5fb81
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize-legacy.css
@@ -0,0 +1,545 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+/* ==========================================================================
+ HTML5 display definitions
+ ========================================================================== */
+
+/**
+ * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+nav,
+section,
+summary {
+ display: block;
+}
+
+/**
+ * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
+ */
+
+audio,
+canvas,
+video {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+}
+
+/**
+ * Prevent modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+/**
+ * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
+ * Known issue: no IE 6 support.
+ */
+
+[hidden] {
+ display: none;
+}
+
+/* ==========================================================================
+ Base
+ ========================================================================== */
+
+/**
+ * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
+ * `em` units.
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
+ * user zoom.
+ */
+
+html {
+ font-size: 100%; /* 1 */
+ -ms-text-size-adjust: 100%; /* 2 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/**
+ * Address `font-family` inconsistency between `textarea` and other form
+ * elements.
+ */
+
+html,
+button,
+input,
+select,
+textarea {
+ font-family: sans-serif;
+}
+
+/**
+ * Address margins handled incorrectly in IE 6/7.
+ */
+
+body {
+ margin: 0;
+}
+
+/* ==========================================================================
+ Links
+ ========================================================================== */
+
+/**
+ * Address `outline` inconsistency between Chrome and other browsers.
+ */
+
+a:focus {
+ outline: thin dotted;
+}
+
+/**
+ * Improve readability when focused and also mouse hovered in all browsers.
+ */
+
+a:active,
+a:hover {
+ outline: 0;
+}
+
+/* ==========================================================================
+ Typography
+ ========================================================================== */
+
+/**
+ * Address font sizes and margins set differently in IE 6/7.
+ * Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
+ * and Chrome.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+h2 {
+ font-size: 1.5em;
+ margin: 0.83em 0;
+}
+
+h3 {
+ font-size: 1.17em;
+ margin: 1em 0;
+}
+
+h4 {
+ font-size: 1em;
+ margin: 1.33em 0;
+}
+
+h5 {
+ font-size: 0.83em;
+ margin: 1.67em 0;
+}
+
+h6 {
+ font-size: 0.67em;
+ margin: 2.33em 0;
+}
+
+/**
+ * Address styling not present in IE 7/8/9, Safari 5, and Chrome.
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/**
+ * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
+ */
+
+b,
+strong {
+ font-weight: bold;
+}
+
+blockquote {
+ margin: 1em 40px;
+}
+
+/**
+ * Address styling not present in Safari 5 and Chrome.
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/**
+ * Address differences between Firefox and other browsers.
+ * Known issue: no IE 6/7 normalization.
+ */
+
+hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+}
+
+/**
+ * Address styling not present in IE 6/7/8/9.
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+/**
+ * Address margins set differently in IE 6/7.
+ */
+
+p,
+pre {
+ margin: 1em 0;
+}
+
+/**
+ * Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, serif;
+ _font-family: 'courier new', monospace;
+ font-size: 1em;
+}
+
+/**
+ * Improve readability of pre-formatted text in all browsers.
+ */
+
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+/**
+ * Address CSS quotes not supported in IE 6/7.
+ */
+
+q {
+ quotes: none;
+}
+
+/**
+ * Address `quotes` property not supported in Safari 4.
+ */
+
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+
+/**
+ * Address inconsistent and variable font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* ==========================================================================
+ Lists
+ ========================================================================== */
+
+/**
+ * Address margins set differently in IE 6/7.
+ */
+
+dl,
+menu,
+ol,
+ul {
+ margin: 1em 0;
+}
+
+dd {
+ margin: 0 0 0 40px;
+}
+
+/**
+ * Address paddings set differently in IE 6/7.
+ */
+
+menu,
+ol,
+ul {
+ padding: 0 0 0 40px;
+}
+
+/**
+ * Correct list images handled incorrectly in IE 7.
+ */
+
+nav ul,
+nav ol {
+ list-style: none;
+ list-style-image: none;
+}
+
+/* ==========================================================================
+ Embedded content
+ ========================================================================== */
+
+/**
+ * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
+ * 2. Improve image quality when scaled in IE 7.
+ */
+
+img {
+ border: 0; /* 1 */
+ -ms-interpolation-mode: bicubic; /* 2 */
+}
+
+/**
+ * Correct overflow displayed oddly in IE 9.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* ==========================================================================
+ Figures
+ ========================================================================== */
+
+/**
+ * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
+ */
+
+figure {
+ margin: 0;
+}
+
+/* ==========================================================================
+ Forms
+ ========================================================================== */
+
+/**
+ * Correct margin displayed oddly in IE 6/7.
+ */
+
+form {
+ margin: 0;
+}
+
+/**
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/**
+ * 1. Correct color not being inherited in IE 6/7/8/9.
+ * 2. Correct text not wrapping in Firefox 3.
+ * 3. Correct alignment displayed oddly in IE 6/7.
+ */
+
+legend {
+ border: 0; /* 1 */
+ padding: 0;
+ white-space: normal; /* 2 */
+ *margin-left: -7px; /* 3 */
+}
+
+/**
+ * 1. Correct font size not being inherited in all browsers.
+ * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
+ * and Chrome.
+ * 3. Improve appearance and consistency in all browsers.
+ */
+
+button,
+input,
+select,
+textarea {
+ font-size: 100%; /* 1 */
+ margin: 0; /* 2 */
+ vertical-align: baseline; /* 3 */
+ *vertical-align: middle; /* 3 */
+}
+
+/**
+ * Address Firefox 3+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+
+button,
+input {
+ line-height: normal;
+}
+
+/**
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
+ * All other form control elements do not inherit `text-transform` values.
+ * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
+ * Correct `select` style inheritance in Firefox 4+ and Opera.
+ */
+
+button,
+select {
+ text-transform: none;
+}
+
+/**
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ * and `video` controls.
+ * 2. Correct inability to style clickable `input` types in iOS.
+ * 3. Improve usability and consistency of cursor style between image-type
+ * `input` and others.
+ * 4. Remove inner spacing in IE 7 without affecting normal text inputs.
+ * Known issue: inner spacing remains in IE 6.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+ cursor: pointer; /* 3 */
+ *overflow: visible; /* 4 */
+}
+
+/**
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+
+/**
+ * 1. Address box sizing set to content-box in IE 8/9.
+ * 2. Remove excess padding in IE 8/9.
+ * 3. Remove excess padding in IE 7.
+ * Known issue: excess padding remains in IE 6.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+ *height: 13px; /* 3 */
+ *width: 13px; /* 3 */
+}
+
+/**
+ * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
+ * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
+ * (include `-moz` to future-proof).
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+}
+
+/**
+ * Remove inner padding and search cancel button in Safari 5 and Chrome
+ * on OS X.
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * Remove inner padding and border in Firefox 3+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/**
+ * 1. Remove default vertical scrollbar in IE 6/7/8/9.
+ * 2. Improve readability and alignment in all browsers.
+ */
+
+textarea {
+ overflow: auto; /* 1 */
+ vertical-align: top; /* 2 */
+}
+
+/* ==========================================================================
+ Tables
+ ========================================================================== */
+
+/**
+ * Remove most spacing between table cells.
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+} \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize.css b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize.css
new file mode 100644
index 000000000..9bfd183d3
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize.css
@@ -0,0 +1,439 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+html {
+ font-family: sans-serif; /* 1 */
+ -ms-text-size-adjust: 100%; /* 2 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/**
+ * Remove default margin.
+ */
+
+body {
+ margin: 0;
+}
+
+/* HTML5 display definitions
+ ========================================================================== */
+
+/**
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
+ * and Firefox.
+ * Correct `block` display not defined for `main` in IE 11.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
+ display: block;
+}
+
+/**
+ * 1. Correct `inline-block` display not defined in IE 8/9.
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
+ */
+
+audio,
+canvas,
+progress,
+video {
+ display: inline-block; /* 1 */
+ vertical-align: baseline; /* 2 */
+}
+
+/**
+ * Prevent modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+/**
+ * Address `[hidden]` styling not present in IE 8/9/10.
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
+ */
+
+[hidden],
+template {
+ display: none;
+}
+
+/* Links
+ ========================================================================== */
+
+/**
+ * Remove the gray background color from active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * Improve readability when focused and also mouse hovered in all browsers.
+ */
+
+a:active,
+a:hover {
+ outline: 0;
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
+ */
+
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+
+/**
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
+ */
+
+b,
+strong {
+ font-weight: bold;
+}
+
+/**
+ * Address styling not present in Safari and Chrome.
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/**
+ * Address variable `h1` font-size and margin within `section` and `article`
+ * contexts in Firefox 4+, Safari, and Chrome.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/**
+ * Address styling not present in IE 8/9.
+ */
+
+mark {
+ background: #ff0;
+ color: #000;
+}
+
+/**
+ * Address inconsistent and variable font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove border when inside `a` element in IE 8/9/10.
+ */
+
+img {
+ border: 0;
+}
+
+/**
+ * Correct overflow not hidden in IE 9/10/11.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * Address margin not present in IE 8/9 and Safari.
+ */
+
+figure {
+ margin: 1em 40px;
+}
+
+/**
+ * Address differences between Firefox and other browsers.
+ */
+
+hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0;
+}
+
+/**
+ * Contain overflow in all browsers.
+ */
+
+pre {
+ overflow: auto;
+}
+
+/**
+ * Address odd `em`-unit font size rendering in all browsers.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
+ * styling of `select`, unless a `border` property is set.
+ */
+
+/**
+ * 1. Correct color not being inherited.
+ * Known issue: affects color of disabled elements.
+ * 2. Correct font properties not being inherited.
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ color: inherit; /* 1 */
+ font: inherit; /* 2 */
+ margin: 0; /* 3 */
+}
+
+/**
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
+ */
+
+button {
+ overflow: visible;
+}
+
+/**
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
+ * All other form control elements do not inherit `text-transform` values.
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
+ * Correct `select` style inheritance in Firefox.
+ */
+
+button,
+select {
+ text-transform: none;
+}
+
+/**
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ * and `video` controls.
+ * 2. Correct inability to style clickable `input` types in iOS.
+ * 3. Improve usability and consistency of cursor style between image-type
+ * `input` and others.
+ */
+
+button,
+html input[type="button"], /* 1 */
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+ cursor: pointer; /* 3 */
+}
+
+/**
+ * Re-set default cursor for disabled elements.
+ */
+
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+
+/**
+ * Remove inner padding and border in Firefox 4+.
+ */
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/**
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+
+input {
+ line-height: normal;
+}
+
+/**
+ * It's recommended that you don't attempt to style these elements.
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
+ *
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
+ * 2. Remove excess padding in IE 8/9/10.
+ */
+
+input[type="checkbox"],
+input[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
+ * `font-size` values of the `input`, it causes the cursor style of the
+ * decrement button to change from `default` to `text`.
+ */
+
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
+ * (include `-moz` to future-proof).
+ */
+
+input[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box; /* 2 */
+ box-sizing: content-box;
+}
+
+/**
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
+ * Safari (but not Chrome) clips the cancel button when the search input has
+ * padding (and `textfield` appearance).
+ */
+
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * Define consistent border, margin, and padding.
+ */
+
+fieldset {
+ border: 1px solid #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em;
+}
+
+/**
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
+ */
+
+legend {
+ border: 0; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Remove default vertical scrollbar in IE 8/9/10/11.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * Don't inherit the `font-weight` (applied by a rule above).
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ */
+
+optgroup {
+ font-weight: bold;
+}
+
+/* Tables
+ ========================================================================== */
+
+/**
+ * Remove most spacing between table cells.
+ */
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+td,
+th {
+ padding: 0;
+}
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/styles.css b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/styles.css
new file mode 100644
index 000000000..9ce7ace9d
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/css/styles.css
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+/* ---------------------------------------------------------
+ HTML5 Bones
+ This stylesheet contains print styling and a section for
+ you to simply add your own. This is a basic template
+ after all.
+ ---------------------------------------------------------*/
+ body {
+
+ }
+ /* Default link styling */
+ a:link { color:#067ab4; }
+ a:visited { color:#067ab4; }
+ a:hover, a:focus { color:#000; }
+ a:active { color:#fb0e02; }
+
+
+
+/* ---------------------------------------------------------
+ Author's styles
+ ---------------------------------------------------------*/
+ body {
+
+ }
+
+ h1 {
+ color: orange;
+ text-align: center;
+ }
+
+
+
+/* ---------------------------------------------------------
+ Print styles
+ ---------------------------------------------------------*/
+@media print {
+ * {
+ color:#000 !important;
+ box-shadow:none !important;
+ text-shadow:none !important;
+ background:transparent !important;
+ }
+ html { background-color:#fff; }
+ /* Hide navigation */
+ nav { display:none; }
+
+ /* Show link destinations in brackets after the link text */
+ a[href]:after { content: " (" attr(href) ") "; }
+ a[href] {
+ font-weight:bold;
+ text-decoration:underline;
+ color:#06c;
+ border:none;
+ }
+ /* Don't show link destinations for JavaScript or internal links */
+ a[href^="javascript:"]:after, a[href^="#"]:after { content:""; }
+
+ /* Show abbr title value in brackets after the text */
+ abbr[title]:after { content: " (" attr(title) ")"; }
+
+ figure {
+ margin-bottom:1em;
+ overflow:hidden;
+ }
+
+ figure img { border:1px solid #000; }
+} \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/app.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/app.js
new file mode 100644
index 000000000..476da957d
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/app.js
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+(function(window, angular, $) {
+ 'use strict';
+ angular.module('abs').requires.push('ngRoute', 'modalServices', 'pascalprecht.translate', 'ngCookies', 'ngSanitize', 'ui-notification',
+ 'ui.grid','ui.grid.pagination','ui.grid.selection', 'ui.grid.exporter', 'ui.grid.edit', 'ui.grid.autoResize','b2b.att',
+ 'ui.grid.resizeColumns', 'ui.grid.treeView');
+ var app = appDS2;
+
+ app.config(['policyManagerConfigProvider', function (config) {
+ var defaults = config.$get();
+ config.set({
+ appName: 'Policy Editor',
+ cache: false,
+ allowedActions: angular.extend(defaults.allowedActions, {
+ remove: true
+ })
+ });
+ }]);
+ /**
+ * jQuery inits
+ */
+ $(window.document).on('shown.bs.modal', '.modal', function() {
+ window.setTimeout(function() {
+ $('[autofocus]', this).focus();
+ }.bind(this), 100);
+ });
+
+ $(window.document).on('click', function() {
+ $('#context-menu').hide();
+ });
+
+ $(window.document).on('contextmenu', '.main-navigation .table-files td:first-child, .iconset a.thumbnail', function(e) {
+ $('#context-menu').hide().css({
+ left: e.pageX,
+ top: e.pageY
+ }).show();
+ e.preventDefault();
+ });
+
+})(window, angular, jQuery);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policyManager.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policyManager.js
new file mode 100644
index 000000000..869d26ba3
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/policyManager.js
@@ -0,0 +1,385 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+app.controller('PolicyManagerController', [
+ '$scope', '$q', '$window', '$cookies', 'policyManagerConfig', 'item', 'policyNavigator', 'policyUploader', 'Notification','PolicyAppService',
+ function($scope, $q, $Window, $cookies, policyManagerConfig, Item, PolicyNavigator, PolicyUploader, Notification, PolicyAppService ) {
+
+ $scope.isDisabled = true;
+ $scope.superAdminId = false;
+ $scope.exportPolicyId = false;
+ $scope.importPolicyId = false;
+ $scope.createScopeId = false;
+ $scope.deleteScopeId = false;
+ $scope.renameId = false;
+ $scope.createPolicyId = false;
+ $scope.cloneId = false;
+ $scope.editPolicyId = false;
+ $scope.switchVersionId = false;
+ $scope.describePolicyId = false;
+ $scope.viewPolicyId = false;
+ $scope.deletePolicyId = false;
+ PolicyAppService.getData('get_LockDownData').then(function(data){
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ $scope.lockdowndata = JSON.parse($scope.data.lockdowndata);
+ if($scope.lockdowndata[0].lockdown == true){
+ $scope.isDisabled = true;
+ }else{
+ $scope.isDisabled = false;
+ }
+ console.log($scope.data);
+ },function(error){
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_DescriptiveScopeByName').then(function(data){
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.descriptiveScopeDictionaryDatas = JSON.parse($scope.data.descriptiveScopeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_EcompNameDataByName').then(function(data){
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.ecompNameDictionaryDatas = JSON.parse($scope.data.ecompNameDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_VSCLActionDataByName').then(function(data){
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.vsclActionDictionaryDatas = JSON.parse($scope.data.vsclActionDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+ PolicyAppService.getData('getDictionary/get_VNFTypeDataByName').then(function(data){
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.vnfTypeDictionaryDatas = JSON.parse($scope.data.vnfTypeDictionaryDatas);
+ }, function (error) {
+ console.log("failed");
+ });
+
+
+ PolicyAppService.getData('get_UserRolesData').then(function (data) {
+ var j = data;
+ $scope.data = JSON.parse(j.data);
+ console.log($scope.data);
+ $scope.userRolesDatas = JSON.parse($scope.data.userRolesDatas);
+ console.log($scope.userRolesDatas);
+ if($scope.userRolesDatas[0] == 'super-admin'){
+ $scope.superAdminId = true;
+ $scope.exportPolicyId = true;
+ $scope.importPolicyId = true;
+ $scope.createScopeId = true;
+ $scope.deleteScopeId = true;
+ $scope.renameId = true;
+ $scope.createPolicyId = true;
+ $scope.cloneId = true;
+ $scope.editPolicyId = true;
+ $scope.switchVersionId = true;
+ $scope.describePolicyId = true;
+ $scope.viewPolicyId = true;
+ $scope.deletePolicyId = true;
+ }else if($scope.userRolesDatas[0] == 'super-editor' || $scope.userRolesDatas[0] == 'editor'){
+ $scope.exportPolicyId = true;
+ $scope.importPolicyId = true;
+ $scope.cloneId = true;
+ $scope.editPolicyId = true;
+ $scope.createPolicyId = true;
+ $scope.cloneId = true;
+ $scope.editPolicyId = true;
+ $scope.switchVersionId = true;
+ $scope.describePolicyId = true;
+ $scope.viewPolicyId = true;
+ $scope.deletePolicyId = true;
+ }else if($scope.userRolesDatas[0] == 'super-guest' || $scope.userRolesDatas[0] == 'guest'){
+ $scope.describePolicyId = true;
+ $scope.viewPolicyId = true;
+ }else if($scope.userRolesDatas[0] == 'admin'){
+ $scope.exportPolicyId = true;
+ $scope.importPolicyId = true;
+ $scope.createScopeId = true;
+ $scope.renameId = true;
+ $scope.createPolicyId = true;
+ $scope.cloneId = true;
+ $scope.editPolicyId = true;
+ $scope.switchVersionId = true;
+ $scope.describePolicyId = true;
+ $scope.viewPolicyId = true;
+ $scope.deletePolicyId = true;
+ }
+ }, function (error) {
+ console.log("failed");
+ });
+
+ $scope.config = policyManagerConfig;
+ $scope.reverse = false;
+ $scope.predicate = ['model.type', 'model.name'];
+ $scope.order = function(predicate) {
+ $scope.reverse = ($scope.predicate[1] === predicate) ? !$scope.reverse : false;
+ $scope.predicate[1] = predicate;
+ };
+
+ $scope.query = '';
+ $scope.temp = new Item();
+ $scope.policyNavigator = new PolicyNavigator();
+ $scope.policyUploader = PolicyUploader;
+ $scope.uploadFileList = [];
+
+ $scope.setTemplate = function(name) {
+ $scope.viewTemplate = $cookies.viewTemplate = name;
+ };
+
+ $scope.touch = function(item) {
+ item = item instanceof Item ? item : new Item();
+ item.revert();
+ $scope.temp = item;
+ };
+
+ $scope.smartClick = function(item) {
+ if (item.isFolder()) {
+ return $scope.policyNavigator.folderClick(item);
+ }
+ if (item.isEditable()) {
+ return $scope.openEditItem(item);
+ }
+ };
+
+ $scope.openEditItem = function(item) {
+ item.getContent();
+ $scope.modal('createNewPolicy');
+ return $scope.touch(item);
+ };
+
+ $scope.modal = function(id, hide) {
+ return $('#' + id).modal(hide ? 'hide' : 'show');
+ };
+
+ $scope.isInThisPath = function(path) {
+ var currentPath = $scope.policyNavigator.currentPath.join('/');
+ return currentPath.indexOf(path) !== -1;
+ };
+
+ $scope.watch = function(item){
+ var uuu = "watchPolicy";
+ var data = {name : item.model.name,
+ path : item.model.path};
+ var postData={watchData: data};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.watchData=data.watchData;});
+ Notification.success($scope.watchData);
+ console.log($scope.watchData);
+ },
+ error : function(data){
+ alert("Error while saving.");
+ }
+ });
+ };
+
+ $scope.search = function(search){
+ var deferred = $q.defer();
+ var uuu = "searchPolicy";
+ var postData = {searchdata : search};
+ $.ajax({
+ type : 'POST',
+ url : uuu,
+ dataType: 'json',
+ contentType: 'application/json',
+ data: JSON.stringify(postData),
+ success : function(data){
+ $scope.$apply(function(){
+ $scope.searchdata=data.result;});
+ if($scope.searchdata[0].error != undefined){
+ Notification.info($scope.searchdata[0].error);
+ }else{
+ var j = data;
+ $scope.data = JSON.stringify(data.result);
+ $scope.searchDatas = JSON.parse($scope.data);
+ var searchString = "Policies List" + "<br>";
+ var i;
+ for(i = 0 ; i < $scope.searchDatas.length; i++){
+ searchString += $scope.searchDatas[i].name + ".xml" + "<br>";
+ }
+ var myWindow = window.open("", "MsgWindow", "width=500,height=500");
+ myWindow.document.write("<p>Search List</p>");
+ myWindow.document.write("<p>"+searchString+"</p>");
+ }
+ },
+ error : function(data){
+ alert("Error while Searching.");
+ }
+ });
+ };
+
+
+ /* $scope.describePolicy = function(item){
+ item.describePolicy().then(function(){
+ $scope.modal('describePolicy', true);
+ });
+ };
+
+ $scope.exportPolicy = function(item){
+ item.exportPolicy().then(function(){
+ $scope.modal('exportPolicy', true);
+ });
+ };*/
+
+ $scope.switchVersion = function(item){
+ if ($scope.policyNavigator.fileNameExists(item.tempModel.content.activeVersion)) {
+ item.error = 'Invalid filename or already exists, specify another name';
+ return false;
+ }
+ item.getSwitchVersionContent().then(function(){
+ $scope.policyNavigator.refresh();
+ $scope.modal('switchVersion', true);
+ });
+ };
+
+
+ /* $scope.viewPolicy = function(item){
+ item.viewPolicy().then(function(){
+ $scope.modal('createNewPolicy', true);
+ });
+ };*/
+
+ $scope.copy = function(item) {
+ var samePath = item.tempModel.path.join() === item.model.path.join();
+ if (samePath && $scope.policyNavigator.fileNameExists(item.tempModel.name)) {
+ item.error = 'Invalid filename or already exists, specify another name';
+ return false;
+ }
+ item.copy().then(function() {
+ $scope.policyNavigator.refresh();
+ $scope.modal('copy', true);
+ });
+ };
+
+ $scope.remove = function(item) {
+ item.remove().then(function() {
+ $scope.policyNavigator.refresh();
+ $scope.modal('delete', true);
+ });
+ };
+
+ $scope.removePolicy = function(item) {
+ item.removePolicy().then(function() {
+ $scope.policyNavigator.refresh();
+ $scope.modal('deletePolicy', true);
+ });
+ };
+
+ $scope.rename = function(item) {
+ var samePath = item.tempModel.path.join() === item.model.path.join();
+ if (samePath && $scope.policyNavigator.fileNameExists(item.tempModel.name)) {
+ item.error = 'Invalid filename or already exists, specify another name';
+ return false;
+ }
+ item.rename().then(function() {
+ $scope.policyNavigator.refresh();
+ $scope.modal('rename', true);
+ });
+ };
+
+ $scope.move = function(item) {
+ var samePath = item.tempModel.path.join() === item.model.path.join();
+ if (samePath && $scope.policyNavigator.fileNameExists(item.tempModel.name)) {
+ item.error = 'Invalid filename or already exists, specify another name';
+ return false;
+ }
+ item.move().then(function() {
+ $scope.policyNavigator.refresh();
+ $scope.modal('move', true);
+ });
+ };
+
+ $scope.createFolder = function(item) {
+ var name = item.tempModel.name && item.tempModel.name.trim();
+ item.tempModel.type = 'dir';
+ item.tempModel.path = $scope.policyNavigator.currentPath;
+ if (name && !$scope.policyNavigator.fileNameExists(name)) {
+ item.createFolder().then(function() {
+ $scope.policyNavigator.refresh();
+ $scope.modal('newfolder', true);
+ });
+ } else {
+ item.error = 'Invalid filename or already exists, specify another name';
+ return false;
+ }
+ };
+
+ $scope.subScopeFolder = function(item) {
+ var name = item.tempModel.name +"\\" + item.tempModel.subScopename && item.tempModel.name.trim() + "\\"+item.tempModel.subScopename.trim() ;
+ item.tempModel.type = 'dir';
+ item.tempModel.path = $scope.policyNavigator.currentPath;
+ if (name && !$scope.policyNavigator.fileNameExists(name)) {
+ item.getScopeContent().then(function() {
+ $scope.policyNavigator.refresh();
+ $scope.modal('addSubScope', true);
+ });
+ } else {
+ item.error = 'Invalid filename or already exists, specify another name';
+ return false;
+ }
+ };
+
+ $scope.closefunction = function(fianlPath){
+ $scope.policyNavigator.policyrefresh(fianlPath);
+ };
+
+ $scope.uploadFiles = function() {
+ $scope.policyUploader.upload($scope.uploadFileList, $scope.policyNavigator.currentPath).then(function() {
+ $scope.policyNavigator.refresh();
+ $scope.modal('uploadfile', true);
+ }, function(data) {
+ var errorMsg = data.result && data.result.error || 'Error Occured while Uploading....';
+ $scope.temp.error = errorMsg;
+ });
+ };
+
+ $scope.getQueryParam = function(param) {
+ var found;
+ window.location.search.substr(1).split('&').forEach(function(item) {
+ if (param === item.split('=')[0]) {
+ found = item.split('=')[1];
+ return false;
+ }
+ });
+ return found;
+ };
+
+ $scope.isWindows = $scope.getQueryParam('server') === 'Windows';
+ $scope.policyNavigator.refresh();
+ }]);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/selector-controller.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/selector-controller.js
new file mode 100644
index 000000000..438036341
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/controllers/selector-controller.js
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+(function(angular, $) {
+ 'use strict';
+ angular.module('abs').controller('PolicyManagerModalCtrl',
+ ['$scope', '$rootScope', 'policyNavigator',
+ function($scope, $rootScope, PolicyNavigator) {
+
+ $scope.reverse = false;
+ $scope.predicate = ['model.type', 'model.name'];
+ $scope.order = function(predicate) {
+ $scope.reverse = ($scope.predicate[1] === predicate) ? !$scope.reverse : false;
+ $scope.predicate[1] = predicate;
+ };
+
+ $scope.policyNavigator = new PolicyNavigator();
+ $rootScope.select = function(item, temp) {
+ temp.tempModel.path = item.model.fullPath().split('/');
+ $('#selector').modal('hide');
+ };
+
+ $rootScope.openNavigator = function(item) {
+ $scope.policyNavigator.currentPath = item.model.path.slice();
+ $scope.policyNavigator.refresh();
+ $('#selector').modal('show');
+ };
+
+ }]);
+})(angular, jQuery); \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/directives/directives.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/directives/directives.js
new file mode 100644
index 000000000..308a634db
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/directives/directives.js
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+(function(angular) {
+ 'use strict';
+ var app = appDS2;
+
+ app.directive('ngFile', ['$parse', function($parse) {
+ return {
+ restrict: 'A',
+ link: function(scope, element, attrs) {
+ var model = $parse(attrs.ngFile);
+ var modelSetter = model.assign;
+
+ element.bind('change', function() {
+ scope.$apply(function() {
+ modelSetter(scope, element[0].files);
+ });
+ });
+ }
+ };
+ }]);
+
+ app.directive('ngRightClick', ['$parse', function($parse) {
+ return function(scope, element, attrs) {
+ var fn = $parse(attrs.ngRightClick);
+ element.bind('contextmenu', function(event) {
+ scope.$apply(function() {
+ event.preventDefault();
+ fn(scope, {$event: event});
+ });
+ });
+ };
+ }]);
+
+})(angular);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js
new file mode 100644
index 000000000..2b1fd3469
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/entities/item.js
@@ -0,0 +1,347 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module('abs').factory('item', ['$http', '$q', 'policyManagerConfig', function($http, $q, policyManagerConfig) {
+
+ var Item = function(model, path) {
+ var rawModel = {
+ name: model && model.name || '',
+ subScopename: model && model.subScopename || '',
+ path: path || [],
+ type: model && model.type || 'file',
+ size: model && parseInt(model.size || 0),
+ date: parseMySQLDate(model && model.date),
+ version: model && model.version || '',
+ createdBy: model && model.createdBy || '',
+ modifiedBy: model && model.modifiedBy || '',
+ content: model && model.content || '',
+ recursive: false,
+ sizeKb: function() {
+ return Math.round(this.size / 1024, 1);
+ },
+ fullPath: function() {
+ if(this.version == ""){
+ return ('/' + this.path.join('/') + '/' + this.name).replace(/\/\//, '/');
+ }else{
+ return ('/' + this.path.join('/') + '/' + this.name + '.' + this.version + '.xml').replace(/\/\//, '/');
+ }
+ }
+ };
+
+ this.error = '';
+ this.inprocess = false;
+
+ this.model = angular.copy(rawModel);
+ this.tempModel = angular.copy(rawModel);
+
+ function parseMySQLDate(mysqlDate) {
+ var d = (mysqlDate || '').toString().split(/[- :]/);
+ return new Date(d[0], d[1] - 1, d[2], d[3], d[4], d[5]);
+ }
+ };
+
+ Item.prototype.update = function() {
+ angular.extend(this.model, angular.copy(this.tempModel));
+ };
+
+ Item.prototype.revert = function() {
+ angular.extend(this.tempModel, angular.copy(this.model));
+ this.error = '';
+ };
+
+ Item.prototype.deferredHandler = function(data, deferred, defaultMsg) {
+ if (!data || typeof data !== 'object') {
+ this.error = 'Bridge response error, please check the docs';
+ }
+ if (data.result && data.result.error) {
+ this.error = data.result.error;
+ }
+ if (!this.error && data.error) {
+ this.error = data.error.message;
+ }
+ if (!this.error && defaultMsg) {
+ this.error = defaultMsg;
+ }
+ if (this.error) {
+ return deferred.reject(data);
+ }
+ this.update();
+ return deferred.resolve(data);
+ };
+
+ Item.prototype.createFolder = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'ADDFOLDER',
+ path: self.tempModel.path.join('/'),
+ name: self.tempModel.name
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.createFolderUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While Creating Scope');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+
+ return deferred.promise;
+ };
+
+ Item.prototype.rename = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'RENAME',
+ path: self.model.fullPath(),
+ newPath: self.tempModel.fullPath()
+ }};
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.renameUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While Renaming');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+
+ Item.prototype.move = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'RENAME',
+ path: self.model.fullPath(),
+ newPath: self.tempModel.fullPath()
+ }};
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.renameUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While Moving');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+ Item.prototype.copy = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'COPY',
+ path: self.model.fullPath(),
+ newPath: self.tempModel.fullPath()
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.copyUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While Cloning');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+
+ Item.prototype.getContent = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'EDITFILE',
+ path: self.tempModel.fullPath()
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.getContentUrl, data).success(function(data) {
+ self.tempModel.content = self.model.content = data.result;
+ var json = data.result;
+ var policy = JSON.parse(json);
+ self.policy = policy;
+ console.log(policy);
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While retrieving the Policy Data');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+ Item.prototype.getViewPolicyContent = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'VIEWPOLICY',
+ path: self.tempModel.fullPath()
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.viewPolicyUrl, data).success(function(data) {
+ self.tempModel.content = self.model.content = data.result;
+ var json = data.result;
+ var policy = JSON.parse(json);
+ self.policy = policy;
+ console.log(data.result);
+ console.log(policy);
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While retrieving the Policy Data');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+ Item.prototype.getSwitchVersionContent = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'SWITCHVERSION',
+ path: self.tempModel.fullPath(),
+ activeVersion : self.tempModel.content.activeVersion,
+ highestVersion : self.tempModel.content.highestVersion
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.switchVersionUrl, data).success(function(data) {
+ self.tempModel.content = self.model.content = data;
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While retrieving the Switch Version Data');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+ Item.prototype.getDescribePolicyContent = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'DESCRIBEPOLICYFILE',
+ path: self.tempModel.fullPath()
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.describePolicyUrl, data).success(function(data) {
+ self.tempModel.content = self.model.content = data.html;
+ var describeTemplate = self.tempModel.content;
+
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While retrieving the Policy Data to Describe');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+ Item.prototype.getScopeContent = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'ADDSUBSCOPE',
+ name: self.tempModel.name,
+ subScopename: self.tempModel.subScopename,
+ path: self.tempModel.fullPath()
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.addSubScopeUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While Creating the Sub Scope');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+ Item.prototype.remove = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'DELETE',
+ path: self.tempModel.fullPath(),
+ deleteVersion : self.model.versions
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.removeUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While retrieving the Deleting Scope');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+ Item.prototype.removePolicy = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var data = {params: {
+ mode: 'DELETE',
+ path: self.tempModel.fullPath(),
+ deleteVersion : self.model.versions
+ }};
+
+ self.inprocess = true;
+ self.error = '';
+ $http.post(policyManagerConfig.removeUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Error Occured While retrieving the Deleting Policy');
+ })['finally'](function() {
+ self.inprocess = false;
+ });
+ return deferred.promise;
+ };
+
+ Item.prototype.isFolder = function() {
+ return this.model.type === 'dir';
+ };
+
+ Item.prototype.isEditable = function() {
+ return !this.isFolder() && policyManagerConfig.isEditableFilePattern.test(this.model.name);
+ };
+
+ /*Item.prototype.isImage = function() {
+ return policyManagerConfig.isImageFilePattern.test(this.model.name);
+ };*/
+
+ return Item;
+ }]);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/filters/filters.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/filters/filters.js
new file mode 100644
index 000000000..4d897c9c0
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/filters/filters.js
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+(function(angular) {
+ 'use strict';
+ var app = angular.module('abs');
+
+ app.filter('strLimit', ['$filter', function($filter) {
+ return function(input, limit) {
+ if (input.length <= limit) {
+ return input;
+ }
+ return $filter('limitTo')(input, limit) + '...';
+ };
+ }]);
+
+ app.filter('formatDate', ['$filter', function() {
+ return function(input) {
+ return input instanceof Date ?
+ input.toISOString().substring(0, 19).replace('T', ' ') :
+ (input.toLocaleString || input.toString).apply(input);
+ };
+ }]);
+})(angular);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/providers/config.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/providers/config.js
new file mode 100644
index 000000000..72fd84d53
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/providers/config.js
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+(function(angular) {
+ 'use strict';
+
+ angular.module('abs').provider('policyManagerConfig', function() {
+
+ var values = {
+ appName: 'Policy Editor',
+ defaultLang: 'en',
+ listUrl: 'fm/listUrl',
+ uploadUrl: 'fm/uploadUrl',
+ renameUrl: 'fm/renameUrl',
+ copyUrl: 'fm/copyUrl',
+ removeUrl: 'fm/removeUrl',
+ editUrl: 'fm/editUrl',
+ getContentUrl: 'fm/getContentUrl',
+ createFolderUrl: 'fm/createFolderUrl',
+ downloadFileUrl: 'fm/downloadFileUrl',
+ compressUrl: 'fm/compressUrl',
+ extractUrl: 'fm/extractUrl',
+ permissionsUrl: 'fm/permissionsUrl',
+ describePolicyUrl : 'fm/describePolicyUrl',
+ viewPolicyUrl : 'fm/viewPolicyUrl',
+ addSubScopeUrl : 'fm/addSubScopeUrl',
+ switchVersionUrl : 'fm/switchVersionUrl',
+ exportUrl : 'fm/exportUrl',
+
+ sidebar: true,
+ breadcrumb: true,
+ allowedActions: {
+ upload: true,
+ rename: true,
+ copy: true,
+ edit: true,
+ describePolicy: true,
+ createNewPolicy: true,
+ viewPolicy: true,
+ download: true,
+ preview: true,
+ remove: true,
+ addSubScope : true,
+ switchVersion : true,
+ exportPolicy : true,
+ removePolicy : true
+ },
+
+ tplPath: 'app/policyApp/policy-models/Editor/templates'
+ };
+
+ return {
+ $get: function() {
+ return values;
+ },
+ set: function (constants) {
+ angular.extend(values, constants);
+ }
+ };
+
+ });
+})(angular);
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/RolesService.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/RolesService.js
new file mode 100644
index 000000000..2d3426fc3
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/RolesService.js
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+angular.module("abs").factory('RolesService', function ($http, $q) {
+ return {
+ getRolesData: function() {
+ return $http.get('get_UserRolesData')
+ .then(function(response) {
+ if (typeof response.data === 'object') {
+ return response.data;
+ } else {
+ return $q.reject(response.data);
+ }
+
+ }, function(response) {
+ // something went wrong
+ return $q.reject(response.data);
+ });
+ }
+ };
+}); \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/policynavigator.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/policynavigator.js
new file mode 100644
index 000000000..bb76dd9d5
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/policynavigator.js
@@ -0,0 +1,235 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+(function(angular) {
+ 'use strict';
+ angular.module('abs').service('policyNavigator', [
+ '$http', '$q', 'policyManagerConfig', 'item', function ($http, $q, policyManagerConfig, Item) {
+
+ $http.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+
+ var PolicyNavigator = function() {
+ this.requesting = false;
+ this.fileList = [];
+ this.currentPath = [];
+ this.history = [];
+ this.error = '';
+ };
+
+ PolicyNavigator.prototype.deferredHandler = function(data, deferred, defaultMsg) {
+ if (!data || typeof data !== 'object') {
+ this.error = 'Bridge response error, please check the docs';
+ }
+ if (!this.error && data.result && data.result.error) {
+ this.error = data.result.error;
+ }
+ if (!this.error && data.error) {
+ this.error = data.error.message;
+ }
+ if (!this.error && defaultMsg) {
+ this.error = defaultMsg;
+ }
+ if (this.error) {
+ return deferred.reject(data);
+ }
+ return deferred.resolve(data);
+ };
+
+ PolicyNavigator.prototype.deferredSearchHandler = function(data, deferred, defaultMsg) {
+ self.fileList = [];
+ self.error = '';
+ if (!data || typeof data !== 'object') {
+ this.error = 'Bridge response error, please check the docs';
+ }
+ if (!this.error && data.result && data.result.error) {
+ this.error = data.result.error;
+ }
+ if (!this.error && data.error) {
+ this.error = data.error.message;
+ }
+ if (!this.error && defaultMsg) {
+ this.error = defaultMsg;
+ }
+ if (this.error) {
+ return deferred.reject(data);
+ }
+ return deferred.resolve(data);
+ };
+
+ PolicyNavigator.prototype.list = function() {
+ var self = this;
+ var deferred = $q.defer();
+ var path = self.currentPath.join('/');
+ var data = {params: {
+ mode: 'LIST',
+ onlyFolders: false,
+ path: '/' + path
+ }};
+
+ self.requesting = true;
+ self.fileList = [];
+ self.error = '';
+
+ $http.post(policyManagerConfig.listUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Unknown error listing, check the response');
+ })['finally'](function() {
+ self.requesting = false;
+ });
+ return deferred.promise;
+ };
+
+ PolicyNavigator.prototype.refresh = function() {
+ var self = this;
+ var path = self.currentPath.join('/');
+ return self.list().then(function(data) {
+ self.fileList = (data.result || []).map(function(file) {
+ return new Item(file, self.currentPath);
+ });
+ self.buildTree(path);
+ });
+ };
+
+ PolicyNavigator.prototype.policylist = function(finalpath) {
+ var self = this;
+ var deferred = $q.defer();
+ var path = finalpath;
+ var data = {params: {
+ mode: 'LIST',
+ onlyFolders: false,
+ path: '/' + path
+ }};
+
+ self.requesting = true;
+ self.fileList = [];
+ self.error = '';
+
+ $http.post(policyManagerConfig.listUrl, data).success(function(data) {
+ self.deferredHandler(data, deferred);
+ }).error(function(data) {
+ self.deferredHandler(data, deferred, 'Unknown error listing, check the response');
+ })['finally'](function() {
+ self.requesting = false;
+ });
+ return deferred.promise;
+ };
+
+ PolicyNavigator.prototype.policyrefresh = function(finalpath) {
+ var self = this;
+ var path = finalpath;
+ self.currentPath = path;
+ return self.policylist(finalpath).then(function(data) {
+ self.fileList = (data.result || []).map(function(file) {
+ return new Item(file, self.currentPath);
+ });
+ self.buildTree(path);
+ });
+ };
+
+
+ PolicyNavigator.prototype.buildTree = function(path) {
+ var flatNodes = [], selectedNode = {};
+
+ function recursive(parent, item, path) {
+ var absName = path ? (path + '/' + item.model.name) : item.model.name;
+ if (parent.name.trim() && path.trim().indexOf(parent.name) !== 0) {
+ parent.nodes = [];
+ }
+ if (parent.name !== path) {
+ for (var i in parent.nodes) {
+ recursive(parent.nodes[i], item, path);
+ }
+ } else {
+ for (var e in parent.nodes) {
+ if (parent.nodes[e].name === absName) {
+ return;
+ }
+ }
+ parent.nodes.push({item: item, name: absName, nodes: []});
+ }
+ parent.nodes = parent.nodes.sort(function(a, b) {
+ return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : a.name.toLowerCase() === b.name.toLowerCase() ? 0 : 1;
+ });
+ }
+
+ function flatten(node, array) {
+ array.push(node);
+ for (var n in node.nodes) {
+ flatten(node.nodes[n], array);
+ }
+ }
+
+ function findNode(data, path) {
+ return data.filter(function (n) {
+ return n.name === path;
+ })[0];
+ }
+
+ !this.history.length && this.history.push({name: '', nodes: []});
+ flatten(this.history[0], flatNodes);
+ selectedNode = findNode(flatNodes, path);
+ selectedNode.nodes = [];
+
+ for (var o in this.fileList) {
+ var item = this.fileList[o];
+ item.isFolder() && recursive(this.history[0], item, path);
+ }
+ };
+
+ PolicyNavigator.prototype.folderClick = function(item) {
+ this.currentPath = [];
+ if (item && item.isFolder()) {
+ this.currentPath = item.model.fullPath().split('/').splice(1);
+ }
+ this.refresh();
+ };
+
+ PolicyNavigator.prototype.upDir = function() {
+ if (this.currentPath[0]) {
+ this.currentPath = this.currentPath.slice(0, -1);
+ this.refresh();
+ }
+ };
+
+ PolicyNavigator.prototype.goTo = function(index) {
+ this.currentPath = this.currentPath.slice(0, index + 1);
+ this.refresh();
+ };
+
+ PolicyNavigator.prototype.fileNameExists = function(fileName) {
+ for (var item in this.fileList) {
+ item = this.fileList[item];
+ if (fileName.trim && item.model.name.trim() === fileName.trim()) {
+ return true;
+ }
+ }
+ };
+
+ PolicyNavigator.prototype.listHasFolders = function() {
+ for (var item in this.fileList) {
+ if (this.fileList[item].model.type === 'dir') {
+ return true;
+ }
+ }
+ };
+
+ return PolicyNavigator;
+ }]);
+})(angular); \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/policyuploader.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/policyuploader.js
new file mode 100644
index 000000000..de7d4c15e
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/js/services/policyuploader.js
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+(function(window, angular) {
+ 'use strict';
+ angular.module('abs').service('policyUploader', ['$http', '$q', 'policyManagerConfig', function ($http, $q, policyManagerConfig) {
+
+ function deferredHandler(data, deferred, errorMessage) {
+ if (!data || typeof data !== 'object') {
+ return deferred.reject('Bridge response error, please check the docs');
+ }
+ if (data.result && data.result.error) {
+ return deferred.reject(data);
+ }
+ if (data.error) {
+ return deferred.reject(data);
+ }
+ if (errorMessage) {
+ return deferred.reject(errorMessage);
+ }
+ deferred.resolve(data);
+ }
+
+ this.requesting = false;
+ this.upload = function(fileList, path) {
+ if (! window.FormData) {
+ throw new Error('Unsupported browser version');
+ }
+ var self = this;
+ var form = new window.FormData();
+ var deferred = $q.defer();
+ form.append('destination', '/' + path.join('/'));
+
+ for (var i = 0; i < fileList.length; i++) {
+ var fileObj = fileList.item(i);
+ fileObj instanceof window.File && form.append('file-' + i, fileObj);
+ }
+
+ self.requesting = true;
+ $http.post(policyManagerConfig.uploadUrl, form, {
+ transformRequest: angular.identity,
+ headers: {
+ 'Content-Type': undefined
+ }
+ }).success(function(data) {
+ deferredHandler(data, deferred);
+ }).error(function(data) {
+ deferredHandler(data, deferred, 'Unknown error uploading files');
+ })['finally'](function() {
+ self.requesting = false;
+ });
+
+ return deferred.promise;
+ };
+ }]);
+})(window, angular); \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/current-folder-breadcrumb.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/current-folder-breadcrumb.html
new file mode 100644
index 000000000..1a59df9b7
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/current-folder-breadcrumb.html
@@ -0,0 +1,14 @@
+<ol class="breadcrumb mb0">
+ <li>
+ <a href="" ng-click="policyNavigator.goTo(-1)">
+ <i class="glyphicon glyphicon-folder-open mr2"></i>
+ </a>
+ </li>
+ <li ng-repeat="(key, dir) in policyNavigator.currentPath track by key" ng-class="{'active':$last}" class="animated fast fadeIn">
+ <a href="" ng-show="!$last" ng-click="policyNavigator.goTo(key)">
+ <i class="glyphicon glyphicon-folder-open mr2"></i> {{dir}}
+ </a>
+ <span ng-show="$last"><i class="glyphicon glyphicon-folder-open mr2"></i> {{dir}}</span>
+ </li>
+ <li><button class="btn btn-primary btn-xs" ng-click="policyNavigator.upDir()">&crarr;</button></li>
+</ol> \ No newline at end of file
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
new file mode 100644
index 000000000..5ef11b219
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-context-menu.html
@@ -0,0 +1,82 @@
+<div id="context-menu" class="dropdown clearfix animated fast fadeIn">
+ <ul class="dropdown-menu dropdown-right-click" ng-hide="isDisabled" role="menu" aria-labelledby="dropdownMenu" style="">
+
+ <li ng-show="temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#addSubScope" ng-show="createScopeId" ng-click="temp.getScopeContent();">
+ <i class="glyphicon glyphicon-plus"></i>Add Sub Scope
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.createNewPolicy && temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#createNewPolicy" ng-show="createPolicyId">
+ <i class="glyphicon glyphicon-plus"></i>Create Policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.describePolicy && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#describePolicy" ng-show="describePolicyId" ng-click="temp.getDescribePolicyContent();">
+ <i class="glyphicon glyphicon-picture"></i>Describe Policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.viewPolicy && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#createNewPolicy" ng-show="viewPolicyId" ng-click="temp.getViewPolicyContent();">
+ <i class="glyphicon glyphicon-picture"></i> View Policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.rename && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#rename" ng-show="renameId">
+ <i class="glyphicon glyphicon-edit"></i> Rename Policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.rename && temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#move" ng-show="renameId">
+ <i class="glyphicon glyphicon-edit"></i> Move Scope
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.rename && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#move" ng-show="renameId">
+ <i class="glyphicon glyphicon-edit"></i> Move Policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.rename && temp.isFolder()" >
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#rename" ng-show="renameId">
+ <i class="glyphicon glyphicon-edit"></i> Rename Scope
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.copy && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#copy" ng-show="cloneId">
+ <i class="glyphicon glyphicon-log-out"></i> Clone policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.edit && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#createNewPolicy" ng-show="editPolicyId" ng-click="temp.getContent();">
+ <i class="glyphicon glyphicon-pencil"></i> Edit Policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.switchVersion && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#switchVersion" ng-show="switchVersionId" ng-click="temp.getSwitchVersionContent();">
+ <i class="glyphicon glyphicon-pencil"></i> Switch Version
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.removePolicy && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#deletePolicy" ng-show="deletePolicyId">
+ <i class="glyphicon glyphicon-trash"></i> Delete Policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.remove && temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#delete" ng-show="deleteScopeId">
+ <i class="glyphicon glyphicon-trash"></i> Delete Scope
+ </a>
+ </li>
+ </ul>
+ <ul class="dropdown-menu dropdown-right-click" ng-show="isDisabled" role="menu" aria-labelledby="dropdownMenu" style="">
+ <li ng-show="config.allowedActions.describePolicy && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#describePolicy" ng-show="describePolicyId" ng-click="temp.getDescribePolicyContent();">
+ <i class="glyphicon glyphicon-picture"></i>Describe Policy
+ </a>
+ </li>
+ <li ng-show="config.allowedActions.viewPolicy && !temp.isFolder()">
+ <a href="" tabindex="-1" data-toggle="modal" data-target="#createNewPolicy" ng-show="viewPolicyId" ng-click="temp.getViewPolicyContent();">
+ <i class="glyphicon glyphicon-picture"></i> View Policy
+ </a>
+ </li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-toolbar.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-toolbar.html
new file mode 100644
index 000000000..086aef010
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/item-toolbar.html
@@ -0,0 +1,5 @@
+<div ng-show="!item.inprocess">
+ <button class="btn btn-sm btn-default" data-toggle="modal" data-target="#watch" ng-click="watch(item)" title="Watch">
+ <i class="glyphicon glyphicon-eye-open"></i>
+ </button>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-icons.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-icons.html
new file mode 100644
index 000000000..53a305b45
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-icons.html
@@ -0,0 +1,23 @@
+<div class="iconset clearfix">
+ <div class="col-120" ng-repeat="item in policyNavigator.fileList | filter: query | orderBy: orderProp" ng-show="!policyNavigator.requesting && !policyNavigator.error">
+ <a href="" class="thumbnail text-center" ng-click="smartClick(item)" ng-right-click="touch(item)" title="{{item.model.name}} ({{item.model.sizeKb()}}kb)">
+ <div class="item-icon">
+ <i class="glyphicon glyphicon-folder-open" ng-show="item.model.type === 'dir'"></i>
+ <i class="glyphicon glyphicon-file" ng-show="item.model.type === 'file'"></i>
+ </div>
+ {{item.model.name | strLimit : 11 }}
+ </a>
+ </div>
+
+ <div ng-show="policyNavigator.requesting">
+ <div ng-include="config.tplPath + '/spinner.html'"></div>
+ </div>
+
+ <div class="alert alert-warning" ng-show="!policyNavigator.requesting && policyNavigator.fileList.length < 1 && !policyNavigator.error">
+ No Policy's in Scope...
+ </div>
+
+ <div class="alert alert-danger" ng-show="!policyNavigator.requesting && policyNavigator.error">
+ {{ policyNavigator.error }}
+ </div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-table-modal.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-table-modal.html
new file mode 100644
index 000000000..948e505f9
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-table-modal.html
@@ -0,0 +1,46 @@
+<table class="table table-condensed table-modal-condensed mb0">
+ <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="text-right"></th>
+ </tr>
+ </thead>
+ <tbody class="file-item">
+ <tr ng-show="policyNavigator.requesting">
+ <td colspan="2">
+ <div ng-include="config.tplPath + '/spinner.html'"></div>
+ </td>
+ </tr>
+ <tr ng-show="!policyNavigator.requesting && !policyNavigator.listHasFolders() && !policyNavigator.error">
+ <td colspan="2">
+ No Sub Scopes in Scope...
+ </td>
+ <td class="text-right">
+ <button class="btn btn-sm btn-default" ng-click="policyNavigator.upDir()">Go back</button>
+ </td>
+ </tr>
+ <tr ng-show="!policyNavigator.requesting && policyNavigator.error">
+ <td colspan="2">
+ {{ policyNavigator.error }}
+ </td>
+ </tr>
+ <tr ng-repeat="item in policyNavigator.fileList | orderBy:predicate:reverse" ng-show="!policyNavigator.requesting && item.model.type === 'dir'">
+ <td>
+ <a href="" ng-click="policyNavigator.folderClick(item)" title="{{item.model.name}} ({{item.model.sizeKb()}}kb)">
+ <i class="glyphicon glyphicon-folder-close"></i>
+ {{item.model.name | strLimit : 32}}
+ </a>
+ </td>
+ <td class="text-right">
+ <button class="btn btn-sm btn-default" ng-click="select(item, temp)">
+ <i class="glyphicon glyphicon-hand-up"></i> Select this
+ </button>
+ </td>
+ </tr>
+ </tbody>
+</table> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-table.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-table.html
new file mode 100644
index 000000000..27ddad7e8
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/main-table.html
@@ -0,0 +1,85 @@
+<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>
+ <th class="hidden-sm hidden-xs">
+ <a href="">
+ Watch Policy
+ <span class="sortorder" ng-class="{reverse:reverse}"></span>
+ </a>
+ </th>
+ <!-- <th class="text-right">
+ <a>Watch Policy</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>
+ <td class="text-right">
+ <div ng-include="config.tplPath + '/item-toolbar.html'"></div>
+ </td>
+ </tr>
+ </tbody>
+</table> \ 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
new file mode 100644
index 000000000..f2b2b8d9d
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/modals.html
@@ -0,0 +1,306 @@
+<div class="modal animated fadeIn" id="delete" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="remove(temp)">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Confirm</h4>
+ </div>
+ <div>
+ Are you Sure to delete <b>{{temp.model.name}}</b> ?
+ <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="submit" class="btn btn-primary" ng-disabled="temp.inprocess" autofocus="autofocus">Delete</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="deletePolicy" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="removePolicy(temp)">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Confirm</h4>
+ </div>
+ <div>Are you Sure to delete <b>{{temp.model.name}}</b> ?
+ <div>
+ <p>
+ <input type = "radio" ng-model ="temp.model.versions" name = "radSize" id = "sizeSmall" value = "CURRENT" checked = "checked" /><label for = "sizeSmall">Are you sure you want to delete Current Version of Policy</label>
+ </br>
+ <input type = "radio" ng-model ="temp.model.versions" name = "radSize" id = "sizeMed" value = "ALL" /><label for = "sizeMed">Are you sure you want to delete All Versions of Policy</label>
+ </p>
+ </div>
+ <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="submit" class="btn btn-primary" ng-disabled="temp.inprocess" autofocus="autofocus">Delete</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="rename" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="rename(temp)">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Rename</h4>
+ </div>
+ <div>
+ <label class="radio">Enter New Name : <b>{{temp.model.name}}</b></label>
+ <input class="form-control" ng-model="temp.tempModel.name" autofocus="autofocus">
+
+ <div ng-include data-src="'path-selector'" class="clearfix"></div>
+ <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="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Rename</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="searchWindow" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form>
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">List of Policies</h4>
+ </div>
+ <div>
+ <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>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="move" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="move(temp)">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Move Policy</h4>
+ </div>
+ <div>
+ <div ng-include data-src="'path-selector'" class="clearfix"></div>
+ <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="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Move</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="switchVersion" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="switchVersion(temp)">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Switch Version</h4>
+ </div>
+ <div>
+ <label class="radio">Highest Version <b></b></label>
+ <input class="form-control" ng-disabled="true" ng-model="temp.tempModel.content.highestVersion" autofocus="autofocus">
+ </div>
+ <div>
+ <label class="radio">Active Version <b></b></label>
+ <select class="form-control" ng-model="temp.tempModel.content.activeVersion" ng-options="option for option in temp.tempModel.content.availableVersions" autofocus="autofocus"></select>
+ <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="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Save</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="copy" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="copy(temp)">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Clone Policy</h4>
+ </div>
+ <div>
+ <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="'path-selector'" class="clearfix"></div>
+ <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="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Clone</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal" id="newfolder" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="createFolder(temp)">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Add Scope</h4>
+ </div>
+ <div>
+ <label class="radio">Scope Name</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 id = "cancel" type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="temp.inprocess">Cancel</button>
+ <button type="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Create</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="addSubScope" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="subScopeFolder(temp)">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Add Sub Scope</h4>
+ </div>
+ <div>
+ <label class="radio">Scope Name</label>
+ <input class="form-control" ng-model="temp.tempModel.subScopename" autofocus="autofocus">
+ <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="submit" class="btn btn-primary" ng-disabled="temp.inprocess">Create</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="uploadfile" data-toggle="modal" data-backdrop="static" data-keyboard="false">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <form ng-submit="uploadFiles()">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Import</h4>
+ </div>
+ <div>
+ <label class="radio">Upload to</label>
+ <input type="file" class="form-control" ng-file="$parent.uploadFileList" autofocus="autofocus" multiple="multiple"/>
+ <div ng-include data-src="'error-bar'" class="clearfix"></div>
+ </div>
+ <div class="modal-footer">
+ <div ng-show="!fileUploader.requesting">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ <button type="submit" class="btn btn-primary" ng-disabled="!uploadFileList.length || fileUploader.requesting">{{'upload' | translate}}</button>
+ </div>
+ <div ng-show="fileUploader.requesting">
+ <span class="label label-warning">Uploading......</span>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+</div>
+
+<div class="modal animated fadeIn" id="selector" ng-controller="PolicyManagerModalCtrl">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">
+ <span aria-hidden="true">&times;</span>
+ <span class="sr-only">Close</span>
+ </button>
+ <h4 class="modal-title">Select the Destination Scope</h4>
+ </div>
+ <div>
+ <div>
+ <div ng-include="config.tplPath + '/current-folder-breadcrumb.html'"></div>
+ <div ng-include="config.tplPath + '/main-table-modal.html'"></div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal" ng-disabled="temp.inprocess">Close</button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script type="text/ng-template" id="path-selector">
+ <div class="panel panel-primary mt10 mb0">
+ <div class="panel-body">
+ <div class="detail-sources">
+ <code class="mr5"><b>Source:</b> {{temp.model.fullPath()}}</code>
+ </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>
+ </div>
+ </div>
+ </div>
+</script>
+
+<script type="text/ng-template" id="error-bar">
+ <div class="label label-danger error-msg pull-left animated fadeIn" ng-show="temp.error">
+ <i class="glyphicon glyphicon-remove-circle"></i>
+ <span>{{temp.error}}</span>
+ </div>
+</script> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/navbar.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/navbar.html
new file mode 100644
index 000000000..80ca1c593
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/navbar.html
@@ -0,0 +1,20 @@
+<nav class="navbar navbar-light bg-faded">
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <form class="form-inline">
+ <label style="text-align: left; color: #157bb2"><h1>
+ <b>{{config.appName}}</b>
+ </h1></label> <label></label> <label></label>
+ </form>
+ </div>
+ <div class="form-group col-sm-5" style="margin-top: 2%"></div>
+ <div class="form-group col-sm-4" style="margin-top: 2%" align="right">
+ <div class="btn-group">
+ <button type="button" class="btn btn-primary" ng-show="superAdminId" data-toggle="modal" data-target="#newfolder" ng-click="touch()"><i class="glyphicon glyphicon-plus"></i>Add Scope</button>
+ <button type="button" class="btn btn-primary" ng-show="importPolicyId" data-toggle="modal" data-target="#uploadfile" ng-show="config.allowedActions.upload" ng-click="touch()"> <i class="glyphicon glyphicon-upload"></i>Import</button>
+ <button type="button" class="btn btn-primary" ng-show="exportPolicyId" data-toggle="modal" data-target="#exportPolicy" ng-show="config.allowedActions.exportPolicy"> <i class="glyphicon glyphicon-download"></i>Export</button>
+ <button class="btn btn-secondary" type="button" onClick="window.location='policy#/policy_SearchFilter';">Filter</button>
+ </div>
+ </div>
+ </div>
+</nav> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/policyEditor.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/policyEditor.html
new file mode 100644
index 000000000..a32eecf0d
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/policyEditor.html
@@ -0,0 +1,20 @@
+<style>
+ .content-container {
+ width:98%;
+ }
+</style>
+<div id="page-content">
+ <div ng-include="config.tplPath + '/navbar.html'"></div>
+ <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>
+ </div>
+
+ <div ng-include="config.tplPath + '/item-context-menu.html'"></div>
+ <div ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html'"></div>
+ <div ng-include="'app/policyApp/policy-models/Editor/templates/modals.html'"></div>
+ <div ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html'"></div>
+ <div ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html'"></div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/searchNavbar.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/searchNavbar.html
new file mode 100644
index 000000000..43eb5148b
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/searchNavbar.html
@@ -0,0 +1,187 @@
+<style>
+body {
+ padding-top: 50px;
+}
+
+.dropdown.dropdown-lg .dropdown-menu {
+ margin-top: -1px;
+ padding: 6px 20px;
+}
+
+.input-group-btn .btn-group {
+ display: flex !important;
+}
+
+.btn-group .btn {
+ border-radius: 0;
+ margin-left: -1px;
+}
+
+.btn-group .btn:last-child {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+}
+
+.btn-group .form-horizontal .btn[type="submit"] {
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+
+.form-horizontal .form-group {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+.form-group .form-control:last-child {
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+
+@media screen and (min-width: 768px) {
+ #adv-search {
+ width: 550px;
+ margin: 0 auto;
+ }
+ .dropdown.dropdown-lg {
+ position: static !important;
+ }
+ .dropdown.dropdown-lg .dropdown-menu {
+ min-width: 550px;
+ }
+}
+</style>
+<nav class="navbar navbar-light bg-faded">
+ <div class="form-group row">
+ <div class="form-group col-sm-8" style="margin-top: 2%">
+ <div class="container">
+ <div class="row">
+ <div class="input-group">
+ <div class="input-group" id="adv-search">
+ <input type="text" class="form-control"
+ placeholder="{{'search'}}..." ng-model="search.query" />
+ <div class="input-group-btn">
+ <div class="btn-group" role="group">
+ <div class="dropdown dropdown-lg">
+ <button type="button" class="btn btn-default dropdown-toggle"
+ data-toggle="dropdown" aria-expanded="false">
+ <span class="caret"></span>
+ </button>
+ <div class="dropdown-menu dropdown-menu-right" role="menu">
+ <form class="form-horizontal" role="form">
+ <div class="form-group row">
+ <div class="form-group col-sm-4">
+ <label for="filter">Policy Type:</label> <select
+ class="form-control" ng-model="search.policyType">
+ <option>action</option>
+ <option>config</option>
+ <option>closedLoop</option>
+ <option>decision</option>
+ <option>all</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-8">
+ <label for="filter">Descriptive Type:</label> <select
+ class="form-control" ng-model="search.descriptiveScope"
+ ng-options="option for option in descriptiveScopeDictionaryDatas track by option"></select>
+ </div>
+ </div>
+ <div ng-if="search.policyType == 'closedLoop'">
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>ClosedLoop Policy Type:</label><BR> <select
+ class="form-control"
+ ng-model="search.closedLooppolicyType">
+ <option>Config_Fault</option>
+ <option>Config_PM</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Ecomp Name:</label><BR> <select
+ class="form-control" ng-model="search.ecompName"
+ ng-options="option for option in ecompNameDictionaryDatas track by option"></select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <label>D2 Service:</label><BR> <select
+ class="form-control" ng-model="search.d2Service">
+ <option>Hosted Voice(Trinity)</option>
+ <option>vUSP</option>
+ <option>MCR</option>
+ <option>Gamma</option>
+ <option>vDNS</option>
+ </select>
+ </div>
+ <div class="form-group col-sm-6">
+ <label>Bind Text Search to:</label><BR> <select
+ class="form-control" ng-model="search.bindTextSearch">
+ <option>Email Address</option>
+ <option>Trigger Signature</option>
+ <option>Connect All Traps</option>
+ <option>Verification Signature</option>
+ <option>Connect All Faults</option>
+ <option>Onset Message</option>
+ <option>Policy Name</option>
+ <option>Abatement Message</option>
+ <option>Geo Link</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-6"
+ ng-if="search.closedLooppolicyType == 'Config_Fault'">
+ <label>VNF Type:</label><BR> <select
+ class="form-control" ng-model="search.vnfType"
+ ng-options="option for option in vnfTypeDictionaryDatas track by option"></select>
+ </div>
+ <div class="form-group col-sm-6"
+ ng-if="search.closedLooppolicyType == 'Config_Fault'">
+ <label>Policy Status:</label><BR> <select
+ class="form-control" ng-model="search.policyStatus">
+ <option>Active</option>
+ <option>InActive</option>
+ </select>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-6"
+ ng-if="search.closedLooppolicyType == 'Config_Fault'">
+ <label>vPRO Action:</label><BR> <select
+ class="form-control" ng-model="search.vproAction"
+ ng-options="option for option in vsclActionDictionaryDatas track by option"></select>
+ </div>
+ <div class="form-group col-sm-6"
+ ng-if="search.closedLooppolicyType == 'Config_PM'">
+ <label>Service Type:</label><BR> <select
+ class="form-control" ng-model="search.serviceType">
+ <option>Registration Failure(Trinity)</option>
+ <option>International Fraud(Trinity)</option>
+ <option>No Dial Tone(Trinity)</option>
+ <option>Call Storm(Trinity)</option>
+ <option>Registration Storm(Trinity)</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ <button type="button" class="btn btn-primary"
+ ng-click="search(search);">
+ <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="form-group col-sm-4" style="margin-top: 2%" align="right">
+ <div class="btn-group">
+ <button class="btn btn-secondary" type="button" onClick="window.location='policy#/Editor';">Editor</button>
+ <button class="btn btn-primary" type="button" onClick="window.location='policy#/policy_SearchFilter';">Filter</button>
+ </div>
+ </div>
+ </div>
+</nav> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/spinner.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/spinner.html
new file mode 100644
index 000000000..5485996ef
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/templates/spinner.html
@@ -0,0 +1,5 @@
+<div class="spinner-wrapper col-xs-12">
+ <svg class="spinner-container" style="width:65px;height:65px" viewBox="0 0 44 44">
+ <circle class="path" cx="22" cy="22" r="20" fill="none" stroke-width="4"></circle>
+ </svg>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_AdminTab.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_AdminTab.html
new file mode 100644
index 000000000..80c0df618
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_AdminTab.html
@@ -0,0 +1,41 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div id="page-content">
+ <div>
+ <h1 style="text-align: left; color: #157bb2">Lockdown Application</h1>
+ </br>
+ <div>
+ <label>Lockdown:</label> <br> <label class="btn-switch-label" style="width:100px">
+ <div>
+ <input type="checkbox"
+ ng-click="saveLockDownValue(lockdowndata[0].lockdown);"
+ ng-model="lockdowndata[0].lockdown" b2b-switches>
+ </div>
+ </label>
+ <div ng-show="isDisabled" class="icon-lock"
+ style="clear: left; float: left">
+ <div class="lock-top-1" style="background-color: #2CC3B5"></div>
+ <div class="lock-top-2"></div>
+ <div class="lock-body" style="background-color: #2CC3B5"></div>
+ <div class="lock-hole"></div>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_AutoPush.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_AutoPush.html
new file mode 100644
index 000000000..b53dab32a
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_AutoPush.html
@@ -0,0 +1,91 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<style>
+.center {
+ margin: auto;
+ width: 60%;
+ border: 3px solid #73AD21;
+ padding: 10px;
+}
+
+.modal {
+ display: block;
+ overflow-y: auto;
+}
+</style>
+<div ng-app id="page-content" style="margin-bottom: 20px; width: 100%">
+ <div class="form-group row">
+ <h1 style="text-align: left; color: #157bb2">Auto Push</h1>
+ <div ng-show="showLoader" class="span loader-container">
+ <i class="icon-spinner" role="img"
+ aria-label="Please wait while we load your content"></i>
+ </div>
+ <div ng-show="isDisabled" class="icon-lock"
+ style="clear: left; float: left">
+ <div class="lock-top-1" style="background-color: #2CC3B5"></div>
+ <div class="lock-top-2"></div>
+ <div class="lock-body" style="background-color: #2CC3B5"></div>
+ <div class="lock-hole"></div>
+ </div>
+ </div>
+ </br>
+ <div class="form-group row" ng-hide="showLoader">
+ <div ng-hide="isDisabled">
+ <button ng-click="pushPoliciesButton();"
+ class="btn btn-primary btn-small center-block" type="button"
+ title="Push policies to PDP Groups">Push Policies</button>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="form-group col-sm-6">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4>
+ <b>Policies</b>
+ </h4>
+ <img id="mySpinner"
+ src="/ecomp/app/policyApp/images/loading_bar.gif"
+ ng-show="loading" />
+ </div>
+ <div class="panel-body">
+ <div id="grid1" style="width: 100%; height: 400px;"
+ ui-grid="gridOptions" ui-grid-tree-view ui-grid-pagination
+ ui-grid-selection ui-grid-resize-columns class="grid"></div>
+ </div>
+ </div>
+ </div>
+ <div class="form-group col-sm-6">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4>
+ <b>PDP Groups</b>
+ </h4>
+ </div>
+ <div class="panel-body">
+ <div style="width: 100%; height: 400px;" ui-grid="pushTabPDPGrid"
+ ui-grid-pagination ui-grid-selection ui-grid-resize-columns
+ class="grid">
+ <pre>{{selectedRows}}</pre>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_DashboardHealth.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_DashboardHealth.html
new file mode 100644
index 000000000..393e2c751
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_DashboardHealth.html
@@ -0,0 +1,49 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div id="page-content" style="margin-bottom: 20px; width: 100%">
+ <div>
+ <h1 style="text-align: left; color: #157bb2">Policy Engine Health</h1>
+ <div ng-show="showLoader" class="span loader-container">
+ <i class="icon-spinner" role="img"
+ aria-label="Please wait while we load your content"></i>
+ </div>
+ </div>
+ <div ng-hide="showLoader">
+ <div class="btn-group" role="group">
+ <button class="btn btn-secondary" type="button"
+ onClick="window.location='policy#/Dashboard';">Logging</button>
+ <button class="btn btn-primary" type="button"
+ onClick="window.location='policy#/Dashboard_Health';">Health</button>
+ </div>
+ </div>
+ <br>
+ <h4 style="text-align: left; color: #157bb2">PDP Status</h4>
+ <div ui-grid="pdpStatusDatas" ui-grid-pagination ui-grid-selection
+ ui-grid-resize-columns ui-grid-exporter class="grid"></div>
+ <h4 style="text-align: left; color: #157bb2">PAP Status</h4>
+ <div ui-grid="papStatusDatas" ui-grid-pagination ui-grid-selection
+ ui-grid-resize-columns ui-grid-exporter class="grid"></div>
+ <h4 style="text-align: left; color: #157bb2">Policy Activity</h4>
+ <div ui-grid="policyActivityDatas" ui-grid-pagination ui-grid-selection
+ ui-grid-resize-columns ui-grid-exporter class="grid"></div>
+ <h4 style="text-align: left; color: #157bb2">System Alerts</h4>
+ <div ui-grid="availableGridHealthDatas" ui-grid-pagination
+ ui-grid-selection ui-grid-resize-columns ui-grid-exporter class="grid"></div>
+</div>
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_DashboardLogging.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_DashboardLogging.html
new file mode 100644
index 000000000..efc05cc42
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_DashboardLogging.html
@@ -0,0 +1,46 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<div id="page-content" style="margin-bottom: 20px; width: 100%">
+ <div>
+ <h1 style="text-align: left; color: #157bb2">Dashboard Logging</h1>
+ <div ng-show="showLoader" class="span loader-container">
+ <i class="icon-spinner" role="img"
+ aria-label="Please wait while we load your content"></i>
+ </div>
+ </div>
+ <div ng-hide="showLoader">
+ <div class="btn-group" role="group">
+ <button class="btn btn-primary" type="button"
+ onClick="window.location='policy#/Dashboard';">Logging</button>
+ <button class="btn btn-secondary" type="button"
+ onClick="window.location='policy#/Dashboard_Health';">Health</button>
+ </div>
+ </div>
+ <br>
+ <h4 style="text-align: left; color: #157bb2">Log Files From Cluster ECOMP</h4>
+ <img id="mySpinner" src="/ecomp/app/policyApp/images/loading_bar.gif"
+ ng-show="loading" />
+ <div ui-grid="availableGridLoggingDatas" ui-grid-pagination
+ ui-grid-selection ui-grid-resize-columns ui-grid-exporter class="grid">
+ </div>
+</div>
+
+
+
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html
new file mode 100644
index 000000000..63429d3de
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Dictionary.html
@@ -0,0 +1,134 @@
+<!--
+ ============LICENSE_START=======================================================
+ ECOMP Policy Engine
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+<style>
+.modal {
+ display: block;
+}
+
+.modal {
+ overflow-y: auto;
+ max-height: 90%;
+ margin-top: 5%;
+ margin-bottom: 5%;
+ margin-left: 10%;
+ margin-right: 10%;
+}
+</style>
+<div ng-app id="page-content" style="margin-bottom: 20px; width: 100%">
+ <div>
+ <h1 style="text-align: left ; color: #157bb2">Dictionary</h1>
+ <div ng-show="showLoader" class="span loader-container">
+ <i class="icon-spinner" role="img"
+ aria-label="Please wait while we load your content"></i>
+ </div>
+ <br />
+ <div ng-hide="showLoader">
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <label>Policy Type Dictionary:</label> </br><select class="form-control"
+ ng-model="option1" ng-options="option for option in options1"
+ ng-change="getOptions2()"></select>
+ </div>
+ <div class="form-group col-sm-3">
+ <label>Select Dictionary:</label></br> <select class="form-control"
+ ng-model="option2" ng-options="option for option in options2"></select>
+ </div>
+ <div class="form-group col-sm-1">
+ <label></label></br>
+ <button class="btn btn-primary btn-small" type="button"
+ herf="javascript:void(0)" ng-click="import();">Import
+ Dictionary's</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!--Common Dictionary-->
+ <div ng-if="option2 == 'Attribute Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/AttributeDictionary.html'" ></div>
+ <div ng-if="option2 == 'EcompName Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/EcompNameDictionary.html'" ></div>
+ <!--Action Policy Dictionary-->
+ <div ng-if="option2 == 'Action Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/ActionPolicyDictionary.html'"></div>
+ <!--ClosedLoop Dictionary's-->
+ <div ng-if="option2 == 'VSCL Action'" ng-include = "'app/policyApp/policy-models/Dictionary/CLVSCLActionDictionary.html'"></div>
+ <div ng-if="option2 == 'VNF Type'" ng-include = "'app/policyApp/policy-models/Dictionary/CLVNFTypeDictionary.html'"></div>
+ <div ng-if="option2 == 'PEP Options'" ng-include = "'app/policyApp/policy-models/Dictionary/CLPepOptionsDictionary.html'"></div>
+ <div ng-if="option2 == 'Varbind Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/CLVarbindDictionary.html'"></div>
+ <div ng-if="option2 == 'Service Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/CLServiceDictionary.html'"></div>
+ <div ng-if="option2 == 'Site Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/CLSiteDictionary.html'"></div>
+ <!--BRMS Dictionary's-->
+ <div ng-if="option2 == 'BRMS Param Template'" ng-include = "'app/policyApp/policy-models/Dictionary/BRMSParamDictionary.html'"></div>
+ <div ng-if="option2 == 'BRMS Dependency'" ng-include = "'app/policyApp/policy-models/Dictionary/BRMSDependencyDictionary.html'"></div>
+ <div ng-if="option2 == 'BRMS Controller'" ng-include = "'app/policyApp/policy-models/Dictionary/BRMSControllerDictionary.html'"></div>
+ <!--Decision Policy Dictionary's-->
+ <div ng-if="option2 == 'Settings Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/DecisionSettingsDictionary.html'"></div>
+ <!--Descriptive Scope Dictionary-->
+ <div ng-if="option2 == 'Descriptive Scope'" ng-include = "'app/policyApp/policy-models/Dictionary/DescriptiveScopeDictionary.html'"></div>
+ <!--Enforcer Policy Dictionary-->
+ <div ng-if="option2 == 'Enforcer Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/EnforcerTypeDictionary.html'"></div>
+ <!--Firewall Policy Dictionary's-->
+ <div ng-if="option2 == 'Action List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWActionListDictionary.html'"></div>
+ <div ng-if="option2 == 'Address Group'" ng-include = "'app/policyApp/policy-models/Dictionary/FWAddressGroupDictionary.html'"></div>
+ <div ng-if="option2 == 'Parent Dictionary List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWParentListDictionary.html'"></div>
+ <div ng-if="option2 == 'Port List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWPortListDictionary.html'"></div>
+ <div ng-if="option2 == 'Prefix List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWPrefixListDictionary.html'"></div>
+ <div ng-if="option2 == 'Protocol List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWProtocolListDictionary.html'"></div>
+ <div ng-if="option2 == 'Security Zone'" ng-include = "'app/policyApp/policy-models/Dictionary/FWSecurityZoneDictionary.html'"></div>
+ <div ng-if="option2 == 'Service Group'" ng-include = "'app/policyApp/policy-models/Dictionary/FWServiceGroupDictionary.html'"></div>
+ <div ng-if="option2 == 'Service List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWServiceListDictionary.html'"></div>
+ <div ng-if="option2 == 'Tag List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWTagListDictionary.html'"></div>
+ <div ng-if="option2 == 'Tag Picker List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWTagPickerListDictionary.html'"></div>
+ <div ng-if="option2 == 'Term List'" ng-include = "'app/policyApp/policy-models/Dictionary/FWTermListDictionary.html'"></div>
+ <div ng-if="option2 == 'Zone'" ng-include = "'app/policyApp/policy-models/Dictionary/FWZoneDictionary.html'"></div>
+ <!--Micro Service Policy Dictionary's-->
+ <div ng-if="option2 == 'DCAE UUID'" ng-include = "'app/policyApp/policy-models/Dictionary/MSDcaeUUIDDictionary.html'"></div>
+ <div ng-if="option2 == 'MicroService ConfigName'" ng-include = "'app/policyApp/policy-models/Dictionary/MSConfigNameDictionary.html'"></div>
+ <div ng-if="option2 == 'MicroService Location'" ng-include = "'app/policyApp/policy-models/Dictionary/MSLocationDictionary.html'"></div>
+ <div ng-if="option2 == 'MicroService Models'" ng-include = "'app/policyApp/policy-models/Dictionary/MSModelDictionary.html'"></div>
+ <div ng-if="option2 == 'MicroService Dictionary'" ng-include = "'app/policyApp/policy-models/Dictionary/ModelAttributeDictionary.html'"></div>
+ <!-- Policy Scope Dictionary's -->
+ <div ng-if="option2 == 'Closed Loop'" ng-include = "'app/policyApp/policy-models/Dictionary/PSClosedLoopDictionary.html'"></div>
+ <div ng-if="option2 == 'Group Policy Scope'" ng-include = "'app/policyApp/policy-models/Dictionary/PSGroupPolicyScopeDictionary.html'"></div>
+ <div ng-if="option2 == 'Resource'" ng-include = "'app/policyApp/policy-models/Dictionary/PSResourceDictionary.html'"></div>
+ <div ng-if="option2 == 'Service'" ng-include = "'app/policyApp/policy-models/Dictionary/PSServiceDictionary.html'"></div>
+ <div ng-if="option2 == 'Type'" ng-include = "'app/policyApp/policy-models/Dictionary/PSTypeDictionary.html'"></div>
+ <!-- Safe Policy Dictionary's -->
+ <div ng-if="option2 == 'Risk Type'" ng-include = "'app/policyApp/policy-models/Dictionary/RiskTypeDictionary.html'"></div>
+ <div ng-if="option2 == 'Safe Policy Warning'" ng-include = "'app/policyApp/policy-models/Dictionary/SafePolicyWarningDictionary.html'"></div>
+</div>
+
+<script type="text/ng-template" id="import_dictionary_popup.html">
+<div>
+<div class="modal-dialog modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h2 class="font-showcase-font-name" style="color : #157bb2">Import Dictionary's</h2>
+ </div>
+ <div class="modal-body">
+ <div class="fn-ebz-container">
+ <input type="file" name="file" class="form-control" onchange="angular.element(this).scope().uploadFile(this.files)"/>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-disabled="importButton" ng-click="submitUpload()">Upload</button>
+ <button class="btn btn-default" herf="javascript:void(0)" ng-click="close()">Close</button>
+ </div>
+ </div>
+</div>
+</div>
+</script> \ No newline at end of file
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_PDPManagement.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_PDPManagement.html
new file mode 100644
index 000000000..1e88e7acb
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_PDPManagement.html
@@ -0,0 +1,119 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<style>
+.modal {
+ display: block;
+ overflow-y: auto;
+}
+</style>
+<div id="page-content" style="margin-bottom: 20px; width: 99%">
+ <div>
+ <h1 style="text-align: left; color: #157bb2">PDP Management</h1>
+ <div ng-show="isDisabled" class="icon-lock"
+ style="clear: left; float: left">
+ <div class="lock-top-1" style="background-color: #2CC3B5"></div>
+ <div class="lock-top-2"></div>
+ <div class="lock-body" style="background-color: #2CC3B5"></div>
+ <div class="lock-hole"></div>
+ </div>
+ <br />
+ <div class="form-group row">
+ <div class="form-group col-sm-3">
+ <button class="btn btn-primary btn-small" type="button"
+ ng-click="addNewPDPGroupPopUpWindow();" ng-show="createPdpGroupId">Create
+ Group</button>
+ </div>
+ <div class="form-group col-sm-6">
+ <input type="text" class="form-control" class="search"
+ ng-disabled="isDisabled"
+ placeholder="{{'search'}}..." ng-model="search">
+ </div>
+ </div>
+
+
+ <div id="pdpGroupTable">
+ <table class="striped" table-data="pdpdatas" current-page="1"
+ table-bordered table-striped>
+ <thead>
+ <tr>
+ <th width="15%">Name</th>
+ <th width="15%">Description</th>
+ <th width="10%">Status</th>
+ <th width="35%">PDP's</th>
+ <th width="5%">Default</th>
+ <th width="15%">View Policies/ Add or Edit PDP's?</th>
+ <th width="5%">Delete?</th>
+ </tr>
+ </thead>
+ <tbody type="body" ng-repeat="pdpdata in pdpdatas | filter:search"
+ style="max-height: 980px;" on-right-click="ShowContextMenu()">
+ <tr>
+ <td width="15%">{{ pdpdata.name }}</td>
+ <td width="15%">{{ pdpdata.description }}</td>
+ <td width="10%">{{ pdpdata.status.status }}</td>
+ <td width="35%">
+ <table current-page="1">
+ <tr>
+ <th>PDP Name</th>
+ <th>Status</th>
+ </tr>
+ <tbody ng-repeat="pdp in pdpdata.pdps | filter:search">
+ <tr context="context1">
+ <td>{{pdp.name}}</td>
+ <td>{{pdp.status.status}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ <td width="5%">
+ <label class="btn-switch-label">
+ <div ng-click="toggleRole( pdpdata.defaultGroup, pdpdata);">
+ <input type="checkbox" ng-model="pdpdata.defaultGroup"
+ b2b-switches>
+ </div>
+ </label>
+ </td>
+ <td width="15%">
+ <div ng-click="editPDPGroupFunctionModalPopup(pdpdata);"
+ style="font-size: 20px;" ng-show="editPdpGroupId">
+ <span href="javascript:void(0)" class="glyphicon glyphicon-edit"></span>
+ </div>
+ </td>
+ <td width="5%">
+ <div ng-click="removePDPGroup(pdpdata);" style="font-size: 20px;"
+ ng-show="deletePdpGroupId">
+ <span href="javascript:void(0)" class="glyphicon glyphicon-trash"></span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <!-- PDP Group Window -->
+ <div ng-include
+ src="'app/policyApp/Windows/PushtabWindow/removeGroupPoliciesWindow.html'"></div>
+ <div ng-include
+ src="'app/policyApp/Windows/PDPTabWindows/AddorEditPDPtoGroup.html'"></div>
+ <div ng-include
+ src="'app/policyApp/Windows/PDPTabWindows/PdpStatusWindow.html'"></div>
+ <div ng-include src="'app/policyApp/Windows/new_PDPGroup_Window.html'"></div>
+ </div>
+
+</div>
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Roles.html b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Roles.html
new file mode 100644
index 000000000..6ca03c963
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_Roles.html
@@ -0,0 +1,53 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<style>
+.modal {
+ display: block;
+}
+
+.modal {
+ overflow-y: auto;
+ max-height: 90%;
+ margin-top: 5%;
+ margin-bottom: 5%;
+ margin-left: 10%;
+ margin-right: 10%;
+}
+</style>
+<div id="page-content" style="margin-bottom: 20px; width: 100%">
+ <div>
+ <h1 style="text-align: left; color: #157bb2">Roles</h1>
+ <div ng-show="showLoader" class="span loader-container">
+ <i class="icon-spinner" role="img"
+ aria-label="Please wait while we load your content"></i>
+ </div>
+ <div ng-show="isDisabled" class="icon-lock"
+ style="clear: left; float: left">
+ <div class="lock-top-1" style="background-color: #2CC3B5"></div>
+ <div class="lock-top-2"></div>
+ <div class="lock-body" style="background-color: #2CC3B5"></div>
+ <div class="lock-hole"></div>
+ </div>
+ </div>
+ <div ng-hide="showLoader">
+ <div style="height: 580px; width: 98%" ui-grid="rolesTableGrid" ui-grid-pagination ui-grid-selection
+ class="grid"></div>
+ </div>
+</div>
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
new file mode 100644
index 000000000..a4fe1af49
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/policy_SearchFilter.html
@@ -0,0 +1,38 @@
+<!--/*-
+ * ============LICENSE_START=======================================================
+ * ECOMP Policy Engine
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */-->
+<style>
+ .content-container {
+ width:98%;
+ }
+</style>
+<div id="page-content">
+ <div ng-include="config.tplPath + '/searchNavbar.html'"></div>
+ <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>
+ </div>
+
+ <div ng-include="config.tplPath + '/item-context-menu.html'"></div>
+ <div ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html'"></div>
+ <div ng-include="'app/policyApp/policy-models/Editor/templates/modals.html'"></div>
+ <div ng-include="'app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html'"></div>
+ </div> \ No newline at end of file