Skip to content

Commit cc08de3

Browse files
committed
perf: pretty graph
1 parent 9251ba0 commit cc08de3

File tree

3 files changed

+42
-5
lines changed

3 files changed

+42
-5
lines changed

ui/src/components/topologyMap/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ const TopologyMap = forwardRef((props: IProps, drawRef) => {
460460
statusShape.animate({
461461
x: 190,
462462
y: 10,
463-
r: 3,
463+
r: 4,
464464
opacity: 0.3,
465465
}, {
466466
duration: 1000,

ui/src/pages/projects/components/runs/previewDetail/index.tsx

+10-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useEffect, useRef, useState } from 'react'
22
import { Badge, Drawer, Segmented, Select, Tag } from 'antd'
33
import { default as AnsiUp } from 'ansi_up';
44
import CodeDiffView from '@/components/codeDiffView'
5+
import styles from "./styles.module.less"
56

67
const PreviewDetail = ({ open, currentRecord, handleClose }) => {
78
// eslint-disable-next-line react-hooks/exhaustive-deps
@@ -44,7 +45,7 @@ const PreviewDetail = ({ open, currentRecord, handleClose }) => {
4445
{
4546
activeKey === 'Exec Result' && (
4647
<>
47-
<div>
48+
<div className={styles.prrviewContainer}>
4849
<Select value={selectedResource} style={{ width: 500, marginBottom: 10 }} onChange={handleChangeResources}>
4950
{
5051
stepKeys?.map(item => {
@@ -63,9 +64,14 @@ const PreviewDetail = ({ open, currentRecord, handleClose }) => {
6364
})
6465
}
6566
</Select>
66-
<Badge style={{ marginLeft: 10 }} status={
67-
changeSteps?.[selectedResource]?.action === 'Undefined' ? 'error' : changeSteps?.[selectedResource]?.action === 'UnChanged' ? "default" : 'warning'
68-
} text={changeSteps?.[selectedResource]?.action} />
67+
<div className={styles.status}>
68+
<div className={styles.pulse}>
69+
<Badge style={{ marginLeft: 10 }} status={
70+
changeSteps?.[selectedResource]?.action === 'Undefined' ? 'error' : changeSteps?.[selectedResource]?.action === 'UnChanged' ? "default" : 'warning'
71+
} />
72+
</div>
73+
{changeSteps?.[selectedResource]?.action}
74+
</div>
6975
</div>
7076
<CodeDiffView oldContent={changeSteps?.[selectedResource]?.from ? JSON.stringify(changeSteps?.[selectedResource]?.from, null, 2) : ''} newContent={changeSteps?.[selectedResource]?.to ? JSON.stringify(changeSteps?.[selectedResource]?.to, null, 2) : ''} />
7177
</>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.prrviewContainer {
2+
display: flex;
3+
align-items: center;
4+
5+
.status {
6+
height: 32px;
7+
display: flex;
8+
align-items: center;
9+
margin-bottom: 10px;
10+
11+
.pulse {
12+
margin-right: 7px;
13+
animation: fade-animation 1.5s infinite;
14+
}
15+
}
16+
}
17+
18+
19+
@keyframes fade-animation {
20+
0% {
21+
opacity: 0;
22+
}
23+
24+
50% {
25+
opacity: 1;
26+
}
27+
28+
100% {
29+
opacity: 0;
30+
}
31+
}

0 commit comments

Comments
 (0)