Skip to content

Commit

Permalink
add: option to show/hide agent select option by launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
lizable committed Nov 21, 2024
1 parent ae54e8a commit 916a5df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion react/src/components/ResourceAllocationFormItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ type MergedResourceAllocationFormValue = ResourceAllocationFormValue &
ImageEnvironmentFormInput;

interface ResourceAllocationFormItemsProps {
enableAgentSelect?: boolean;
enableNumOfSessions?: boolean;
enableResourcePresets?: boolean;
showRemainingWarning?: boolean;
Expand All @@ -93,6 +94,7 @@ interface ResourceAllocationFormItemsProps {
const ResourceAllocationFormItems: React.FC<
ResourceAllocationFormItemsProps
> = ({
enableAgentSelect = false,
enableNumOfSessions,
enableResourcePresets,
forceImageMinValues = false,
Expand Down Expand Up @@ -1206,7 +1208,7 @@ const ResourceAllocationFormItems: React.FC<
</Card>
) : null}
{/* TODO: Support cluster mode */}
{!baiClient._config.hideAgents && (
{!baiClient._config.hideAgents && enableAgentSelect && (
<Form.Item
label={t('session.launcher.SelectAgent')}
required
Expand Down
1 change: 1 addition & 0 deletions react/src/pages/SessionLauncherPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,7 @@ const SessionLauncherPage = () => {
}}
>
<ResourceAllocationFormItems
enableAgentSelect
enableNumOfSessions
enableResourcePresets
showRemainingWarning
Expand Down

0 comments on commit 916a5df

Please sign in to comment.