11import { 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"
33
44import { Status , StatusState } from "../models"
55
@@ -64,19 +64,27 @@ export default function StatusStateIcon(props: StatusStateIconProps): JSX.Elemen
6464function mapStateToIcon ( state : StatusState ) : JSX . Element {
6565 switch ( state ) {
6666 case StatusState . Null :
67- return < span > </ span >
67+ return < > </ >
6868 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+ )
7274 case StatusState . Success :
7375 return < CheckOutlined style = { { color : colorSuccess } } />
7476 case StatusState . Failure :
7577 return < CloseOutlined style = { { color : colorFailure } } />
78+ case StatusState . Cancelled :
79+ return < ExclamationCircleOutlined />
80+ case StatusState . Skipped :
81+ return < StopOutlined />
7682 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+ )
8088 }
8189}
8290
@@ -87,7 +95,8 @@ function mergeStatusStates(states: StatusState[]): StatusState {
8795
8896 // The state is failure if one of them is failure.
8997 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 ) {
91100 return StatusState . Failure
92101 }
93102 }
0 commit comments