fix: Modify the license binding node filtering (#9111)

This commit is contained in:
ssongliu 2025-06-16 14:40:52 +08:00 committed by GitHub
parent d9358b87c4
commit a0d5319cd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -40,8 +40,8 @@ export const changeBind = (id: number, nodeIDs: Array<number>) => {
export const loadLicenseOptions = () => { export const loadLicenseOptions = () => {
return http.get<Array<Setting.LicenseOptions>>(`/core/licenses/options`); return http.get<Array<Setting.LicenseOptions>>(`/core/licenses/options`);
}; };
export const listNodeOptions = () => { export const listNodeOptions = (type: string) => {
return http.get<Array<Setting.NodeItem>>(`/core/nodes/list`); return http.post<Array<Setting.NodeItem>>(`/core/nodes/list`, { type: type });
}; };
export const listAllNodes = () => { export const listAllNodes = () => {

View file

@ -67,7 +67,7 @@ const onBind = async () => {
}; };
const loadNodes = async () => { const loadNodes = async () => {
await listNodeOptions().then((res) => { await listNodeOptions('free').then((res) => {
let nodeOptions = res.data || []; let nodeOptions = res.data || [];
for (const item of nodeOptions) { for (const item of nodeOptions) {
if (!item.isBound) { if (!item.isBound) {

View file

@ -116,7 +116,7 @@ const loadNodes = async () => {
freeNodes.value = [{ id: 0, name: i18n.global.t('xpack.node.master') }]; freeNodes.value = [{ id: 0, name: i18n.global.t('xpack.node.master') }];
return; return;
} }
await listNodeOptions() await listNodeOptions('free')
.then((res) => { .then((res) => {
freeNodes.value = res.data || []; freeNodes.value = res.data || [];
}) })