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