@@ -28,6 +28,8 @@ import StartIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
28
28
import { CellProps } from './CellProps' ;
29
29
import { PlanStatusVmCount } from './PlanStatusVmCount' ;
30
30
31
+ import './PlanStatusCell.style.scss' ;
32
+
31
33
type VmPipelineTask = {
32
34
vmName : string ;
33
35
task : string ;
@@ -74,7 +76,7 @@ export const PlanStatusCell: React.FC<CellProps> = ({ data }) => {
74
76
if ( phase === PlanPhase . Ready ) {
75
77
return (
76
78
< Button
77
- variant = { ButtonVariant . primary }
79
+ variant = { ButtonVariant . secondary }
78
80
icon = { < StartIcon /> }
79
81
isDisabled = { ! isButtonEnabled }
80
82
onClick = { ( ) =>
@@ -103,45 +105,62 @@ export const PlanStatusCell: React.FC<CellProps> = ({ data }) => {
103
105
104
106
return (
105
107
< Flex alignItems = { { default : 'alignItemsCenter' } } spaceItems = { { default : 'spaceItemsSm' } } >
106
- { isPlanLoading ? (
107
- < Spinner size = "md" />
108
- ) : phase === PlanPhase . NotReady ? (
109
- t ( 'Validating...' )
110
- ) : (
111
- < Label isCompact > { phase } </ Label >
112
- ) }
113
-
114
- { progressValue !== 0 && isPlanLoading && (
115
- < FlexItem className = "pf-v5-u-font-size-sm" > { Math . trunc ( progressValue ) } %</ FlexItem >
116
- ) }
117
-
118
- < Split hasGutter >
119
- { vmCount . success > 0 && (
120
- < SplitItem >
121
- < PlanStatusVmCount
122
- count = { vmCount . success }
123
- status = "success"
124
- linkPath = { vmCountLinkPath }
125
- />
126
- </ SplitItem >
127
- ) }
128
-
129
- { vmCount . canceled > 0 && (
130
- < SplitItem >
131
- < PlanStatusVmCount
132
- count = { vmCount . canceled }
133
- status = "warning"
134
- linkPath = { vmCountLinkPath }
135
- />
136
- </ SplitItem >
137
- ) }
138
-
139
- { vmCount . error > 0 && (
140
- < SplitItem >
141
- < PlanStatusVmCount count = { vmCount . error } status = "danger" linkPath = { vmCountLinkPath } />
142
- </ SplitItem >
108
+ < Flex
109
+ alignItems = { { default : 'alignItemsCenter' } }
110
+ spaceItems = { { default : 'spaceItemsSm' } }
111
+ className = "plan-status-cell-label-section"
112
+ >
113
+ < FlexItem >
114
+ { isPlanLoading ? (
115
+ < Spinner size = "md" />
116
+ ) : phase === PlanPhase . NotReady ? (
117
+ t ( 'Validating...' )
118
+ ) : (
119
+ < Label isCompact > { phase } </ Label >
120
+ ) }
121
+ </ FlexItem >
122
+
123
+ { progressValue !== 0 && isPlanLoading && (
124
+ < FlexItem className = "pf-v5-u-font-size-sm" > { Math . trunc ( progressValue ) } %</ FlexItem >
143
125
) }
144
- </ Split >
126
+ </ Flex >
127
+
128
+ < FlexItem >
129
+ < Split hasGutter >
130
+ { vmCount . success > 0 && (
131
+ < SplitItem >
132
+ < PlanStatusVmCount
133
+ count = { vmCount . success }
134
+ status = "success"
135
+ linkPath = { vmCountLinkPath }
136
+ tooltipLabel = { t ( 'Succeeded' ) }
137
+ />
138
+ </ SplitItem >
139
+ ) }
140
+
141
+ { vmCount . canceled > 0 && (
142
+ < SplitItem >
143
+ < PlanStatusVmCount
144
+ count = { vmCount . canceled }
145
+ status = "canceled"
146
+ linkPath = { vmCountLinkPath }
147
+ tooltipLabel = { t ( 'Canceled' ) }
148
+ />
149
+ </ SplitItem >
150
+ ) }
151
+
152
+ { vmCount . error > 0 && (
153
+ < SplitItem >
154
+ < PlanStatusVmCount
155
+ count = { vmCount . error }
156
+ status = "danger"
157
+ linkPath = { vmCountLinkPath }
158
+ tooltipLabel = { t ( 'Failed' ) }
159
+ />
160
+ </ SplitItem >
161
+ ) }
162
+ </ Split >
163
+ </ FlexItem >
145
164
</ Flex >
146
165
) ;
147
166
} ;
0 commit comments