Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/locales/en-US/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions src/locales/ja-JP/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/locales/ru-RU/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export default {
'common.appearance.theme': 'Тема',
'common.page.wentwrong': 'Что-то пошло не так.',
'common.page.refresh.tips':
'Упс! Что-то пошло не так. Попробуйте обновить страницу.',
'Страница может нуждаться в обновлении. Попробуйте обновить её!',
'common.tips.escape.disable':
'Чтобы закрыть, нажмите "Отмена" или крестик (X) в правом верхнем углу.',
'common.button.clearSelection': 'Сбросить выбор',
Expand Down
16 changes: 8 additions & 8 deletions src/locales/zh-CN/clusters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': '选择集群',
Expand All @@ -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': '额外卷挂载',
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh-CN/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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} 项',
Expand Down
3 changes: 2 additions & 1 deletion src/pages/api-keys/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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'
})}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/backends/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/cluster-management/clusters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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'
})}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/cluster-management/credentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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'
})}
Expand Down
8 changes: 2 additions & 6 deletions src/pages/cluster-management/hooks/use-credential-columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -76,7 +72,7 @@ const useCredentialColumns = (
)
}
];
}, [intl, handleSelect, sortOrder]);
}, [intl, handleSelect]);
};

export default useCredentialColumns;
1 change: 1 addition & 0 deletions src/pages/cluster-management/step-forms/advance-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const ClusterAdvanceConfig: React.FC<{
return editorRef.current?.getValue();
},
setYamlValue: (values: any) => {
console.log('setYamlValue:', values);
editorRef.current?.setValue(values || yamlTemplate);
}
}));
Expand Down
2 changes: 1 addition & 1 deletion src/pages/llmodels/catalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/llmodels/hooks/use-no-resource-result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions src/pages/playground/components/ground-images.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/pages/playground/hooks/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ export const imgInitialValues = {
size: '512x512',
response_format: 'b64_json',
width: 512,
height: 512
height: 512,
random_seed: true
};
3 changes: 2 additions & 1 deletion src/pages/resources/components/gpus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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' })}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/resources/components/model-files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' })}
Expand Down
5 changes: 1 addition & 4 deletions src/pages/users/hooks/use-users-columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
Expand Down
3 changes: 2 additions & 1 deletion src/pages/users/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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'
})}
Expand Down
Loading