mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix icon prop refactor
This commit is contained in:
@@ -3,7 +3,7 @@ import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconD
|
||||
import IconDropdwonItem from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownItem';
|
||||
import IconDropdwonMenu from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownMenu';
|
||||
import IconDropdwonRow from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownRow';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
|
||||
const Help: FunctionComponent = (): ReactElement => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
|
||||
import Notifications from 'CommonUI/src/Components/Header/Notifications/Notifications';
|
||||
import NotificationItem from 'CommonUI/src/Components/Header/Notifications/NotificationItem';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
|
||||
const DashboardHeader: FunctionComponent = (): ReactElement => {
|
||||
return (
|
||||
|
||||
@@ -5,7 +5,7 @@ import React, {
|
||||
useEffect,
|
||||
} from 'react';
|
||||
import ProjectPicker from 'CommonUI/src/Components/Header/ProjectPicker/ProjectPicker';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Project from 'Model/Models/Project';
|
||||
import ModelFormModal from 'CommonUI/src/Components/ModelFormModal/ModelFormModal';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
@@ -142,13 +142,11 @@ const DashboardProjectPicker: FunctionComponent<ComponentProps> = (
|
||||
).map((plan: SubscriptionPlan): RadioButton => {
|
||||
let description: string = plan.isCustomPricing()
|
||||
? `Our sales team will contact you soon.`
|
||||
: `Billed ${
|
||||
isSubsriptionPlanYearly ? 'yearly' : 'monthly'
|
||||
}. ${
|
||||
plan.getTrialPeriod() > 0
|
||||
? `Free ${plan.getTrialPeriod()} days trial.`
|
||||
: ''
|
||||
}`;
|
||||
: `Billed ${isSubsriptionPlanYearly ? 'yearly' : 'monthly'
|
||||
}. ${plan.getTrialPeriod() > 0
|
||||
? `Free ${plan.getTrialPeriod()} days trial.`
|
||||
: ''
|
||||
}`;
|
||||
|
||||
if (
|
||||
isSubsriptionPlanYearly &&
|
||||
@@ -173,20 +171,20 @@ const DashboardProjectPicker: FunctionComponent<ComponentProps> = (
|
||||
sideTitle: plan.isCustomPricing()
|
||||
? 'Custom Price'
|
||||
: isSubsriptionPlanYearly
|
||||
? '$' +
|
||||
(
|
||||
plan.getYearlySubscriptionAmountInUSD() *
|
||||
12
|
||||
).toString()
|
||||
: '$' +
|
||||
plan
|
||||
.getMonthlySubscriptionAmountInUSD()
|
||||
.toString(),
|
||||
? '$' +
|
||||
(
|
||||
plan.getYearlySubscriptionAmountInUSD() *
|
||||
12
|
||||
).toString()
|
||||
: '$' +
|
||||
plan
|
||||
.getMonthlySubscriptionAmountInUSD()
|
||||
.toString(),
|
||||
sideDescription: plan.isCustomPricing()
|
||||
? ''
|
||||
: isSubsriptionPlanYearly
|
||||
? `/year per user`
|
||||
: `/month per user`,
|
||||
? `/year per user`
|
||||
: `/month per user`,
|
||||
};
|
||||
}),
|
||||
title: 'Please select a plan.',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { FunctionComponent, ReactElement, useState } from 'react';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import ModelFormModal from 'CommonUI/src/Components/ModelFormModal/ModelFormModal';
|
||||
import Project from 'Model/Models/Project';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
@@ -82,21 +82,19 @@ const Upgrade: FunctionComponent = (): ReactElement => {
|
||||
let description: string =
|
||||
plan.isCustomPricing()
|
||||
? `Our sales team will contact you soon.`
|
||||
: `Billed ${
|
||||
isSubsriptionPlanYearly
|
||||
? 'yearly'
|
||||
: 'monthly'
|
||||
}. ${
|
||||
plan.getTrialPeriod() >
|
||||
0
|
||||
? `Free ${plan.getTrialPeriod()} days trial.`
|
||||
: ''
|
||||
}`;
|
||||
: `Billed ${isSubsriptionPlanYearly
|
||||
? 'yearly'
|
||||
: 'monthly'
|
||||
}. ${plan.getTrialPeriod() >
|
||||
0
|
||||
? `Free ${plan.getTrialPeriod()} days trial.`
|
||||
: ''
|
||||
}`;
|
||||
|
||||
if (
|
||||
isSubsriptionPlanYearly &&
|
||||
plan.getYearlySubscriptionAmountInUSD() ===
|
||||
0
|
||||
0
|
||||
) {
|
||||
description =
|
||||
'This plan is free, forever. ';
|
||||
@@ -105,7 +103,7 @@ const Upgrade: FunctionComponent = (): ReactElement => {
|
||||
if (
|
||||
!isSubsriptionPlanYearly &&
|
||||
plan.getMonthlySubscriptionAmountInUSD() ===
|
||||
0
|
||||
0
|
||||
) {
|
||||
description =
|
||||
'This plan is free, forever. ';
|
||||
@@ -121,21 +119,21 @@ const Upgrade: FunctionComponent = (): ReactElement => {
|
||||
plan.isCustomPricing()
|
||||
? 'Custom Price'
|
||||
: isSubsriptionPlanYearly
|
||||
? '$' +
|
||||
(
|
||||
plan.getYearlySubscriptionAmountInUSD() *
|
||||
12
|
||||
).toString()
|
||||
: '$' +
|
||||
plan
|
||||
.getMonthlySubscriptionAmountInUSD()
|
||||
.toString(),
|
||||
? '$' +
|
||||
(
|
||||
plan.getYearlySubscriptionAmountInUSD() *
|
||||
12
|
||||
).toString()
|
||||
: '$' +
|
||||
plan
|
||||
.getMonthlySubscriptionAmountInUSD()
|
||||
.toString(),
|
||||
sideDescription:
|
||||
plan.isCustomPricing()
|
||||
? ''
|
||||
: isSubsriptionPlanYearly
|
||||
? `/year per user`
|
||||
: `/month per user`,
|
||||
? `/year per user`
|
||||
: `/month per user`,
|
||||
};
|
||||
}
|
||||
),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
|
||||
@@ -5,7 +5,7 @@ import Button, {
|
||||
ButtonSize,
|
||||
ButtonStyleType,
|
||||
} from 'CommonUI/src/Components/Button/Button';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import ModelAPI, { ListResult } from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import ProjectUtil from 'CommonUI/src/Utils/Project';
|
||||
import IncidentState from 'Model/Models/IncidentState';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Incident from 'Model/Models/Incident';
|
||||
@@ -186,14 +186,14 @@ const IncidentsTable: FunctionComponent<ComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'currentIncidentState'
|
||||
'currentIncidentState'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'currentIncidentState'
|
||||
'currentIncidentState'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -230,14 +230,14 @@ const IncidentsTable: FunctionComponent<ComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'incidentSeverity'
|
||||
'incidentSeverity'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'incidentSeverity'
|
||||
'incidentSeverity'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Monitor from 'Model/Models/Monitor';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Label from 'Model/Models/Label';
|
||||
import { JSONArray, JSONObject } from 'Common/Types/JSON';
|
||||
import LabelsElement from '../../Components/Label/Labels';
|
||||
@@ -151,14 +151,14 @@ const MonitorsTable: FunctionComponent<ComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'currentMonitorStatus'
|
||||
'currentMonitorStatus'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'currentMonitorStatus'
|
||||
'currentMonitorStatus'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import NavBarItem from 'CommonUI/src/Components/Navbar/NavBarItem';
|
||||
// import NavBarMenuItem from 'CommonUI/src/Components/Navbar/NavBarMenuItem';
|
||||
// import NavBarMenuColumn from 'CommonUI/src/Components/Navbar/NavBarMenuColumn';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import Button, {
|
||||
ButtonSize,
|
||||
ButtonStyleType,
|
||||
} from 'CommonUI/src/Components/Button/Button';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import ModelAPI, { ListResult } from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import ProjectUtil from 'CommonUI/src/Utils/Project';
|
||||
import ScheduledMaintenanceState from 'Model/Models/ScheduledMaintenanceState';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import ScheduledMaintenance from 'Model/Models/ScheduledMaintenance';
|
||||
@@ -208,14 +208,14 @@ const ScheduledMaintenancesTable: FunctionComponent<ComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'currentScheduledMaintenanceState'
|
||||
'currentScheduledMaintenanceState'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'currentScheduledMaintenanceState'
|
||||
'currentScheduledMaintenanceState'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -286,7 +286,7 @@ const ScheduledMaintenancesTable: FunctionComponent<ComponentProps> = (
|
||||
statusPages={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['statusPages'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
StatusPage
|
||||
) as Array<StatusPage>
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import Route from 'Common/Types/API/Route';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { JSONArray, JSONObject } from 'Common/Types/JSON';
|
||||
import Incident from 'Model/Models/Incident';
|
||||
@@ -69,8 +69,7 @@ const Home: FunctionComponent<PageComponentProps> = (
|
||||
pluralName="Active Incidents"
|
||||
onViewPage={(item: Incident) => {
|
||||
return new Route(
|
||||
`/dashboard/${
|
||||
item.projectId || item.project?._id || ''
|
||||
`/dashboard/${item.projectId || item.project?._id || ''
|
||||
}/incidents/${item._id}`
|
||||
);
|
||||
}}
|
||||
@@ -92,7 +91,7 @@ const Home: FunctionComponent<PageComponentProps> = (
|
||||
project={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['project'] as JSONObject) ||
|
||||
[],
|
||||
[],
|
||||
Project
|
||||
) as Project
|
||||
}
|
||||
@@ -132,14 +131,14 @@ const Home: FunctionComponent<PageComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'currentIncidentState'
|
||||
'currentIncidentState'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'currentIncidentState'
|
||||
'currentIncidentState'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -166,14 +165,14 @@ const Home: FunctionComponent<PageComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'incidentSeverity'
|
||||
'incidentSeverity'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'incidentSeverity'
|
||||
'incidentSeverity'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -200,7 +199,7 @@ const Home: FunctionComponent<PageComponentProps> = (
|
||||
monitors={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['monitors'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
Monitor
|
||||
) as Array<Monitor>
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageMap from '../../Utils/PageMap';
|
||||
import TeamMember from 'Model/Models/TeamMember';
|
||||
import User from 'CommonUI/src/Utils/User';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
|
||||
@@ -6,7 +6,7 @@ import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import User from 'Model/Models/User';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/CountModelSideMenuItem';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
@@ -61,7 +61,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Ongoing Events',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.HOME_ONGOING_SCHEDULED_MAINTENANCE_EVENTS
|
||||
PageMap.HOME_ONGOING_SCHEDULED_MAINTENANCE_EVENTS
|
||||
] as Route
|
||||
),
|
||||
}}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageComponentProps from '../../PageComponentProps';
|
||||
import SideMenu from './SideMenu';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { JSONArray, JSONObject } from 'Common/Types/JSON';
|
||||
@@ -208,14 +208,14 @@ const IncidentView: FunctionComponent<PageComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'currentIncidentState'
|
||||
'currentIncidentState'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'currentIncidentState'
|
||||
'currentIncidentState'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -244,14 +244,14 @@ const IncidentView: FunctionComponent<PageComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'incidentSeverity'
|
||||
'incidentSeverity'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'incidentSeverity'
|
||||
'incidentSeverity'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -305,7 +305,7 @@ const IncidentView: FunctionComponent<PageComponentProps> = (
|
||||
labels={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['labels'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
Label
|
||||
) as Array<Label>
|
||||
}
|
||||
@@ -326,7 +326,7 @@ const IncidentView: FunctionComponent<PageComponentProps> = (
|
||||
incidentId={modelId}
|
||||
incidentTimeline={
|
||||
onBeforeFetchData[
|
||||
'data'
|
||||
'data'
|
||||
] as Array<BaseModel>
|
||||
}
|
||||
incidentType={IncidentType.Ack}
|
||||
@@ -350,7 +350,7 @@ const IncidentView: FunctionComponent<PageComponentProps> = (
|
||||
incidentId={modelId}
|
||||
incidentTimeline={
|
||||
onBeforeFetchData[
|
||||
'data'
|
||||
'data'
|
||||
] as Array<BaseModel>
|
||||
}
|
||||
incidentType={IncidentType.Resolve}
|
||||
|
||||
@@ -12,7 +12,7 @@ import ModelTable, {
|
||||
ShowTableAs,
|
||||
} from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
@@ -130,7 +130,7 @@ const IncidentDelete: FunctionComponent<PageComponentProps> = (
|
||||
user={
|
||||
JSONFunctions.fromJSON(
|
||||
item[
|
||||
'createdByUser'
|
||||
'createdByUser'
|
||||
] as JSONObject,
|
||||
User
|
||||
) as User
|
||||
|
||||
@@ -12,7 +12,7 @@ import ModelTable, {
|
||||
ShowTableAs,
|
||||
} from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
@@ -130,7 +130,7 @@ const PublicNote: FunctionComponent<PageComponentProps> = (
|
||||
user={
|
||||
JSONFunctions.fromJSON(
|
||||
item[
|
||||
'createdByUser'
|
||||
'createdByUser'
|
||||
] as JSONObject,
|
||||
User
|
||||
) as User
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
@@ -33,7 +33,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'State Timeline',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.INCIDENT_VIEW_STATE_TIMELINE
|
||||
PageMap.INCIDENT_VIEW_STATE_TIMELINE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
|
||||
@@ -9,7 +9,7 @@ import DashboardNavigation from '../../../Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import IncidentStateTimeline from 'Model/Models/IncidentStateTimeline';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import IncidentState from 'Model/Models/IncidentState';
|
||||
@@ -129,12 +129,12 @@ const IncidentDelete: FunctionComponent<PageComponentProps> = (
|
||||
<Pill
|
||||
color={
|
||||
(item['incidentState'] as JSONObject)[
|
||||
'color'
|
||||
'color'
|
||||
] as Color
|
||||
}
|
||||
text={
|
||||
(item['incidentState'] as JSONObject)[
|
||||
'name'
|
||||
'name'
|
||||
] as string
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
|
||||
@@ -15,7 +15,7 @@ import Color from 'Common/Types/Color';
|
||||
import Pill from 'CommonUI/src/Components/Pill/Pill';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import MonitorStatus from 'Model/Models/MonitorStatus';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Incident from 'Model/Models/Incident';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
@@ -80,8 +80,7 @@ const MonitorIncidents: FunctionComponent<PageComponentProps> = (
|
||||
}}
|
||||
onViewPage={(item: Incident) => {
|
||||
return new Route(
|
||||
`/dashboard/${
|
||||
DashboardNavigation.getProjectId()?.toString() || ''
|
||||
`/dashboard/${DashboardNavigation.getProjectId()?.toString() || ''
|
||||
}/incidents/${item._id}`
|
||||
);
|
||||
}}
|
||||
@@ -177,14 +176,14 @@ const MonitorIncidents: FunctionComponent<PageComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'currentIncidentState'
|
||||
'currentIncidentState'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'currentIncidentState'
|
||||
'currentIncidentState'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -211,7 +210,7 @@ const MonitorIncidents: FunctionComponent<PageComponentProps> = (
|
||||
monitors={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['monitors'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
Monitor
|
||||
) as Array<Monitor>
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageComponentProps from '../../PageComponentProps';
|
||||
import SideMenu from './SideMenu';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import Label from 'Model/Models/Label';
|
||||
@@ -80,7 +80,7 @@ const MonitorView: 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');
|
||||
@@ -204,14 +204,14 @@ const MonitorView: FunctionComponent<PageComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'currentMonitorStatus'
|
||||
'currentMonitorStatus'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'currentMonitorStatus'
|
||||
'currentMonitorStatus'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -240,7 +240,7 @@ const MonitorView: FunctionComponent<PageComponentProps> = (
|
||||
labels={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['labels'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
Label
|
||||
) as Array<Label>
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
@@ -33,7 +33,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Status Timeline',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.MONITOR_VIEW_STATUS_TIMELINE
|
||||
PageMap.MONITOR_VIEW_STATUS_TIMELINE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
|
||||
@@ -9,7 +9,7 @@ import DashboardNavigation from '../../../Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import MonitorStatusTimeline from 'Model/Models/MonitorStatusTimeline';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import MonitorStatus from 'Model/Models/MonitorStatus';
|
||||
@@ -128,12 +128,12 @@ const MonitorDelete: FunctionComponent<PageComponentProps> = (
|
||||
<Statusbubble
|
||||
color={
|
||||
(item['monitorStatus'] as JSONObject)[
|
||||
'color'
|
||||
'color'
|
||||
] as Color
|
||||
}
|
||||
text={
|
||||
(item['monitorStatus'] as JSONObject)[
|
||||
'name'
|
||||
'name'
|
||||
] as string
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -8,7 +8,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import OnCallDuty from 'Model/Models/OnCallDuty';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Label from 'Model/Models/Label';
|
||||
import { JSONArray, JSONObject } from 'Common/Types/JSON';
|
||||
import LabelsElement from '../../Components/Label/Labels';
|
||||
|
||||
@@ -3,7 +3,7 @@ import PageComponentProps from '../PageComponentProps';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import Button, { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import { BILLING_ENABLED } from 'CommonUI/src/Config';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
|
||||
export interface ComponentProps extends PageComponentProps {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
@@ -26,7 +26,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'All Events',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SCHEDULED_MAINTENANCE_EVENTS
|
||||
PageMap.SCHEDULED_MAINTENANCE_EVENTS
|
||||
] as Route
|
||||
),
|
||||
}}
|
||||
@@ -38,7 +38,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Ongoing Events',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.ONGOING_SCHEDULED_MAINTENANCE_EVENTS
|
||||
PageMap.ONGOING_SCHEDULED_MAINTENANCE_EVENTS
|
||||
] as Route
|
||||
),
|
||||
}}
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageComponentProps from '../../PageComponentProps';
|
||||
import SideMenu from './SideMenu';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { JSONArray, JSONObject } from 'Common/Types/JSON';
|
||||
@@ -249,14 +249,14 @@ const ScheduledMaintenanceView: FunctionComponent<PageComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'currentScheduledMaintenanceState'
|
||||
'currentScheduledMaintenanceState'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'currentScheduledMaintenanceState'
|
||||
'currentScheduledMaintenanceState'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
@@ -348,7 +348,7 @@ const ScheduledMaintenanceView: FunctionComponent<PageComponentProps> = (
|
||||
labels={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['labels'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
Label
|
||||
) as Array<Label>
|
||||
}
|
||||
@@ -369,7 +369,7 @@ const ScheduledMaintenanceView: FunctionComponent<PageComponentProps> = (
|
||||
scheduledMaintenanceId={modelId}
|
||||
scheduledMaintenanceTimeline={
|
||||
onBeforeFetchData[
|
||||
'data'
|
||||
'data'
|
||||
] as Array<BaseModel>
|
||||
}
|
||||
stateType={StateType.Ongoing}
|
||||
@@ -393,7 +393,7 @@ const ScheduledMaintenanceView: FunctionComponent<PageComponentProps> = (
|
||||
scheduledMaintenanceId={modelId}
|
||||
scheduledMaintenanceTimeline={
|
||||
onBeforeFetchData[
|
||||
'data'
|
||||
'data'
|
||||
] as Array<BaseModel>
|
||||
}
|
||||
stateType={StateType.Completed}
|
||||
|
||||
@@ -12,7 +12,7 @@ import ModelTable, {
|
||||
ShowTableAs,
|
||||
} from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
@@ -55,7 +55,7 @@ const ScheduledMaintenanceDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Private Notes',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SCHEDULED_MAINTENANCE_INTERNAL_NOTE
|
||||
PageMap.SCHEDULED_MAINTENANCE_INTERNAL_NOTE
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
@@ -132,7 +132,7 @@ const ScheduledMaintenanceDelete: FunctionComponent<PageComponentProps> = (
|
||||
user={
|
||||
JSONFunctions.fromJSON(
|
||||
item[
|
||||
'createdByUser'
|
||||
'createdByUser'
|
||||
] as JSONObject,
|
||||
User
|
||||
) as User
|
||||
|
||||
@@ -12,7 +12,7 @@ import ModelTable, {
|
||||
ShowTableAs,
|
||||
} from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
@@ -55,7 +55,7 @@ const PublicNote: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Public Notes',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SCHEDULED_MAINTENANCE_PUBLIC_NOTE
|
||||
PageMap.SCHEDULED_MAINTENANCE_PUBLIC_NOTE
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
@@ -132,7 +132,7 @@ const PublicNote: FunctionComponent<PageComponentProps> = (
|
||||
user={
|
||||
JSONFunctions.fromJSON(
|
||||
item[
|
||||
'createdByUser'
|
||||
'createdByUser'
|
||||
] as JSONObject,
|
||||
User
|
||||
) as User
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
@@ -23,7 +23,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Overview',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SCHEDULED_MAINTENANCE_VIEW
|
||||
PageMap.SCHEDULED_MAINTENANCE_VIEW
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -35,8 +35,8 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'State Timeline',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap
|
||||
.SCHEDULED_MAINTENANCE_VIEW_STATE_TIMELINE
|
||||
PageMap
|
||||
.SCHEDULED_MAINTENANCE_VIEW_STATE_TIMELINE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -51,7 +51,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Private Notes',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SCHEDULED_MAINTENANCE_INTERNAL_NOTE
|
||||
PageMap.SCHEDULED_MAINTENANCE_INTERNAL_NOTE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -63,7 +63,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Public Notes',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SCHEDULED_MAINTENANCE_PUBLIC_NOTE
|
||||
PageMap.SCHEDULED_MAINTENANCE_PUBLIC_NOTE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -78,7 +78,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Delete Scheduled Maintenance',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SCHEDULED_MAINTENANCE_VIEW_DELETE
|
||||
PageMap.SCHEDULED_MAINTENANCE_VIEW_DELETE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
|
||||
@@ -9,7 +9,7 @@ import DashboardNavigation from '../../../Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import ScheduledMaintenanceStateTimeline from 'Model/Models/ScheduledMaintenanceStateTimeline';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import ScheduledMaintenanceState from 'Model/Models/ScheduledMaintenanceState';
|
||||
@@ -52,7 +52,7 @@ const ScheduledMaintenanceDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Status Timeline',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SCHEDULED_MAINTENANCE_VIEW_STATE_TIMELINE
|
||||
PageMap.SCHEDULED_MAINTENANCE_VIEW_STATE_TIMELINE
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
@@ -132,14 +132,14 @@ const ScheduledMaintenanceDelete: FunctionComponent<PageComponentProps> = (
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'scheduledMaintenanceState'
|
||||
'scheduledMaintenanceState'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'scheduledMaintenanceState'
|
||||
'scheduledMaintenanceState'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import DashboardSideMenu from './SideMenu';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import ApiKeyPermission from 'Model/Models/ApiKeyPermission';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import ApiKey from 'Model/Models/ApiKey';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
|
||||
@@ -9,7 +9,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import ApiKey from 'Model/Models/ApiKey';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import DashboardNavigation from '../../Utils/Navigation';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
const APIKeys: FunctionComponent<PageComponentProps> = (
|
||||
|
||||
@@ -4,7 +4,7 @@ import { JSONObject } from 'Common/Types/JSON';
|
||||
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import Card from 'CommonUI/src/Components/Card/Card';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
@@ -44,7 +44,7 @@ import Text from 'Common/Types/Text';
|
||||
import DashboardNavigation from '../../Utils/Navigation';
|
||||
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
|
||||
|
||||
export interface ComponentProps extends PageComponentProps {}
|
||||
export interface ComponentProps extends PageComponentProps { }
|
||||
|
||||
const Settings: FunctionComponent<ComponentProps> = (
|
||||
_props: ComponentProps
|
||||
@@ -87,7 +87,7 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
try {
|
||||
setError(
|
||||
(err as HTTPErrorResponse).message ||
|
||||
'Server Error. Please try again'
|
||||
'Server Error. Please try again'
|
||||
);
|
||||
} catch (e) {
|
||||
setError('Server Error. Please try again');
|
||||
@@ -162,20 +162,18 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
).map((plan: SubscriptionPlan): RadioButton => {
|
||||
let description: string = plan.isCustomPricing()
|
||||
? `Our sales team will contact you soon.`
|
||||
: `Billed ${
|
||||
isSubsriptionPlanYearly
|
||||
? 'yearly'
|
||||
: 'monthly'
|
||||
}. ${
|
||||
plan.getTrialPeriod() > 0
|
||||
? `Free ${plan.getTrialPeriod()} days trial.`
|
||||
: ''
|
||||
}`;
|
||||
: `Billed ${isSubsriptionPlanYearly
|
||||
? 'yearly'
|
||||
: 'monthly'
|
||||
}. ${plan.getTrialPeriod() > 0
|
||||
? `Free ${plan.getTrialPeriod()} days trial.`
|
||||
: ''
|
||||
}`;
|
||||
|
||||
if (
|
||||
isSubsriptionPlanYearly &&
|
||||
plan.getYearlySubscriptionAmountInUSD() ===
|
||||
0
|
||||
0
|
||||
) {
|
||||
description =
|
||||
'This plan is free, forever. ';
|
||||
@@ -184,7 +182,7 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
if (
|
||||
!isSubsriptionPlanYearly &&
|
||||
plan.getMonthlySubscriptionAmountInUSD() ===
|
||||
0
|
||||
0
|
||||
) {
|
||||
description =
|
||||
'This plan is free, forever. ';
|
||||
@@ -199,20 +197,20 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
sideTitle: plan.isCustomPricing()
|
||||
? 'Custom Price'
|
||||
: isSubsriptionPlanYearly
|
||||
? '$' +
|
||||
(
|
||||
plan.getYearlySubscriptionAmountInUSD() *
|
||||
12
|
||||
).toString()
|
||||
: '$' +
|
||||
plan
|
||||
.getMonthlySubscriptionAmountInUSD()
|
||||
.toString(),
|
||||
? '$' +
|
||||
(
|
||||
plan.getYearlySubscriptionAmountInUSD() *
|
||||
12
|
||||
).toString()
|
||||
: '$' +
|
||||
plan
|
||||
.getMonthlySubscriptionAmountInUSD()
|
||||
.toString(),
|
||||
sideDescription: plan.isCustomPricing()
|
||||
? ''
|
||||
: isSubsriptionPlanYearly
|
||||
? `/year per user`
|
||||
: `/month per user`,
|
||||
? `/year per user`
|
||||
: `/month per user`,
|
||||
};
|
||||
}),
|
||||
title: 'Please select a plan.',
|
||||
@@ -250,18 +248,16 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
|
||||
let description: string = plan.isCustomPricing()
|
||||
? `Custom Pricing based on your needs. Our sales team will contact you shortly.`
|
||||
: `$${
|
||||
isYearlyPlan
|
||||
? plan.getYearlySubscriptionAmountInUSD()
|
||||
: plan.getMonthlySubscriptionAmountInUSD()
|
||||
} / month per user. Billed ${
|
||||
isYearlyPlan ? 'yearly' : 'monthly'
|
||||
}.`;
|
||||
: `$${isYearlyPlan
|
||||
? plan.getYearlySubscriptionAmountInUSD()
|
||||
: plan.getMonthlySubscriptionAmountInUSD()
|
||||
} / month per user. Billed ${isYearlyPlan ? 'yearly' : 'monthly'
|
||||
}.`;
|
||||
|
||||
if (
|
||||
isYearlyPlan &&
|
||||
plan.getYearlySubscriptionAmountInUSD() ===
|
||||
0
|
||||
0
|
||||
) {
|
||||
description =
|
||||
'This plan is free, forever. ';
|
||||
@@ -270,7 +266,7 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
if (
|
||||
!isYearlyPlan &&
|
||||
plan.getMonthlySubscriptionAmountInUSD() ===
|
||||
0
|
||||
0
|
||||
) {
|
||||
description =
|
||||
'This plan is free, forever. ';
|
||||
@@ -299,7 +295,7 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
<div className="bold">
|
||||
{
|
||||
item[
|
||||
'paymentProviderSubscriptionSeats'
|
||||
'paymentProviderSubscriptionSeats'
|
||||
] as string
|
||||
}{' '}
|
||||
users in this project.
|
||||
@@ -433,7 +429,7 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
Navigation.navigate(
|
||||
RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SETTINGS_DANGERZONE
|
||||
PageMap.SETTINGS_DANGERZONE
|
||||
] as Route
|
||||
)
|
||||
);
|
||||
|
||||
@@ -9,7 +9,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
const CustomSMTP: FunctionComponent<PageComponentProps> = (
|
||||
_props: PageComponentProps
|
||||
|
||||
@@ -13,7 +13,7 @@ import DashboardSideMenu from './SideMenu';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Domain from 'Model/Models/Domain';
|
||||
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
@@ -203,8 +203,8 @@ const Domains: FunctionComponent<PageComponentProps> = (
|
||||
new ObjectID(
|
||||
currentVerificationDomain['_id']
|
||||
? currentVerificationDomain[
|
||||
'_id'
|
||||
].toString()
|
||||
'_id'
|
||||
].toString()
|
||||
: ''
|
||||
),
|
||||
{
|
||||
@@ -219,7 +219,7 @@ const Domains: 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');
|
||||
|
||||
@@ -10,7 +10,7 @@ import ModelTable, {
|
||||
} from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import IncidentSeverity from 'Model/Models/IncidentSeverity';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Pill from 'CommonUI/src/Components/Pill/Pill';
|
||||
|
||||
@@ -10,7 +10,7 @@ import ModelTable, {
|
||||
} from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import IncidentState from 'Model/Models/IncidentState';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Pill from 'CommonUI/src/Components/Pill/Pill';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Button, { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
@@ -24,7 +24,7 @@ import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
|
||||
import ComponentLoader from 'CommonUI/src/Components/ComponentLoader/ComponentLoader';
|
||||
import DashboardNavigation from '../../Utils/Navigation';
|
||||
|
||||
export interface ComponentProps extends PageComponentProps {}
|
||||
export interface ComponentProps extends PageComponentProps { }
|
||||
|
||||
const Settings: FunctionComponent<ComponentProps> = (
|
||||
_props: ComponentProps
|
||||
@@ -57,7 +57,7 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
try {
|
||||
setError(
|
||||
(err as HTTPErrorResponse).message ||
|
||||
'Server Error. Please try again'
|
||||
'Server Error. Please try again'
|
||||
);
|
||||
} catch (e) {
|
||||
setError('Server Error. Please try again');
|
||||
@@ -136,11 +136,10 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
isFilterable: true,
|
||||
getElement: (item: JSONObject) => {
|
||||
return (
|
||||
<span>{`${
|
||||
(item['amount'] as number) / 100
|
||||
} ${item['currencyCode']
|
||||
?.toString()
|
||||
.toUpperCase()}`}</span>
|
||||
<span>{`${(item['amount'] as number) / 100
|
||||
} ${item['currencyCode']
|
||||
?.toString()
|
||||
.toUpperCase()}`}</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -188,7 +187,7 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
onClick={() => {
|
||||
Navigation.navigate(
|
||||
item[
|
||||
'downloadableLink'
|
||||
'downloadableLink'
|
||||
] as URL
|
||||
);
|
||||
}}
|
||||
@@ -199,16 +198,16 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
)}
|
||||
|
||||
{item['status'] !== 'paid' &&
|
||||
item['status'] !== 'draft' ? (
|
||||
item['status'] !== 'draft' ? (
|
||||
<Button
|
||||
icon={IconProp.Billing}
|
||||
onClick={async () => {
|
||||
await payInvoice(
|
||||
item[
|
||||
'paymentProviderCustomerId'
|
||||
'paymentProviderCustomerId'
|
||||
] as string,
|
||||
item[
|
||||
'paymentProviderInvoiceId'
|
||||
'paymentProviderInvoiceId'
|
||||
] as string
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -12,7 +12,7 @@ import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSc
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Pill from 'CommonUI/src/Components/Pill/Pill';
|
||||
import Color from 'Common/Types/Color';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import DashboardNavigation from '../../Utils/Navigation';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
const Labels: FunctionComponent<PageComponentProps> = (
|
||||
|
||||
@@ -14,7 +14,7 @@ import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSc
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import StatusBubble from 'CommonUI/src/Components/StatusBubble/StatusBubble';
|
||||
import Color from 'Common/Types/Color';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import SortOrder from 'Common/Types/Database/SortOrder';
|
||||
import DashboardNavigation from '../../Utils/Navigation';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Project from 'Model/Models/Project';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Page from 'CommonUI/src/Components/Page/Page';
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
|
||||
@@ -10,7 +10,7 @@ import ModelTable, {
|
||||
} from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import ScheduledMaintenanceState from 'Model/Models/ScheduledMaintenanceState';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Pill from 'CommonUI/src/Components/Pill/Pill';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
@@ -80,7 +80,7 @@ const DashboardSideMenu: FunctionComponent = (): ReactElement => {
|
||||
title: 'Incident Severity',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SETTINGS_INCIDENTS_SEVERITY
|
||||
PageMap.SETTINGS_INCIDENTS_SEVERITY
|
||||
] as Route
|
||||
),
|
||||
}}
|
||||
@@ -100,7 +100,7 @@ const DashboardSideMenu: FunctionComponent = (): ReactElement => {
|
||||
title: 'Event State',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SETTINGS_SCHEDULED_MAINTENANCE_STATE
|
||||
PageMap.SETTINGS_SCHEDULED_MAINTENANCE_STATE
|
||||
] as Route
|
||||
),
|
||||
}}
|
||||
@@ -177,7 +177,7 @@ const DashboardSideMenu: FunctionComponent = (): ReactElement => {
|
||||
title: 'Invoices',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.SETTINGS_BILLING_INVOICES
|
||||
PageMap.SETTINGS_BILLING_INVOICES
|
||||
] as Route
|
||||
),
|
||||
}}
|
||||
|
||||
@@ -8,7 +8,7 @@ import DashboardSideMenu from './SideMenu';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Team from 'Model/Models/Team';
|
||||
import TeamMember from 'Model/Models/TeamMember';
|
||||
|
||||
@@ -9,7 +9,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Team from 'Model/Models/Team';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import DashboardNavigation from '../../Utils/Navigation';
|
||||
const Teams: FunctionComponent<PageComponentProps> = (
|
||||
props: PageComponentProps
|
||||
|
||||
@@ -8,7 +8,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Label from 'Model/Models/Label';
|
||||
import { JSONArray, JSONObject } from 'Common/Types/JSON';
|
||||
import LabelsElement from '../../Components/Label/Labels';
|
||||
|
||||
@@ -8,7 +8,7 @@ import SideMenu from './SideMenu';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
@@ -47,7 +47,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Advanced Settings',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_ADVANCED_OPTIONS
|
||||
PageMap.STATUS_PAGE_VIEW_ADVANCED_OPTIONS
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -10,7 +10,7 @@ import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPageAnnouncement from 'Model/Models/StatusPageAnnouncement';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
@@ -53,7 +53,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Announcements',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_ANNOUNCEMENTS
|
||||
PageMap.STATUS_PAGE_VIEW_ANNOUNCEMENTS
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -8,7 +8,7 @@ import SideMenu from './SideMenu';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
|
||||
@@ -8,7 +8,7 @@ import SideMenu from './SideMenu';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
|
||||
@@ -11,7 +11,7 @@ import StatusPageDomain from 'Model/Models/StatusPageDomain';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import Domain from 'Model/Models/Domain';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { StatusPageCNameRecord } from 'CommonUI/src/Config';
|
||||
|
||||
@@ -10,7 +10,7 @@ import ObjectID from 'Common/Types/ObjectID';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import StatusPageSubscriber from 'Model/Models/StatusPageSubscriber';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import NotNull from 'Common/Types/Database/NotNull';
|
||||
@@ -53,7 +53,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Email Subscribers',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_EMAIL_SUBSCRIBERS
|
||||
PageMap.STATUS_PAGE_VIEW_EMAIL_SUBSCRIBERS
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -9,7 +9,7 @@ import DashboardNavigation from '../../../Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
@@ -51,7 +51,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Footer',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_FOOTER_STYLE
|
||||
PageMap.STATUS_PAGE_VIEW_FOOTER_STYLE
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -10,7 +10,7 @@ import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPageGroup from 'Model/Models/StatusPageGroup';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import SortOrder from 'Common/Types/Database/SortOrder';
|
||||
|
||||
@@ -9,7 +9,7 @@ import DashboardNavigation from '../../../Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
@@ -51,7 +51,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Header',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_HEADER_STYLE
|
||||
PageMap.STATUS_PAGE_VIEW_HEADER_STYLE
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageComponentProps from '../../PageComponentProps';
|
||||
import SideMenu from './SideMenu';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import Label from 'Model/Models/Label';
|
||||
@@ -133,7 +133,7 @@ const StatusPageView: FunctionComponent<PageComponentProps> = (
|
||||
labels={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['labels'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
Label
|
||||
) as Array<Label>
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import SideMenu from './SideMenu';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
@@ -46,7 +46,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Navbar',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_NAVBAR_STYLE
|
||||
PageMap.STATUS_PAGE_VIEW_NAVBAR_STYLE
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -9,7 +9,7 @@ import DashboardNavigation from '../../../Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
|
||||
@@ -53,7 +53,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Private Users',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_PRIVATE_USERS
|
||||
PageMap.STATUS_PAGE_VIEW_PRIVATE_USERS
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
@@ -130,9 +130,9 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
currentPlan={
|
||||
BILLING_ENABLED
|
||||
? SubscriptionPlan.getPlanSelect(
|
||||
props.currentProject?.paymentProviderPlanId!,
|
||||
getAllEnvVars()
|
||||
)
|
||||
props.currentProject?.paymentProviderPlanId!,
|
||||
getAllEnvVars()
|
||||
)
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -18,7 +18,7 @@ import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSc
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import SortOrder from 'Common/Types/Database/SortOrder';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Monitor from 'Model/Models/Monitor';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import MonitorElement from '../../../Components/Monitor/Monitor';
|
||||
@@ -68,7 +68,7 @@ const StatusPageDelete: 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');
|
||||
@@ -121,13 +121,12 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
}}
|
||||
cardProps={{
|
||||
icon: IconProp.AltGlobe,
|
||||
title: `${
|
||||
statusPageGroupName
|
||||
title: `${statusPageGroupName
|
||||
? statusPageGroupName + ' - '
|
||||
: groups.length > 0
|
||||
? 'Uncategorized - '
|
||||
: ''
|
||||
}Status Page Resources`,
|
||||
? 'Uncategorized - '
|
||||
: ''
|
||||
}Status Page Resources`,
|
||||
description: 'Resources that will be shown on the page',
|
||||
}}
|
||||
noItemsMessage={
|
||||
@@ -235,7 +234,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
monitor={
|
||||
JSONFunctions.fromJSON(
|
||||
(item['monitor'] as JSONObject) ||
|
||||
[],
|
||||
[],
|
||||
Monitor
|
||||
) as Monitor
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPageSubscriber from 'Model/Models/StatusPageSubscriber';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import NotNull from 'Common/Types/Database/NotNull';
|
||||
@@ -49,7 +49,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'SMS Subscribers',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_SMS_SUBSCRIBERS
|
||||
PageMap.STATUS_PAGE_VIEW_SMS_SUBSCRIBERS
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
@@ -34,7 +34,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Annoucements',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_ANNOUNCEMENTS
|
||||
PageMap.STATUS_PAGE_VIEW_ANNOUNCEMENTS
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -49,7 +49,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Monitors',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_RESOURCES
|
||||
PageMap.STATUS_PAGE_VIEW_RESOURCES
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -74,7 +74,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Email Subscribers',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_EMAIL_SUBSCRIBERS
|
||||
PageMap.STATUS_PAGE_VIEW_EMAIL_SUBSCRIBERS
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -112,7 +112,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Subscriber Settings',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_SUBSCRIBER_SETTINGS
|
||||
PageMap.STATUS_PAGE_VIEW_SUBSCRIBER_SETTINGS
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -127,7 +127,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Essential Branding',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_BRANDING
|
||||
PageMap.STATUS_PAGE_VIEW_BRANDING
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -153,7 +153,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'HTML, CSS & JavaScript',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_CUSTOM_HTML_CSS
|
||||
PageMap.STATUS_PAGE_VIEW_CUSTOM_HTML_CSS
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -177,7 +177,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Header',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_HEADER_STYLE
|
||||
PageMap.STATUS_PAGE_VIEW_HEADER_STYLE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -190,7 +190,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Footer',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_FOOTER_STYLE
|
||||
PageMap.STATUS_PAGE_VIEW_FOOTER_STYLE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -203,7 +203,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Navigation',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_NAVBAR_STYLE
|
||||
PageMap.STATUS_PAGE_VIEW_NAVBAR_STYLE
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -218,7 +218,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Private Users',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_PRIVATE_USERS
|
||||
PageMap.STATUS_PAGE_VIEW_PRIVATE_USERS
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
@@ -233,7 +233,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Advanced Settings',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_ADVANCED_OPTIONS
|
||||
PageMap.STATUS_PAGE_VIEW_ADVANCED_OPTIONS
|
||||
] as Route,
|
||||
props.modelId
|
||||
),
|
||||
|
||||
@@ -8,7 +8,7 @@ import SideMenu from './SideMenu';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
@@ -46,7 +46,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Subscriber Settings',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_SUBSCRIBER_SETTINGS
|
||||
PageMap.STATUS_PAGE_VIEW_SUBSCRIBER_SETTINGS
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -10,7 +10,7 @@ import ObjectID from 'Common/Types/ObjectID';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import StatusPageSubscriber from 'Model/Models/StatusPageSubscriber';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import NotNull from 'Common/Types/Database/NotNull';
|
||||
@@ -49,7 +49,7 @@ const StatusPageDelete: FunctionComponent<PageComponentProps> = (
|
||||
title: 'Webhook Subscribers',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.STATUS_PAGE_VIEW_WEBHOOK_SUBSCRIBERS
|
||||
PageMap.STATUS_PAGE_VIEW_WEBHOOK_SUBSCRIBERS
|
||||
] as Route,
|
||||
modelId
|
||||
),
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageComponentProps from '../PageComponentProps';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import WorkflowLogs from 'Model/Models/WorkflowLog';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import WorkflowSideMenu from './SideMenu';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
|
||||
@@ -8,7 +8,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import WorkflowVariable from 'Model/Models/WorkflowVariable';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import DashboardNavigation from '../../Utils/Navigation';
|
||||
import WorkflowSideMenu from './SideMenu';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Workflow from 'CommonUI/src/Components/Workflow/Workflow';
|
||||
import Card from 'CommonUI/src/Components/Card/Card';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import { Edge, Node } from 'reactflow';
|
||||
|
||||
const Delete: FunctionComponent<PageComponentProps> = (
|
||||
|
||||
@@ -9,7 +9,7 @@ import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Workflow from 'Model/Models/Workflow';
|
||||
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
|
||||
const Delete: FunctionComponent<PageComponentProps> = (
|
||||
|
||||
@@ -8,7 +8,7 @@ import SideMenu from './SideMenu';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import WorkflowLogs from 'Model/Models/WorkflowLog';
|
||||
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import DashboardNavigation from '../../../Utils/Navigation';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
|
||||
|
||||
@@ -8,7 +8,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import WorkflowVariable from 'Model/Models/WorkflowVariable';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import DashboardNavigation from '../../../Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
|
||||
@@ -8,7 +8,7 @@ import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
|
||||
import Workflow from 'Model/Models/Workflow';
|
||||
import FieldType from 'CommonUI/src/Components/Types/FieldType';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import WorkflowSideMenu from './SideMenu';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import NavBar from 'CommonUI/src/Components/Navbar/NavBar';
|
||||
import NavBarItem from 'CommonUI/src/Components/Navbar/NavBarItem';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
|
||||
@@ -56,8 +56,8 @@ const DashboardNavbar: FunctionComponent<ComponentProps> = (
|
||||
route={RouteUtil.populateRouteParams(
|
||||
props.isPreview
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_SCHEDULED_EVENT_LIST
|
||||
] as Route)
|
||||
PageMap.PREVIEW_SCHEDULED_EVENT_LIST
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.SCHEDULED_EVENT_LIST] as Route)
|
||||
)}
|
||||
></NavBarItem>
|
||||
|
||||
@@ -30,7 +30,7 @@ import EventItem, {
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import UserUtil from '../../Utils/User';
|
||||
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import { Blue } from 'Common/Types/BrandColors';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
|
||||
@@ -47,11 +47,11 @@ export const getAnnouncementEventItem: Function = (
|
||||
eventViewRoute: !isSummary
|
||||
? undefined
|
||||
: RouteUtil.populateRouteParams(
|
||||
isPreviewPage
|
||||
? (RouteMap[PageMap.PREVIEW_ANNOUNCEMENT_DETAIL] as Route)
|
||||
: (RouteMap[PageMap.ANNOUNCEMENT_DETAIL] as Route),
|
||||
announcement.id!
|
||||
),
|
||||
isPreviewPage
|
||||
? (RouteMap[PageMap.PREVIEW_ANNOUNCEMENT_DETAIL] as Route)
|
||||
: (RouteMap[PageMap.ANNOUNCEMENT_DETAIL] as Route),
|
||||
announcement.id!
|
||||
),
|
||||
isDetailItem: !isSummary,
|
||||
eventTypeColor: Blue,
|
||||
eventSecondDescription:
|
||||
@@ -147,7 +147,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');
|
||||
@@ -201,8 +201,8 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
to: RouteUtil.populateRouteParams(
|
||||
props.isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_ANNOUNCEMENT_LIST
|
||||
] as Route)
|
||||
PageMap.PREVIEW_ANNOUNCEMENT_LIST
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.ANNOUNCEMENT_LIST] as Route)
|
||||
),
|
||||
},
|
||||
@@ -211,8 +211,8 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
to: RouteUtil.populateRouteParams(
|
||||
props.isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_ANNOUNCEMENT_DETAIL
|
||||
] as Route)
|
||||
PageMap.PREVIEW_ANNOUNCEMENT_DETAIL
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.ANNOUNCEMENT_DETAIL] as Route),
|
||||
Navigation.getLastParamAsObjectID()
|
||||
),
|
||||
|
||||
@@ -32,7 +32,7 @@ import UserUtil from '../../Utils/User';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
|
||||
@@ -113,7 +113,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');
|
||||
@@ -194,8 +194,8 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
to: RouteUtil.populateRouteParams(
|
||||
props.isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_ANNOUNCEMENT_LIST
|
||||
] as Route)
|
||||
PageMap.PREVIEW_ANNOUNCEMENT_LIST
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.ANNOUNCEMENT_LIST] as Route)
|
||||
),
|
||||
},
|
||||
|
||||
@@ -37,7 +37,7 @@ import Monitor from 'Model/Models/Monitor';
|
||||
import UserUtil from '../../Utils/User';
|
||||
import Color from 'Common/Types/Color';
|
||||
import { Green, Grey, Red } from 'Common/Types/BrandColors';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
|
||||
export const getIncidentEventItem: Function = (
|
||||
@@ -56,7 +56,7 @@ export const getIncidentEventItem: Function = (
|
||||
for (const incidentPublicNote of incidentPublicNotes) {
|
||||
if (
|
||||
incidentPublicNote.incidentId?.toString() ===
|
||||
incident.id?.toString() &&
|
||||
incident.id?.toString() &&
|
||||
incidentPublicNote?.note
|
||||
) {
|
||||
timeline.push({
|
||||
@@ -77,7 +77,7 @@ export const getIncidentEventItem: Function = (
|
||||
for (const incidentStateTimeline of incidentStateTimelines) {
|
||||
if (
|
||||
incidentStateTimeline.incidentId?.toString() ===
|
||||
incident.id?.toString() &&
|
||||
incident.id?.toString() &&
|
||||
incidentStateTimeline.incidentState
|
||||
) {
|
||||
timeline.push({
|
||||
@@ -87,10 +87,10 @@ export const getIncidentEventItem: Function = (
|
||||
icon: incidentStateTimeline.incidentState.isCreatedState
|
||||
? IconProp.Alert
|
||||
: incidentStateTimeline.incidentState.isAcknowledgedState
|
||||
? IconProp.TransparentCube
|
||||
: incidentStateTimeline.incidentState.isResolvedState
|
||||
? IconProp.CheckCircle
|
||||
: IconProp.ArrowCircleRight,
|
||||
? IconProp.TransparentCube
|
||||
: incidentStateTimeline.incidentState.isResolvedState
|
||||
? IconProp.CheckCircle
|
||||
: IconProp.ArrowCircleRight,
|
||||
iconColor: incidentStateTimeline.incidentState.color || Grey,
|
||||
});
|
||||
|
||||
@@ -135,11 +135,11 @@ export const getIncidentEventItem: Function = (
|
||||
eventViewRoute: !isSummary
|
||||
? undefined
|
||||
: RouteUtil.populateRouteParams(
|
||||
isPreviewPage
|
||||
? (RouteMap[PageMap.PREVIEW_INCIDENT_DETAIL] as Route)
|
||||
: (RouteMap[PageMap.INCIDENT_DETAIL] as Route),
|
||||
incident.id!
|
||||
),
|
||||
isPreviewPage
|
||||
? (RouteMap[PageMap.PREVIEW_INCIDENT_DETAIL] as Route)
|
||||
: (RouteMap[PageMap.INCIDENT_DETAIL] as Route),
|
||||
incident.id!
|
||||
),
|
||||
isDetailItem: !isSummary,
|
||||
currentStatus: currentStateStatus,
|
||||
currentStatusColor: currentStatusColor,
|
||||
@@ -252,7 +252,7 @@ const Detail: 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');
|
||||
@@ -320,8 +320,8 @@ const Detail: FunctionComponent<PageComponentProps> = (
|
||||
to: RouteUtil.populateRouteParams(
|
||||
props.isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_INCIDENT_DETAIL
|
||||
] as Route)
|
||||
PageMap.PREVIEW_INCIDENT_DETAIL
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.INCIDENT_DETAIL] as Route),
|
||||
Navigation.getLastParamAsObjectID()
|
||||
),
|
||||
|
||||
@@ -34,7 +34,7 @@ import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import User from '../../Utils/User';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
|
||||
@@ -129,7 +129,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');
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import PageComponentProps from '../PageComponentProps';
|
||||
import Page from '../../Components/Page/Page';
|
||||
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
|
||||
const PageNotFound: FunctionComponent<PageComponentProps> = (
|
||||
_props: PageComponentProps
|
||||
|
||||
@@ -47,7 +47,7 @@ import { getIncidentEventItem } from '../Incidents/Detail';
|
||||
import { getScheduledEventEventItem } from '../ScheduledEvent/Detail';
|
||||
import { getAnnouncementEventItem } from '../Announcement/Detail';
|
||||
import EmnptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
|
||||
const Overview: FunctionComponent<PageComponentProps> = (
|
||||
props: PageComponentProps
|
||||
@@ -190,7 +190,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
const scheduledMaintenanceStateTimelines: Array<ScheduledMaintenanceStateTimeline> =
|
||||
JSONFunctions.fromJSONArray(
|
||||
(data['scheduledMaintenanceStateTimelines'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
ScheduledMaintenanceStateTimeline
|
||||
);
|
||||
|
||||
@@ -224,7 +224,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');
|
||||
@@ -256,7 +256,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
if (
|
||||
!Object.keys(dict).includes(
|
||||
resource.monitor?.currentMonitorStatusId.toString() ||
|
||||
''
|
||||
''
|
||||
)
|
||||
) {
|
||||
dict[
|
||||
@@ -297,7 +297,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 =
|
||||
@@ -484,7 +484,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
group &&
|
||||
group._id?.toString() &&
|
||||
group._id?.toString() ===
|
||||
resource.statusPageGroupId.toString()) ||
|
||||
resource.statusPageGroupId.toString()) ||
|
||||
(!resource.statusPageGroupId && !group)
|
||||
) {
|
||||
hasReosurce = true;
|
||||
@@ -501,7 +501,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
currentStatus.priority &&
|
||||
currentMonitorStatus?.priority &&
|
||||
currentMonitorStatus?.priority >
|
||||
currentStatus.priority) ||
|
||||
currentStatus.priority) ||
|
||||
!currentStatus.priority
|
||||
) {
|
||||
currentStatus = currentMonitorStatus!;
|
||||
@@ -595,16 +595,14 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
<div>
|
||||
{currentStatus && statusPageResources.length > 0 && (
|
||||
<Alert
|
||||
title={`${
|
||||
currentStatus.isOperationalState
|
||||
title={`${currentStatus.isOperationalState
|
||||
? `All`
|
||||
: 'Some'
|
||||
} Resources are ${
|
||||
currentStatus.name?.toLowerCase() ===
|
||||
'maintenance'
|
||||
} Resources are ${currentStatus.name?.toLowerCase() ===
|
||||
'maintenance'
|
||||
? 'under'
|
||||
: ''
|
||||
} ${currentStatus.name}`}
|
||||
} ${currentStatus.name}`}
|
||||
color={currentStatus.color}
|
||||
doNotShowIcon={true}
|
||||
textClassName="text-white text-lg"
|
||||
@@ -655,7 +653,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
}
|
||||
isLastElement={
|
||||
resourceGroups.length -
|
||||
1 ===
|
||||
1 ===
|
||||
i
|
||||
}
|
||||
title={
|
||||
|
||||
@@ -37,7 +37,7 @@ import Color from 'Common/Types/Color';
|
||||
import { Green, Grey, Yellow } from 'Common/Types/BrandColors';
|
||||
import UserUtil from '../../Utils/User';
|
||||
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
|
||||
export const getScheduledEventEventItem: Function = (
|
||||
scheduledMaintenance: ScheduledMaintenance,
|
||||
@@ -56,7 +56,7 @@ export const getScheduledEventEventItem: Function = (
|
||||
for (const scheduledMaintenancePublicNote of scheduledMaintenanceEventsPublicNotes) {
|
||||
if (
|
||||
scheduledMaintenancePublicNote.scheduledMaintenanceId?.toString() ===
|
||||
scheduledMaintenance.id?.toString() &&
|
||||
scheduledMaintenance.id?.toString() &&
|
||||
scheduledMaintenancePublicNote?.note
|
||||
) {
|
||||
timeline.push({
|
||||
@@ -75,7 +75,7 @@ export const getScheduledEventEventItem: Function = (
|
||||
for (const scheduledMaintenanceEventstateTimeline of scheduledMaintenanceStateTimelines) {
|
||||
if (
|
||||
scheduledMaintenanceEventstateTimeline.scheduledMaintenanceId?.toString() ===
|
||||
scheduledMaintenance.id?.toString() &&
|
||||
scheduledMaintenance.id?.toString() &&
|
||||
scheduledMaintenanceEventstateTimeline.scheduledMaintenanceState
|
||||
) {
|
||||
timeline.push({
|
||||
@@ -89,12 +89,12 @@ export const getScheduledEventEventItem: Function = (
|
||||
.scheduledMaintenanceState.isScheduledState
|
||||
? IconProp.Clock
|
||||
: scheduledMaintenanceEventstateTimeline
|
||||
.scheduledMaintenanceState.isOngoingState
|
||||
? IconProp.Settings
|
||||
: scheduledMaintenanceEventstateTimeline
|
||||
.scheduledMaintenanceState.isResolvedState
|
||||
? IconProp.CheckCircle
|
||||
: IconProp.ArrowCircleRight,
|
||||
.scheduledMaintenanceState.isOngoingState
|
||||
? IconProp.Settings
|
||||
: scheduledMaintenanceEventstateTimeline
|
||||
.scheduledMaintenanceState.isResolvedState
|
||||
? IconProp.CheckCircle
|
||||
: IconProp.ArrowCircleRight,
|
||||
iconColor:
|
||||
scheduledMaintenanceEventstateTimeline
|
||||
.scheduledMaintenanceState.color || Grey,
|
||||
@@ -127,13 +127,13 @@ export const getScheduledEventEventItem: Function = (
|
||||
eventViewRoute: !isSummary
|
||||
? undefined
|
||||
: RouteUtil.populateRouteParams(
|
||||
isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_SCHEDULED_EVENT_DETAIL
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.SCHEDULED_EVENT_DETAIL] as Route),
|
||||
scheduledMaintenance.id!
|
||||
),
|
||||
isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_SCHEDULED_EVENT_DETAIL
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.SCHEDULED_EVENT_DETAIL] as Route),
|
||||
scheduledMaintenance.id!
|
||||
),
|
||||
isDetailItem: !isSummary,
|
||||
currentStatus: currentStateStatus,
|
||||
currentStatusColor: currentStatusColor,
|
||||
@@ -236,7 +236,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
const scheduledMaintenanceStateTimelines: Array<ScheduledMaintenanceStateTimeline> =
|
||||
JSONFunctions.fromJSONArray(
|
||||
(data['scheduledMaintenanceStateTimelines'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
ScheduledMaintenanceStateTimeline
|
||||
);
|
||||
|
||||
@@ -256,7 +256,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');
|
||||
@@ -314,8 +314,8 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
to: RouteUtil.populateRouteParams(
|
||||
props.isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_SCHEDULED_EVENT_LIST
|
||||
] as Route)
|
||||
PageMap.PREVIEW_SCHEDULED_EVENT_LIST
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.SCHEDULED_EVENT_LIST] as Route)
|
||||
),
|
||||
},
|
||||
@@ -324,11 +324,11 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
to: 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),
|
||||
Navigation.getLastParamAsObjectID()
|
||||
),
|
||||
},
|
||||
|
||||
@@ -34,7 +34,7 @@ import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import User from '../../Utils/User';
|
||||
import EmptyState from 'CommonUI/src/Components/EmptyState/EmptyState';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
import PageMap from '../../Utils/PageMap';
|
||||
|
||||
@@ -120,7 +120,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
const scheduledMaintenanceStateTimelines: Array<ScheduledMaintenanceStateTimeline> =
|
||||
JSONFunctions.fromJSONArray(
|
||||
(data['scheduledMaintenanceStateTimelines'] as JSONArray) ||
|
||||
[],
|
||||
[],
|
||||
ScheduledMaintenanceStateTimeline
|
||||
);
|
||||
|
||||
@@ -140,7 +140,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');
|
||||
@@ -223,15 +223,15 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
to: RouteUtil.populateRouteParams(
|
||||
props.isPreviewPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_SCHEDULED_EVENT_LIST
|
||||
] as Route)
|
||||
PageMap.PREVIEW_SCHEDULED_EVENT_LIST
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.SCHEDULED_EVENT_LIST] as Route)
|
||||
),
|
||||
},
|
||||
]}
|
||||
>
|
||||
{scheduledMaintenanceEvents &&
|
||||
scheduledMaintenanceEvents.length > 0 ? (
|
||||
scheduledMaintenanceEvents.length > 0 ? (
|
||||
<EventHistoryList {...parsedData} />
|
||||
) : (
|
||||
<></>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, ReactElement } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import { IconProp } from 'CommonUI/src/Components/Icon/Icon';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
|
||||
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
|
||||
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
|
||||
@@ -21,8 +21,8 @@ const SubscribeSideMenu: FunctionComponent<ComponentProps> = (
|
||||
to: RouteUtil.populateRouteParams(
|
||||
props.isPreviewStatusPage
|
||||
? (RouteMap[
|
||||
PageMap.PREVIEW_SUBSCRIBE_EMAIL
|
||||
] as Route)
|
||||
PageMap.PREVIEW_SUBSCRIBE_EMAIL
|
||||
] as Route)
|
||||
: (RouteMap[PageMap.SUBSCRIBE_EMAIL] as Route)
|
||||
),
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user