summaryrefslogtreecommitdiffstats
path: root/src/main
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
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')
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java2
-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
-rw-r--r--src/main/resources/clds/clds-policy-config.properties4
-rw-r--r--src/main/resources/logback.xml23
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 15706345..f9eeeb58 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 755ad7df..c2306140 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 fb810027..cd2f5ed1 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 01a39b62..c0a16ce2 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 3c723626..fd39a6f6 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 a2bc1faf..b812ffa7 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 a1330e3d..e02a320d 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>