From 777b3a55be1ecf5b05bf755ce8b14735496509e1 Mon Sep 17 00:00:00 2001 From: Yury Shkoda Date: Wed, 26 Apr 2023 16:10:04 +0300 Subject: [PATCH] feat(log): put download log icon into log tab --- .../internal/components/log/logComponent.tsx | 19 ------------------- .../components/log/logTabWithIcons.tsx | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/web/src/containers/Studio/internal/components/log/logComponent.tsx b/web/src/containers/Studio/internal/components/log/logComponent.tsx index a9c0b1b..e9e8ed1 100644 --- a/web/src/containers/Studio/internal/components/log/logComponent.tsx +++ b/web/src/containers/Studio/internal/components/log/logComponent.tsx @@ -265,25 +265,6 @@ const LogComponent = (props: LogComponentProps) => { )} -
- -
) } diff --git a/web/src/containers/Studio/internal/components/log/logTabWithIcons.tsx b/web/src/containers/Studio/internal/components/log/logTabWithIcons.tsx index 653e11a..fdfc6cc 100644 --- a/web/src/containers/Studio/internal/components/log/logTabWithIcons.tsx +++ b/web/src/containers/Studio/internal/components/log/logTabWithIcons.tsx @@ -1,12 +1,18 @@ import { ErrorOutline, Warning } from '@mui/icons-material' -import { LogObject } from '../../../../../utils' +import FileDownloadIcon from '@mui/icons-material/FileDownload' +import { + LogObject, + download, + clearErrorsAndWarningsHtmlWrapping +} from '../../../../../utils' +import Tooltip from '@mui/material/Tooltip' interface LogTabProps { log: LogObject } const LogTabWithIcons = (props: LogTabProps) => { - const { errors, warnings } = props.log + const { errors, warnings, body } = props.log return (
{ {warnings && warnings.length !== 0 && ( )}{' '} + { + download(evt, clearErrorsAndWarningsHtmlWrapping(body)) + }} + > + +
) }