tirkarthi commented on code in PR #44656:
URL: https://github.com/apache/airflow/pull/44656#discussion_r1870852002


##########
airflow/ui/src/pages/TaskInstance/Header.tsx:
##########
@@ -0,0 +1,82 @@
+/*!
+ * 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 { Box, Flex, Heading, HStack, SimpleGrid, Text } from 
"@chakra-ui/react";
+import dayjs from "dayjs";
+import { MdOutlineModeComment, MdOutlineTask } from "react-icons/md";
+
+import type { TaskInstanceResponse } from "openapi/requests/types.gen";
+import { Stat } from "src/components/Stat";
+import Time from "src/components/Time";
+import { Status } from "src/components/ui";
+
+export const Header = ({
+  taskInstance,
+}: {
+  readonly taskInstance: TaskInstanceResponse;
+}) => (
+  <Box borderColor="border" borderRadius={8} borderWidth={1} p={2}>
+    <Flex alignItems="center" justifyContent="space-between" mb={2}>
+      <HStack alignItems="center" gap={2}>
+        <MdOutlineTask size="1.75rem" />
+        <Heading size="lg">
+          <strong>Task Instance: </strong>
+          {taskInstance.task_display_name}{" "}
+          <Time datetime={taskInstance.start_date} />
+        </Heading>
+        <Status state={taskInstance.state ?? undefined}>
+          {taskInstance.state}
+        </Status>
+        <Flex>
+          <div />
+        </Flex>
+      </HStack>
+    </Flex>
+    {taskInstance.note === null ||
+    taskInstance.note.length === 0 ? undefined : (
+      <Flex alignItems="flex-start" justifyContent="space-between" mr={16}>
+        <MdOutlineModeComment size="3rem" />
+        <Text fontSize="sm" ml={3}>
+          {taskInstance.note}
+        </Text>
+      </Flex>
+    )}
+    <SimpleGrid columns={4} gap={4} my={2}>

Review Comment:
   For tasks with higher try number greater than 1 this pushes duration to it's 
own row making the header slightly larger. Perhaps `columns` can be dynamic or 
6 to accommodate all attributes



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