tirkarthi commented on code in PR #49412:
URL: https://github.com/apache/airflow/pull/49412#discussion_r2049304138
##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/Logs.tsx:
##########
@@ -83,9 +79,33 @@ export const Logs = () => {
tryNumber: tryNumber === 0 ? 1 : tryNumber,
});
+ const { datum } = useLogDownload({
+ dagId,
+ logLevelFilters,
+ sourceFilters,
+ taskInstance,
+ tryNumber: tryNumber === 0 ? 1 : tryNumber,
+ });
+
+ const downloadLog = () => {
+ const texts = datum as Array<BlobPart>;
+ const file = new Blob(texts, { type: "text/plain" });
+ const element = document.createElement("a");
+
+ element.href = URL.createObjectURL(file);
+ element.download = `taskInstanceLogs.txt`;
Review Comment:
This looks the filename for the downloaded log file. This should include
dagId and taskInstance details in the name like Airflow 2 else this might keep
overwriting the file on disk or create something like `taskInstanceLogs(1).txt`
--
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]