Skip to content

Commit

Permalink
Hammer/decom info (#941)
Browse files Browse the repository at this point in the history
* Display commission status

Signed-off-by: Aaron Chong <[email protected]>

* Adding warning to decommission confirm dialog

Signed-off-by: Aaron Chong <[email protected]>

* Add warning before recommissioning

Signed-off-by: Aaron Chong <[email protected]>

---------

Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth authored Apr 25, 2024
1 parent a764368 commit a37bad9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/dashboard/src/components/robots/robot-decommission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,22 @@ export function RobotDecommissionButton({
onSubmit={robotDecommissioned ? handleRecommission : handleDecommission}
>
{robotDecommissioned ? (
<Typography>Confirm recommission robot?</Typography>
<>
<Typography>Confirm recommission robot?</Typography>
<Typography color="warning.main">
Warning: the robot could immediately be assigned a new task after recommission,
please ensure that the robot is fully functional, localized, and its location
reflecting accurately on the Open-RMF map before recommissioning.
</Typography>
</>
) : (
<>
<Typography>Confirm decommission robot?</Typography>
<Typography color="warning.main">
Warning: ongoing tasks will not be affected. If manual intervention is required,
please ensure the ongoing task is cancelled after decommission, before executing
manual intervention.
</Typography>
<FormGroup>
<Tooltip title="Attempts to reassign all queued tasks to other robots if possible">
<FormControlLabel
Expand Down
13 changes: 13 additions & 0 deletions packages/dashboard/src/components/robots/robot-summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,19 @@ export const RobotSummary = React.memo(({ onClose, robot }: RobotSummaryProps) =
);
}

if (robotState && robotState.commission) {
const commission = robotState.commission;
contents.push({
title: `[${
commission.dispatch_tasks === false ? 'Decommissioned' : 'Commissioned'
}] status`,
value:
`Direct tasks : ${commission.direct_tasks ?? 'n/a'}\n` +
`Dispatch tasks: ${commission.dispatch_tasks ?? 'n/a'}\n` +
`Idle Behavior : ${commission.idle_behavior ?? 'n/a'}`,
});
}

return (
<>
{contents.map((message, index) => (
Expand Down

0 comments on commit a37bad9

Please sign in to comment.