fix: ignore the sort_by when no data
This commit is contained in:
@@ -247,7 +247,7 @@ export default {
|
||||
'common.appearance.theme': 'Theme',
|
||||
'common.page.wentwrong': 'Something went wrong.',
|
||||
'common.page.refresh.tips':
|
||||
'Oops! Something went wrong. Try refreshing the page.',
|
||||
'The page may need to be updated. Try refreshing it!',
|
||||
'common.tips.escape.disable':
|
||||
'Click Cancel or the X at the top right to close.',
|
||||
'common.button.clearSelection': 'Clear Selection',
|
||||
|
||||
@@ -247,7 +247,7 @@ export default {
|
||||
'common.appearance.theme': 'Theme',
|
||||
'common.page.wentwrong': 'Something went wrong.',
|
||||
'common.page.refresh.tips':
|
||||
'Oops! Something went wrong. Try refreshing the page.',
|
||||
'The page may need to be updated. Try refreshing it!',
|
||||
'common.tips.escape.disable':
|
||||
'Click Cancel or the X at the top right to close.',
|
||||
'common.button.clearSelection': 'Clear Selection',
|
||||
@@ -280,7 +280,7 @@ export default {
|
||||
// 9. 'common.button.forgotpassword': 'Forgot Password?'
|
||||
// 10. 'common.appearance.theme': 'Theme',
|
||||
// 11. 'common.page.wentwrong': 'Something went wrong.',
|
||||
// 12. 'common.page.refresh.tips': 'Oops! Something went wrong. Try refreshing the page.'
|
||||
// 12. 'common.page.refresh.tips': 'The page may need to be updated. Try refreshing it!',
|
||||
// 13. 'common.tips.escape.disable': 'Click Cancel or the X at the top right to close.'
|
||||
// 14. 'common.button.clearSelection': 'Clear Selection',
|
||||
// 15. 'common.select.count': '{count} selected',
|
||||
|
||||
@@ -246,7 +246,7 @@ export default {
|
||||
'common.appearance.theme': 'Тема',
|
||||
'common.page.wentwrong': 'Что-то пошло не так.',
|
||||
'common.page.refresh.tips':
|
||||
'Упс! Что-то пошло не так. Попробуйте обновить страницу.',
|
||||
'Страница может нуждаться в обновлении. Попробуйте обновить её!',
|
||||
'common.tips.escape.disable':
|
||||
'Чтобы закрыть, нажмите "Отмена" или крестик (X) в правом верхнем углу.',
|
||||
'common.button.clearSelection': 'Сбросить выбор',
|
||||
|
||||
@@ -48,15 +48,15 @@ export default {
|
||||
'clusters.addworker.nvidiaNotes-01':
|
||||
'如果节点有多个出站 IP 地址,请填写 <span class="bold-text">WORKER_IP</span>,以确保使用指定的 IP。可通过命令 <span class="bold-text">hostname -I | xargs -n1</span> 进行确认。',
|
||||
'clusters.addworker.nvidiaNotes-02':
|
||||
'如果 worker 上已经存在模型目录,你可以指定该路径进行挂载。',
|
||||
'如果节点上已经存在模型目录,你可以指定该路径进行挂载。',
|
||||
'clusters.addworker.hygonNotes':
|
||||
'如果 <span class="bold-text">/opt/hyhal</span> 目录不存在,请创建指向 Hygon 安装路径的符号链接:<span class="bold-text">/opt/hyhal</span>。与 <span class="bold-text">/opt/dtk</span> 目录相同。',
|
||||
'如果 <span class="bold-text">/opt/hyhal</span> 目录不存在,请创建指向海光安装路径的符号链接:<span class="bold-text">/opt/hyhal</span>。与 <span class="bold-text">/opt/dtk</span> 目录相同。',
|
||||
'clusters.addworker.corexNotes':
|
||||
'如果 <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> 目录相同。',
|
||||
'如果 <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> 目录相同。',
|
||||
'clusters.addworker.metaxNotes':
|
||||
'如果 <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> 目录相同。',
|
||||
'如果 <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> 目录相同。',
|
||||
'clusters.addworker.cambriconNotes':
|
||||
'如果 <span class="bold-text">/usr/local/neuware</span> 目录不存在,请创建指向 Cambricon 安装路径的符号链接:<span class="bold-text">ln -s /path/to/neuware /usr/local/neuware</span>。',
|
||||
'如果 <span class="bold-text">/usr/local/neuware</span> 目录不存在,请创建指向寒武纪安装路径的符号链接:<span class="bold-text">ln -s /path/to/neuware /usr/local/neuware</span>。',
|
||||
'clusters.addworker.hygonNotes-02':
|
||||
'如果未能检测到设备,请尝试移除 <span class="bold-text">--env ROCM_SMI_LIB_PATH=/opt/hyhal/lib</span>。',
|
||||
'clusters.addworker.selectCluster': '选择集群',
|
||||
@@ -67,11 +67,11 @@ export default {
|
||||
'clusters.addworker.specifyArgs': '指定参数',
|
||||
'clusters.addworker.runCommand': '运行指令',
|
||||
'clusters.addworker.specifyWorkerIP':
|
||||
'指定 Worker IP <span class="text-tertiary">{type}</span>',
|
||||
'指定节点 IP <span class="text-tertiary">{type}</span>',
|
||||
'clusters.addworker.detectWorkerIP':
|
||||
'自动检测 Worker IP <span class="text-tertiary">{type}</span>',
|
||||
'自动检测节点 IP <span class="text-tertiary">{type}</span>',
|
||||
'clusters.addworker.externalIP.tips':
|
||||
'当 worker 位于 VPC 或私有网络时,需要指定外部 IP。',
|
||||
'当节点位于 VPC 或私有网络时,需要指定外部 IP。',
|
||||
'clusters.addworker.enterWorkerIP': '输入节点 IP',
|
||||
'clusters.addworker.enterWorkerIP.error': '请输入节点 IP',
|
||||
'clusters.addworker.extraVolume': '额外卷挂载',
|
||||
|
||||
@@ -241,7 +241,7 @@ export default {
|
||||
'common.button.forgotpassword': '忘记密码?',
|
||||
'common.appearance.theme': '主题',
|
||||
'common.page.wentwrong': '哎呀,出了点问题',
|
||||
'common.page.refresh.tips': '出了点问题,试试刷新页面吧!',
|
||||
'common.page.refresh.tips': '页面似乎需要更新,刷新一下试试吧!',
|
||||
'common.tips.escape.disable': '请点击「取消」按钮或右上角 X 关闭窗口',
|
||||
'common.button.clearSelection': '清除选择',
|
||||
'common.select.count': '已选 {count} 项',
|
||||
|
||||
@@ -7,6 +7,7 @@ import useTableFetch from '@/hooks/use-table-fetch';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import useMemoizedFn from 'ahooks/lib/useMemoizedFn';
|
||||
import { ConfigProvider, Table } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import { useState } from 'react';
|
||||
import NoResult from '../_components/no-result';
|
||||
import PageBox from '../_components/page-box';
|
||||
@@ -109,7 +110,7 @@ const APIKeys: React.FC = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
image={<IconFont type="icon-key" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({
|
||||
id: 'noresult.keys.nofound'
|
||||
})}
|
||||
|
||||
@@ -214,7 +214,7 @@ const BackendList = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
image={<IconFont type="icon-models" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({
|
||||
id: 'noresult.backend.nofound'
|
||||
})}
|
||||
|
||||
@@ -15,6 +15,7 @@ import { useIntl, useNavigate } from '@umijs/max';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { message } from 'antd';
|
||||
import { useAtom } from 'jotai';
|
||||
import _ from 'lodash';
|
||||
import { useEffect, useState } from 'react';
|
||||
import NoResult from '../_components/no-result';
|
||||
import PageBox from '../_components/page-box';
|
||||
@@ -343,7 +344,7 @@ const Clusters: React.FC = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
image={<IconFont type="icon-cluster-outline" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({
|
||||
id: 'noresult.cluster.nofound'
|
||||
})}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { useIntl, useNavigate } from '@umijs/max';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { ConfigProvider, Table, message } from 'antd';
|
||||
import { useAtom } from 'jotai';
|
||||
import _ from 'lodash';
|
||||
import { useState } from 'react';
|
||||
import NoResult from '../_components/no-result';
|
||||
import PageBox from '../_components/page-box';
|
||||
@@ -159,7 +160,7 @@ const Credentials: React.FC = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={[]}
|
||||
image={<IconFont type="icon-credential-outline" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({
|
||||
id: 'noresult.credentials.nofound'
|
||||
})}
|
||||
|
||||
@@ -4,17 +4,13 @@ import DropdownButtons from '@/components/drop-down-buttons';
|
||||
import { tableSorter } from '@/config/settings';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { ColumnsType } from 'antd/es/table';
|
||||
import type { SortOrder } from 'antd/es/table/interface';
|
||||
import dayjs from 'dayjs';
|
||||
import { useMemo } from 'react';
|
||||
import { ProviderLabelMap, credentialActionList } from '../config';
|
||||
import { CredentialListItem as ListItem } from '../config/types';
|
||||
|
||||
const useCredentialColumns = (
|
||||
sortOrder: {
|
||||
order?: SortOrder;
|
||||
columnKey?: string;
|
||||
},
|
||||
sortOrder: string[],
|
||||
handleSelect: (val: string, record: ListItem) => void
|
||||
): ColumnsType<ListItem> => {
|
||||
const intl = useIntl();
|
||||
@@ -76,7 +72,7 @@ const useCredentialColumns = (
|
||||
)
|
||||
}
|
||||
];
|
||||
}, [intl, handleSelect, sortOrder]);
|
||||
}, [intl, handleSelect]);
|
||||
};
|
||||
|
||||
export default useCredentialColumns;
|
||||
|
||||
@@ -25,6 +25,7 @@ const ClusterAdvanceConfig: React.FC<{
|
||||
return editorRef.current?.getValue();
|
||||
},
|
||||
setYamlValue: (values: any) => {
|
||||
console.log('setYamlValue:', values);
|
||||
editorRef.current?.setValue(values || yamlTemplate);
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -246,7 +246,7 @@ const Catalog: React.FC = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
image={<IconFont type="icon-layers" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({
|
||||
id: 'noresult.catalog.nofound'
|
||||
})}
|
||||
|
||||
@@ -5,6 +5,7 @@ import NoResult from '@/pages/_components/no-result';
|
||||
import { useIntl, useNavigate } from '@umijs/max';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { useAtom } from 'jotai';
|
||||
import _ from 'lodash';
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
/**Title: Generally, this is from the activation page.
|
||||
@@ -102,7 +103,7 @@ const useNoResourceResult = (props: {
|
||||
loadend={loadend}
|
||||
dataSource={dataSource}
|
||||
image={<IconFont type={iconType} />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={statusContent.noFoundText}
|
||||
title={title}
|
||||
subTitle={statusContent.subTitle}
|
||||
|
||||
@@ -153,6 +153,7 @@ const GroundImages: React.FC<MessageProps> = forwardRef((props, ref) => {
|
||||
await form.current?.form?.validateFields();
|
||||
if (!parameters.model) return;
|
||||
const params = generateParams();
|
||||
console.log('generateParams:', params);
|
||||
setParams({
|
||||
...parameters,
|
||||
seed: params.seed
|
||||
|
||||
@@ -72,5 +72,6 @@ export const imgInitialValues = {
|
||||
size: '512x512',
|
||||
response_format: 'b64_json',
|
||||
width: 512,
|
||||
height: 512
|
||||
height: 512,
|
||||
random_seed: true
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@ import PageBox from '@/pages/_components/page-box';
|
||||
import { queryClusterList } from '@/pages/cluster-management/apis';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { ConfigProvider, Table } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { GPU_DEVICES_API, queryGpuDevicesList } from '../apis';
|
||||
import { GPUDeviceItem } from '../config/types';
|
||||
@@ -62,7 +63,7 @@ const GPUList: React.FC = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
image={<IconFont type="icon-gpu1" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({ id: 'noresult.gpus.nofound' })}
|
||||
title={intl.formatMessage({ id: 'noresult.gpus.title' })}
|
||||
subTitle={intl.formatMessage({ id: 'noresult.gpus.subTitle' })}
|
||||
|
||||
@@ -216,7 +216,7 @@ const ModelFiles = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
image={<IconFont type="icon-files" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({ id: 'noresult.modelfiles.nofound' })}
|
||||
title={intl.formatMessage({ id: 'noresult.modelfiles.title' })}
|
||||
subTitle={intl.formatMessage({ id: 'noresult.modelfiles.subTitle' })}
|
||||
|
||||
@@ -14,10 +14,7 @@ import { ListItem } from '../config/types';
|
||||
|
||||
interface ColumnsHookProps {
|
||||
handleSelect: (val: string, record: ListItem) => void;
|
||||
sortOrder: {
|
||||
order?: 'ascend' | 'descend' | null;
|
||||
columnKey?: string;
|
||||
};
|
||||
sortOrder: string[];
|
||||
}
|
||||
|
||||
const actionList: Global.ActionItem[] = [
|
||||
|
||||
@@ -8,6 +8,7 @@ import useTableFetch from '@/hooks/use-table-fetch';
|
||||
import { useIntl, useModel } from '@umijs/max';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { ConfigProvider, message, Table } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import { useMemo, useState } from 'react';
|
||||
import NoResult from '../_components/no-result';
|
||||
import PageBox from '../_components/page-box';
|
||||
@@ -148,7 +149,7 @@ const Users: React.FC = () => {
|
||||
loadend={dataSource.loadend}
|
||||
dataSource={dataSource.dataList}
|
||||
image={<IconFont type="icon-users" />}
|
||||
filters={queryParams}
|
||||
filters={_.omit(queryParams, ['sort_by'])}
|
||||
noFoundText={intl.formatMessage({
|
||||
id: 'noresult.users.nofound'
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user