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.
31 .fileUpload input.upload {
40 filter: alpha(opacity = 0);
45 display: inline-block;
57 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
58 <script type="text/javascript">
59 function disablefile() {
61 document.getElementById("fileUpload").disabled = true;
65 function disableSVN() {
67 document.getElementById("schemaLocation").disabled = true;
68 document.getElementById("userID").disabled = true;
69 document.getElementById("password").disabled = true;
76 <div id="configure-widgets">
77 <div class="modal-header">
78 <button type="button" class="close" ng-click="close(false)"
79 aria-hidden="true" style="margin-top: -3px">×</button>
80 <h4>Model Properties</h4>
82 <div class="modal-body" style="height: 280px">
83 <div style="height: 10px"></div>
84 <form id="saveProps" >
85 <div class="alert alert-danger" role="alert" id='paramsWarn'>
86 <strong>Ooops!</strong> Unable to load properties for <span id='servName'>. Would you like to</span>
87 <a href="javascript:void(0);" class="btn-link" id='paramsRetry'>Retry </a> /
88 <a href="javascript:void(0);" class="btn-link" id='paramsCancel'>Cancel</a>
92 <div class="form-group clearfix">
93 <label for="services" class="col-sm-4 control-label" >Services</label>
95 <div class="col-sm-8">
96 <select class="form-control"
97 name="service" id="service" >
98 <!-- <option ng-repeat="(key, value) in services" value="{{key}}">{{value}}</option> -->
102 <div class="form-group">
103 <label for="vf" class="col-sm-4 control-label">
106 <div class="col-sm-8">
107 <select class="form-control" id="vf" name="vf" >
113 <div class="form-group">
114 <label for="location" class="col-sm-4 control-label">
117 <div class="col-sm-8">
118 <select class="form-control" id="location" name="location" multiple size=2>
127 <i hidden id="ridinSpinners" class="fa fa-spinner fa-spin" style="display:none;width:100%;text-align:center;font-size:24px;color:black;"></i>
130 <div class="modal-footer">
131 <!--<button ng-click="reset()" class="btn btn-primary" style="float:left">Reset</button>-->
132 <button id="savePropsBtn" class="btn btn-primary">Close</button>
133 <button ng-click="close(true)" id="close_button"
134 class="btn btn-primary">Cancel</button>
137 <!-- <select id="vUSP_vfc" disabled hidden></select>
138 <select id="vUSP_location" disabled hidden></select>
139 <select id="vUSP_recipe" disabled hidden></select>
140 <select id="vUSP_vf" disabled hidden></select>
142 <select id="Trinity_vfc" disabled hidden></select>
143 <select id="Trinity_location" disabled hidden></select>
144 <select id="Trinity_recipe" disabled hidden></select>
145 <select id="Trinity_vf" disabled hidden></select>
148 <select id="vSCP_vfc" disabled hidden></select>
149 <select id="vSCP_location" disabled hidden></select>
150 <select id="vSCP_recipe" disabled hidden></select>
151 <select id="vSCP_vf" disabled hidden></select>
153 <select id="vProbes_vfc" disabled hidden></select>
154 <select id="vProbes_location" disabled hidden></select>
155 <select id="vProbes_recipe" disabled hidden></select>
156 <select id="vProbes_vf" disabled hidden></select> -->
163 // url: '/restservices/clds/v1/jaxrsClds/clds/asdc/services/',
164 // success: function(data){
167 // error:function(s,a,err){
174 // var services=vf_Services.service
175 // console.log(elementMap["global"])
176 // for(k in services){
177 // console.log("lol")
178 // $("#service").append("<option value="+k+">"+services[k]+"</option>")
180 // loadSharedPropertyByService()
181 // var el = elementMap["global"];
182 // $("#status").val($("#activity_modeler").text())
183 // if (el !== undefined) {
184 // for (var i = 0; i < el.length; i++) {
185 // $("#" + el[i].name).val(el[i].value);
195 $("#paramsWarn").hide();
196 /*Below service method is called for checking the service is being loaded or not*/
197 loadSharedPropertyByService();
199 $("#service").on('focus', function () {
200 // Store the current value on focus and on change
201 previous = this.value;
203 }).change(function(){
204 $("#ridinSpinners").css("display","")
205 var bool=loadSharedPropertyByService($(this).val())
206 $("#ridinSpinners").css("display","none")
208 $(this).val(previous)
210 $("#paramsRetry").on('click', function () {
211 //$("#paramsWarn").hide();
212 var currentValue = $("#service").val() == null ? previous : $("#service").val();
213 $("#ridinSpinners").css("display","")
214 var bool=loadSharedPropertyByService(currentValue);
215 $("#ridinSpinners").css("display","none")
217 $("#paramsCancel").on('click', function () {
218 loadSharedPropertyByServiceProperties();
219 $("#paramsWarn").hide();
223 // $("#service").on("change",function(){
224 // $("#ridinSpinners").css("display","")
225 // loadSharedPropertyByService($(this).val())
226 // $("#ridinSpinners").css("display","none")
228 function noRepeats(form){
230 for(var i=0;i<form.length;i++){
231 if(form[i].hasOwnProperty("name")){
232 if(select[form[i].name]===undefined)
233 select[form[i].name]=[]
234 select[form[i].name].push(form[i].value);
247 $("#saveProps").on('submit', function(event) {
248 saveGlobalProperties(noRepeats($(this).serializeArray()))
249 event.preventDefault();
251 $("#close_button").click();
254 $("#savePropsBtn").click(function(event) {
255 //alert($("#CProp_Target").val())
256 $("#saveProps").submit();