fix: impoer external components
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { BulbOutlined } from '@ant-design/icons';
|
||||
import { AutoTooltip, FullMarkdown } from '@gpustack/core-ui';
|
||||
import { AutoTooltip } from '@gpustack/core-ui';
|
||||
import { FullMarkdown } from '@gpustack/core-ui/markdown';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, Tag } from 'antd';
|
||||
import _ from 'lodash';
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import { enabledBackendsAtom } from '@/atoms/backend';
|
||||
import useTableFetch from '@/hooks/use-table-fetch';
|
||||
import { SearchOutlined } from '@ant-design/icons';
|
||||
import { IconFont, ThemeTag } from '@gpustack/core-ui';
|
||||
import {
|
||||
IconFont,
|
||||
InfiniteScrollerProvider,
|
||||
NoResult,
|
||||
ThemeTag
|
||||
} from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Input, Tooltip } from 'antd';
|
||||
import { useAtom } from 'jotai';
|
||||
import _ from 'lodash';
|
||||
import React, { useEffect } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { ScrollerContext } from '../../_components/infinite-scroller/use-scroller-context';
|
||||
import NoResult from '../../_components/no-result';
|
||||
import { INFERENCE_BACKEND_API, queryBackendsList } from '../apis';
|
||||
import BackendCard from '../components/backend-card';
|
||||
import BackendCardList from '../components/backend-list';
|
||||
@@ -144,7 +147,7 @@ const CommunityBackends: React.FC<{
|
||||
onChange={handleNameChange}
|
||||
></Input>
|
||||
</FilterBox>
|
||||
<ScrollerContext.Provider
|
||||
<InfiniteScrollerProvider
|
||||
value={{
|
||||
total: dataSource.totalPage,
|
||||
current: queryParams.page!,
|
||||
@@ -170,7 +173,7 @@ const CommunityBackends: React.FC<{
|
||||
id: 'noresult.backend.nofound'
|
||||
})}
|
||||
></NoResult>
|
||||
</ScrollerContext.Provider>
|
||||
</InfiniteScrollerProvider>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { PageAction } from '@/config';
|
||||
import { PageActionType } from '@/config/types';
|
||||
import { YamlEditor } from '@gpustack/core-ui';
|
||||
import useUserSettings from '@/hooks/use-user-settings';
|
||||
import { YamlEditor } from '@gpustack/core-ui/yaml-editor';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import React, {
|
||||
forwardRef,
|
||||
@@ -27,6 +28,7 @@ interface ImportYAMLProps {
|
||||
const ImportYAML: React.FC<ImportYAMLProps> = forwardRef(
|
||||
({ actionStatus, content = '', height }, ref) => {
|
||||
const intl = useIntl();
|
||||
const { isDarkTheme } = useUserSettings();
|
||||
const editorRef = useRef<any>(null);
|
||||
const [fileContent, setFileContent] = useState<string>(
|
||||
actionStatus.action === PageAction.CREATE ? yamlTemplate : content
|
||||
@@ -116,6 +118,7 @@ const ImportYAML: React.FC<ImportYAMLProps> = forwardRef(
|
||||
setError('');
|
||||
setContent(content);
|
||||
}}
|
||||
isDarkTheme={isDarkTheme}
|
||||
schema={
|
||||
actionStatus.action === PageAction.CREATE
|
||||
? createSchema
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import { PageAction } from '@/config';
|
||||
import useTableFetch from '@/hooks/use-table-fetch';
|
||||
import { DeleteModal, FilterBar, IconFont } from '@gpustack/core-ui';
|
||||
import {
|
||||
DeleteModal,
|
||||
FilterBar,
|
||||
IconFont,
|
||||
InfiniteScrollerProvider,
|
||||
NoResult
|
||||
} from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import useMemoizedFn from 'ahooks/lib/useMemoizedFn';
|
||||
import _ from 'lodash';
|
||||
import { useState } from 'react';
|
||||
import { ScrollerContext } from '../_components/infinite-scroller/use-scroller-context';
|
||||
import NoResult from '../_components/no-result';
|
||||
import PageBox from '../_components/page-box';
|
||||
import {
|
||||
createBackend,
|
||||
@@ -249,7 +253,7 @@ const BackendList = () => {
|
||||
value: item.value
|
||||
}))}
|
||||
></FilterBar>
|
||||
<ScrollerContext.Provider
|
||||
<InfiniteScrollerProvider
|
||||
value={{
|
||||
total: dataSource.totalPage,
|
||||
current: queryParams.page!,
|
||||
@@ -279,7 +283,7 @@ const BackendList = () => {
|
||||
onClick={() => handleAddBackend({ key: 'community' })}
|
||||
buttonText={intl.formatMessage({ id: 'noresult.button.add' })}
|
||||
></NoResult>
|
||||
</ScrollerContext.Provider>
|
||||
</InfiniteScrollerProvider>
|
||||
<AddModal
|
||||
action={openBackendModalStatus.action}
|
||||
onClose={() => closeBackendModal('custom')}
|
||||
|
||||
Reference in New Issue
Block a user