Skip to content

Commit e3b3f51

Browse files
committed
fix: ignore the sort_by when no data
1 parent 45efda7 commit e3b3f51

File tree

19 files changed

+35
-33
lines changed

19 files changed

+35
-33
lines changed

src/locales/en-US/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export default {
247247
'common.appearance.theme': 'Theme',
248248
'common.page.wentwrong': 'Something went wrong.',
249249
'common.page.refresh.tips':
250-
'Oops! Something went wrong. Try refreshing the page.',
250+
'The page may need to be updated. Try refreshing it!',
251251
'common.tips.escape.disable':
252252
'Click Cancel or the X at the top right to close.',
253253
'common.button.clearSelection': 'Clear Selection',

src/locales/ja-JP/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export default {
247247
'common.appearance.theme': 'Theme',
248248
'common.page.wentwrong': 'Something went wrong.',
249249
'common.page.refresh.tips':
250-
'Oops! Something went wrong. Try refreshing the page.',
250+
'The page may need to be updated. Try refreshing it!',
251251
'common.tips.escape.disable':
252252
'Click Cancel or the X at the top right to close.',
253253
'common.button.clearSelection': 'Clear Selection',
@@ -280,7 +280,7 @@ export default {
280280
// 9. 'common.button.forgotpassword': 'Forgot Password?'
281281
// 10. 'common.appearance.theme': 'Theme',
282282
// 11. 'common.page.wentwrong': 'Something went wrong.',
283-
// 12. 'common.page.refresh.tips': 'Oops! Something went wrong. Try refreshing the page.'
283+
// 12. 'common.page.refresh.tips': 'The page may need to be updated. Try refreshing it!',
284284
// 13. 'common.tips.escape.disable': 'Click Cancel or the X at the top right to close.'
285285
// 14. 'common.button.clearSelection': 'Clear Selection',
286286
// 15. 'common.select.count': '{count} selected',

src/locales/ru-RU/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export default {
246246
'common.appearance.theme': 'Тема',
247247
'common.page.wentwrong': 'Что-то пошло не так.',
248248
'common.page.refresh.tips':
249-
'Упс! Что-то пошло не так. Попробуйте обновить страницу.',
249+
'Страница может нуждаться в обновлении. Попробуйте обновить её!',
250250
'common.tips.escape.disable':
251251
'Чтобы закрыть, нажмите "Отмена" или крестик (X) в правом верхнем углу.',
252252
'common.button.clearSelection': 'Сбросить выбор',

src/locales/zh-CN/clusters.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ export default {
4848
'clusters.addworker.nvidiaNotes-01':
4949
'如果节点有多个出站 IP 地址,请填写 <span class="bold-text">WORKER_IP</span>,以确保使用指定的 IP。可通过命令 <span class="bold-text">hostname -I | xargs -n1</span> 进行确认。',
5050
'clusters.addworker.nvidiaNotes-02':
51-
'如果 worker 上已经存在模型目录,你可以指定该路径进行挂载。',
51+
'如果节点上已经存在模型目录,你可以指定该路径进行挂载。',
5252
'clusters.addworker.hygonNotes':
53-
'如果 <span class="bold-text">/opt/hyhal</span> 目录不存在,请创建指向 Hygon 安装路径的符号链接:<span class="bold-text">/opt/hyhal</span>。与 <span class="bold-text">/opt/dtk</span> 目录相同。',
53+
'如果 <span class="bold-text">/opt/hyhal</span> 目录不存在,请创建指向海光安装路径的符号链接:<span class="bold-text">/opt/hyhal</span>。与 <span class="bold-text">/opt/dtk</span> 目录相同。',
5454
'clusters.addworker.corexNotes':
55-
'如果 <span class="bold-text">/lib/modules</span> 目录不存在,请创建指向 Iluvatar 安装路径的符号链接:<span class="bold-text">ln -s /path/to/corex /lib/modules</span>。与 <span class="bold-text">/usr/local/corex</span> 目录相同。',
55+
'如果 <span class="bold-text">/lib/modules</span> 目录不存在,请创建指向天数智芯安装路径的符号链接:<span class="bold-text">ln -s /path/to/corex /lib/modules</span>。与 <span class="bold-text">/usr/local/corex</span> 目录相同。',
5656
'clusters.addworker.metaxNotes':
57-
'如果 <span class="bold-text">/opt/mxdriver</span> 目录不存在,请创建指向 MetaX 安装路径的符号链接:<span class="bold-text">ln -s /path/to/metax /opt/mxdriver</span>。与 <span class="bold-text">/opt/maca</span> 目录相同。',
57+
'如果 <span class="bold-text">/opt/mxdriver</span> 目录不存在,请创建指向沐曦安装路径的符号链接:<span class="bold-text">ln -s /path/to/metax /opt/mxdriver</span>。与 <span class="bold-text">/opt/maca</span> 目录相同。',
5858
'clusters.addworker.cambriconNotes':
59-
'如果 <span class="bold-text">/usr/local/neuware</span> 目录不存在,请创建指向 Cambricon 安装路径的符号链接:<span class="bold-text">ln -s /path/to/neuware /usr/local/neuware</span>。',
59+
'如果 <span class="bold-text">/usr/local/neuware</span> 目录不存在,请创建指向寒武纪安装路径的符号链接:<span class="bold-text">ln -s /path/to/neuware /usr/local/neuware</span>。',
6060
'clusters.addworker.hygonNotes-02':
6161
'如果未能检测到设备,请尝试移除 <span class="bold-text">--env ROCM_SMI_LIB_PATH=/opt/hyhal/lib</span>。',
6262
'clusters.addworker.selectCluster': '选择集群',
@@ -67,11 +67,11 @@ export default {
6767
'clusters.addworker.specifyArgs': '指定参数',
6868
'clusters.addworker.runCommand': '运行指令',
6969
'clusters.addworker.specifyWorkerIP':
70-
'指定 Worker IP <span class="text-tertiary">{type}</span>',
70+
'指定节点 IP <span class="text-tertiary">{type}</span>',
7171
'clusters.addworker.detectWorkerIP':
72-
'自动检测 Worker IP <span class="text-tertiary">{type}</span>',
72+
'自动检测节点 IP <span class="text-tertiary">{type}</span>',
7373
'clusters.addworker.externalIP.tips':
74-
'当 worker 位于 VPC 或私有网络时,需要指定外部 IP。',
74+
'当节点位于 VPC 或私有网络时,需要指定外部 IP。',
7575
'clusters.addworker.enterWorkerIP': '输入节点 IP',
7676
'clusters.addworker.enterWorkerIP.error': '请输入节点 IP',
7777
'clusters.addworker.extraVolume': '额外卷挂载',

src/locales/zh-CN/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export default {
241241
'common.button.forgotpassword': '忘记密码?',
242242
'common.appearance.theme': '主题',
243243
'common.page.wentwrong': '哎呀,出了点问题',
244-
'common.page.refresh.tips': '出了点问题,试试刷新页面吧!',
244+
'common.page.refresh.tips': '页面似乎需要更新,刷新一下试试吧!',
245245
'common.tips.escape.disable': '请点击「取消」按钮或右上角 X 关闭窗口',
246246
'common.button.clearSelection': '清除选择',
247247
'common.select.count': '已选 {count} 项',

src/pages/api-keys/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import useTableFetch from '@/hooks/use-table-fetch';
77
import { useIntl } from '@umijs/max';
88
import useMemoizedFn from 'ahooks/lib/useMemoizedFn';
99
import { ConfigProvider, Table } from 'antd';
10+
import _ from 'lodash';
1011
import { useState } from 'react';
1112
import NoResult from '../_components/no-result';
1213
import PageBox from '../_components/page-box';
@@ -109,7 +110,7 @@ const APIKeys: React.FC = () => {
109110
loadend={dataSource.loadend}
110111
dataSource={dataSource.dataList}
111112
image={<IconFont type="icon-key" />}
112-
filters={queryParams}
113+
filters={_.omit(queryParams, ['sort_by'])}
113114
noFoundText={intl.formatMessage({
114115
id: 'noresult.keys.nofound'
115116
})}

src/pages/backends/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const BackendList = () => {
214214
loadend={dataSource.loadend}
215215
dataSource={dataSource.dataList}
216216
image={<IconFont type="icon-models" />}
217-
filters={queryParams}
217+
filters={_.omit(queryParams, ['sort_by'])}
218218
noFoundText={intl.formatMessage({
219219
id: 'noresult.backend.nofound'
220220
})}

src/pages/cluster-management/clusters.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { useIntl, useNavigate } from '@umijs/max';
1515
import { useMemoizedFn } from 'ahooks';
1616
import { message } from 'antd';
1717
import { useAtom } from 'jotai';
18+
import _ from 'lodash';
1819
import { useEffect, useState } from 'react';
1920
import NoResult from '../_components/no-result';
2021
import PageBox from '../_components/page-box';
@@ -343,7 +344,7 @@ const Clusters: React.FC = () => {
343344
loadend={dataSource.loadend}
344345
dataSource={dataSource.dataList}
345346
image={<IconFont type="icon-cluster-outline" />}
346-
filters={queryParams}
347+
filters={_.omit(queryParams, ['sort_by'])}
347348
noFoundText={intl.formatMessage({
348349
id: 'noresult.cluster.nofound'
349350
})}

src/pages/cluster-management/credentials.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useIntl, useNavigate } from '@umijs/max';
99
import { useMemoizedFn } from 'ahooks';
1010
import { ConfigProvider, Table, message } from 'antd';
1111
import { useAtom } from 'jotai';
12+
import _ from 'lodash';
1213
import { useState } from 'react';
1314
import NoResult from '../_components/no-result';
1415
import PageBox from '../_components/page-box';
@@ -159,7 +160,7 @@ const Credentials: React.FC = () => {
159160
loadend={dataSource.loadend}
160161
dataSource={[]}
161162
image={<IconFont type="icon-credential-outline" />}
162-
filters={queryParams}
163+
filters={_.omit(queryParams, ['sort_by'])}
163164
noFoundText={intl.formatMessage({
164165
id: 'noresult.credentials.nofound'
165166
})}

src/pages/cluster-management/hooks/use-credential-columns.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ import DropdownButtons from '@/components/drop-down-buttons';
44
import { tableSorter } from '@/config/settings';
55
import { useIntl } from '@umijs/max';
66
import { ColumnsType } from 'antd/es/table';
7-
import type { SortOrder } from 'antd/es/table/interface';
87
import dayjs from 'dayjs';
98
import { useMemo } from 'react';
109
import { ProviderLabelMap, credentialActionList } from '../config';
1110
import { CredentialListItem as ListItem } from '../config/types';
1211

1312
const useCredentialColumns = (
14-
sortOrder: {
15-
order?: SortOrder;
16-
columnKey?: string;
17-
},
13+
sortOrder: string[],
1814
handleSelect: (val: string, record: ListItem) => void
1915
): ColumnsType<ListItem> => {
2016
const intl = useIntl();
@@ -76,7 +72,7 @@ const useCredentialColumns = (
7672
)
7773
}
7874
];
79-
}, [intl, handleSelect, sortOrder]);
75+
}, [intl, handleSelect]);
8076
};
8177

8278
export default useCredentialColumns;

0 commit comments

Comments
 (0)