Skip to content

Commit

Permalink
setValue instead of setEditorValue
Browse files Browse the repository at this point in the history
Signed-off-by: Vasil Vasilev <vasil.vasilev@bosch.com>
  • Loading branch information
vvasilevbosch committed Nov 16, 2023
1 parent 84896ad commit dac14d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/modules/operations/piggyback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function hasEditorError(editorSession) {
async function submitPiggybackCommand() {
if (isCommandValid()) {
dom.responseStatus.innerHTML = REQUEST_IN_PROGRESS_MESSAGE;
aceResponse.setEditorValue('', -1);
aceResponse.setValue('', -1);
let path = buildPath(
dom.serviceSelector.value,
dom.instanceSelector.value,
Expand All @@ -224,19 +224,19 @@ async function submitPiggybackCommand() {
.catch(err => reject(err));
} catch (err) {
onRequestDone();
aceResponse.setEditorValue(err.message, -1);
aceResponse.setValue(err.message, -1);
dom.responseStatus.innerHTML = REQUEST_ERROR_MESSAGE;
}
});
promise.then((result: any) => {
onRequestDone();
result.json().then(resultJson => {
aceResponse.setEditorValue(Utils.stringifyPretty(resultJson), -1);
aceResponse.setValue(Utils.stringifyPretty(resultJson), -1);
dom.responseStatus.innerHTML = result.status;
});
}).catch(err => {
onRequestDone();
aceResponse.setEditorValue(err.message, -1);
aceResponse.setValue(err.message, -1);
dom.responseStatus.innerHTML = REQUEST_ERROR_MESSAGE;
});

Expand Down

0 comments on commit dac14d6

Please sign in to comment.