aboutsummaryrefslogtreecommitdiffstats
path: root/gui-editors/gui-editor-apex/src
diff options
context:
space:
mode:
Diffstat (limited to 'gui-editors/gui-editor-apex/src')
-rw-r--r--gui-editors/gui-editor-apex/src/main/java/org/onap/policy/gui/editors/apex/rest/ApexEditorParameterParser.java2
-rw-r--r--gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js9
2 files changed, 7 insertions, 4 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/java/org/onap/policy/gui/editors/apex/rest/ApexEditorParameterParser.java b/gui-editors/gui-editor-apex/src/main/java/org/onap/policy/gui/editors/apex/rest/ApexEditorParameterParser.java
index 7487fa0..0c8c648 100644
--- a/gui-editors/gui-editor-apex/src/main/java/org/onap/policy/gui/editors/apex/rest/ApexEditorParameterParser.java
+++ b/gui-editors/gui-editor-apex/src/main/java/org/onap/policy/gui/editors/apex/rest/ApexEditorParameterParser.java
@@ -102,7 +102,7 @@ public class ApexEditorParameterParser {
.longOpt("upload-url")
.desc("the URL to use for uploads. Default value is null")
.hasArg()
- .argName("USERID")
+ .argName("UPLOAD_URL")
.required(false)
.type(String.class)
.build()
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
index a002788..de9edf3 100644
--- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
+++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
@@ -58,10 +58,13 @@ function files_fileDownload() {
}
function files_fileUpload() {
- var requestURL = window.restRootURL + "/Model/Upload?userId=" + new URLSearchParams(window.location.search).get('userId');
-
+ let requestURL = window.restRootURL + "/Model/Upload";
+ const userId = new URLSearchParams(window.location.search).get('userId');
+ if (userId) {
+ requestURL = requestURL + "?userId=" + userId;
+ }
ajax_getOKOrFail(requestURL, function(data) {
- var uploadResultString = "";
+ let uploadResultString = "";
for (let value of data.messages.message) {
uploadResultString += (value + "\n");
}