From 90aa4c414670eb3c8a74ede47953b338399659b0 Mon Sep 17 00:00:00 2001 From: Enis Nazif Date: Sat, 9 Nov 2024 13:55:29 +0000 Subject: [PATCH 1/2] Disable button if link is null or empty --- airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx b/airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx index ec44cd920d1f6..802daaf4c1b64 100644 --- a/airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx +++ b/airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx @@ -55,7 +55,7 @@ const ExtraLinks = ({ const isSanitised = (url: string | null) => { if (!url) { - return true; + return false; // Empty or null urls should cause the link to be disabled } const path = new URL(url, "http://localhost"); // Allow Absolute/Relative URL and prevent javascript:() from executing when passed as path. From 18953f40512dc07bb7b98778242b00d907c75624 Mon Sep 17 00:00:00 2001 From: Enis Nazif Date: Sat, 9 Nov 2024 17:12:45 +0000 Subject: [PATCH 2/2] Fix space --- airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx b/airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx index 802daaf4c1b64..abed853189266 100644 --- a/airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx +++ b/airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx @@ -55,7 +55,7 @@ const ExtraLinks = ({ const isSanitised = (url: string | null) => { if (!url) { - return false; // Empty or null urls should cause the link to be disabled + return false; // Empty or null urls should cause the link to be disabled } const path = new URL(url, "http://localhost"); // Allow Absolute/Relative URL and prevent javascript:() from executing when passed as path.