guan404ming commented on code in PR #50416:
URL: https://github.com/apache/airflow/pull/50416#discussion_r2083003121


##########
airflow-core/src/airflow/ui/src/components/DurationChart.tsx:
##########
@@ -141,6 +145,24 @@ export const DurationChart = ({
         }}
         datasetIdKey="id"
         options={{
+          onClick: (_event, elements) => {
+            const [element] = elements;
+
+            if (element && typeof element.index === "number") {
+              const entry = entries[element.index];
+
+              if (kind === "Dag Run") {

Review Comment:
   Should we also need to handle case task here?



##########
airflow-core/src/airflow/ui/src/components/DurationChart.tsx:
##########
@@ -141,6 +145,24 @@ export const DurationChart = ({
         }}
         datasetIdKey="id"
         options={{
+          onClick: (_event, elements) => {
+            const [element] = elements;
+
+            if (element && typeof element.index === "number") {

Review Comment:
   Not sure if the type assertion is necessary. What other types could the 
index type have?



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