1
0
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:
ssongliu 2023-04-12 18:58:30 +08:00 committed by GitHub
parent 11d3e98155
commit 7f75ea06c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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>;

View File

@ -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;
});
};