diff --git a/packages/client/hmi-client/src/components/workflow/ops/model-edit/tera-model-edit.vue b/packages/client/hmi-client/src/components/workflow/ops/model-edit/tera-model-edit.vue
index 27fc6ff353..8b2e2dda22 100644
--- a/packages/client/hmi-client/src/components/workflow/ops/model-edit/tera-model-edit.vue
+++ b/packages/client/hmi-client/src/components/workflow/ops/model-edit/tera-model-edit.vue
@@ -64,12 +64,6 @@
-
@@ -88,22 +82,26 @@
+
-
-
diff --git a/packages/client/hmi-client/src/page/project/components/tera-save-model-modal.vue b/packages/client/hmi-client/src/page/project/components/tera-save-model-modal.vue
new file mode 100644
index 0000000000..89bb695761
--- /dev/null
+++ b/packages/client/hmi-client/src/page/project/components/tera-save-model-modal.vue
@@ -0,0 +1,145 @@
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/client/hmi-client/src/page/project/tera-project.vue b/packages/client/hmi-client/src/page/project/tera-project.vue
index 5318a9e0bf..55e41de3cb 100644
--- a/packages/client/hmi-client/src/page/project/tera-project.vue
+++ b/packages/client/hmi-client/src/page/project/tera-project.vue
@@ -66,7 +66,12 @@
-
+
@@ -93,8 +98,8 @@ import { getCodeFileAsText } from '@/services/code';
import TeraCode from '@/components/code/tera-code.vue';
import TeraWorkflow from '@/components/workflow/tera-workflow.vue';
import Button from 'primevue/button';
-import TeraModelModal from './components/tera-model-modal.vue';
import TeraUploadResourcesModal from './components/tera-upload-resources-modal.vue';
+import TeraSaveModelModal from './components/tera-save-model-modal.vue';
const route = useRoute();
const router = useRouter();
@@ -102,7 +107,7 @@ const router = useRouter();
const code = ref();
const isResourcesSliderOpen = ref(true);
const isNotesSliderOpen = ref(false);
-const isNewModelModalVisible = ref(false);
+const showSaveModelModal = ref(false);
const isUploadResourcesModalVisible = ref(false);
const pageType = computed(() => (route.params.pageType as ProjectPages | AssetType) ?? '');
@@ -177,7 +182,7 @@ const openWorkflow = async () => {
const openNewAsset = (assetType: AssetType) => {
switch (assetType) {
case AssetType.Model:
- isNewModelModalVisible.value = true;
+ showSaveModelModal.value = true;
break;
case AssetType.Workflow:
openWorkflow();
@@ -206,7 +211,7 @@ async function openCode() {
}
const onCloseModelModal = () => {
- isNewModelModalVisible.value = false;
+ showSaveModelModal.value = false;
};
onMounted(() => {
diff --git a/packages/client/hmi-client/src/services/model.ts b/packages/client/hmi-client/src/services/model.ts
index 9df8577843..b8cab1c9fa 100644
--- a/packages/client/hmi-client/src/services/model.ts
+++ b/packages/client/hmi-client/src/services/model.ts
@@ -1,6 +1,5 @@
import API from '@/api/api';
import { useProjects } from '@/composables/project';
-import { newAMR } from '@/model-representation/petrinet/petrinet-service';
import * as EventService from '@/services/event';
import type { Initial, Model, ModelConfiguration, ModelParameter } from '@/types/Types';
import { Artifact, AssetType, EventType } from '@/types/Types';
@@ -81,18 +80,6 @@ export async function getModelConfigurations(modelId: Model['id']): Promise {
- // 1. Load an empty AMR
- const amr = newAMR(modelName);
- (amr as any).id = undefined; // FIXME: id hack
-
- const response = await createModel(amr);
- const modelId = response?.id;
-
- return modelId ?? null;
-}
-
export async function processAndAddModelToProject(artifact: Artifact): Promise {
const response = await API.post(`/mira/convert-and-create-model`, {
artifactId: artifact.id