aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java/org/onap
diff options
context:
space:
mode:
authorrb7147 <rb7147@att.com>2017-09-12 14:43:59 -0400
committerrb7147 <rb7147@att.com>2017-09-12 15:56:25 -0400
commit84b95a134c61217667b7eb7b7e774a485d2406ba (patch)
tree0c2456f81c76092378f1b84e19a2596189820894 /ONAP-PAP-REST/src/main/java/org/onap
parentc8b426318857bf6907ccdf799c7f4317399b6028 (diff)
Resolved Policy GUI Issues
Resolved the time to leave date issue field to support all browsers. Resolved Export and Import Policy Functionality. Added few GUI cosmetic fixes. Issue-Id : POLICY-221 Change-Id: I920a4d9c8e16ae1cffcd13df3319e109a992ba55 Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java2
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/util/AbstractPolicyCreation.java14
2 files changed, 4 insertions, 12 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java
index d989470a2..64324d432 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java
@@ -115,7 +115,7 @@ public class PolicyCreation extends AbstractPolicyCreation{
policyData.setTtlDate("NA");
}else{
String dateTTL = policyData.getTtlDate();
- String newDate = convertDate(dateTTL, false);
+ String newDate = convertDate(dateTTL);
policyData.setTtlDate(newDate);
}
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/util/AbstractPolicyCreation.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/util/AbstractPolicyCreation.java
index 71de2b297..aa33729c9 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/util/AbstractPolicyCreation.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/util/AbstractPolicyCreation.java
@@ -40,18 +40,10 @@ public abstract class AbstractPolicyCreation {
getDomain().replaceAll("[/\\\\.]", ":"), "xacml", "policy", "id", UUID.randomUUID());
}
- public String convertDate(String dateTTL, boolean portalType) {
+ public String convertDate(String dateTTL) {
String formateDate = null;
- String[] date;
- String[] parts;
-
- if (portalType){
- parts = dateTTL.split("-");
- formateDate = parts[2] + "-" + parts[1] + "-" + parts[0];
- } else {
- date = dateTTL.split("T");
- parts = date[0].split("-");
- formateDate = parts[2] + "-" + parts[1] + "-" + parts[0];
+ if(dateTTL.contains("/")){
+ formateDate = dateTTL.replace("/", "-");
}
return formateDate;
}