diff --git a/CommonUI/src/Components/Accordian/Accordian.tsx b/CommonUI/src/Components/Accordian/Accordian.tsx index 15f87f3e3b..a6444d94f5 100644 --- a/CommonUI/src/Components/Accordian/Accordian.tsx +++ b/CommonUI/src/Components/Accordian/Accordian.tsx @@ -88,20 +88,19 @@ const Accordian: FunctionComponent = ( )} {props.title && (
{props.title}{' '}
- {props.description && } - + {props.description && ( + + )}
)} diff --git a/CommonUI/src/Components/EventItem/EventItem.tsx b/CommonUI/src/Components/EventItem/EventItem.tsx index 2a64315f9b..6b3845bc3b 100644 --- a/CommonUI/src/Components/EventItem/EventItem.tsx +++ b/CommonUI/src/Components/EventItem/EventItem.tsx @@ -90,12 +90,7 @@ const EventItem: FunctionComponent = ( {props.eventDescription && (

- +

)} @@ -121,7 +116,7 @@ const EventItem: FunctionComponent = ( )} {props.eventResourcesAffected && - props.eventResourcesAffected?.length > 0 ? ( + props.eventResourcesAffected?.length > 0 ? (
@@ -150,11 +145,12 @@ const EventItem: FunctionComponent = ( {props.eventTimeline && props.eventTimeline.length > 0 && (
0 + className={`w-full border-t border-gray-200 mt-5 -ml-5 ${ + props.eventTimeline && + props.eventTimeline.length > 0 ? 'mb-5' : 'mb-0' - } -mr-5 -pr-5`} + } -mr-5 -pr-5`} style={{ width: 'calc(100% + 2.5em)' }} >
)} @@ -174,12 +170,12 @@ const EventItem: FunctionComponent = ( {i !== props.eventTimeline .length - - 1 && ( - - )} + 1 && ( + + )}
@@ -246,12 +242,12 @@ const EventItem: FunctionComponent = ( {i !== props.eventTimeline .length - - 1 && ( - - )} + 1 && ( + + )}
diff --git a/Mail/Config.ts b/Mail/Config.ts index fd48d26ab7..1f51eaaf99 100644 --- a/Mail/Config.ts +++ b/Mail/Config.ts @@ -26,5 +26,4 @@ export const InternalSmtpFromEmail: Email = new Email( export const InternalSmtpFromName: string = process.env['INTERNAL_SMTP_NAME'] || ''; -export const SendGridApiKey: string = - process.env['SENDGRID_API_KEY'] || ''; +export const SendGridApiKey: string = process.env['SENDGRID_API_KEY'] || ''; diff --git a/Mail/Services/MailService.ts b/Mail/Services/MailService.ts index 8dd65c79c5..57f87881ef 100755 --- a/Mail/Services/MailService.ts +++ b/Mail/Services/MailService.ts @@ -16,7 +16,7 @@ import { JSONObject } from 'Common/Types/JSON'; import logger from 'CommonServer/Utils/Logger'; import { IsDevelopment } from 'CommonServer/Config'; import { SendGridApiKey } from '../Config'; -import SendgridMail from '@sendgrid/mail'; +import SendgridMail, { MailDataRequired } from '@sendgrid/mail'; Handlebars.registerHelper('ifCond', function (v1, v2, options) { if (v1 === v2) { @@ -117,8 +117,8 @@ export default class MailService { }; } - public static getGlobalFromEmail(){ - const emailServer = this.getGlobalSmtpSettings(); + public static getGlobalFromEmail(): Email { + const emailServer: EmailServer = this.getGlobalSmtpSettings(); return emailServer.fromEmail; } @@ -202,8 +202,6 @@ export default class MailService { mail: EmailMessage, emailServer?: EmailServer ): Promise { - - // default vars. if (!mail.vars) { mail.vars = {}; @@ -218,18 +216,18 @@ export default class MailService { : this.compileText(mail.body || '', mail.vars); mail.subject = this.compileText(mail.subject, mail.vars); - if(!emailServer && SendGridApiKey){ + if (!emailServer && SendGridApiKey) { SendgridMail.setApiKey(SendGridApiKey); - const msg = { - to: mail.toEmail.toString(), // Change to your recipient - from: this.getGlobalFromEmail().toString(), // Change to your verified sender + const msg: MailDataRequired = { + to: mail.toEmail.toString(), + from: this.getGlobalFromEmail().toString(), subject: mail.subject, html: mail.body, - } + }; - await SendgridMail.send(msg) - return; + await SendgridMail.send(msg); + return; } if (!emailServer) { diff --git a/Model/Models/IncidentCustomField.ts b/Model/Models/IncidentCustomField.ts index fe55a9119a..612dec46eb 100644 --- a/Model/Models/IncidentCustomField.ts +++ b/Model/Models/IncidentCustomField.ts @@ -185,7 +185,8 @@ export default class IncidentCustomField extends BaseModel { required: false, type: TableColumnType.LongText, title: 'Description', - description: 'Friendly description of this custom field that will help you remember', + description: + 'Friendly description of this custom field that will help you remember', }) @Column({ nullable: true, diff --git a/Model/Models/MonitorCustomField.ts b/Model/Models/MonitorCustomField.ts index 6ae07ecc7b..b6fef81afd 100644 --- a/Model/Models/MonitorCustomField.ts +++ b/Model/Models/MonitorCustomField.ts @@ -185,7 +185,8 @@ export default class MonitorCustomField extends BaseModel { required: false, type: TableColumnType.LongText, title: 'Description', - description: 'Friendly description of this custom field that will help you remember', + description: + 'Friendly description of this custom field that will help you remember', }) @Column({ nullable: true, diff --git a/Model/Models/ScheduledMaintenance.ts b/Model/Models/ScheduledMaintenance.ts index 9d02c9e90d..a1dc832b4b 100644 --- a/Model/Models/ScheduledMaintenance.ts +++ b/Model/Models/ScheduledMaintenance.ts @@ -211,7 +211,8 @@ export default class ScheduledMaintenance extends BaseModel { required: false, type: TableColumnType.Description, title: 'Description', - description: 'Description of this scheduled event that will show up on Status Page. This is in markdown.', + description: + 'Description of this scheduled event that will show up on Status Page. This is in markdown.', }) @Column({ nullable: true, diff --git a/Model/Models/ScheduledMaintenanceCustomField.ts b/Model/Models/ScheduledMaintenanceCustomField.ts index 759664f1bc..ef9a164caf 100644 --- a/Model/Models/ScheduledMaintenanceCustomField.ts +++ b/Model/Models/ScheduledMaintenanceCustomField.ts @@ -185,7 +185,8 @@ export default class ScheduledMaintenanceCustomField extends BaseModel { required: false, type: TableColumnType.LongText, title: 'Description', - description: 'Friendly description of this custom field that will help you remember', + description: + 'Friendly description of this custom field that will help you remember', }) @Column({ nullable: true, diff --git a/Model/Models/StatusPageCustomField.ts b/Model/Models/StatusPageCustomField.ts index 64c1c3c9a9..9d37735332 100644 --- a/Model/Models/StatusPageCustomField.ts +++ b/Model/Models/StatusPageCustomField.ts @@ -185,7 +185,8 @@ export default class StatusPageCustomField extends BaseModel { required: false, type: TableColumnType.LongText, title: 'Description', - description: 'Friendly description of this custom field that will help you remember', + description: + 'Friendly description of this custom field that will help you remember', }) @Column({ nullable: true, diff --git a/Model/Models/StatusPageGroup.ts b/Model/Models/StatusPageGroup.ts index 070b53850f..4bb75c345f 100644 --- a/Model/Models/StatusPageGroup.ts +++ b/Model/Models/StatusPageGroup.ts @@ -288,7 +288,8 @@ export default class StatusPageGroup extends BaseModel { required: false, type: TableColumnType.LongText, title: 'Description', - description: 'Description for this group. This is visible on Status Page. This can be in markdown format.', + description: + 'Description for this group. This is visible on Status Page. This can be in markdown format.', }) @Column({ nullable: true, diff --git a/StatusPage/src/Components/Monitor/MonitorOverview.tsx b/StatusPage/src/Components/Monitor/MonitorOverview.tsx index 0411421e3f..f491761bfc 100644 --- a/StatusPage/src/Components/Monitor/MonitorOverview.tsx +++ b/StatusPage/src/Components/Monitor/MonitorOverview.tsx @@ -62,13 +62,9 @@ const MonitorOverview: FunctionComponent = ( )}
- {props.description && } - + {props.description && ( + + )}
{props.showHistoryChart && (