bbovenzi commented on code in PR #68378:
URL: https://github.com/apache/airflow/pull/68378#discussion_r3397103894
##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Details.tsx:
##########
@@ -84,6 +84,40 @@ 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);
+ }
Review Comment:
We do have a `RenderedJsonField` that we can use here
##########
airflow-core/src/airflow/ui/public/i18n/locales/en/common.json:
##########
@@ -302,6 +305,8 @@
"latestHeartbeat": "Latest triggerer heartbeat",
"title": "Triggerer Info"
},
+ "triggererJob": "Triggerer Job",
+ "tryNumber": "Try Number",
Review Comment:
We already have this key, let's reuse it instead of adding a new one.
https://www.i18next.com/translation-function/nesting
--
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]