Skip to content
Open
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
9 changes: 9 additions & 0 deletions react/src/components/FolderExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ export interface FolderExplorerElement extends HTMLDivElement {
handleUpload: (name: 'file' | 'folder') => void;
}

export interface FileItem {
name: string;
type: string;
size: number;
mode: string;
created: string;
modified: string;
}

interface FolderExplorerProps extends BAIModalProps {
vfolderID: string;
onRequestClose: () => void;
Expand Down
27 changes: 17 additions & 10 deletions react/src/components/ModelCardModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useBackendAIImageMetaData } from '../hooks';
import { useModelCardMetadata } from '../hooks/useModelCardMetadata';
import ModelCardChat from './ModelCardChat';
import ModelCloneModal from './ModelCloneModal';
// import ModelTryContentButton from './ModelTryContentButton';
import ModelTryContentButton from './ModelTryContentButton';
import ResourceNumber from './ResourceNumber';
import { BankOutlined, FileOutlined, CopyOutlined } from '@ant-design/icons';
import {
Expand All @@ -17,6 +17,7 @@ import {
Typography,
theme,
Skeleton,
Tooltip,
} from 'antd';
import { BAIFlex, BAIModal, BAIModalProps } from 'backend.ai-ui';
import dayjs from 'dayjs';
Expand Down Expand Up @@ -112,16 +113,22 @@ const ModelCardModal: React.FC<ModelCardModalProps> = ({
: '90%'
}
footer={[
// FIXME: ModelTryContentButton is not working properly
// It should be fixed in the future.
// This button is used to clone-and-create/create the model service with the content of the model card.
/*<ModelTryContentButton
vfolderNode={model_card?.vfolder_node || null}
modelStorageHost={model_card?.vfolder?.host as string}
modelCardMetadata={model || null}
modelName={model_card?.name as string}
key="try"
/>,*/
<Suspense
key="model-try-content-button"
fallback={
<Tooltip title={t('modelStore.CheckingSettings')}>
<Button loading disabled />
</Tooltip>
}
>
<ModelTryContentButton
vfolderNode={model_card?.vfolder_node || null}
modelStorageHost={model_card?.vfolder?.host ?? ''}
modelName={model_card?.name ?? ''}
key="try"
/>
</Suspense>,
<Button
key="clone"
type="primary"
Expand Down
Loading