mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
feat: 编辑运行环境增加提示 (#1896)
This commit is contained in:
parent
1cccfeff22
commit
bb7102d543
@ -12,6 +12,7 @@ export namespace Runtime {
|
|||||||
type: string;
|
type: string;
|
||||||
resource: string;
|
resource: string;
|
||||||
version: string;
|
version: string;
|
||||||
|
status: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RuntimeReq extends ReqPage {
|
export interface RuntimeReq extends ReqPage {
|
||||||
|
@ -87,7 +87,6 @@
|
|||||||
<span>{{ $t('runtime.extendHelper') }}</span>
|
<span>{{ $t('runtime.extendHelper') }}</span>
|
||||||
<span v-html="$t('runtime.phpPluginHelper')"></span>
|
<span v-html="$t('runtime.phpPluginHelper')"></span>
|
||||||
<br />
|
<br />
|
||||||
<span v-if="mode == 'edit'">{{ $t('runtime.rebuildHelper') }}</span>
|
|
||||||
</el-alert>
|
</el-alert>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
@ -246,8 +245,8 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
|
||||||
if (mode.value == 'create') {
|
if (mode.value == 'create') {
|
||||||
|
loading.value = true;
|
||||||
CreateRuntime(runtime.value)
|
CreateRuntime(runtime.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.createSuccess'));
|
||||||
@ -257,6 +256,11 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
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)
|
UpdateRuntime(runtime.value)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
@ -265,6 +269,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -97,6 +97,9 @@ const buttons = [
|
|||||||
click: function (row: Runtime.Runtime) {
|
click: function (row: Runtime.Runtime) {
|
||||||
openDetail(row);
|
openDetail(row);
|
||||||
},
|
},
|
||||||
|
disabled: function (row: Runtime.Runtime) {
|
||||||
|
return row.status === 'building';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: i18n.global.t('commons.button.delete'),
|
label: i18n.global.t('commons.button.delete'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user