1
1
import { Popover , Avatar , Typography , Row , Col , Divider , Space } from "antd"
2
- import { CheckOutlined , CloseOutlined } from "@ant-design/icons"
2
+ import { CheckOutlined , CloseOutlined , StopOutlined , ExclamationCircleOutlined } from "@ant-design/icons"
3
3
4
4
import { Status , StatusState } from "../models"
5
5
@@ -64,19 +64,27 @@ export default function StatusStateIcon(props: StatusStateIconProps): JSX.Elemen
64
64
function mapStateToIcon ( state : StatusState ) : JSX . Element {
65
65
switch ( state ) {
66
66
case StatusState . Null :
67
- return < span > </ span >
67
+ return < > </ >
68
68
case StatusState . Pending :
69
- return < span >
70
- < span className = "gitploy-pending-icon" />
71
- </ span >
69
+ return (
70
+ < span >
71
+ < span className = "gitploy-pending-icon" />
72
+ </ span >
73
+ )
72
74
case StatusState . Success :
73
75
return < CheckOutlined style = { { color : colorSuccess } } />
74
76
case StatusState . Failure :
75
77
return < CloseOutlined style = { { color : colorFailure } } />
78
+ case StatusState . Cancelled :
79
+ return < ExclamationCircleOutlined />
80
+ case StatusState . Skipped :
81
+ return < StopOutlined />
76
82
default :
77
- return < span >
78
- < span className = "gitploy-pending-icon" />
79
- </ span >
83
+ return (
84
+ < span >
85
+ < span className = "gitploy-pending-icon" />
86
+ </ span >
87
+ )
80
88
}
81
89
}
82
90
@@ -87,7 +95,8 @@ function mergeStatusStates(states: StatusState[]): StatusState {
87
95
88
96
// The state is failure if one of them is failure.
89
97
for ( let idx = 0 ; idx < states . length ; idx ++ ) {
90
- if ( states [ idx ] === StatusState . Failure ) {
98
+ if ( states [ idx ] === StatusState . Failure
99
+ || states [ idx ] === StatusState . Cancelled ) {
91
100
return StatusState . Failure
92
101
}
93
102
}
0 commit comments