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 ===================================================================
30 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
31 <div attribute-test="refreshasdc" id="configure-widgets">
32 <div attribute-test="refreshasdch" class="modal-header">
33 <button type="button" class="close" ng-click="close(false)"
34 aria-hidden="true" style="margin-top: -3px">×</button>
35 <h4>Model Properties</h4>
37 <div class="modal-body" style="height: 280px">
38 <div style="height: 10px"></div>
39 <div class="alert alert-danger refreshASDC" role="alert" id='paramsWarnrefresh'>
40 <strong>Ooops!</strong> Unable to load properties for <span id='servName'>. Would you like to</span>
41 <a href="javascript:void(0);" ng-click="paramsRetry();" class="btn-link" id='paramsRetry'>Retry </a> /
42 <a href="javascript:void(0);" ng-click="paramsCancel();" class="btn-link" id='paramsCancel'>Cancel</a>
44 <form id="saveProps" >
47 <div class="form-group">
48 <label for="services" class="col-sm-4 control-label" >Refresh ASDC services?</label>
56 <i hidden id="ridinSpinners" class="fa fa-spinner fa-spin" style="display:none;width:100%;text-align:center;font-size:24px;color:black;"></i>
59 <div attribute-test="refreshasdcf" class="modal-footer">
60 <!--<button ng-click="reset()" class="btn btn-primary" style="float:left">Reset</button>-->
61 <button ng-click="refreshASDC()" class="btn btn-primary">refresh</button>
62 <button ng-click="close(true)" id="close_button"
63 class="btn btn-primary">Cancel</button>
70 // url: '/restservices/clds/v1/clds/asdc/services/',
71 // success: function(data){
74 // error:function(s,a,err){
81 // var services=vf_Services.service
82 // console.log(elementMap["global"])
83 // for(k in services){
85 // $("#service").append("<option value="+k+">"+services[k]+"</option>")
87 // loadSharedPropertyByService()
88 // var el = elementMap["global"];
89 // $("#status").val($("#activity_modeler").text())
90 // if (el !== undefined) {
91 // for (var i = 0; i < el.length; i++) {
92 // $("#" + el[i].name).val(el[i].value);
98 $("#service").on('focus', function () {
99 // Store the current value on focus and on change
100 previous = this.value;
102 }).change(function(){
103 $("#ridinSpinners").css("display","")
104 var bool=loadSharedPropertyByService($(this).val())
105 $("#ridinSpinners").css("display","none")
107 $(this).val(previous)
111 // $("#service").on("change",function(){
112 // $("#ridinSpinners").css("display","")
113 // loadSharedPropertyByService($(this).val())
114 // $("#ridinSpinners").css("display","none")
116 function noRepeats(form){
118 for(var i=0;i<form.length;i++){
119 if(select[form[i].name]===undefined)
120 select[form[i].name]=[]
121 select[form[i].name].push(form[i].value);
133 $("#saveProps").on('submit', function(event) {
134 saveGlobalProperties(noRepeats($(this).serializeArray()))
135 event.preventDefault();
137 $("#close_button").click();
140 $("#savePropsBtn").click(function(event) {
141 //alert($("#CProp_Target").val())
142 $("#saveProps").submit();