Remove SDC query
[clamp.git] / src / main / resources / META-INF / resources / designer / partials / portfolios / global_properties.html
1 <!--
2   ============LICENSE_START=======================================================
3   ONAP CLAMP
4   ================================================================================
5   Copyright (C) 2017 AT&T Intellectual Property. All rights
6                               reserved.
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
11   
12   http://www.apache.org/licenses/LICENSE-2.0
13   
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   
22   -->
23
24
25 <style>
26 #paramsWarn {
27         display: none;
28 }
29 </style>
30
31 <div id="configure-widgets">
32         <div class="modal-header">
33                 <button type="button" class="close" ng-click="close(false)"
34                         aria-hidden="true" style="margin-top: -3px">&times;</button>
35                 <h4>Model Properties</h4>
36         </div>
37
38         <div class="modal-body" style="height: 280px">
39                 <i hidden id="ridinSpinners" class="fa fa-spinner fa-spin"
40                         style="display: none; margin-bottom: 10px; width: 100%; text-align: center; font-size: 24px; color: black;"></i>
41                 <form id="saveProps">
42                         <div class="alert alert-danger" role="alert" id='paramsWarn'>
43                                 <strong>Ooops!</strong> Unable to load properties for <span
44                                         id='servName'>. Would you like to</span> <a
45                                         href="javascript:void(0);" class="btn-link" id='paramsRetry'>Retry
46                                 </a> / <a href="javascript:void(0);" class="btn-link" id='paramsCancel'>Cancel</a>
47                         </div>
48                         <div>
49
50                                 <div class="form-group clearfix">
51                                         <label for="actionSet" class="col-sm-4 control-label">
52                                                 Action Set</label>
53
54                                         <div class="col-sm-8">
55                                                 <select class="form-control" id="actionSet" name="actionSet"
56                                                         onchange="propChangeAlert(this);">
57                                                 </select>
58
59                                         </div>
60                                 </div>
61
62                                 <div class="form-group clearfix">
63                                         <label for="location" class="col-sm-4 control-label">
64                                                 Location</label>
65
66                                         <div class="col-sm-8">
67                                                 <select class="form-control" id="location" name="location"
68                                                         multiple size=2>
69
70                                                 </select>
71
72                                         </div>
73                                 </div>
74                                 <div class="form-group clearfix">
75                                         <label for="deployParameters" class="col-sm-4 control-label">
76                                                 Deploy Parameters</label>
77
78                                         <div class="col-sm-8">
79                                                 <textarea class="form-control" id="deployParameters"
80                                                         name="deployParameters" rows="3">
81                                                 </textarea>
82
83                                         </div>
84                                 </div>
85
86
87                         </div>
88
89                 </form>
90                 <div class="alert alert-warning propChangeWarn" style="display: none;">
91                         <strong>Warning!</strong> Changing these properties will reset all
92                         associated GUI fields.
93                 </div>
94
95         </div>
96         <div class="modal-footer">
97                 <button id="savePropsBtn" class="btn btn-primary" ng-click="submitForm()">Save</button>
98                 <button ng-click="close(true)" id="close_button"
99                         class="btn btn-primary">Cancel</button>
100
101         </div>
102
103
104         <script>
105                 //display message only if global was previously saved
106         asDiff = false;
107
108         function propChangeAlert(actionset) {
109                 //throw warnings only if options were previously chosen
110                 if (elementMap["global"]) {
111                         loop1: for (var i = 0; i < elementMap["global"].length; i++) {
112                                 if (elementMap["global"][i]["name"] == actionset.id) {
113                                         //user did not change properties                                                
114                                         if (elementMap["global"][i]["value"][0] == actionset.value) {
115                                                 if (elementMap["global"][i]["name"] == "actionSet") {
116                                                         asDiff = false;
117                                                 }
118                                                 if (!asDiff) {
119                                                         $(".propChangeWarn").hide();
120                                                 }
121                                                 ;
122                                                 //user changed properties
123                                         } else {
124                                                 if (elementMap["global"][i]["name"] == "actionSet") {
125                                                         asDiff = true;
126                                                 };
127                                                 $(".propChangeWarn").show();
128                                         }
129                                         break loop1;
130                                 }
131                         }
132                 }
133         }
134         </script>
135 </div>