jscheffl commented on code in PR #55400:
URL: https://github.com/apache/airflow/pull/55400#discussion_r2334631960
##########
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceExitButton.tsx:
##########
@@ -48,14 +51,43 @@ export const MaintenanceExitButton = ({ onExitMaintenance,
workerName }: Mainten
};
return (
- <IconButton
- size="sm"
- variant="ghost"
- onClick={() => exitMaintenance()}
- aria-label="Exit Maintenance"
- title="Exit Maintenance"
- >
- <IoMdExit />
- </IconButton>
+ <>
+ <IconButton
+ size="sm"
+ variant="ghost"
+ onClick={onOpen}
+ aria-label="Exit Maintenance"
+ title="Exit Maintenance"
+ >
+ <IoMdExit />
+ </IconButton>
+
+ <Dialog.Root onOpenChange={onClose} open={open} size="md">
+ <Portal>
+ <Dialog.Backdrop />
+ <Dialog.Positioner>
+ <Dialog.Content>
+ <Dialog.Header>
+ <Dialog.Title>Exit maintenance for worker
{workerName}</Dialog.Title>
+ </Dialog.Header>
+ <Dialog.Body>
+ <p>Are you sure you want to exit maintenance mode for worker
{workerName}?</p>
+ </Dialog.Body>
+ <Dialog.Footer>
+ <Dialog.ActionTrigger asChild>
+ <Button variant="outline">No</Button>
+ </Dialog.ActionTrigger>
+ <Button onClick={exitMaintenance} colorScheme="red">
Review Comment:
Then I propose _not_ making this red and taking "red" only for dangerous
options like remote shutdown or deletion of worker.
```suggestion
<Button onClick={exitMaintenance}>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]