-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new incident view pages for Root Cause and Description; upd…
…ate icon properties and breadcrumb links
- Loading branch information
Showing
12 changed files
with
335 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import PageMap from "../../../Utils/PageMap"; | ||
import RouteMap, { RouteUtil } from "../../../Utils/RouteMap"; | ||
import PageComponentProps from "../../PageComponentProps"; | ||
import Route from "Common/Types/API/Route"; | ||
import ObjectID from "Common/Types/ObjectID"; | ||
import ModelDelete from "Common/UI/Components/ModelDelete/ModelDelete"; | ||
import Navigation from "Common/UI/Utils/Navigation"; | ||
import Incident from "Common/Models/DatabaseModels/Incident"; | ||
import React, { FunctionComponent, ReactElement } from "react"; | ||
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail"; | ||
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType"; | ||
import FieldType from "Common/UI/Components/Types/FieldType"; | ||
|
||
const IncidentDelete: FunctionComponent< | ||
PageComponentProps | ||
> = (): ReactElement => { | ||
const modelId: ObjectID = Navigation.getLastParamAsObjectID(1); | ||
|
||
return ( | ||
<CardModelDetail | ||
name="Incident Description" | ||
cardProps={{ | ||
title: "Incident Description", | ||
description: | ||
"Description of this incident. This is visible on Status Page and is in markdown format.", | ||
}} | ||
editButtonText="Edit Incident Description" | ||
isEditable={true} | ||
formFields={[ | ||
{ | ||
field: { | ||
description: true, | ||
}, | ||
title: "Description", | ||
|
||
fieldType: FormFieldSchemaType.Markdown, | ||
required: false, | ||
placeholder: "Description", | ||
}, | ||
]} | ||
modelDetailProps={{ | ||
showDetailsInNumberOfColumns: 1, | ||
modelType: Incident, | ||
id: "model-detail-incident-description", | ||
fields: [ | ||
{ | ||
field: { | ||
description: true, | ||
}, | ||
title: "Description", | ||
fieldType: FieldType.Markdown, | ||
}, | ||
], | ||
modelId: modelId, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default IncidentDelete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import PageMap from "../../../Utils/PageMap"; | ||
import RouteMap, { RouteUtil } from "../../../Utils/RouteMap"; | ||
import PageComponentProps from "../../PageComponentProps"; | ||
import Route from "Common/Types/API/Route"; | ||
import ObjectID from "Common/Types/ObjectID"; | ||
import ModelDelete from "Common/UI/Components/ModelDelete/ModelDelete"; | ||
import Navigation from "Common/UI/Utils/Navigation"; | ||
import Incident from "Common/Models/DatabaseModels/Incident"; | ||
import React, { FunctionComponent, ReactElement } from "react"; | ||
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail"; | ||
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType"; | ||
import FieldType from "Common/UI/Components/Types/FieldType"; | ||
|
||
const IncidentDelete: FunctionComponent< | ||
PageComponentProps | ||
> = (): ReactElement => { | ||
const modelId: ObjectID = Navigation.getLastParamAsObjectID(1); | ||
|
||
return ( | ||
<CardModelDetail | ||
name="Remediation Notes" | ||
cardProps={{ | ||
title: "Remediation Notes", | ||
description: | ||
"What steps should be taken to resolve this incident? Here are the remediation notes.", | ||
}} | ||
editButtonText="Edit Remediation Notes" | ||
isEditable={true} | ||
formFields={[ | ||
{ | ||
field: { | ||
remediationNotes: true, | ||
}, | ||
title: "Remediation Notes", | ||
|
||
fieldType: FormFieldSchemaType.Markdown, | ||
required: true, | ||
placeholder: "Remediation Notes", | ||
}, | ||
]} | ||
modelDetailProps={{ | ||
showDetailsInNumberOfColumns: 1, | ||
modelType: Incident, | ||
id: "model-detail-incident-remediation-notes", | ||
fields: [ | ||
{ | ||
field: { | ||
remediationNotes: true, | ||
}, | ||
title: "Remediation Notes", | ||
placeholder: "No remediation notes added for this incident.", | ||
fieldType: FieldType.Markdown, | ||
}, | ||
], | ||
modelId: modelId, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default IncidentDelete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import PageMap from "../../../Utils/PageMap"; | ||
import RouteMap, { RouteUtil } from "../../../Utils/RouteMap"; | ||
import PageComponentProps from "../../PageComponentProps"; | ||
import Route from "Common/Types/API/Route"; | ||
import ObjectID from "Common/Types/ObjectID"; | ||
import ModelDelete from "Common/UI/Components/ModelDelete/ModelDelete"; | ||
import Navigation from "Common/UI/Utils/Navigation"; | ||
import Incident from "Common/Models/DatabaseModels/Incident"; | ||
import React, { FunctionComponent, ReactElement } from "react"; | ||
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail"; | ||
import FieldType from "Common/UI/Components/Types/FieldType"; | ||
|
||
const IncidentDelete: FunctionComponent< | ||
PageComponentProps | ||
> = (): ReactElement => { | ||
const modelId: ObjectID = Navigation.getLastParamAsObjectID(1); | ||
|
||
return ( | ||
<CardModelDetail | ||
name="Root Cause" | ||
cardProps={{ | ||
title: "Root Cause", | ||
description: | ||
"Why did this incident happen? Here is the root cause of this incident.", | ||
}} | ||
isEditable={false} | ||
modelDetailProps={{ | ||
showDetailsInNumberOfColumns: 1, | ||
modelType: Incident, | ||
id: "model-detail-incident-root-cause", | ||
fields: [ | ||
{ | ||
field: { | ||
rootCause: true, | ||
}, | ||
title: "", | ||
placeholder: "No root cause identified for this incident.", | ||
fieldType: FieldType.Markdown, | ||
}, | ||
], | ||
modelId: modelId, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default IncidentDelete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.