File tree Expand file tree Collapse file tree 2 files changed +27
-5
lines changed
pages/Dashboard/Incidents/components Expand file tree Collapse file tree 2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,34 @@ export async function getIncidents(
40
40
}
41
41
42
42
43
+ export interface MonitorIncident {
44
+ id : string ;
45
+ teamId : number ;
46
+ monitorId : number ;
47
+ title : string ;
48
+ description : string ;
49
+ createdAt : string ;
50
+ updatedAt : string ;
51
+ property : string ;
52
+ target : string ;
53
+ operator : string ;
54
+ }
55
+
56
+ /*
57
+ Get Team Incidents
58
+ */
59
+
60
+ export interface GetMonitorIncidentsResponse {
61
+ incidents : MonitorIncident [ ] ;
62
+ }
63
+
64
+
43
65
export async function getMonitorIncidents (
44
66
teamId : number ,
45
67
monitorId : number ,
46
68
offset ?: number ,
47
69
limit ?: number ,
48
- ) : Promise < GetIncidentsResponse > {
70
+ ) : Promise < GetMonitorIncidentsResponse > {
49
71
const response = await client . get ( `/v1/teams/${ teamId } /incidents/monitor/${ monitorId } ` ,
50
72
{
51
73
params : {
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ import {
11
11
import { FunctionComponent } from "react" ;
12
12
import { IoOpenOutline , IoStatsChart } from "react-icons/io5" ;
13
13
import { useNavigate } from "react-router-dom" ;
14
- import { Incident } from "../../../../../src/api/endpoints/incidents" ;
14
+ import { MonitorIncident } from "../../../../../src/api/endpoints/incidents" ;
15
15
16
16
interface MonitorIncidentPageIncidentsListProps {
17
- incidents ?: Incident [ ] ;
17
+ incidents ?: MonitorIncident [ ] ;
18
18
}
19
19
20
20
const IncidentPageIncidentsList : FunctionComponent <
@@ -32,7 +32,7 @@ MonitorIncidentPageIncidentsListProps
32
32
} ;
33
33
34
34
interface IncidentsListItemProps {
35
- incident : Incident ;
35
+ incident : MonitorIncident ;
36
36
}
37
37
38
38
const IncidentsListItem : FunctionComponent < IncidentsListItemProps > = (
@@ -65,7 +65,7 @@ const IncidentsListItem: FunctionComponent<IncidentsListItemProps> = (
65
65
>
66
66
< Grid item >
67
67
< Stack spacing = { 1 } >
68
- < Typography variant = "body2" > { incident . title } </ Typography >
68
+ < Typography variant = "body2" > ERROR: { incident . title } { incident . operator } { incident . target } </ Typography >
69
69
70
70
< Stack direction = "row" spacing = { 1 } >
71
71
< Chip size = "small" label = "api" color = "info" />
You can’t perform that action at this time.
0 commit comments