mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-18 21:38:57 +08:00
fix: Fix the issue of abnormal default network card display (#10525)
Refs #10520
This commit is contained in:
parent
8937acee13
commit
97d6d9c69f
1 changed files with 9 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ import { DropdownInstance } from 'element-plus';
|
||||||
import { countExecutingTask } from '@/api/modules/log';
|
import { countExecutingTask } from '@/api/modules/log';
|
||||||
import { MsgError, MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { listNodeOptions } from '@/api/modules/setting';
|
import { getAgentSettingInfo, listNodeOptions } from '@/api/modules/setting';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import bus from '@/global/bus';
|
import bus from '@/global/bus';
|
||||||
import { logOutApi } from '@/api/modules/auth';
|
import { logOutApi } from '@/api/modules/auth';
|
||||||
|
|
@ -182,6 +182,7 @@ const changeNode = (command: string) => {
|
||||||
if (command == 'local') {
|
if (command == 'local') {
|
||||||
globalStore.currentNode = 'local';
|
globalStore.currentNode = 'local';
|
||||||
globalStore.currentNodeAddr = item.addr;
|
globalStore.currentNodeAddr = item.addr;
|
||||||
|
loadGlobalSetting();
|
||||||
loadProductProFromDB();
|
loadProductProFromDB();
|
||||||
routerToNameWithQuery('home', { t: Date.now() });
|
routerToNameWithQuery('home', { t: Date.now() });
|
||||||
return;
|
return;
|
||||||
|
|
@ -198,6 +199,7 @@ const changeNode = (command: string) => {
|
||||||
MsgError(i18n.global.t('setting.versionNotSame'));
|
MsgError(i18n.global.t('setting.versionNotSame'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
loadGlobalSetting();
|
||||||
globalStore.currentNode = command || 'local';
|
globalStore.currentNode = command || 'local';
|
||||||
globalStore.currentNodeAddr = item.addr;
|
globalStore.currentNodeAddr = item.addr;
|
||||||
loadProductProFromDB();
|
loadProductProFromDB();
|
||||||
|
|
@ -206,6 +208,12 @@ const changeNode = (command: string) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const loadGlobalSetting = async () => {
|
||||||
|
await getAgentSettingInfo().then((res) => {
|
||||||
|
globalStore.defaultNetwork = res.data.defaultNetwork;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const showNodes = () => {
|
const showNodes = () => {
|
||||||
return nodes.value.length > 0 && isMasterPro;
|
return nodes.value.length > 0 && isMasterPro;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue