Skip to content

Commit 7c5b370

Browse files
committed
Fix color of status badge in replica sets
1 parent 40bd954 commit 7c5b370

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/resources/ReplicaSets/ReplicaSetDetails.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,19 @@ export function ReplicaSetsDetails(props) {
120120
value: resource => <div>{resource?.status?.replicas ?? 0}</div>,
121121
},
122122
];
123-
124123
const statusConditions = resource => {
125124
return resource?.status?.conditions?.map(condition => {
125+
const overridenStatus = () => {
126+
if (condition.type === 'ReplicaFailure')
127+
return condition.status === 'True' ? 'Negative' : 'Positive';
128+
return undefined;
129+
};
126130
return {
127-
header: { titleText: condition.type, status: condition.status },
131+
header: {
132+
titleText: condition.type,
133+
status: condition.status,
134+
overrideStatusType: overridenStatus(),
135+
},
128136
message: condition.message,
129137
};
130138
});

0 commit comments

Comments
 (0)