This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch v2-5-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 38852d4cd232d88add9c0a6ee9549f03c1d6d783
Author: Jakub Novák <[email protected]>
AuthorDate: Tue Mar 14 23:00:39 2023 +0100

    Formatted config (#30103)
    
    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.
    
    (cherry picked from commit 465de1b24d9867380e15686a0b67e6756d694168)
---
 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 f88115b64c..112a4839aa 100644
--- a/airflow/www/static/js/dag/details/dagRun/index.tsx
+++ b/airflow/www/static/js/dag/details/dagRun/index.tsx
@@ -64,7 +64,9 @@ const DagRun = ({ runId }: Props) => {
   const { data: { dagRuns } } = useGridData();
   const detailsRef = useRef<HTMLDivElement>(null);
   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 {
     executionDate,

Reply via email to