mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-29 18:26:03 +08:00
fix: fix issue with add supervisor config error (#8734)
This commit is contained in:
parent
5892ef222f
commit
80c7d68cf4
2 changed files with 8 additions and 3 deletions
|
|
@ -29,6 +29,9 @@
|
|||
<el-form-item :label="$t('tool.supervisor.numprocs')" prop="numprocsNum">
|
||||
<el-input type="number" v-model.number="process.numprocsNum"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('tool.supervisor.autoRestart')" prop="autoRestart">
|
||||
<el-switch v-model="process.autoRestart" active-value="true" inactive-value="false"></el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
|
|
@ -69,6 +72,7 @@ const initData = (runtimeID: number) => ({
|
|||
numprocsNum: 1,
|
||||
numprocs: '1',
|
||||
id: runtimeID,
|
||||
autoRestart: 'true',
|
||||
});
|
||||
const process = ref(initData(0));
|
||||
const em = defineEmits(['close']);
|
||||
|
|
@ -95,6 +99,7 @@ const acceptParams = (operate: string, config: HostTool.SupersivorProcess, id: n
|
|||
numprocsNum: 1,
|
||||
numprocs: config.numprocs,
|
||||
id: id,
|
||||
autoRestart: config.autoRestart,
|
||||
};
|
||||
process.value.numprocsNum = Number(config.numprocs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,8 +219,8 @@ const checkStatus = (status: HostTool.ProcessStatus[]): string => {
|
|||
const operate = async (operation: string, name: string) => {
|
||||
try {
|
||||
ElMessageBox.confirm(
|
||||
i18n.global.t('tool.supervisor.operatorHelper', [name, i18n.global.t('app.' + operation)]),
|
||||
i18n.global.t('app.' + operation),
|
||||
i18n.global.t('tool.supervisor.operatorHelper', [name, i18n.global.t('commons.operate.' + operation)]),
|
||||
i18n.global.t('commons.operate.' + operation),
|
||||
{
|
||||
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
||||
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||
|
|
@ -248,7 +248,7 @@ const getFile = (name: string, file: string, runtimeID: number) => {
|
|||
};
|
||||
|
||||
const edit = (row: HostTool.SupersivorProcess) => {
|
||||
createRef.value.acceptParams('update', row);
|
||||
createRef.value.acceptParams('update', row, runtimeID.value);
|
||||
};
|
||||
|
||||
const buttons = [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue