diff --git a/frontend/src/api/interface/runtime.ts b/frontend/src/api/interface/runtime.ts index 44e0e22e3..209cc45a9 100644 --- a/frontend/src/api/interface/runtime.ts +++ b/frontend/src/api/interface/runtime.ts @@ -12,6 +12,7 @@ export namespace Runtime { type: string; resource: string; version: string; + status: string; } export interface RuntimeReq extends ReqPage { diff --git a/frontend/src/views/website/runtime/create/index.vue b/frontend/src/views/website/runtime/create/index.vue index dc4ebf298..12e73b581 100644 --- a/frontend/src/views/website/runtime/create/index.vue +++ b/frontend/src/views/website/runtime/create/index.vue @@ -87,7 +87,6 @@ {{ $t('runtime.extendHelper') }}
- {{ $t('runtime.rebuildHelper') }} @@ -246,8 +245,8 @@ const submit = async (formEl: FormInstance | undefined) => { if (!valid) { return; } - loading.value = true; if (mode.value == 'create') { + loading.value = true; CreateRuntime(runtime.value) .then(() => { MsgSuccess(i18n.global.t('commons.msg.createSuccess')); @@ -257,14 +256,20 @@ const submit = async (formEl: FormInstance | undefined) => { loading.value = false; }); } else { - UpdateRuntime(runtime.value) - .then(() => { - MsgSuccess(i18n.global.t('commons.msg.updateSuccess')); - handleClose(); - }) - .finally(() => { - loading.value = false; - }); + ElMessageBox.confirm(i18n.global.t('runtime.rebuildHelper'), i18n.global.t('commons.msg.infoTitle'), { + confirmButtonText: i18n.global.t('commons.button.confirm'), + cancelButtonText: i18n.global.t('commons.button.cancel'), + }).then(async () => { + loading.value = true; + UpdateRuntime(runtime.value) + .then(() => { + MsgSuccess(i18n.global.t('commons.msg.updateSuccess')); + handleClose(); + }) + .finally(() => { + loading.value = false; + }); + }); } }); }; diff --git a/frontend/src/views/website/runtime/index.vue b/frontend/src/views/website/runtime/index.vue index 3cfd1a54a..d6926ecbc 100644 --- a/frontend/src/views/website/runtime/index.vue +++ b/frontend/src/views/website/runtime/index.vue @@ -97,6 +97,9 @@ const buttons = [ click: function (row: Runtime.Runtime) { openDetail(row); }, + disabled: function (row: Runtime.Runtime) { + return row.status === 'building'; + }, }, { label: i18n.global.t('commons.button.delete'),