Skip to content

Commit

Permalink
fix: resolve bugs (#21)
Browse files Browse the repository at this point in the history
Signed-off-by: namkyu1999 <lak9348@konkuk.ac.kr>
  • Loading branch information
namkyu1999 committed Mar 4, 2024
1 parent 61e2956 commit 1839ebb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"type": "git",
"url": "https://github.com/litmuschaos/backstage-plugin.git"
},
"version": "1.0.0",
"version": "1.0.2",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const ExperimentRunStatsSection = ({ entity }: { entity: Entity }) => {
const errored = value?.totalErroredExperimentRuns ?? 0;
const stopped = value?.totalStoppedExperimentRuns ?? 0;
const terminated = value?.totalTerminatedExperimentRuns?? 0;

const others = total - (completed + running + errored + stopped + terminated);
return (
<Box>
<Stack direction="column" spacing={2} width="100%" textAlign="center">
Expand Down Expand Up @@ -94,6 +94,11 @@ export const ExperimentRunStatsSection = ({ entity }: { entity: Entity }) => {
color: '#d9d9d9',
label: 'Terminated',
},
{
value: others >= 0 ? others : 0,
color: '#f6832c',
label: 'Others',
},
],
},
]}
Expand Down
2 changes: 1 addition & 1 deletion src/components/EntityLitmusContent/StatusHeatMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export function StatusHeatMap(props: StatusHeatMapProps): React.ReactElement {
color="#D24433"
display="inline"
>
{execution.resiliencyScore.toString() + ' '}
{(execution.resiliencyScore ?? 0).toString() + ' '}
</Typography>
<Typography
sx={{ display: 'inline' }}
Expand Down
2 changes: 1 addition & 1 deletion src/types/Experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export enum ExperimentRunStatus {

export type RecentExecutions = {
experimentRunID: string;
resiliencyScore: number;
resiliencyScore: number | null;
phase: ExperimentRunStatus;
updatedAt: string;
updatedBy: UserDetails;
Expand Down

0 comments on commit 1839ebb

Please sign in to comment.