This commit is contained in:
somunslotus 2024-09-18 14:35:54 +08:00
commit 25a5c457eb
6 changed files with 22 additions and 19 deletions

View File

@ -18,6 +18,14 @@ spec:
image: 172.20.32.187/ci4s/managent:20240401
ports:
- containerPort: 9213
volumeMounts:
- name: resource
mountPath: /home/resource/
volumes:
- name: resource
hostPath:
path: /home/resource/
type: DirectoryOrCreate
---
apiVersion: v1

View File

@ -9,7 +9,7 @@
flex-direction: column;
align-items: center;
justify-content: center;
background-color: rgba(255, 255, 255, 0.5);
background-color: rgba(255, 255, 255, 0.3);
&__label {
margin-top: 20px;

View File

@ -3,17 +3,12 @@ import { CategoryData, ResourceType, resourceConfig } from '../../config';
import CategoryItem from '../CategoryItem';
import styles from './index.less';
export type CategoryValue = {
dataType: number | undefined;
dataTag: number | undefined;
};
type CategoryProps = {
resourceType: ResourceType; // 资源类型,数据集还是模型
typeList: CategoryData[];
tagList: CategoryData[];
activeType?: number;
activeTag?: number;
activeType?: string;
activeTag?: string;
onTypeSelect: (value: CategoryData) => void;
onTagSelect: (value: CategoryData) => void;
onSearch: (value: string) => void;
@ -44,7 +39,7 @@ function CategoryList({
resourceType={resourceType}
item={item}
onClick={onTypeSelect}
isSelected={item.id === activeType}
isSelected={item.name === activeType}
></CategoryItem>
))}
</Flex>
@ -58,7 +53,7 @@ function CategoryList({
resourceType={resourceType}
item={item}
onClick={onTagSelect}
isSelected={item.id === activeTag}
isSelected={item.name === activeTag}
></CategoryItem>
))}
</Flex>

View File

@ -20,8 +20,8 @@ export type ResourceListRef = {
type ResourceListProps = {
resourceType: ResourceType;
dataType?: number;
dataTag?: number;
dataType?: string;
dataTag?: string;
isPublic: boolean;
typeList: CategoryData[];
tagList: CategoryData[];

View File

@ -29,9 +29,9 @@ type ResourceTypeInfo = {
deleteVersion: (params: any) => Promise<any>; // 删除版本
getInfo: (params: any) => Promise<any>; // 获取详情
name: string; // 名称
typeParamKey: string; // 类型参数名称,获取资源列表接口使用
tagParamKey: string; // 标签参数名称,获取资源列表接口使用
filePropKey: string;
typeParamKey: 'data_type' | 'model_type'; // 类型参数名称,获取资源列表接口使用
tagParamKey: 'data_tag' | 'model_tag'; // 标签参数名称,获取资源列表接口使用
filePropKey: 'dataset_version_vos' | 'model_version_vos'; // 文件列表属性
tabItems: TabsProps['items']; // tab 列表
typeTitle: string; // 类型标题
tagTitle: string; // 标签标题

View File

@ -34,7 +34,7 @@ function ExperimentComparison() {
// const [cacheState, setCacheState] = useCacheState();
// const [total, setTotal] = useState(0);
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
const [loading, setLoading] = useState(false);
// const [loading, setLoading] = useState(false);
const { message } = App.useApp();
const config = useMemo(() => comparisonConfig[comparisonType], [comparisonType]);
// const [pagination, setPagination] = useState<TablePaginationConfig>(
@ -50,11 +50,11 @@ function ExperimentComparison() {
// 获取对比数据列表
const getComparisonData = async () => {
setLoading(true);
// setLoading(true);
const request =
comparisonType === ComparisonType.Train ? getExpTrainInfosReq : getExpEvaluateInfosReq;
const [res] = await to(request(experimentId));
setLoading(false);
// setLoading(false);
if (res && res.data) {
// const { content = [], totalElements = 0 } = res.data;
setTableData(res.data);
@ -204,7 +204,7 @@ function ExperimentComparison() {
scroll={{ y: 'calc(100% - 55px)', x: '100%' }}
pagination={false}
bordered={true}
loading={loading}
// loading={loading}
// pagination={{
// ...pagination,
// total: total,