jscheffl commented on code in PR #55348:
URL: https://github.com/apache/airflow/pull/55348#discussion_r2328861661


##########
providers/edge3/src/airflow/providers/edge3/plugins/www/src/components/MaintenanceEnterButton.tsx:
##########
@@ -0,0 +1,97 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Portal } from "@chakra-ui/react";
+import { Button, CloseButton, Dialog, IconButton, Textarea, useDisclosure } 
from "@chakra-ui/react";
+import { useUiServiceRequestWorkerMaintenance } from "openapi/queries";
+import { useState } from "react";
+import { HiOutlineWrenchScrewdriver } from "react-icons/hi2";
+
+interface MaintenanceEnterButtonProps {
+  onEnterMaintenance: () => void;
+  workerName: string;
+}
+
+export const MaintenanceEnterButton = ({ onEnterMaintenance, workerName }: 
MaintenanceEnterButtonProps) => {
+  const { onClose, onOpen, open } = useDisclosure();
+  const [comment, setComment] = useState("");

Review Comment:
   Actually keeping the comment if not applied/Maintenance is not confirmed but 
dialog is closed is OK. Actually I'd see this as a feature.
   Note that the maintenance comments are having their individual state per 
worker and with the current code the comment is reset if the mainteance is 
confirmed, reset and then requested again. (Besides it is reset on page reload)



-- 
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]

Reply via email to