From 22361ea3a12a7be22010d89b5d6cf9f2004a38b1 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Fri, 9 Jun 2023 13:56:15 +0100 Subject: [PATCH] fix typo from staus to status --- Common/Types/API/StatusCode.ts | 2 +- CommonServer/API/StatusPageAPI.ts | 40 +++++++++---------- CommonServer/Config.ts | 2 +- .../Services/IncidentStateTimelineService.ts | 10 ++--- ...cheduledMaintenanceStateTimelineService.ts | 10 ++--- CommonServer/Utils/StartServer.ts | 2 +- Dashboard/src/Pages/StatusPages/View/SSO.tsx | 2 +- Model/Models/StatusPageDomain.ts | 4 +- StatusPage/src/Components/Page/Page.tsx | 4 +- Workers/Index.ts | 4 +- .../{StausPageCerts.ts => StatusPageCerts.ts} | 0 11 files changed, 40 insertions(+), 40 deletions(-) rename Workers/Jobs/StatusPageCerts/{StausPageCerts.ts => StatusPageCerts.ts} (100%) diff --git a/Common/Types/API/StatusCode.ts b/Common/Types/API/StatusCode.ts index d1a9b8aab8..a81e5bac8d 100644 --- a/Common/Types/API/StatusCode.ts +++ b/Common/Types/API/StatusCode.ts @@ -24,7 +24,7 @@ export default class StatusCode { return this.statusCode.toNumber(); } - public static isValidStausCode(statusCode: number | string): boolean { + public static isValidStatusCode(statusCode: number | string): boolean { try { if (typeof statusCode === Typeof.String) { statusCode = parseInt(statusCode as string); diff --git a/CommonServer/API/StatusPageAPI.ts b/CommonServer/API/StatusPageAPI.ts index a0ca44ebcc..063f0be6b5 100644 --- a/CommonServer/API/StatusPageAPI.ts +++ b/CommonServer/API/StatusPageAPI.ts @@ -602,19 +602,19 @@ export default class StatusPageAPI extends BaseAPI< }); } - const incidentsOnStausPage: Array = + const incidentsOnStatusPage: Array = activeIncidents.map((incident: Incident) => { return incident.id!; }); let incidentPublicNotes: Array = []; - if (incidentsOnStausPage.length > 0) { + if (incidentsOnStatusPage.length > 0) { incidentPublicNotes = await IncidentPublicNoteService.findBy({ query: { incidentId: - QueryHelper.in(incidentsOnStausPage), + QueryHelper.in(incidentsOnStatusPage), projectId: statusPage.projectId!, }, select: { @@ -635,12 +635,12 @@ export default class StatusPageAPI extends BaseAPI< let incidentStateTimelines: Array = []; - if (incidentsOnStausPage.length > 0) { + if (incidentsOnStatusPage.length > 0) { incidentStateTimelines = await IncidentStateTimelineService.findBy({ query: { incidentId: - QueryHelper.in(incidentsOnStausPage), + QueryHelper.in(incidentsOnStatusPage), projectId: statusPage.projectId!, }, select: { @@ -783,7 +783,7 @@ export default class StatusPageAPI extends BaseAPI< } ); - const scheduledMaintenanceEventsOnStausPage: Array = + const scheduledMaintenanceEventsOnStatusPage: Array = scheduledMaintenanceEvents.map( (event: ScheduledMaintenance) => { return event.id!; @@ -793,12 +793,12 @@ export default class StatusPageAPI extends BaseAPI< let scheduledMaintenanceEventsPublicNotes: Array = []; - if (scheduledMaintenanceEventsOnStausPage.length > 0) { + if (scheduledMaintenanceEventsOnStatusPage.length > 0) { scheduledMaintenanceEventsPublicNotes = await ScheduledMaintenancePublicNoteService.findBy({ query: { scheduledMaintenanceId: QueryHelper.in( - scheduledMaintenanceEventsOnStausPage + scheduledMaintenanceEventsOnStatusPage ), projectId: statusPage.projectId!, }, @@ -820,13 +820,13 @@ export default class StatusPageAPI extends BaseAPI< let scheduledMaintenanceStateTimelines: Array = []; - if (scheduledMaintenanceEventsOnStausPage.length > 0) { + if (scheduledMaintenanceEventsOnStatusPage.length > 0) { scheduledMaintenanceStateTimelines = await ScheduledMaintenanceStateTimelineService.findBy( { query: { scheduledMaintenanceId: QueryHelper.in( - scheduledMaintenanceEventsOnStausPage + scheduledMaintenanceEventsOnStatusPage ), projectId: statusPage.projectId!, }, @@ -1338,7 +1338,7 @@ export default class StatusPageAPI extends BaseAPI< } ); - const scheduledMaintenanceEventsOnStausPage: Array = + const scheduledMaintenanceEventsOnStatusPage: Array = scheduledMaintenanceEvents.map((event: ScheduledMaintenance) => { return event.id!; }); @@ -1346,12 +1346,12 @@ export default class StatusPageAPI extends BaseAPI< let scheduledMaintenanceEventsPublicNotes: Array = []; - if (scheduledMaintenanceEventsOnStausPage.length > 0) { + if (scheduledMaintenanceEventsOnStatusPage.length > 0) { scheduledMaintenanceEventsPublicNotes = await ScheduledMaintenancePublicNoteService.findBy({ query: { scheduledMaintenanceId: QueryHelper.in( - scheduledMaintenanceEventsOnStausPage + scheduledMaintenanceEventsOnStatusPage ), projectId: statusPage.projectId!, }, @@ -1373,12 +1373,12 @@ export default class StatusPageAPI extends BaseAPI< let scheduledMaintenanceStateTimelines: Array = []; - if (scheduledMaintenanceEventsOnStausPage.length > 0) { + if (scheduledMaintenanceEventsOnStatusPage.length > 0) { scheduledMaintenanceStateTimelines = await ScheduledMaintenanceStateTimelineService.findBy({ query: { scheduledMaintenanceId: QueryHelper.in( - scheduledMaintenanceEventsOnStausPage + scheduledMaintenanceEventsOnStatusPage ), projectId: statusPage.projectId!, }, @@ -1703,7 +1703,7 @@ export default class StatusPageAPI extends BaseAPI< incidents = ArrayUtil.distinctByFieldName(incidents, '_id'); } - const incidentsOnStausPage: Array = incidents.map( + const incidentsOnStatusPage: Array = incidents.map( (incident: Incident) => { return incident.id!; } @@ -1711,10 +1711,10 @@ export default class StatusPageAPI extends BaseAPI< let incidentPublicNotes: Array = []; - if (incidentsOnStausPage.length > 0) { + if (incidentsOnStatusPage.length > 0) { incidentPublicNotes = await IncidentPublicNoteService.findBy({ query: { - incidentId: QueryHelper.in(incidentsOnStausPage), + incidentId: QueryHelper.in(incidentsOnStatusPage), projectId: statusPage.projectId!, }, select: { @@ -1734,10 +1734,10 @@ export default class StatusPageAPI extends BaseAPI< let incidentStateTimelines: Array = []; - if (incidentsOnStausPage.length > 0) { + if (incidentsOnStatusPage.length > 0) { incidentStateTimelines = await IncidentStateTimelineService.findBy({ query: { - incidentId: QueryHelper.in(incidentsOnStausPage), + incidentId: QueryHelper.in(incidentsOnStatusPage), projectId: statusPage.projectId!, }, select: { diff --git a/CommonServer/Config.ts b/CommonServer/Config.ts index aef766d12a..bee14310c1 100644 --- a/CommonServer/Config.ts +++ b/CommonServer/Config.ts @@ -120,7 +120,7 @@ export const IdentityRoute: Route = new Route( export const FileRoute: Route = new Route(process.env['FILE_ROUTE'] || '/file'); -export const StausPageRoute: Route = new Route( +export const StatusPageRoute: Route = new Route( process.env['STATUS_PAGE_ROUTE'] || '/status-page' ); diff --git a/CommonServer/Services/IncidentStateTimelineService.ts b/CommonServer/Services/IncidentStateTimelineService.ts index d00ee9e25a..c1dbb87948 100644 --- a/CommonServer/Services/IncidentStateTimelineService.ts +++ b/CommonServer/Services/IncidentStateTimelineService.ts @@ -97,15 +97,15 @@ export class Service extends DatabaseService { if (resolvedMonitorState) { for (const monitor of incident.monitors) { - const monitorStausTimeline: MonitorStatusTimeline = + const monitorStatusTimeline: MonitorStatusTimeline = new MonitorStatusTimeline(); - monitorStausTimeline.monitorId = monitor.id!; - monitorStausTimeline.projectId = incident.projectId!; - monitorStausTimeline.monitorStatusId = + monitorStatusTimeline.monitorId = monitor.id!; + monitorStatusTimeline.projectId = incident.projectId!; + monitorStatusTimeline.monitorStatusId = resolvedMonitorState.id!; await MonitorStatusTimelineService.create({ - data: monitorStausTimeline, + data: monitorStatusTimeline, props: { isRoot: true, }, diff --git a/CommonServer/Services/ScheduledMaintenanceStateTimelineService.ts b/CommonServer/Services/ScheduledMaintenanceStateTimelineService.ts index eb27063e7f..9d20dae2ed 100644 --- a/CommonServer/Services/ScheduledMaintenanceStateTimelineService.ts +++ b/CommonServer/Services/ScheduledMaintenanceStateTimelineService.ts @@ -105,16 +105,16 @@ export class Service extends DatabaseService if (resolvedMonitorState) { for (const monitor of scheduledMaintenanceService.monitors) { - const monitorStausTimeline: MonitorStatusTimeline = + const monitorStatusTimeline: MonitorStatusTimeline = new MonitorStatusTimeline(); - monitorStausTimeline.monitorId = monitor.id!; - monitorStausTimeline.projectId = + monitorStatusTimeline.monitorId = monitor.id!; + monitorStatusTimeline.projectId = scheduledMaintenanceService.projectId!; - monitorStausTimeline.monitorStatusId = + monitorStatusTimeline.monitorStatusId = resolvedMonitorState.id!; await MonitorStatusTimelineService.create({ - data: monitorStausTimeline, + data: monitorStatusTimeline, props: { isRoot: true, }, diff --git a/CommonServer/Utils/StartServer.ts b/CommonServer/Utils/StartServer.ts index c08f4546f8..5eb7943535 100644 --- a/CommonServer/Utils/StartServer.ts +++ b/CommonServer/Utils/StartServer.ts @@ -154,7 +154,7 @@ const init: Function = async ( if (err instanceof Promise) { err.catch((exception: Exception) => { if ( - StatusCode.isValidStausCode( + StatusCode.isValidStatusCode( (exception as Exception).code ) ) { diff --git a/Dashboard/src/Pages/StatusPages/View/SSO.tsx b/Dashboard/src/Pages/StatusPages/View/SSO.tsx index 2103f946ba..b739202e08 100644 --- a/Dashboard/src/Pages/StatusPages/View/SSO.tsx +++ b/Dashboard/src/Pages/StatusPages/View/SSO.tsx @@ -105,7 +105,7 @@ const SSOPage: FunctionComponent = ( return Promise.resolve(item); }} id="sso-table" - name="Status Pages > Staus Page View > Project SSO" + name="Status Pages > Status Page View > Project SSO" isDeleteable={true} isEditable={true} isCreateable={true} diff --git a/Model/Models/StatusPageDomain.ts b/Model/Models/StatusPageDomain.ts index 1f9a1806fa..1720613aa6 100644 --- a/Model/Models/StatusPageDomain.ts +++ b/Model/Models/StatusPageDomain.ts @@ -61,8 +61,8 @@ import { JSONObject } from 'Common/Types/JSON'; @CrudApiEndpoint(new Route('/status-page-domain')) @TableMetadata({ tableName: 'StatusPageDomain', - singularName: 'Staus Page Domain', - pluralName: 'Staus Page Domains', + singularName: 'Status Page Domain', + pluralName: 'Status Page Domains', icon: IconProp.Globe, tableDescription: 'Manage custom domains for your status page', }) diff --git a/StatusPage/src/Components/Page/Page.tsx b/StatusPage/src/Components/Page/Page.tsx index 5eee87c961..90e903f7bb 100644 --- a/StatusPage/src/Components/Page/Page.tsx +++ b/StatusPage/src/Components/Page/Page.tsx @@ -3,7 +3,7 @@ import Page, { ComponentProps as PageComponentProps, } from 'CommonUI/src/Components/Page/Page'; -const StausPagePage: FunctionComponent = ( +const StatusPagePage: FunctionComponent = ( props: PageComponentProps ): ReactElement => { return ( @@ -14,4 +14,4 @@ const StausPagePage: FunctionComponent = ( ); }; -export default StausPagePage; +export default StatusPagePage; diff --git a/Workers/Index.ts b/Workers/Index.ts index 748a1ab700..fa8a651756 100644 --- a/Workers/Index.ts +++ b/Workers/Index.ts @@ -31,7 +31,7 @@ import './Jobs/ScheduledMaintenanceStateTimeline/SendEmailToSubscribers'; import './Jobs/ScheduledMaintenancePublicNote/SendEmailToSubscribers'; // Certs Routers -import StausPageCerts from './Jobs/StatusPageCerts/StausPageCerts'; +import StatusPageCerts from './Jobs/StatusPageCerts/StatusPageCerts'; // Express import Express, { ExpressApplication } from 'CommonServer/Utils/Express'; @@ -64,7 +64,7 @@ const APP_NAME: string = 'workers'; const app: ExpressApplication = Express.getExpressApp(); //cert routes. -app.use(`/${APP_NAME.toLocaleLowerCase()}`, StausPageCerts); +app.use(`/${APP_NAME.toLocaleLowerCase()}`, StatusPageCerts); const init: Function = async (): Promise => { try { diff --git a/Workers/Jobs/StatusPageCerts/StausPageCerts.ts b/Workers/Jobs/StatusPageCerts/StatusPageCerts.ts similarity index 100% rename from Workers/Jobs/StatusPageCerts/StausPageCerts.ts rename to Workers/Jobs/StatusPageCerts/StatusPageCerts.ts