mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
fix docker files for UI containers
This commit is contained in:
parent
46b14a4792
commit
3d533db7c0
@ -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" ]
|
||||
|
@ -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">
|
||||
|
@ -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 }}
|
||||
|
36
Dashboard/src/Components/CustomSMTP/CustomSMTPView.tsx
Normal file
36
Dashboard/src/Components/CustomSMTP/CustomSMTPView.tsx
Normal 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;
|
@ -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:
|
||||
|
@ -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" ]
|
||||
|
Loading…
Reference in New Issue
Block a user