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 ===================================================================
26 <div id="holmes-configuration">
28 <div class="modal-header">
29 <button type="button" class="close" ng-click="close(false)" aria-hidden="true" style="margin-top: -3px">×</button>
30 <h4>Holmes Microservice Configuration</h4>
34 <div class="modal-body" style="height: 280px">
36 <form id="saveProps" class="form-horizontal">
37 <div class="form-group">
39 <label for="correlationalLogic" class="col-sm-4 control-label">Correlational logic</label>
41 <div class="col-sm-8">
42 <textarea class="form-control" focus="true" name="correlationalLogic" id="correlationalLogic" />
45 <label for="configPolicyName" class="col-sm-4 control-label">Configuration Policy Name</label>
47 <div class="col-sm-8">
48 <textarea class="form-control" focus="true" name="configPolicyName" id="configPolicyName" />
56 <div class="modal-footer">
57 <button id="savePropsBtn" class="btn btn-primary">Save</button>
58 <button id="close_button" class="btn btn-primary" ng-click="close(true)">Cancel</button>
62 <script language="javascript">
65 loadPropertyWindow('holmes')
67 // fill policy combo box (allPolicies from ImporSchemaCtrl.js
68 if (typeof allPolicies !== "undefined"){
69 $.each(Object.keys(allPolicies), function(val, text) {
70 $('#operationalPolicy').append($('<option></option>').val(text).html(text));
72 } else if (typeof elementMap !== "undefined"){
73 for (key in elementMap){
74 if (key.indexOf("Policy")>-1){
75 $.each(Object.keys(elementMap[key]), function(val, text){
76 $('#operationalPolicy').append(
77 $('<option></option>').val(text).html(text)
84 // load property values
85 var el=elementMap[lastElementSelected];
87 for(var i=0;i<el.length;i++){
88 $("#"+el[i].name).val(el[i].value);
92 $("#saveProps").on('submit', function (event) {
93 saveProperties($(this).serializeArray())
94 event.preventDefault();
95 $("#close_button").click();
98 $("#savePropsBtn").click(function (event) {
99 $("#saveProps").submit();