diff --git a/packages/client/hmi-client/src/components/workflow/ops/stratify-mira/tera-stratify-mira.vue b/packages/client/hmi-client/src/components/workflow/ops/stratify-mira/tera-stratify-mira.vue index 297a81162f..32791d62e1 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/stratify-mira/tera-stratify-mira.vue +++ b/packages/client/hmi-client/src/components/workflow/ops/stratify-mira/tera-stratify-mira.vue @@ -20,18 +20,10 @@
- + + Processing... + +
@@ -135,6 +136,7 @@ import { AssetType } from '@/types/Types'; import { AMRSchemaNames } from '@/types/common'; import { getModelIdFromModelConfigurationId } from '@/services/model-configurations'; import { nodeOutputLabel } from '@/components/workflow/util'; +import TeraProgressSpinner from '@/components/widgets/tera-progress-spinner.vue'; /* Jupyter imports */ import { KernelSessionManager } from '@/services/jupyter'; @@ -170,9 +172,8 @@ const executeResponse = ref({ }); const modelNodeOptions = ref([]); const showSaveModelModal = ref(false); -const isStratifyButtonDisabled = ref(false); -const stratifyButtonLabel = computed(() => (isStratifyButtonDisabled.value ? 'Loading...' : 'Stratify')); +const isStratifyInProgress = ref(false); const selectedOutputId = ref(); @@ -200,11 +201,6 @@ const updateStratifyGroupForm = (config: StratifyGroup) => { emit('update-state', state); }; -const stratifyModel = () => { - isStratifyButtonDisabled.value = true; - stratifyRequest(); -}; - const processLLMOutput = (data: any) => { codeText.value = data.content.code; saveCodeToState(data.content.code, false); @@ -231,8 +227,9 @@ const handleResetResponse = (data: any) => { } }; -const stratifyRequest = () => { +const stratifyModel = () => { if (!amr.value) return; + isStratifyInProgress.value = true; // Sanity check states vs parameters const conceptsToStratify: string[] = []; @@ -273,7 +270,7 @@ const handleStratifyResponse = (data: any) => { const handleModelPreview = async (data: any) => { stratifiedAmr.value = data.content['application/json']; - isStratifyButtonDisabled.value = false; + isStratifyInProgress.value = false; if (!stratifiedAmr.value) { logger.error('Error getting updated model from beaker'); return; @@ -380,6 +377,7 @@ const initialize = (editorInstance: any) => { const runCodeStratify = () => { const code = editor?.getValue(); if (!code) return; + isStratifyInProgress.value = true; const messageContent = { silent: false,