diff options
author | 2020-09-21 09:19:42 +0100 | |
---|---|---|
committer | 2020-10-02 09:06:00 +0100 | |
commit | 51b0c6c9b06d97d007d99cdcd8651a97b0b792df (patch) | |
tree | 4388fe094039c59c6391ac30bd20be58697a5385 /gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js | |
parent | 33c9f2c07083f2f94f909a27f406da2744c4158f (diff) |
JS Testing added for apex-editor
Last apex-editor/pom.xml change to exclude the /dist folder
Issue-ID: POLICY-2783
Change-Id: I076aac4e503c7e5f2ea39fa9291153be4b119808
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js')
-rw-r--r-- | gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js index bf0e016..65b39d9 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js @@ -19,6 +19,12 @@ * ============LICENSE_END========================================================= */ +import { formUtils_generateDescription, formUtils_generateUUID } from "./ApexFormUtils"; +import {apexUtils_removeElement} from "./ApexUtils"; +import {pageControl_modelMode} from "./ApexPageControl"; +import {ajax_post, ajax_get} from "./ApexAjax"; +import {keyInformationTab_reset} from "./ApexKeyInformationTab"; + function newModelForm_activate(formParent) { apexUtils_removeElement("newModelFormDiv"); @@ -203,25 +209,33 @@ function newModelForm_cancelPressed() { } function newModelForm_submitPressed() { - jsonString = JSON.stringify({ + var jsonString = JSON.stringify({ "name" : $('#newModelFormNameInput').val(), "version" : $('#newModelFormVersionInput').val(), "uuid" : $('#newModelFormUuidInput').val(), "description" : $('#newModelFormDescriptionTextArea').val() }); - var requestURL = restRootURL + "/Model/Create"; + var requestURL = window.restRootURL + "/Model/Create"; ajax_post(requestURL, jsonString, function(resultData) { apexUtils_removeElement("newModelDivBackground"); - var requestURL = restRootURL + "/Model/GetKey"; + var requestURL = window.restRootURL + "/Model/GetKey"; ajax_get(requestURL, function(data) { var modelKey = JSON.parse(data.messages.message[0]).apexArtifactKey; - modelFileName = modelKey.name + ".json"; + var modelFileName = modelKey.name + ".json"; pageControl_modelMode(modelKey.name, modelKey.version, modelFileName); }); keyInformationTab_reset() }); } + +export { + newModelForm_activate, + newModelForm_cancelPressed, + newModelForm_generateDescriptionPressed, + newModelForm_generateUUIDPressed, + newModelForm_submitPressed +} |