Skip to content

Commit

Permalink
[Cases] Activate Case detail metrics (#121336)
Browse files Browse the repository at this point in the history
* activate metrics for secsol and o11y

* add connectors to o11y

* disable o11y metrics
  • Loading branch information
semd authored Dec 16, 2021
1 parent acb5acc commit f2ad0a9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
50 changes: 27 additions & 23 deletions x-pack/plugins/cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ cases.getCases({
basePath: '/investigate/cases',
userCanCrud: true,
owner: ['securitySolution'],
features: { alerts: { sync: false }, metrics: ['alerts.count', 'lifespan'] }
timelineIntegration: {
plugins: {
parsingPlugin,
Expand All @@ -68,24 +69,27 @@ cases.getCases({

Arguments:

| Property | Description |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| userCanCrud | `boolean;` user permissions to crud |
| owner | `string[];` owner ids of the cases |
| basePath | `string;` path to mount the Cases router on top of |
| useFetchAlertData | `(alertIds: string[]) => [boolean, Record<string, Ecs>];` fetch alerts |
| disableAlerts? | `boolean` (default: false) flag to not show alerts information |
| actionsNavigation? | <code>CasesNavigation<string, 'configurable'></code> |
| ruleDetailsNavigation? | <code>CasesNavigation<string &vert; null &vert; undefined, 'configurable'></code> |
| onComponentInitialized? | `() => void;` callback when component has initialized |
| showAlertDetails? | `(alertId: string, index: string) => void;` callback to show alert details |
| timelineIntegration?.editor_plugins | Plugins needed for integrating timeline into markdown editor. |
| timelineIntegration?.editor_plugins.parsingPlugin | `Plugin;` |
| timelineIntegration?.editor_plugins.processingPluginRenderer | `React.FC<TimelineProcessingPluginRendererProps & { position: EuiMarkdownAstNodePosition }>` |
| timelineIntegration?.editor_plugins.uiPlugin? | `EuiMarkdownEditorUiPlugin` |
| timelineIntegration?.hooks.useInsertTimeline | `(value: string, onChange: (newValue: string) => void): UseInsertTimelineReturn` |
| timelineIntegration?.ui?.renderInvestigateInTimelineActionComponent? | `(alertIds: string[]) => JSX.Element;` space to render `InvestigateInTimelineActionComponent` |
| timelineIntegration?.ui?renderTimelineDetailsPanel? | `() => JSX.Element;` space to render `TimelineDetailsPanel` |
| Property | Description |
| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| userCanCrud | `boolean;` user permissions to crud |
| owner | `string[];` owner ids of the cases |
| basePath | `string;` path to mount the Cases router on top of |
| useFetchAlertData | `(alertIds: string[]) => [boolean, Record<string, Ecs>];` fetch alerts |
| disableAlerts? | `boolean` (default: false) flag to not show alerts information |
| actionsNavigation? | <code>CasesNavigation<string, 'configurable'></code> |
| ruleDetailsNavigation? | <code>CasesNavigation<string &vert; null &vert; undefined, 'configurable'></code> |
| onComponentInitialized? | `() => void;` callback when component has initialized |
| showAlertDetails? | `(alertId: string, index: string) => void;` callback to show alert details |
| features? | `CasesFeatures` object defining the features to enable/disable |
| features?.alerts.sync | `boolean` (default: `true`) defines wether the alert sync action should be enabled/disabled |
| features?.metrics | `string[]` (default: `[]`) defines the metrics to show in the Case Detail View. Allowed metrics: "alerts.count", "alerts.users", "alerts.hosts", "connectors", "lifespan". |
| timelineIntegration?.editor_plugins | Plugins needed for integrating timeline into markdown editor. |
| timelineIntegration?.editor_plugins.parsingPlugin | `Plugin;` |
| timelineIntegration?.editor_plugins.processingPluginRenderer | `React.FC<TimelineProcessingPluginRendererProps & { position: EuiMarkdownAstNodePosition }>` |
| timelineIntegration?.editor_plugins.uiPlugin? | `EuiMarkdownEditorUiPlugin` |
| timelineIntegration?.hooks.useInsertTimeline | `(value: string, onChange: (newValue: string) => void): UseInsertTimelineReturn` |
| timelineIntegration?.ui?.renderInvestigateInTimelineActionComponent? | `(alertIds: string[]) => JSX.Element;` space to render `InvestigateInTimelineActionComponent` |
| timelineIntegration?.ui?renderTimelineDetailsPanel? | `() => JSX.Element;` space to render `TimelineDetailsPanel` |

UI component:
![All Cases Component][all-cases-img]
Expand Down Expand Up @@ -127,11 +131,11 @@ UI component:

Arguments:

| Property | Description |
| -------------- | ---------------------------------------------------- |
| userCanCrud | `boolean;` user permissions to crud |
| owner | `string[];` owner ids of the cases |
| maxCasesToShow | `number;` number of cases to show in widget |
| Property | Description |
| -------------- | ------------------------------------------- |
| userCanCrud | `boolean;` user permissions to crud |
| owner | `string[];` owner ids of the cases |
| maxCasesToShow | `number;` number of cases to show in widget |

UI component:
![Recent Cases Component][recent-cases-img]
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugins/security_solution/public/cases/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ const CaseContainerComponent: React.FC = () => {
{casesUi.getCases({
basePath: CASES_PATH,
owner: [APP_ID],
features: {
metrics: ['alerts.count', 'alerts.users', 'alerts.hosts', 'connectors', 'lifespan'],
},
refreshRef,
onComponentInitialized,
actionsNavigation: {
Expand Down

0 comments on commit f2ad0a9

Please sign in to comment.