You've already forked DataMate
feat:修复下载数据集问题、删除数据确认框、修改标题、添加列表轮询刷新 (#16)
* refactor: clean up tag management and dataset handling, update API endpoints * feat: add showTime prop to DevelopmentInProgress component across multiple pages * refactor: update component styles and improve layout with new utility classes * feat: enhance useFetchData hook with polling functionality and improve task progress tracking * feat: enhance dataset management features with improved tag handling, download functionality, and UI updates * feat: Enhance DatasetDetail component with delete functionality and improved download handling feat: Add automatic data refresh and improved user feedback in DatasetManagementPage fix: Update dataset API to streamline download functionality and improve error handling * feat: Clear new tag input after successful addition in TagManager
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
import {
|
||||
DatabaseOutlined,
|
||||
BarChartOutlined,
|
||||
FileTextOutlined,
|
||||
ThunderboltOutlined,
|
||||
PictureOutlined,
|
||||
CalculatorOutlined,
|
||||
SwapOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { FileImage, FileText, Music, Repeat, Video } from "lucide-react";
|
||||
|
||||
// 模板类型选项
|
||||
export const templateTypes = [
|
||||
{
|
||||
value: "text",
|
||||
label: "文本",
|
||||
icon: FileText,
|
||||
description: "处理文本数据的清洗模板",
|
||||
},
|
||||
{
|
||||
value: "image",
|
||||
label: "图片",
|
||||
icon: FileImage,
|
||||
description: "处理图像数据的清洗模板",
|
||||
},
|
||||
{
|
||||
value: "video",
|
||||
label: "视频",
|
||||
icon: Video,
|
||||
description: "处理视频数据的清洗模板",
|
||||
},
|
||||
{
|
||||
value: "audio",
|
||||
label: "音频",
|
||||
icon: Music,
|
||||
description: "处理音频数据的清洗模板",
|
||||
},
|
||||
{
|
||||
value: "image-to-text",
|
||||
label: "图片转文本",
|
||||
icon: Repeat,
|
||||
description: "图像识别转文本的处理模板",
|
||||
},
|
||||
];
|
||||
|
||||
// 算子分类
|
||||
export const OPERATOR_CATEGORIES = {
|
||||
data: { name: "数据清洗", icon: <DatabaseOutlined />, color: "#1677ff" },
|
||||
ml: { name: "机器学习", icon: <ThunderboltOutlined />, color: "#722ed1" },
|
||||
vision: { name: "计算机视觉", icon: <PictureOutlined />, color: "#52c41a" },
|
||||
nlp: { name: "自然语言处理", icon: <FileTextOutlined />, color: "#faad14" },
|
||||
analysis: { name: "数据分析", icon: <BarChartOutlined />, color: "#f5222d" },
|
||||
transform: { name: "数据转换", icon: <SwapOutlined />, color: "#13c2c2" },
|
||||
io: { name: "输入输出", icon: <FileTextOutlined />, color: "#595959" },
|
||||
math: { name: "数学计算", icon: <CalculatorOutlined />, color: "#fadb14" },
|
||||
};
|
||||
@@ -93,9 +93,13 @@ function cleaningTaskItem() {
|
||||
srcDatasetName: Mock.Random.ctitle(5, 15),
|
||||
destDatasetId: Mock.Random.guid().replace(/[^a-zA-Z0-9]/g, ""),
|
||||
destDatasetName: Mock.Random.ctitle(5, 15),
|
||||
progress: Mock.Random.float(0, 100, 2, 2),
|
||||
progress: {
|
||||
finishedFileNum: Mock.Random.integer(0, 100),
|
||||
process: Mock.Random.integer(0, 100),
|
||||
totalFileNum: 100,
|
||||
},
|
||||
startedAt: Mock.Random.datetime("yyyy-MM-dd HH:mm:ss"),
|
||||
endedAt: Mock.Random.datetime("yyyy-MM-dd HH:mm:ss"),
|
||||
finishedAt: Mock.Random.datetime("yyyy-MM-dd HH:mm:ss"),
|
||||
createdAt: Mock.Random.datetime("yyyy-MM-dd HH:mm:ss"),
|
||||
updatedAt: Mock.Random.datetime("yyyy-MM-dd HH:mm:ss"),
|
||||
instance: operatorList,
|
||||
@@ -244,7 +248,7 @@ module.exports = function (router) {
|
||||
const task = cleaningTaskList.find((j) => j.id === taskId);
|
||||
|
||||
if (task) {
|
||||
task.status = "running";
|
||||
task.status = "RUNNING";
|
||||
task.startTime = new Date().toISOString();
|
||||
|
||||
res.send({
|
||||
@@ -252,7 +256,7 @@ module.exports = function (router) {
|
||||
msg: "Cleaning task execution started",
|
||||
data: {
|
||||
executionId: Mock.Random.guid().replace(/[^a-zA-Z0-9]/g, ""),
|
||||
status: "running",
|
||||
status: "RUNNING",
|
||||
message: "Task execution started successfully",
|
||||
},
|
||||
});
|
||||
@@ -271,7 +275,7 @@ module.exports = function (router) {
|
||||
const task = cleaningTaskList.find((j) => j.id === taskId);
|
||||
|
||||
if (task) {
|
||||
task.status = "pending";
|
||||
task.status = "PENDING";
|
||||
task.endTime = new Date().toISOString();
|
||||
|
||||
res.send({
|
||||
|
||||
Reference in New Issue
Block a user