|
|
@@ -13,18 +13,39 @@ const TaskRelation = ({ tasks }: IWidget) => {
|
|
|
|
|
|
//节点样式
|
|
|
const color = [
|
|
|
- { status: "pending", fill: "white" },
|
|
|
- { status: "published", fill: "orange" },
|
|
|
- { status: "running", fill: "green" },
|
|
|
- { status: "done", fill: "blue" },
|
|
|
- { status: "restarted", fill: "red" },
|
|
|
- { status: "closed", fill: "yellow" },
|
|
|
- { status: "canceled", fill: "gray" },
|
|
|
- { status: "expired", fill: "brown" },
|
|
|
+ {
|
|
|
+ status: "pending",
|
|
|
+ fill: "#fafafa",
|
|
|
+ stroke: "#d9d9d9",
|
|
|
+ color: "#000000d9",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status: "published",
|
|
|
+ fill: "#fff7e6",
|
|
|
+ stroke: "#ffd591",
|
|
|
+ color: "#d46b08",
|
|
|
+ },
|
|
|
+ { status: "running", fill: "#e6f7ff", stroke: "#91d5ff", color: "#1890ff" },
|
|
|
+ { status: "done", fill: "#f6ffed", stroke: "#b7eb8f", color: "#52c41a" },
|
|
|
+ {
|
|
|
+ status: "restarted",
|
|
|
+ fill: "r#fff2f0",
|
|
|
+ stroke: "#ffccc7",
|
|
|
+ color: "#ff4d4f",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ status: "requested_restart",
|
|
|
+ fill: "#fffbe6",
|
|
|
+ stroke: "#ffe58f",
|
|
|
+ color: "#faad14",
|
|
|
+ },
|
|
|
+ { status: "closed", fill: "yellow", stroke: "#333", color: "#333" },
|
|
|
+ { status: "canceled", fill: "gray", stroke: "#333", color: "#333" },
|
|
|
+ { status: "expired", fill: "brown", stroke: "#333", color: "#333" },
|
|
|
];
|
|
|
|
|
|
color.forEach((value) => {
|
|
|
- mermaidText += `classDef ${value.status} fill:${value.fill},stroke:#333,stroke-width:2px;\n`;
|
|
|
+ mermaidText += `classDef ${value.status} fill:${value.fill},stroke:${value.stroke},color:${value.color},stroke-width:1px;\n`;
|
|
|
});
|
|
|
|
|
|
let relationLine = new Map<string, number>();
|