2 ============LICENSE_START=======================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property. All rights
7 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END============================================
20 ===================================================================
21 ECOMP is a trademark and service mark of AT&T Intellectual Property.
27 <div id="holmes-configuration">
29 <div class="modal-header">
30 <button type="button" class="close" ng-click="close(false)" aria-hidden="true" style="margin-top: -3px">×</button>
31 <h4>Holmes Microservice Configuration</h4>
35 <div class="modal-body" style="height: 280px">
37 <form id="saveProps" class="form-horizontal">
38 <div class="form-group">
40 <label for="correlationalLogic" class="col-sm-4 control-label">Correlational logic</label>
42 <div class="col-sm-8">
43 <textarea class="form-control" focus="true" name="correlationalLogic" id="correlationalLogic" />
46 <label for="operationalPolicy" class="col-sm-4 control-label">Operational policy</label>
48 <div class="col-sm-8">
49 <select class="form-control" id="operationalPolicy" name="operationalPolicy" autofocus="autofocus" required ng-trim="true" enableFilter="true">
50 <option ng-repeat="x in operationalPolicies" value="{{x}}">{{x}}</option>
59 <div class="modal-footer">
60 <button id="savePropsBtn" class="btn btn-primary">Save</button>
61 <button id="close_button" class="btn btn-primary" ng-click="close(true)">Cancel</button>
65 <script language="javascript">
68 loadPropertyWindow('holmes')
70 // fill policy combo box (allPolicies from ImporSchemaCtrl.js
71 if (typeof allPolicies !== "undefined"){
72 $.each(Object.keys(allPolicies), function(val, text) {
73 $('#operationalPolicy').append($('<option></option>').val(text).html(text));
75 } else if (typeof elementMap !== "undefined"){
76 for (key in elementMap){
77 if (key.indexOf("Policy")>-1){
78 $.each(Object.keys(elementMap[key]), function(val, text){
79 $('#operationalPolicy').append(
80 $('<option></option>').val(text).html(text)
87 // load property values
88 var el=elementMap[lastElementSelected];
90 for(var i=0;i<el.length;i++){
91 $("#"+el[i].name).val(el[i].value);
95 $("#saveProps").on('submit', function (event) {
96 saveProperties($(this).serializeArray())
97 event.preventDefault();
98 $("#close_button").click();
101 $("#savePropsBtn").click(function (event) {
102 $("#saveProps").submit();