mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
fix lint,
This commit is contained in:
parent
862aefa20d
commit
25ba8b791a
@ -1,4 +1,3 @@
|
||||
|
||||
import { DataSource } from 'typeorm';
|
||||
import {
|
||||
DatabaseHost,
|
||||
@ -14,7 +13,6 @@ import DatabaseType from 'Common/Types/DatabaseType';
|
||||
import AppEnvironment from 'Common/Types/AppEnvironment';
|
||||
import Faker from 'Common/Utils/Faker';
|
||||
|
||||
|
||||
export const dataSourceOptions = {
|
||||
type: DatabaseType.Postgres,
|
||||
host: DatabaseHost.toString(),
|
||||
@ -29,7 +27,7 @@ export const dataSourceOptions = {
|
||||
synchronize: Env === AppEnvironment.Development,
|
||||
};
|
||||
|
||||
export const datasource = new DataSource(dataSourceOptions)
|
||||
export const datasource = new DataSource(dataSourceOptions);
|
||||
|
||||
export const testDataSourceOptions = {
|
||||
type: DatabaseType.Postgres,
|
||||
@ -40,6 +38,5 @@ export const testDataSourceOptions = {
|
||||
database: DatabaseName + Faker.random16Numbers(),
|
||||
entities: Entities,
|
||||
synchronize:
|
||||
Env === AppEnvironment.Test ||
|
||||
Env === AppEnvironment.Development,
|
||||
};
|
||||
Env === AppEnvironment.Test || Env === AppEnvironment.Development,
|
||||
};
|
||||
|
@ -1,3 +1 @@
|
||||
export default [
|
||||
|
||||
];
|
||||
export default [];
|
||||
|
@ -115,7 +115,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
const activeScheduledMaintenanceEvents: Array<ScheduledMaintenance> =
|
||||
BaseModel.fromJSONArray(
|
||||
(data['activeScheduledMaintenanceEvents'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
ScheduledMaintenance
|
||||
);
|
||||
const activeAnnouncements: Array<StatusPageAnnouncement> =
|
||||
@ -160,7 +160,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
const scheduledMaintenanceStateTimelines: Array<ScheduledMaintenanceStateTimeline> =
|
||||
BaseModel.fromJSONArray(
|
||||
(data['scheduledMaintenanceStateTimelines'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
ScheduledMaintenanceStateTimeline
|
||||
);
|
||||
|
||||
@ -194,7 +194,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
try {
|
||||
setError(
|
||||
(err as HTTPErrorResponse).message ||
|
||||
'Server Error. Please try again'
|
||||
'Server Error. Please try again'
|
||||
);
|
||||
} catch (e) {
|
||||
setError('Server Error. Please try again');
|
||||
@ -218,7 +218,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
if (
|
||||
!Object.keys(dict).includes(
|
||||
resource.monitor?.currentMonitorStatusId.toString() ||
|
||||
''
|
||||
''
|
||||
)
|
||||
) {
|
||||
dict[
|
||||
@ -259,7 +259,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
group &&
|
||||
group._id?.toString() &&
|
||||
group._id?.toString() ===
|
||||
resource.statusPageGroupId.toString()) ||
|
||||
resource.statusPageGroupId.toString()) ||
|
||||
(!resource.statusPageGroupId && !group)
|
||||
) {
|
||||
let currentStatus: MonitorStatus | undefined =
|
||||
@ -419,7 +419,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
group &&
|
||||
group._id?.toString() &&
|
||||
group._id?.toString() ===
|
||||
resource.statusPageGroupId.toString()) ||
|
||||
resource.statusPageGroupId.toString()) ||
|
||||
(!resource.statusPageGroupId && !group)
|
||||
) {
|
||||
hasReosurce = true;
|
||||
@ -436,7 +436,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
currentStatus.priority &&
|
||||
currentMonitorStatus?.priority &&
|
||||
currentMonitorStatus?.priority >
|
||||
currentStatus.priority) ||
|
||||
currentStatus.priority) ||
|
||||
!currentStatus.priority
|
||||
) {
|
||||
currentStatus = currentMonitorStatus!;
|
||||
@ -575,12 +575,12 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
eventViewRoute={RouteUtil.populateRouteParams(
|
||||
props.isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap
|
||||
.PREVIEW_INCIDENT_DETAIL
|
||||
] as Route)
|
||||
PageMap
|
||||
.PREVIEW_INCIDENT_DETAIL
|
||||
] as Route)
|
||||
: (RouteMap[
|
||||
PageMap.INCIDENT_DETAIL
|
||||
] as Route),
|
||||
PageMap.INCIDENT_DETAIL
|
||||
] as Route),
|
||||
incidentGroup.incident.id!
|
||||
)}
|
||||
/>
|
||||
@ -621,12 +621,12 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
eventViewRoute={RouteUtil.populateRouteParams(
|
||||
props.isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap
|
||||
.PREVIEW_SCHEDULED_EVENT_DETAIL
|
||||
] as Route)
|
||||
PageMap
|
||||
.PREVIEW_SCHEDULED_EVENT_DETAIL
|
||||
] as Route)
|
||||
: (RouteMap[
|
||||
PageMap.SCHEDULED_EVENT_DETAIL
|
||||
] as Route),
|
||||
PageMap.SCHEDULED_EVENT_DETAIL
|
||||
] as Route),
|
||||
scheduledEventGroup.scheduledMaintenance
|
||||
.id!
|
||||
)}
|
||||
@ -638,10 +638,11 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
<div>
|
||||
{currentStatus && statusPageResources.length > 0 && (
|
||||
<Alert
|
||||
title={`${currentStatus.isOperationalState
|
||||
title={`${
|
||||
currentStatus.isOperationalState
|
||||
? `All`
|
||||
: 'Some'
|
||||
} Resources are ${currentStatus.name}`}
|
||||
} Resources are ${currentStatus.name}`}
|
||||
color={currentStatus.color}
|
||||
doNotShowIcon={true}
|
||||
size={AlertSize.Large}
|
||||
@ -692,7 +693,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
}
|
||||
isLastElement={
|
||||
resourceGroups.length -
|
||||
1 ===
|
||||
1 ===
|
||||
i
|
||||
}
|
||||
title={
|
||||
@ -712,8 +713,10 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
)}
|
||||
|
||||
{statusPageResources.length === 0 && (
|
||||
<ErrorMessage error=" No resources added to this status page. Please add
|
||||
some resources from OneUptime Dashboard."/>
|
||||
<ErrorMessage
|
||||
error=" No resources added to this status page. Please add
|
||||
some resources from OneUptime Dashboard."
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
|
@ -19,13 +19,18 @@ const PageNotFound: FunctionComponent<PageComponentProps> = (
|
||||
<div className="justify-center">
|
||||
<div>
|
||||
{!isSuccess && <h5>Subscribe to this page.</h5>}
|
||||
{isSuccess && <p
|
||||
className="text-center color-light-grey"
|
||||
style={{
|
||||
marginTop: '50px',
|
||||
marginBottom: '50px',
|
||||
}}
|
||||
> You have been subscribed successfully.</p>}
|
||||
{isSuccess && (
|
||||
<p
|
||||
className="text-center color-light-grey"
|
||||
style={{
|
||||
marginTop: '50px',
|
||||
marginBottom: '50px',
|
||||
}}
|
||||
>
|
||||
{' '}
|
||||
You have been subscribed successfully.
|
||||
</p>
|
||||
)}
|
||||
|
||||
{/* <Tabs
|
||||
tabs={['Email', 'SMS', 'Webhook']}
|
||||
|
Loading…
Reference in New Issue
Block a user