mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-07 17:10:07 +08:00
fix: 防火墙禁 ping 样式优化 (#601)
This commit is contained in:
parent
11d3e98155
commit
7f75ea06c2
@ -199,7 +199,7 @@ const loadPath = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const changePath = async () => {
|
const changePath = async () => {
|
||||||
composeFile.value = baseDir.value + '/docker/compose/' + form.name + '/docker-compose.yml';
|
composeFile.value = baseDir.value + '/docker/compose/' + form.name + '/xxx';
|
||||||
};
|
};
|
||||||
|
|
||||||
type FormInstance = InstanceType<typeof ElForm>;
|
type FormInstance = InstanceType<typeof ElForm>;
|
||||||
|
@ -100,6 +100,7 @@ const onOperate = async (operation: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onPingOperate = async (operation: string) => {
|
const onPingOperate = async (operation: string) => {
|
||||||
|
emit('update:maskShow', false);
|
||||||
let operationHelper =
|
let operationHelper =
|
||||||
operation === 'Enable' ? i18n.global.t('firewall.noPingHelper') : i18n.global.t('firewall.onPingHelper');
|
operation === 'Enable' ? i18n.global.t('firewall.noPingHelper') : i18n.global.t('firewall.onPingHelper');
|
||||||
ElMessageBox.confirm(operationHelper, i18n.global.t('firewall.noPingTitle'), {
|
ElMessageBox.confirm(operationHelper, i18n.global.t('firewall.noPingTitle'), {
|
||||||
@ -110,6 +111,7 @@ const onPingOperate = async (operation: string) => {
|
|||||||
emit('update:loading', true);
|
emit('update:loading', true);
|
||||||
emit('update:status', 'running');
|
emit('update:status', 'running');
|
||||||
operation = operation === 'Disable' ? 'disablePing' : 'enablePing';
|
operation = operation === 'Disable' ? 'disablePing' : 'enablePing';
|
||||||
|
emit('update:maskShow', true);
|
||||||
await operateFire(operation)
|
await operateFire(operation)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
@ -120,6 +122,7 @@ const onPingOperate = async (operation: string) => {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
emit('update:maskShow', true);
|
||||||
onPing.value = oldStatus.value;
|
onPing.value = oldStatus.value;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user