Fix workload overview status sorting (#3486)

* Sort statuses allowing 'running' to be first

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix Chart legend badges

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Adding getStatus() tests for each store

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev authored and GitHub committed 2021-07-26 09:33:32 +03:00
1 parent fd5881fe33
commit 89662103a8
17 files changed
+1322 -14

No files matched your search

+3 -3
View File
@@ -171,8 +171,8 @@ export class Chart extends React.Component<ChartProps> {
key={title}
className="LegendBadge flex gaps align-center"
label={(
<div>
<StatusBrick style={{ backgroundColor: color }}/>
<div className="flex items-center">
<StatusBrick style={{ backgroundColor: color }} className="flex-shrink-0"/>
<span>{title}</span>
</div>
)}
@@ -182,7 +182,7 @@ export class Chart extends React.Component<ChartProps> {
);
return (
<div className="legend flex wrap gaps">
<div className="legend flex wrap">
{labels && labels.map((label: string, index) => {
const { backgroundColor } = datasets[0] as any;
const color = legendColors ? legendColors[index] : backgroundColor[index];