Skip to content

Commit

Permalink
Fix deployment status dot on deploying devices status
Browse files Browse the repository at this point in the history
  • Loading branch information
jakdan99 committed Nov 6, 2024
1 parent 10dc1c3 commit 546d03c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/pages/Deployment/BasicInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const BasicInfo = () => {
}
>
<FileDownloadOutlinedIcon fontSize="small" />
<Typography variant="h5">Export Data</Typography>
<Typography variant="h5">{t("common:export_data")}</Typography>
</ExportButton>
</Box>
<StyledCard elevation={2}>
Expand All @@ -113,7 +113,13 @@ const BasicInfo = () => {
variant="h6"
status={deployment.deploymentStatus.__type.split(".").pop()}
>
{deployment.deploymentStatus.__type.split(".").pop()}
{
deployment.deploymentStatus.__type
.split(".")
.pop()
.replace(/([a-z])([A-Z])/g, "$1 $2")
.split(" ")[0]
}
</StyledStatusText>
</Stack>
{!deployment.deploymentStatus.__type.includes("Stopped") && (
Expand Down
8 changes: 7 additions & 1 deletion src/pages/Deployments/DeploymentCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ const DeploymentCard = ({
status={deployment.deploymentStatus.__type.split(".").pop()}
/>
<Typography variant="h6">
{deployment.deploymentStatus.__type.split(".").pop()}
{
deployment.deploymentStatus.__type
.split(".")
.pop()
.replace(/([a-z])([A-Z])/g, "$1 $2")
.split(" ")[0]
}
</Typography>
<DateTooltip
invitedAt={deployment.deploymentStatus.createdOn}
Expand Down
6 changes: 5 additions & 1 deletion src/pages/Participant/Deployment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ const Deployment = () => {
status={deploymentInformation.groupStatus}
/>
<SecondaryText variant="h6">
{deploymentInformation.groupStatus}
{
deploymentInformation.groupStatus
.replace(/([a-z])([A-Z])/g, "$1 $2")
.split(" ")[0]
}
</SecondaryText>
<DateTooltip
invitedAt={deploymentInformation.deploymentStatus.invitedOn}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const DeploymentStatus = () => {
id: 1,
value: 0,
label: "Deploying",
color: getDeploymentStatusColor("Deploying"),
color: getDeploymentStatusColor("DeployingDevices"),
},
running: {
id: 2,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utility.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const getDeploymentStatusColor = (deploymentStatus: string) => {
return palette.status.green;
case "Stopped":
return palette.status.grey;
case "Deploying":
case "DeployingDevices":
return palette.status.blue;
default:
return "#000000";
Expand Down

0 comments on commit 546d03c

Please sign in to comment.