diff --git a/Accounts/Dockerfile.tpl b/Accounts/Dockerfile.tpl index e8039a43bb..a66542a37f 100755 --- a/Accounts/Dockerfile.tpl +++ b/Accounts/Dockerfile.tpl @@ -73,6 +73,7 @@ EXPOSE 3003 {{ if eq .Env.ENVIRONMENT "development" }} +RUN touch /usr/src/app/.env RUN printenv > /usr/src/app/.env #Run the app CMD [ "npm", "run", "dev" ] diff --git a/CommonUI/src/Components/Forms/BasicForm.tsx b/CommonUI/src/Components/Forms/BasicForm.tsx index 6b0878dec5..51a9d58c1a 100644 --- a/CommonUI/src/Components/Forms/BasicForm.tsx +++ b/CommonUI/src/Components/Forms/BasicForm.tsx @@ -405,9 +405,9 @@ const BasicForm: ForwardRefExoticComponent = forwardRef( )} {Boolean(props.description) && ( -

+

{props.description} -

+
)}
diff --git a/Dashboard/Dockerfile.tpl b/Dashboard/Dockerfile.tpl index eb8ea97aff..8f6ce68879 100755 --- a/Dashboard/Dockerfile.tpl +++ b/Dashboard/Dockerfile.tpl @@ -70,6 +70,7 @@ EXPOSE 3009 {{ if eq .Env.ENVIRONMENT "development" }} #Run the app +RUN touch /usr/src/app/.env RUN printenv > /usr/src/app/.env CMD [ "npm", "run", "dev" ] {{ else }} diff --git a/Dashboard/src/Components/CustomSMTP/CustomSMTPView.tsx b/Dashboard/src/Components/CustomSMTP/CustomSMTPView.tsx new file mode 100644 index 0000000000..5cc7432e60 --- /dev/null +++ b/Dashboard/src/Components/CustomSMTP/CustomSMTPView.tsx @@ -0,0 +1,36 @@ +import React, { FunctionComponent, ReactElement } from 'react'; +import Link from 'CommonUI/src/Components/Link/Link'; +import Route from 'Common/Types/API/Route'; +import RouteMap, { RouteUtil } from '../../Utils/RouteMap'; +import PageMap from '../../Utils/PageMap'; +import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig'; + +export interface ComponentProps { + smtp?: ProjectSmtpConfig | undefined; + onNavigateComplete?: (() => void) | undefined; +} + +const CustomSMTPElement: FunctionComponent = ( + props: ComponentProps +): ReactElement => { + + if(!props.smtp) return (OneUptime Mail Server); + + if (props.smtp._id) { + return ( + + {props.smtp.name} + + ); + } + + return {props.smtp.name}; +}; + +export default CustomSMTPElement; diff --git a/Dashboard/src/Pages/Settings/EmailLog.tsx b/Dashboard/src/Pages/Settings/EmailLog.tsx index 96379ed48c..50c2f6e18d 100644 --- a/Dashboard/src/Pages/Settings/EmailLog.tsx +++ b/Dashboard/src/Pages/Settings/EmailLog.tsx @@ -17,6 +17,8 @@ import EmailStatus from 'Common/Types/Mail/MailStatus'; import { Green, Red } from 'Common/Types/BrandColors'; import Columns from 'CommonUI/src/Components/ModelTable/Columns'; import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal'; +import CustomSMTPElement from '../../Components/CustomSMTP/CustomSMTPView'; +import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig'; const EmailLogs: FunctionComponent = ( _props: PageComponentProps @@ -29,11 +31,22 @@ const EmailLogs: FunctionComponent = ( const modelTableColumns: Columns = [ { field: { - _id: true, + projectSmtpConfig: { + name: true + }, }, - title: 'Log ID', - type: FieldType.Text, - isFilterable: true, + title: "SMTP Server", + type: FieldType.Element, + getElement: (item: JSONObject): ReactElement => { + + return ( + + ); + }, + isFilterable: false + }, { field: { @@ -44,6 +57,7 @@ const EmailLogs: FunctionComponent = ( title: 'From Email', type: FieldType.Email, }, + { field: { toEmail: true, @@ -120,6 +134,7 @@ const EmailLogs: FunctionComponent = ( isDeleteable={false} isEditable={false} isCreateable={false} + showViewIdButton={true} name="Email Logs" query={{ projectId: diff --git a/StatusPage/Dockerfile.tpl b/StatusPage/Dockerfile.tpl index df30181942..48bcf907f0 100755 --- a/StatusPage/Dockerfile.tpl +++ b/StatusPage/Dockerfile.tpl @@ -71,6 +71,7 @@ EXPOSE 3105 EXPOSE 3106 {{ if eq .Env.ENVIRONMENT "development" }} +RUN touch /usr/src/app/.env RUN printenv > /usr/src/app/.env #Run the app CMD [ "npm", "run", "dev" ]