Skip to content
Snippets Groups Projects
Commit 621c306f authored by Robin Leber's avatar Robin Leber
Browse files

Fix: clear Model

parent 7a5344cb
Branches
No related tags found
No related merge requests found
......@@ -100,6 +100,25 @@ export const clearArchitecture = async () => {
});
};
export const clearModel = async () => {
loader(true);
await axios
.get(`${SERVER_URL}/customCode/clear`)
.then((response) => {
loader(false);
if (response.status === 200) {
successFeedback();
} else {
errorFeedback(response);
}
})
.catch((error) => {
loader(false);
errorFeedback(error);
console.error(error);
});
};
export const scaleOut = async (id) => {
const requestBody = { id };
loader(true);
......
......
......@@ -11,6 +11,7 @@ import {
stopCustomCode,
restartCustomCode,
clearArchitecture,
clearModel,
} from "./functions/api";
import { getScaleValues } from "./functions/scaling";
import { showAllWarning } from "./functions/visualValidation";
......@@ -106,6 +107,7 @@ function App() {
"#Diagram .Filter, #Diagram .Pipe, .jtk-endpoint, .jtk-connector"
);
elements.forEach((element) => element.remove());
await clearModel();
});
killDeploymentElement.addEventListener("click", async () => {
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment