From e0a5c40af5c32450a52347de83dc3d78c692c1ef Mon Sep 17 00:00:00 2001 From: xg353y Date: Thu, 9 Nov 2017 16:52:37 +0100 Subject: 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 Issue-ID: CLAMP-68 --- .../partials/portfolios/global_properties.html | 50 +++++++++++----------- .../designer/scripts/GlobalPropertiesCtrl.js | 2 + .../META-INF/resources/designer/scripts/aOnBoot.js | 9 ---- .../META-INF/resources/designer/scripts/app.js | 2 +- .../resources/clds/clds-policy-config.properties | 4 +- src/main/resources/logback.xml | 23 +++++----- 6 files changed, 40 insertions(+), 50 deletions(-) (limited to 'src/main/resources') 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("") for(k in services){ $("#service").append("") } 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": [{ diff --git a/src/main/resources/clds/clds-policy-config.properties b/src/main/resources/clds/clds-policy-config.properties index a2bc1faf3..b812ffa70 100644 --- a/src/main/resources/clds/clds-policy-config.properties +++ b/src/main/resources/clds/clds-policy-config.properties @@ -21,8 +21,8 @@ # ECOMP is a trademark and service mark of AT&T Intellectual Property. ### # Configuration Settings for Policy Engine Components -PDP_URL1=https://vm1.policy.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123 -PDP_URL2=https://vm1.policy.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123 +PDP_URL1=http://vm1.policy.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123 +PDP_URL2=http://vm1.policy.simpledemo.onap.org:8081/pdp/ , testpdp, alpha123 NOTIFICATION_TYPE=websocket NOTIFICATION_UEB_SERVERS=localhost NOTIFICATION_TOPIC= diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index a1330e3d2..e02a320d3 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -19,7 +19,7 @@ - WARN + INFO ${logDirectory}/CLAMP/error.log true @@ -45,16 +45,13 @@ %date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX",UTC}|%X{RequestId}|%.20thread|%.-5level|%logger{36}|%msg%n - - 10 - ${logDirectory}/CLAMP/debug.%i.log.zip - - - + + ${logDirectory}/CLAMP/debug.%d{yyyy-MM-dd}.%i.log.zip + 10MB - + + 5 + - - + + + @@ -250,7 +248,6 @@ - -- cgit 1.2.3-korg