-
Notifications
You must be signed in to change notification settings - Fork 232
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 pages for Alert Description, Root Cause, and Remediatio…
…n with routing and breadcrumbs
- Loading branch information
Showing
8 changed files
with
295 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import PageComponentProps from "../../PageComponentProps"; | ||
import ObjectID from "Common/Types/ObjectID"; | ||
import Navigation from "Common/UI/Utils/Navigation"; | ||
import Alert from "Common/Models/DatabaseModels/Alert"; | ||
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 AlertDelete: 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 alert? 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: Alert, | ||
id: "model-detail-alert-remediation-notes", | ||
fields: [ | ||
{ | ||
field: { | ||
remediationNotes: true, | ||
}, | ||
title: "Remediation Notes", | ||
placeholder: "No remediation notes added for this alert.", | ||
fieldType: FieldType.Markdown, | ||
}, | ||
], | ||
modelId: modelId, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default AlertDelete; |
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,57 @@ | ||
import PageComponentProps from "../../PageComponentProps"; | ||
import ObjectID from "Common/Types/ObjectID"; | ||
import Navigation from "Common/UI/Utils/Navigation"; | ||
import Alert from "Common/Models/DatabaseModels/Alert"; | ||
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 AlertDelete: 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 alert? 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: Alert, | ||
id: "model-detail-alert-remediation-notes", | ||
fields: [ | ||
{ | ||
field: { | ||
remediationNotes: true, | ||
}, | ||
title: "Remediation Notes", | ||
placeholder: "No remediation notes added for this alert.", | ||
fieldType: FieldType.Markdown, | ||
}, | ||
], | ||
modelId: modelId, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default AlertDelete; |
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,43 @@ | ||
import PageComponentProps from "../../PageComponentProps"; | ||
import ObjectID from "Common/Types/ObjectID"; | ||
import Navigation from "Common/UI/Utils/Navigation"; | ||
import Alert from "Common/Models/DatabaseModels/Alert"; | ||
import React, { FunctionComponent, ReactElement } from "react"; | ||
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail"; | ||
import FieldType from "Common/UI/Components/Types/FieldType"; | ||
|
||
const AlertDelete: FunctionComponent< | ||
PageComponentProps | ||
> = (): ReactElement => { | ||
const modelId: ObjectID = Navigation.getLastParamAsObjectID(1); | ||
|
||
return ( | ||
<CardModelDetail | ||
name="Root Cause" | ||
cardProps={{ | ||
title: "Root Cause", | ||
description: | ||
"Why did this alert happen? Here is the root cause of this alert.", | ||
}} | ||
isEditable={true} | ||
modelDetailProps={{ | ||
showDetailsInNumberOfColumns: 1, | ||
modelType: Alert, | ||
id: "model-detail-alert-root-cause", | ||
fields: [ | ||
{ | ||
field: { | ||
rootCause: true, | ||
}, | ||
title: "", | ||
placeholder: "No root cause identified for this alert.", | ||
fieldType: FieldType.Markdown, | ||
}, | ||
], | ||
modelId: modelId, | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default AlertDelete; |
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
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