dheerajturaga commented on code in PR #55400:
URL: https://github.com/apache/airflow/pull/55400#discussion_r2332103234


##########
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:
   I don't think entering and removing from maintenance is particularly 
dangerous as such. I can make it red if you would like. However I wanted to 
reserve red color for the shutdown worker/remove worker buttons that I plan on 
adding next



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to