diff --git a/Dashboard/src/Pages/OnCallDuty/OnCallDutyPolicy/Index.tsx b/Dashboard/src/Pages/OnCallDuty/OnCallDutyPolicy/Index.tsx index 21b1f6b9816..96646a1b88c 100644 --- a/Dashboard/src/Pages/OnCallDuty/OnCallDutyPolicy/Index.tsx +++ b/Dashboard/src/Pages/OnCallDuty/OnCallDutyPolicy/Index.tsx @@ -19,7 +19,7 @@ const OnCallDutyPolicyView: FunctionComponent = ( return ( {/* OnCallDutyPolicy View */} - name="On-Call Policy > On-Call Policy Details" cardProps={{ title: 'On-Call Policy Details', @@ -105,7 +105,7 @@ const OnCallDutyPolicyView: FunctionComponent = ( }, title: 'Labels', fieldType: FieldType.Element, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: OnCallDutyPolicy): ReactElement => { return ( = ( return ( {/* OnCallDutySchedule View */} - name="On-Call Schedule > On-Call Schedule Details" cardProps={{ title: 'On-Call Schedule Details', @@ -105,7 +105,7 @@ const OnCallDutyScheduleView: FunctionComponent = ( }, title: 'Labels', fieldType: FieldType.Element, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: OnCallDutySchedule): ReactElement => { return ( = ( type: FieldType.Entity, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: ScheduledMaintenanceInternalNote): ReactElement => { return ( = ( _props: PageComponentProps @@ -41,7 +42,7 @@ const TeamView: FunctionComponent = ( return ( {/* Incident View */} - name="Incident Template Details" cardProps={{ title: 'Incident Template Details', @@ -249,7 +250,7 @@ const TeamView: FunctionComponent = ( }, title: 'Incident Severity', fieldType: FieldType.Entity, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: IncidentTemplate): ReactElement => { if (!item['incidentSeverity']) { return

No incident severity.

; } @@ -257,18 +258,10 @@ const TeamView: FunctionComponent = ( return ( ); @@ -283,16 +276,13 @@ const TeamView: FunctionComponent = ( }, title: 'Monitors Affected', fieldType: FieldType.Element, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: IncidentTemplate): ReactElement => { return ( + item[ + 'monitors' + ] || [] } /> ); @@ -307,16 +297,13 @@ const TeamView: FunctionComponent = ( }, title: 'On-Call Duty Policies', fieldType: FieldType.Element, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: IncidentTemplate): ReactElement => { return ( + item[ + 'onCallDutyPolicies' + ] || [] } /> ); @@ -338,7 +325,7 @@ const TeamView: FunctionComponent = ( }, title: 'Labels', fieldType: FieldType.Element, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: IncidentTemplate): ReactElement => { return ( = ( title: 'Team', type: FieldType.Entity, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: IncidentTemplateOwnerTeam): ReactElement => { if (!item['team']) { throw new BadDataException('Team not found'); } @@ -509,7 +496,7 @@ const TeamView: FunctionComponent = ( }, title: 'User', type: FieldType.Entity, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: IncidentTemplateOwnerUser): ReactElement => { if (!item['user']) { throw new BadDataException('User not found'); } diff --git a/Dashboard/src/Pages/StatusPages/View/EmailSubscribers.tsx b/Dashboard/src/Pages/StatusPages/View/EmailSubscribers.tsx index 32c959061fb..0dbb5e4a79f 100644 --- a/Dashboard/src/Pages/StatusPages/View/EmailSubscribers.tsx +++ b/Dashboard/src/Pages/StatusPages/View/EmailSubscribers.tsx @@ -258,7 +258,7 @@ const StatusPageDelete: FunctionComponent = ( title: 'Status', type: FieldType.Text, getElement: ( - item: JSONObject + item: StatusPageSubscriber ): ReactElement => { if (item['isUnsubscribed']) { return ( diff --git a/Dashboard/src/Pages/StatusPages/View/OverviewPageBranding.tsx b/Dashboard/src/Pages/StatusPages/View/OverviewPageBranding.tsx index 5de0062d411..f1e694ed6a6 100644 --- a/Dashboard/src/Pages/StatusPages/View/OverviewPageBranding.tsx +++ b/Dashboard/src/Pages/StatusPages/View/OverviewPageBranding.tsx @@ -188,7 +188,7 @@ const StatusPageDelete: FunctionComponent = ( description: 'These monitor statuses are be considered as down when we calculate uptime %', fieldType: FieldType.EntityArray, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: StatusPage): ReactElement => { if (item['downtimeMonitorStatuses']) { return ( = ( return ( {/* Service View */} - name="Service Details" formSteps={[ { @@ -104,7 +104,7 @@ const ServiceDelete: FunctionComponent = ( }, title: 'Labels', fieldType: FieldType.Element, - getElement: (item: JSONObject): ReactElement => { + getElement: (item: TelemetryService): ReactElement => { return (