mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 15:06:37 +08:00
fix: Node switchover is cancelled when the master node unbinds the li… (#8253)
This commit is contained in:
parent
1b2f19560e
commit
732bbd8951
6 changed files with 27 additions and 16 deletions
|
@ -139,7 +139,6 @@ const handleBeforeClose = (done: () => void) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
console.log('321321');
|
|
||||||
localOpenPage.value = false;
|
localOpenPage.value = false;
|
||||||
globalStore.isFullScreen = false;
|
globalStore.isFullScreen = false;
|
||||||
emit('close');
|
emit('close');
|
||||||
|
|
|
@ -1434,6 +1434,7 @@ const message = {
|
||||||
proxyPort: '代理端口',
|
proxyPort: '代理端口',
|
||||||
proxyPasswdKeep: '记住密码',
|
proxyPasswdKeep: '记住密码',
|
||||||
proxyDocker: 'Docker 代理',
|
proxyDocker: 'Docker 代理',
|
||||||
|
proxyDockerHelper: '将代理服务器配置同步至 Docker,支持离线服务器拉取镜像等操作',
|
||||||
apiInterface: 'API 接口',
|
apiInterface: 'API 接口',
|
||||||
apiInterfaceClose: '关闭后将不能使用 API 接口进行访问,是否继续?',
|
apiInterfaceClose: '关闭后将不能使用 API 接口进行访问,是否继续?',
|
||||||
apiInterfaceHelper: '提供面板支持 API 接口访问',
|
apiInterfaceHelper: '提供面板支持 API 接口访问',
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
{{ $t('menu.msgCenter') }}
|
{{ $t('menu.msgCenter') }}
|
||||||
<el-tag class="msg-tag" v-if="taskCount !== 0" size="small" round>{{ taskCount }}</el-tag>
|
<el-tag class="msg-tag" v-if="taskCount !== 0" size="small" round>{{ taskCount }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<el-divider v-if="nodes.length > 0" class="divider" />
|
<el-divider v-if="nodes.length > 0 && globalStore.isMasterProductPro" class="divider" />
|
||||||
<div v-if="nodes.length > 0" class="mt-2 mb-2">
|
<div v-if="nodes.length > 0 && globalStore.isMasterProductPro" class="mt-2 mb-2">
|
||||||
<div class="dropdown-item" @click="changeNode('local')">
|
<div class="dropdown-item" @click="changeNode('local')">
|
||||||
{{ $t('xpack.node.master') }}
|
{{ $t('xpack.node.master') }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -90,6 +90,10 @@ const loadCurrentName = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadNodes = async () => {
|
const loadNodes = async () => {
|
||||||
|
if (!globalStore.isMasterProductPro) {
|
||||||
|
globalStore.currentNode = 'local';
|
||||||
|
return;
|
||||||
|
}
|
||||||
await listNodeOptions()
|
await listNodeOptions()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
|
|
|
@ -339,6 +339,7 @@ const login = (formEl: FormInstance | undefined) => {
|
||||||
globalStore.currentNode = 'local';
|
globalStore.currentNode = 'local';
|
||||||
MsgSuccess(i18n.t('commons.msg.loginSuccess'));
|
MsgSuccess(i18n.t('commons.msg.loginSuccess'));
|
||||||
router.push({ name: 'home' });
|
router.push({ name: 'home' });
|
||||||
|
document.onkeydown = null;
|
||||||
} catch (res) {
|
} catch (res) {
|
||||||
if (res.code === 401) {
|
if (res.code === 401) {
|
||||||
if (res.message === 'ErrCaptchaCode') {
|
if (res.message === 'ErrCaptchaCode') {
|
||||||
|
@ -374,6 +375,7 @@ const mfaLogin = async (auto: boolean) => {
|
||||||
MsgSuccess(i18n.t('commons.msg.loginSuccess'));
|
MsgSuccess(i18n.t('commons.msg.loginSuccess'));
|
||||||
globalStore.currentNode = 'local';
|
globalStore.currentNode = 'local';
|
||||||
router.push({ name: 'home' });
|
router.push({ name: 'home' });
|
||||||
|
document.onkeydown = null;
|
||||||
} catch (res) {
|
} catch (res) {
|
||||||
if (res.code === 401) {
|
if (res.code === 401) {
|
||||||
errMfaInfo.value = true;
|
errMfaInfo.value = true;
|
||||||
|
|
|
@ -288,18 +288,23 @@ const handleMFA = async () => {
|
||||||
ElMessageBox.confirm(i18n.global.t('setting.mfaClose'), i18n.global.t('setting.mfa'), {
|
ElMessageBox.confirm(i18n.global.t('setting.mfaClose'), i18n.global.t('setting.mfa'), {
|
||||||
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
||||||
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||||
}).then(async () => {
|
})
|
||||||
loading.value = true;
|
.then(async () => {
|
||||||
await updateSetting({ key: 'MFAStatus', value: 'Disable' })
|
loading.value = true;
|
||||||
.then(() => {
|
await updateSetting({ key: 'MFAStatus', value: 'Disable' })
|
||||||
loading.value = false;
|
.then(() => {
|
||||||
search();
|
loading.value = false;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
search();
|
||||||
})
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
.catch(() => {
|
})
|
||||||
loading.value = false;
|
.catch(() => {
|
||||||
});
|
loading.value = false;
|
||||||
});
|
search();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
search();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onChangeEntrance = () => {
|
const onChangeEntrance = () => {
|
||||||
|
|
|
@ -64,7 +64,7 @@ const onSave = async (formEl: FormInstance | undefined) => {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
},
|
},
|
||||||
).then(async () => {
|
).then(async () => {
|
||||||
await updateFail2ban({ key: 'logPath', value: form.logPath })
|
await updateFail2ban({ key: 'logpath', value: form.logPath })
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue