fix docker files for UI containers

This commit is contained in:
Simon Larsen 2023-07-22 17:03:13 +01:00
parent 46b14a4792
commit 3d533db7c0
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
6 changed files with 60 additions and 6 deletions

View File

@ -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" ]

View File

@ -405,9 +405,9 @@ const BasicForm: ForwardRefExoticComponent<any> = forwardRef(
)}
{Boolean(props.description) && (
<p className="text-sm text-gray-500 mb-5">
<div className="text-sm text-gray-500 mb-5">
{props.description}
</p>
</div>
)}
<div className="flex">

View File

@ -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 }}

View File

@ -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<ComponentProps> = (
props: ComponentProps
): ReactElement => {
if(!props.smtp) return (<span>OneUptime Mail Server</span>);
if (props.smtp._id) {
return (
<Link
onNavigateComplete={props.onNavigateComplete}
className="hover:underline"
to={RouteUtil.populateRouteParams(
RouteMap[PageMap.SETTINGS_CUSTOM_SMTP] as Route
)}
>
<span>{props.smtp.name}</span>
</Link>
);
}
return <span>{props.smtp.name}</span>;
};
export default CustomSMTPElement;

View File

@ -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<PageComponentProps> = (
_props: PageComponentProps
@ -29,11 +31,22 @@ const EmailLogs: FunctionComponent<PageComponentProps> = (
const modelTableColumns: Columns<EmailLog> = [
{
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 (
<CustomSMTPElement
smtp={item['projectSmtpConfig'] as ProjectSmtpConfig}
/>
);
},
isFilterable: false
},
{
field: {
@ -44,6 +57,7 @@ const EmailLogs: FunctionComponent<PageComponentProps> = (
title: 'From Email',
type: FieldType.Email,
},
{
field: {
toEmail: true,
@ -120,6 +134,7 @@ const EmailLogs: FunctionComponent<PageComponentProps> = (
isDeleteable={false}
isEditable={false}
isCreateable={false}
showViewIdButton={true}
name="Email Logs"
query={{
projectId:

View File

@ -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" ]