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

bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 465de1b24d Formatted config (#30103)
465de1b24d is described below

commit 465de1b24d9867380e15686a0b67e6756d694168
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.
---
 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 e77dcff84e..7b8d920556 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,

Reply via email to