fix: logs are not fully loaded
This commit is contained in:
@@ -152,37 +152,37 @@ export const frameworks = [
|
||||
label: 'CANN',
|
||||
value: GPUDriverMap.ASCEND,
|
||||
tips: ManufacturerMap[GPUDriverMap.ASCEND],
|
||||
locale: true
|
||||
tipLocale: true
|
||||
},
|
||||
{
|
||||
label: 'DTK',
|
||||
value: GPUDriverMap.HYGON,
|
||||
tips: ManufacturerMap[GPUDriverMap.HYGON],
|
||||
locale: true
|
||||
tipLocale: true
|
||||
},
|
||||
{
|
||||
label: 'MACA',
|
||||
value: GPUDriverMap.METAX,
|
||||
tips: ManufacturerMap[GPUDriverMap.METAX],
|
||||
locale: true
|
||||
tipLocale: true
|
||||
},
|
||||
{
|
||||
label: 'CoreX',
|
||||
value: GPUDriverMap.ILUVATAR,
|
||||
tips: ManufacturerMap[GPUDriverMap.ILUVATAR],
|
||||
locale: true
|
||||
tipLocale: true
|
||||
},
|
||||
{
|
||||
label: 'MUSA',
|
||||
value: GPUDriverMap.MOORE_THREADS,
|
||||
tips: ManufacturerMap[GPUDriverMap.MOORE_THREADS],
|
||||
locale: true
|
||||
tipLocale: true
|
||||
},
|
||||
{
|
||||
label: 'Neuware',
|
||||
value: GPUDriverMap.CAMBRICON,
|
||||
tips: ManufacturerMap[GPUDriverMap.CAMBRICON],
|
||||
locale: true
|
||||
tipLocale: true
|
||||
},
|
||||
{
|
||||
label: 'CPU',
|
||||
|
||||
@@ -163,7 +163,7 @@ const VersionsForm: React.FC<AddModalProps> = ({
|
||||
<span>
|
||||
{option.label}
|
||||
{data.tips ? (
|
||||
data.locale ? (
|
||||
data.tipLocale ? (
|
||||
<span className="text-tertiary m-l-4">{` [${intl.formatMessage({ id: data.tips })}]`}</span>
|
||||
) : (
|
||||
<span className="text-tertiary m-l-4">{` [${data.tips}]`}</span>
|
||||
|
||||
@@ -8,12 +8,24 @@ import { ExportOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Form, Typography } from 'antd';
|
||||
import React, { useEffect } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { ProviderType, ProviderValueMap } from '../config';
|
||||
import {
|
||||
CredentialFormData as FormData,
|
||||
CredentialListItem as ListItem
|
||||
} from '../config/types';
|
||||
|
||||
const ExtraContent = styled.div`
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
bottom: 6px;
|
||||
right: 32px;
|
||||
z-index: 1;
|
||||
background: var(--ant-color-bg-container);
|
||||
padding-inline: 8px;
|
||||
`;
|
||||
type AddModalProps = {
|
||||
title: string;
|
||||
action: PageActionType;
|
||||
@@ -105,18 +117,17 @@ const AddModal: React.FC<AddModalProps> = ({
|
||||
id: 'clusters.credential.token'
|
||||
})}
|
||||
required={action === PageAction.CREATE}
|
||||
labelExtra={
|
||||
<Typography.Link
|
||||
href="https://cloud.digitalocean.com/account/api/tokens"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
style={{ marginLeft: 8, lineHeight: 1 }}
|
||||
>
|
||||
{intl.formatMessage({ id: 'clusters.button.genToken' })}{' '}
|
||||
<ExportOutlined style={{ fontSize: 12 }} />
|
||||
</Typography.Link>
|
||||
}
|
||||
></SealInput.Password>
|
||||
<ExtraContent>
|
||||
<Typography.Link
|
||||
href="https://cloud.digitalocean.com/account/api/tokens"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{intl.formatMessage({ id: 'clusters.button.genToken' })}{' '}
|
||||
<ExportOutlined style={{ transform: 'scale(0.8)' }} />
|
||||
</Typography.Link>
|
||||
</ExtraContent>
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import SealSelect from '@/components/seal-form/seal-select';
|
||||
import TooltipList from '@/components/tooltip-list';
|
||||
import useAppUtils from '@/hooks/use-app-utils';
|
||||
import { CaretDownOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { CaretDownOutlined, InfoCircleOutlined } from '@ant-design/icons';
|
||||
import { useIntl, useNavigate } from '@umijs/max';
|
||||
import { Form, Select } from 'antd';
|
||||
import React, { useMemo } from 'react';
|
||||
import styled from 'styled-components';
|
||||
@@ -24,6 +24,7 @@ const CaretDownWrapper = styled.span`
|
||||
|
||||
const BackendFields: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const navigate = useNavigate();
|
||||
const { getRuleMessage } = useAppUtils();
|
||||
const form = Form.useFormInstance();
|
||||
const { onValuesChange, backendOptions, onBackendChange } = useFormContext();
|
||||
@@ -193,6 +194,27 @@ const BackendFields: React.FC = () => {
|
||||
})}
|
||||
onChange={handleBackendVersionOnChange}
|
||||
label={intl.formatMessage({ id: 'models.form.backendVersion' })}
|
||||
footer={
|
||||
<dl className="flex" style={{ marginBottom: 0 }}>
|
||||
<dt>
|
||||
<InfoCircleOutlined />
|
||||
</dt>
|
||||
<dd style={{ marginLeft: 8, marginBottom: 0 }}>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: 'models.form.backendVersions.tips'
|
||||
},
|
||||
{
|
||||
link: (
|
||||
<a onClick={() => navigate('/resources/backends')}>
|
||||
{intl.formatMessage({ id: 'backends.title' })}
|
||||
</a>
|
||||
)
|
||||
}
|
||||
)}
|
||||
</dd>
|
||||
</dl>
|
||||
}
|
||||
>
|
||||
{renderVersionOptions(
|
||||
backendVersions.builtIn,
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
import { clusterSessionAtom } from '@/atoms/clusters';
|
||||
import SealInput from '@/components/seal-form/seal-input';
|
||||
import SealSelect from '@/components/seal-form/seal-select';
|
||||
import { modelNameReg, PageAction } from '@/config';
|
||||
import { modelNameReg } from '@/config';
|
||||
import { GPUSTACK_API_BASE_URL } from '@/config/settings';
|
||||
import useAppUtils from '@/hooks/use-app-utils';
|
||||
import {
|
||||
ClusterStatusLabelMap,
|
||||
ClusterStatusValueMap
|
||||
} from '@/pages/cluster-management/config';
|
||||
import { Link, useIntl } from '@umijs/max';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Form } from 'antd';
|
||||
import { useAtom } from 'jotai';
|
||||
import { useMemo } from 'react';
|
||||
import { sourceOptions } from '../config';
|
||||
import { FormData } from '../config/types';
|
||||
@@ -30,26 +28,6 @@ interface BasicFormProps {
|
||||
onSourceChange?: (value: string) => void;
|
||||
}
|
||||
|
||||
const NotFoundCredentialContent: React.FC = () => {
|
||||
const [, setFromClusterCreation] = useAtom(clusterSessionAtom);
|
||||
const intl = useIntl();
|
||||
const handleOnClick = () => {
|
||||
setFromClusterCreation({
|
||||
firstAddWorker: false,
|
||||
firstAddCluster: true
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Link
|
||||
to={`/cluster-management/clusters/create?action=${PageAction.CREATE}`}
|
||||
onClick={handleOnClick}
|
||||
>
|
||||
{intl.formatMessage({ id: 'noresult.resources.gotocluster' })}
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
const BasicForm: React.FC<BasicFormProps> = (props) => {
|
||||
const {
|
||||
fields = [],
|
||||
@@ -140,9 +118,6 @@ const BasicForm: React.FC<BasicFormProps> = (props) => {
|
||||
>
|
||||
{
|
||||
<SealSelect
|
||||
notFoundContent={
|
||||
<NotFoundCredentialContent></NotFoundCredentialContent>
|
||||
}
|
||||
onChange={handleClusterChange}
|
||||
label={intl.formatMessage({ id: 'clusters.title' })}
|
||||
options={clusterOptions}
|
||||
|
||||
Reference in New Issue
Block a user