diff options
author | Sébastien Determe <sd378r@intl.att.com> | 2017-11-10 10:04:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-11-10 10:04:21 +0000 |
commit | f2650c8b133ff9569994eed1c6edc88af981d84c (patch) | |
tree | 0a455a96118f9a289c652109f989b6ed4aa47c5e /src | |
parent | 06a84f0bc392a6a2845f7512d45af17d86f1d83b (diff) | |
parent | e0a5c40af5c32450a52347de83dc3d78c692c1ef (diff) |
Merge "Fix Properties CL UI issue"
Diffstat (limited to 'src')
7 files changed, 41 insertions, 51 deletions
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java index 157063456..f9eeeb58b 100644 --- a/src/main/java/org/onap/clamp/clds/service/CldsService.java +++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java @@ -937,7 +937,7 @@ public class CldsService extends SecureServiceBase { JsonNode globalNode = modelJson.get("global"); String service = AbstractModelElement.getValueByName(globalNode, "service"); List<String> resourceVf = AbstractModelElement.getValuesByName(globalNode, "vf"); - if (resourceVf != null && !resourceVf.isEmpty()) { + if (service != null && resourceVf != null && !resourceVf.isEmpty()) { List<CldsModelProp> cldsModelPropList = cldsDao.getAllModelProperties(); for (CldsModelProp cldsModelProp : cldsModelPropList) { JsonNode currentJson = new ObjectMapper().readTree(cldsModelProp.getPropText()); 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": [{ 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 @@ <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> - <level>WARN</level> + <level>INFO</level> </filter> <file>${logDirectory}/CLAMP/error.log</file> <append>true</append> @@ -45,16 +45,13 @@ <encoder> <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX",UTC}|%X{RequestId}|%.20thread|%.-5level|%logger{36}|%msg%n</pattern> </encoder> - <rollingPolicy - class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> - <maxIndex>10</maxIndex> - <FileNamePattern>${logDirectory}/CLAMP/debug.%i.log.zip - </FileNamePattern> - </rollingPolicy> - <triggeringPolicy - class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/CLAMP/debug.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>10MB</maxFileSize> - </triggeringPolicy> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>5</maxHistory> + </rollingPolicy> </appender> <appender name="AUDIT" @@ -131,8 +128,9 @@ </appender> <!-- CLDS related loggers --> - <logger name="org.onap.clamp.clds" level="INFO" /> - + <logger name="org.onap.clamp.clds" level="INFO" additivity="true"> + <appender-ref ref="ERROR" /> + </logger> <!-- EELF related loggers --> <logger name="com.att.eelf.audit" level="INFO" additivity="false"> <appender-ref ref="asyncEELFAudit" /> @@ -250,7 +248,6 @@ <root level="WARN"> <appender-ref ref="DEBUG" /> - <appender-ref ref="ERROR" /> <appender-ref ref="STDOUT" /> </root> |