Skip to content

Commit

Permalink
fix: Hide sFTP upload RG from session launcher
Browse files Browse the repository at this point in the history
RG: Resource Group
  • Loading branch information
adrysn committed Nov 5, 2023
1 parent 1e2f2ba commit d035593
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/backend-ai-resource-broker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,15 @@ export default class BackendAiResourceBroker extends BackendAIPage {
const sgs = await globalThis.backendaiclient.scalingGroup.list(
this.current_user_group,
);
// TODO: Delete these codes after backend.ai support scaling groups filtering.
// ================================ START ====================================
if (sgs && sgs.scaling_groups && sgs.scaling_groups.length > 0) {
const sftpResourceGroups = await this._sftpScalingGroups();
sgs.scaling_groups = sgs.scaling_groups.filter(
(item) => !sftpResourceGroups?.includes(item.name),
);
}
// ================================ END ====================================
// Make empty scaling group item if there is no scaling groups.
this.scaling_groups =
sgs.scaling_groups.length > 0 ? sgs.scaling_groups : [{ name: '' }];
Expand Down

0 comments on commit d035593

Please sign in to comment.