From a0d5319cd9f15452e5f45f941e30a9806f00c298 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 16 Jun 2025 14:40:52 +0800 Subject: [PATCH] fix: Modify the license binding node filtering (#9111) --- frontend/src/api/modules/setting.ts | 4 ++-- frontend/src/views/setting/license/bind/free.vue | 2 +- frontend/src/views/setting/license/bind/xpack.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/api/modules/setting.ts b/frontend/src/api/modules/setting.ts index b47a222e0..c4ee2f074 100644 --- a/frontend/src/api/modules/setting.ts +++ b/frontend/src/api/modules/setting.ts @@ -40,8 +40,8 @@ export const changeBind = (id: number, nodeIDs: Array) => { export const loadLicenseOptions = () => { return http.get>(`/core/licenses/options`); }; -export const listNodeOptions = () => { - return http.get>(`/core/nodes/list`); +export const listNodeOptions = (type: string) => { + return http.post>(`/core/nodes/list`, { type: type }); }; export const listAllNodes = () => { diff --git a/frontend/src/views/setting/license/bind/free.vue b/frontend/src/views/setting/license/bind/free.vue index 2d3e18de5..eb9dd780a 100644 --- a/frontend/src/views/setting/license/bind/free.vue +++ b/frontend/src/views/setting/license/bind/free.vue @@ -67,7 +67,7 @@ const onBind = async () => { }; const loadNodes = async () => { - await listNodeOptions().then((res) => { + await listNodeOptions('free').then((res) => { let nodeOptions = res.data || []; for (const item of nodeOptions) { if (!item.isBound) { diff --git a/frontend/src/views/setting/license/bind/xpack.vue b/frontend/src/views/setting/license/bind/xpack.vue index 984ea5303..63f401140 100644 --- a/frontend/src/views/setting/license/bind/xpack.vue +++ b/frontend/src/views/setting/license/bind/xpack.vue @@ -116,7 +116,7 @@ const loadNodes = async () => { freeNodes.value = [{ id: 0, name: i18n.global.t('xpack.node.master') }]; return; } - await listNodeOptions() + await listNodeOptions('free') .then((res) => { freeNodes.value = res.data || []; })