Skip to content

Commit 0c4f211

Browse files
authored
feat(FR-2323): change cluster mode default to multi-node with per-option descriptions (#6163)
1 parent bd8258a commit 0c4f211

1 file changed

Lines changed: 30 additions & 15 deletions

File tree

react/src/components/SessionFormItems/ResourceAllocationFormItems.tsx

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ import {
2525
import InputNumberWithSlider from '../InputNumberWithSlider';
2626
import ResourcePresetSelect from '../ResourcePresetSelect';
2727
import SharedMemoryFormItems from './SharedMemoryFormItems';
28-
import { CaretDownOutlined, ReloadOutlined } from '@ant-design/icons';
29-
import { Button, Card, Col, Divider, Form, Radio, Row, theme } from 'antd';
28+
import {
29+
CaretDownOutlined,
30+
InfoCircleOutlined,
31+
ReloadOutlined,
32+
} from '@ant-design/icons';
33+
import { Button, Card, Col, Form, Radio, Row, Tooltip, theme } from 'antd';
3034
import {
3135
useResourceSlotsDetails,
3236
BAIFlex,
@@ -51,7 +55,7 @@ export const RESOURCE_ALLOCATION_INITIAL_FORM_VALUES: DeepPartial<ResourceAlloca
5155
accelerator: 0,
5256
},
5357
num_of_sessions: 1,
54-
cluster_mode: 'single-node',
58+
cluster_mode: 'multi-node',
5559
cluster_size: 1,
5660
enabledAutomaticShmem: true,
5761
agent: ['auto'],
@@ -1333,15 +1337,6 @@ const ResourceAllocationFormItems: React.FC<
13331337
)}
13341338
<Form.Item
13351339
label={t('session.launcher.ClusterMode')}
1336-
tooltip={
1337-
<BAIFlex direction="column" align="start">
1338-
{t('session.launcher.SingleNode')}
1339-
<Trans i18nKey={'session.launcher.DescSingleNode'} />
1340-
<Divider style={{ backgroundColor: token.colorBorder }} />
1341-
{t('session.launcher.MultiNode')}
1342-
<Trans i18nKey={'session.launcher.DescMultiNode'} />
1343-
</BAIFlex>
1344-
}
13451340
required
13461341
dependencies={['agent']}
13471342
>
@@ -1367,11 +1362,31 @@ const ResourceAllocationFormItems: React.FC<
13671362
])
13681363
}
13691364
>
1370-
<Radio.Button value="single-node">
1371-
{t('session.launcher.SingleNode')}
1372-
</Radio.Button>
13731365
<Radio.Button value="multi-node">
13741366
{t('session.launcher.MultiNode')}
1367+
<Tooltip
1368+
title={
1369+
<Trans i18nKey={'session.launcher.DescMultiNode'} />
1370+
}
1371+
>
1372+
<InfoCircleOutlined
1373+
style={{ marginLeft: token.marginXXS }}
1374+
/>
1375+
</Tooltip>
1376+
</Radio.Button>
1377+
<Radio.Button value="single-node">
1378+
{t('session.launcher.SingleNode')}
1379+
<Tooltip
1380+
title={
1381+
<Trans
1382+
i18nKey={'session.launcher.DescSingleNode'}
1383+
/>
1384+
}
1385+
>
1386+
<InfoCircleOutlined
1387+
style={{ marginLeft: token.marginXXS }}
1388+
/>
1389+
</Tooltip>
13751390
</Radio.Button>
13761391
</Radio.Group>
13771392
</Form.Item>

0 commit comments

Comments
 (0)