You've already forked DataMate
feature:增加数据配比功能 (#52)
* refactor: 修改调整数据归集实现,删除无用代码,优化代码结构 * feature: 每天凌晨00:00扫描所有数据集,检查数据集是否超过了预设的保留天数,超出保留天数的数据集调用删除接口进行删除 * fix: 修改删除数据集文件的逻辑,上传到数据集中的文件会同时删除数据库中的记录和文件系统中的文件,归集过来的文件仅删除数据库中的记录 * fix: 增加参数校验和接口定义,删除不使用的接口 * fix: 数据集统计数据默认为0 * feature: 数据集状态增加流转,创建时为草稿状态,上传文件或者归集文件后修改为活动状态 * refactor: 修改分页查询归集任务的代码 * fix: 更新后重新执行;归集任务执行增加事务控制 * feature: 创建归集任务时能够同步创建数据集,更新归集任务时能更新到指定数据集 * fix: 创建归集任务不需要创建数据集时不应该报错 * fix: 修复删除文件时数据集的统计数据不变动 * feature: 查询数据集详情时能够获取到文件标签分布 * fix: tags为空时不进行分析 * fix: 状态修改为ACTIVE * fix: 修改解析tag的方法 * feature: 实现创建、分页查询、删除配比任务 * feature: 实现创建、分页查询、删除配比任务的前端交互 * fix: 修复进度计算异常导致的页面报错
This commit is contained in:
82
frontend/src/pages/RatioTask/ratio.model.ts
Normal file
82
frontend/src/pages/RatioTask/ratio.model.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
// Ratio module models aligned with scripts/db/data-ratio-init.sql
|
||||
|
||||
// enums
|
||||
export type RatioMethod = "TAG" | "DATASET"
|
||||
export type RatioStatus = "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "PAUSED"
|
||||
|
||||
// t_st_ratio_instances
|
||||
export interface RatioInstance {
|
||||
id: string
|
||||
name: string
|
||||
description?: string
|
||||
targetDatasetId?: string
|
||||
ratioMethod?: RatioMethod
|
||||
ratioParameters?: any
|
||||
mergeMethod?: string
|
||||
status?: RatioStatus | string
|
||||
totals?: number
|
||||
createdAt?: string
|
||||
updatedAt?: string
|
||||
createdBy?: string
|
||||
updatedBy?: string
|
||||
}
|
||||
|
||||
// t_st_ratio_relations
|
||||
export interface RatioRelation {
|
||||
id: string
|
||||
ratioInstanceId: string
|
||||
sourceDatasetId?: string
|
||||
ratioValue?: string
|
||||
counts?: number
|
||||
filterConditions?: string
|
||||
createdAt?: string
|
||||
updatedAt?: string
|
||||
createdBy?: string
|
||||
updatedBy?: string
|
||||
}
|
||||
|
||||
// API DTOs
|
||||
export interface RatioConfigItem {
|
||||
datasetId: string
|
||||
counts: string
|
||||
filter_conditions: string
|
||||
}
|
||||
|
||||
export interface CreateRatioTaskRequest {
|
||||
name: string
|
||||
description?: string
|
||||
totals: string
|
||||
ratio_method: RatioMethod
|
||||
config: RatioConfigItem[]
|
||||
}
|
||||
|
||||
export interface TargetDatasetInfo {
|
||||
id: string
|
||||
name: string
|
||||
datasetType: string
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface CreateRatioTaskResponse {
|
||||
id: string
|
||||
name: string
|
||||
description?: string
|
||||
totals: number
|
||||
ratio_method: RatioMethod
|
||||
status: string
|
||||
config: RatioConfigItem[]
|
||||
targetDataset: TargetDatasetInfo
|
||||
}
|
||||
|
||||
export interface RatioTaskItem {
|
||||
id: string
|
||||
name: string
|
||||
description?: string
|
||||
status?: string
|
||||
totals?: number
|
||||
ratio_method?: RatioMethod
|
||||
target_dataset_id?: string
|
||||
target_dataset_name?: string
|
||||
created_at?: string
|
||||
updated_at?: string
|
||||
}
|
||||
Reference in New Issue
Block a user