mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
add severity column
This commit is contained in:
@@ -211,6 +211,50 @@ const MonitorIncidents: FunctionComponent<PageComponentProps> = (
|
||||
return <></>;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: {
|
||||
incidentSeverity: {
|
||||
name: true,
|
||||
color: true,
|
||||
},
|
||||
},
|
||||
isFilterable: true,
|
||||
filterEntityType: IncidentSeverity,
|
||||
filterQuery: {
|
||||
projectId:
|
||||
DashboardNavigation.getProjectId()?.toString(),
|
||||
},
|
||||
filterDropdownField: {
|
||||
label: 'name',
|
||||
value: '_id',
|
||||
},
|
||||
title: 'Severity',
|
||||
type: FieldType.Entity,
|
||||
getElement: (item: JSONObject): ReactElement => {
|
||||
if (item['incidentSeverity']) {
|
||||
return (
|
||||
<Pill
|
||||
color={
|
||||
(
|
||||
item[
|
||||
'incidentSeverity'
|
||||
] as JSONObject
|
||||
)['color'] as Color
|
||||
}
|
||||
text={
|
||||
(
|
||||
item[
|
||||
'incidentSeverity'
|
||||
] as JSONObject
|
||||
)['name'] as string
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return <></>;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: {
|
||||
monitors: {
|
||||
|
||||
Reference in New Issue
Block a user