mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-17 19:07:08 +08:00
fix: Modify the license binding node filtering (#9111)
This commit is contained in:
parent
d9358b87c4
commit
a0d5319cd9
3 changed files with 4 additions and 4 deletions
|
@ -40,8 +40,8 @@ export const changeBind = (id: number, nodeIDs: Array<number>) => {
|
|||
export const loadLicenseOptions = () => {
|
||||
return http.get<Array<Setting.LicenseOptions>>(`/core/licenses/options`);
|
||||
};
|
||||
export const listNodeOptions = () => {
|
||||
return http.get<Array<Setting.NodeItem>>(`/core/nodes/list`);
|
||||
export const listNodeOptions = (type: string) => {
|
||||
return http.post<Array<Setting.NodeItem>>(`/core/nodes/list`, { type: type });
|
||||
};
|
||||
|
||||
export const listAllNodes = () => {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 || [];
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue