From 6ece8dd627e6eedb683ffb057a39402024a3a51a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Nov=C3=A1k?= Date: Tue, 14 Mar 2023 18:22:40 +0100 Subject: [PATCH] Formatted config The most usual use case is to copy it to the new run, but if it isn't formatted, its readability for longer configs is quite low. Moreover this corresponds to what the user sees. --- airflow/www/static/js/dag/details/dagRun/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airflow/www/static/js/dag/details/dagRun/index.tsx b/airflow/www/static/js/dag/details/dagRun/index.tsx index e77dcff84ef6b..7b8d920556ebd 100644 --- a/airflow/www/static/js/dag/details/dagRun/index.tsx +++ b/airflow/www/static/js/dag/details/dagRun/index.tsx @@ -63,7 +63,9 @@ const DagRun = ({ runId }: Props) => { const offsetTop = useOffsetTop(detailsRef); const run = dagRuns.find((dr) => dr.runId === runId); - const { onCopy, hasCopied } = useClipboard(run?.conf || ""); + const { onCopy, hasCopied } = useClipboard( + JSON.stringify(JSON.parse(run?.conf || ""), null, 4) + ); if (!run) return null; const { state,