aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/META-INF
diff options
context:
space:
mode:
authorxg353y <xg353y@intl.att.com>2017-11-09 16:52:37 +0100
committerxg353y <xg353y@intl.att.com>2017-11-09 16:52:37 +0100
commite0a5c40af5c32450a52347de83dc3d78c692c1ef (patch)
treeb710255a9b70653acaabbebe88bec1199bb1b88c /src/main/resources/META-INF
parentf391c6ca9ee635c25f57f217e3280cb25e42ac9f (diff)
Fix Properties CL UI issue
Fix the issue in Properties CL window, where the first service doesn't show the corresponding vf settings Change-Id: I59f1f5117f453f1cb385d4789288a5b8a690e7e9 Signed-off-by: xg353y <xg353y@intl.att.com> Issue-ID: CLAMP-68
Diffstat (limited to 'src/main/resources/META-INF')
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/global_properties.html50
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js2
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js9
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/app.js2
4 files changed, 28 insertions, 35 deletions
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/global_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/global_properties.html
index 755ad7dfd..c2306140a 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/global_properties.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/global_properties.html
@@ -213,35 +213,33 @@
(function () {
$("#paramsWarn").hide();
/*Below service method is called for checking the service is being loaded or not*/
-
+
var intialize = intializeService;
-
+
function intializeService() {
$("#service").off('focus').off('change');
-
- $("#service").on('change', function(){
- var chosen = $(this).val();
- (function(spinner){
- $("#ridinSpinners").show();
- setTimeout(spinner, 1);
- })(function(){
- loadSharedPropertyByService(chosen, null, intialize);
- if (elementMap["global"]){
- if ($("#vf").val() == oldVf){
- vfDiff = false;
- if ((!vfDiff)&&(!asDiff)&&(!serDiff)){
+
+ $("#service").on('change', function(){
+ var chosen = $(this).val();
+ (function(spinner){
+ $("#ridinSpinners").show();
+ setTimeout(spinner, 1);
+ })(function(){
+ loadSharedPropertyByService(chosen, null, intialize);
+ if (elementMap["global"]){
+ if ($("#vf").val() == oldVf){
+ vfDiff = false;
+ if ((!vfDiff)&&(!asDiff)&&(!serDiff)){
$(".propChangeWarn").hide();
};
- } else {
- vfDiff = true;
- $(".propChangeWarn").show();
- }
- }
-
- $("#ridinSpinners").hide();
- });
- });
-
+ } else {
+ vfDiff = true;
+ $(".propChangeWarn").show();
+ }
+ }
+ $("#ridinSpinners").hide();
+ });
+ });
}
loadSharedPropertyByService(undefined, null, intialize);
@@ -276,7 +274,9 @@
var f={}
f.name=s
f.value=select[s]
- arr.push(f)
+ if (!(s=="service" && f.value=="")){
+ arr.push(f)
+ }
}
return arr
}
diff --git a/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js
index fb8100276..cd2f5ed1c 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/GlobalPropertiesCtrl.js
@@ -27,6 +27,8 @@ app.controller('GlobalPropertiesCtrl',
$scope.$watch('name', function(newValue, oldValue) {
var services=asdc_Services
setASDCFields()
+ // add blank service item as the default service, to force user chose the correct service by themselves
+ $("#service").append("<option></option>")
for(k in services){
$("#service").append("<option value="+k+">"+services[k]+"</option>")
}
diff --git a/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js b/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js
index 01a39b62d..c0a16ce28 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/aOnBoot.js
@@ -150,15 +150,6 @@ function loadSharedPropertyByService(onChangeUUID, refresh, callBack) {
if (uuid === undefined) {
uuid = elementMap["global"] && elementMap["global"].length > 0 ?
elementMap["global"][0].value : "";
- } else if (uuid === "") {
- vf_Services = null
- if ($("#vf").length > 0)
- $("#vf").empty().multiselect("refresh");
- if ($("#location").length > 0)
- $("#location").empty().multiselect("refresh");
- if ($("#alarmCondition").length > 0)
- $("#alarmCondition").empty().multiselect("refresh");
- return true;
}
var share = null,
serviceUrl = '/restservices/clds/v1/clds/properties/' + uuid;
diff --git a/src/main/resources/META-INF/resources/designer/scripts/app.js b/src/main/resources/META-INF/resources/designer/scripts/app.js
index 3c723626e..fd39a6f67 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/app.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/app.js
@@ -486,7 +486,7 @@ var app = angular.module('clds-app', ['ngRoute',
link: "/refreshStatus",
name: "Refresh Status"
}, {
- link: "/refreshASDCProperties",
+ link: "/cldsRefreshASDC",
name: "Refresh ASDC"
}],
"Help": [{