ashb commented on code in PR #68378:
URL: https://github.com/apache/airflow/pull/68378#discussion_r3395208718


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,34 @@ export const Details = () => {
     },
   );
 
+  const renderValue = (value: unknown): string => {
+    if (value === null || value === undefined || value === "") {
+      return translate("common:none", { defaultValue: "None" });
+    }
+
+    if (typeof value === "string") {
+      return value;
+    }
+
+    if (typeof value === "number" || typeof value === "boolean" || typeof 
value === "bigint") {
+      return value.toString();
+    }
+
+    if (typeof value === "object") {
+      return JSON.stringify(value, undefined, 2);
+    }
+
+    return "";
+  };
+
+  const rawTaskInstanceDetails: Array<{ label: string; value: unknown }> = [
+    { label: translate("taskInstance.tryNumber"), value: 
tryInstance?.try_number },
+    { label: translate("taskInstance.maxTries"), value: tryInstance?.max_tries 
},
+    { label: translate("dagId"), value: tryInstance?.dag_id },
+    { label: translate("taskInstance.trigger"), value: taskInstance?.trigger },

Review Comment:
   Given #67868 we will likely want to explicitly filter out/not display the 
`kwargs` field here.



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