Skip to content

Commit a819243

Browse files
authored
Merge branch 'main' into data-registry-apm-types
2 parents a38a1d5 + ed166b5 commit a819243

File tree

36 files changed

+375
-74
lines changed

36 files changed

+375
-74
lines changed

oas_docs/output/kibana.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77107,6 +77107,9 @@ paths:
7710777107
required: true
7710877108
schema:
7710977109
type: string
77110+
responses:
77111+
'200':
77112+
description: OK
7711077113
summary: Delete a monitor
7711177114
tags:
7711277115
- synthetics
@@ -77278,6 +77281,9 @@ paths:
7727877281
- $ref: '#/components/schemas/Synthetics_tcpMonitorFields'
7727977282
type: object
7728077283
required: true
77284+
responses:
77285+
'200':
77286+
description: OK
7728177287
summary: Update a monitor
7728277288
tags:
7728377289
- synthetics
@@ -77448,11 +77454,11 @@ paths:
7744877454
- content: Kibana
7744977455
name: product_name
7745077456
/api/synthetics/params/_bulk_delete:
77451-
delete:
77457+
post:
7745277458
description: |
7745377459
**Spaces method and path for this operation:**
7745477460

77455-
<div><span class="operation-verb delete">delete</span>&nbsp;<span class="operation-path">/s/{space_id}/api/synthetics/params/_bulk_delete</span></div>
77461+
<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/synthetics/params/_bulk_delete</span></div>
7745677462

7745777463
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
7745877464

@@ -77529,6 +77535,9 @@ paths:
7752977535
required: true
7753077536
schema:
7753177537
type: string
77538+
responses:
77539+
'200':
77540+
description: OK
7753277541
summary: Delete a parameter
7753377542
tags:
7753477543
- synthetics
@@ -77830,6 +77839,9 @@ paths:
7783077839
maxLength: 1024
7783177840
minLength: 1
7783277841
type: string
77842+
responses:
77843+
'200':
77844+
description: OK
7783377845
summary: Delete a private location
7783477846
tags:
7783577847
- synthetics
@@ -103915,6 +103927,8 @@ components:
103915103927
type: string
103916103928
synthetics_args:
103917103929
description: Synthetics agent CLI arguments.
103930+
items:
103931+
type: string
103918103932
type: array
103919103933
type:
103920103934
description: The monitor type.
@@ -104073,7 +104087,7 @@ components:
104073104087
Synthetics_httpMonitorFields:
104074104088
allOf:
104075104089
- $ref: '#/components/schemas/Synthetics_commonMonitorFields'
104076-
- additionalproperties: true
104090+
- additionalProperties: true
104077104091
type: object
104078104092
properties:
104079104093
check:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"./oas_docs/output/kibana.yaml": 1249,
2+
"./oas_docs/output/kibana.yaml": 1244,
33
"./oas_docs/output/kibana.serverless.yaml": 1137
44
}

x-pack/solutions/observability/plugins/synthetics/docs/openapi/synthetic_apis.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ paths:
281281
required: true
282282
schema:
283283
type: string
284+
responses:
285+
"200":
286+
description: OK
284287
get:
285288
summary: Get a monitor
286289
operationId: get-synthetic-monitor
@@ -442,6 +445,9 @@ paths:
442445
"inline_script": "step('Go to https://google.com.co', () => page.goto('https://www.google.com'))",
443446
"locations": ["united_kingdom"]
444447
}
448+
responses:
449+
"200":
450+
description: OK
445451
/api/synthetics/monitors/_bulk_delete:
446452
post:
447453
summary: Delete monitors
@@ -671,6 +677,9 @@ paths:
671677
required: true
672678
schema:
673679
type: string
680+
responses:
681+
"200":
682+
description: OK
674683
get:
675684
summary: Get a parameter
676685
operationId: get-parameter
@@ -783,7 +792,7 @@ paths:
783792
"tags": ["authentication", "security", "updated"]
784793
}
785794
/api/synthetics/params/_bulk_delete:
786-
delete:
795+
post:
787796
summary: Delete parameters
788797
operationId: delete-parameters
789798
description: >
@@ -990,6 +999,9 @@ paths:
990999
type: string
9911000
minLength: 1
9921001
maxLength: 1024
1002+
responses:
1003+
"200":
1004+
description: OK
9931005
get:
9941006
summary: Get a private location
9951007
operationId: get-private-location
@@ -1297,6 +1309,8 @@ components:
12971309
synthetics_args:
12981310
type: array
12991311
description: Synthetics agent CLI arguments.
1312+
items:
1313+
type: string
13001314
type:
13011315
type: string
13021316
description: The monitor type.
@@ -1310,7 +1324,7 @@ components:
13101324
required:
13111325
- type
13121326
- url
1313-
additionalproperties: true
1327+
additionalProperties: true
13141328
properties:
13151329
check:
13161330
type: object

x-pack/solutions/security/packages/data-table/common/types/data_table/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export enum TableId {
2626
hostsPageSessions = 'hosts-page-sessions-v2', // the v2 is to cache bust localstorage settings as default columns were reworked.
2727
alertsOnRuleDetailsPage = 'alerts-rules-details-page',
2828
alertsOnAlertsPage = 'alerts-page',
29+
alertsOnAttacksPage = 'attacks-page',
2930
alertsOnAlertSummaryPage = 'alert-summary-page',
3031
test = 'table-test', // Reserved for testing purposes
3132
alternateTest = 'alternateTest',
@@ -45,6 +46,7 @@ export enum TableEntityType {
4546

4647
export const tableEntity: Record<TableId, TableEntityType> = {
4748
[TableId.alertsOnAlertsPage]: TableEntityType.alert,
49+
[TableId.alertsOnAttacksPage]: TableEntityType.alert,
4850
[TableId.alertsOnAlertSummaryPage]: TableEntityType.alert,
4951
[TableId.alertsOnCasePage]: TableEntityType.alert,
5052
[TableId.alertsOnRuleDetailsPage]: TableEntityType.alert,
@@ -67,6 +69,7 @@ const TableIdLiteralRt = runtimeTypes.union([
6769
runtimeTypes.literal(TableId.hostsPageSessions),
6870
runtimeTypes.literal(TableId.alertsOnRuleDetailsPage),
6971
runtimeTypes.literal(TableId.alertsOnAlertsPage),
72+
runtimeTypes.literal(TableId.alertsOnAttacksPage),
7073
runtimeTypes.literal(TableId.alertsOnAlertSummaryPage),
7174
runtimeTypes.literal(TableId.test),
7275
runtimeTypes.literal(TableId.rulePreview),

x-pack/solutions/security/plugins/security_solution/common/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ export const VIEW_SELECTION = {
524524

525525
export const ALERTS_TABLE_REGISTRY_CONFIG_IDS = {
526526
ALERTS_PAGE: `${APP_ID}-alerts-page`,
527+
ATTACKS_PAGE: `${APP_ID}-attacks-page`,
527528
RULE_DETAILS: `${APP_ID}-rule-details`,
528529
CASE: `${APP_ID}-case`,
529530
RISK_INPUTS: `${APP_ID}-risk-inputs`,

x-pack/solutions/security/plugins/security_solution/public/app/actions/toggle_column/cell_action/toggle_column.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ describe('createToggleColumnCellActionFactory', () => {
114114
TableId.alertsOnCasePage,
115115
TableId.alertsOnRuleDetailsPage,
116116
TableId.alertsRiskInputs,
117+
TableId.alertsOnAttacksPage,
117118
].forEach((scopeId) => {
118119
it(`should call toggleColumn on the visible alerts table to add a column in alert for TableId ${scopeId}`, async () => {
119120
const name = 'fake-field-name';
@@ -136,6 +137,7 @@ describe('createToggleColumnCellActionFactory', () => {
136137
TableId.alertsOnCasePage,
137138
TableId.alertsOnRuleDetailsPage,
138139
TableId.alertsRiskInputs,
140+
TableId.alertsOnAttacksPage,
139141
].forEach((scopeId) => {
140142
it(`should call toggleColumn on the visible alerts table to remove a column in alert for TableId ${scopeId}`, async () => {
141143
await toggleColumnAction.execute({

x-pack/solutions/security/plugins/security_solution/public/common/components/cell_actions/cell_actions_renderer.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ describe('cell actions renderer', () => {
123123
TableId.alternateTest,
124124
TimelineId.casePage,
125125
TableId.alertsOnAlertsPage,
126+
TableId.alertsOnAttacksPage,
126127
TableId.alertsOnRuleDetailsPage,
127128
TableId.hostsPageEvents,
128129
TableId.hostsPageSessions,

x-pack/solutions/security/plugins/security_solution/public/common/components/cell_actions/utils.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const scopeIdsWithHoverActions = [
2121
TableId.alternateTest,
2222
TimelineId.casePage,
2323
TableId.alertsOnAlertsPage,
24+
TableId.alertsOnAttacksPage,
2425
TableId.alertsOnRuleDetailsPage,
2526
TableId.hostsPageEvents,
2627
TableId.hostsPageSessions,

x-pack/solutions/security/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { ActionCreator } from 'typescript-fsa';
1111
import type { FieldSpec } from '@kbn/data-plugin/common';
1212

1313
import { getFieldIdFromDraggable, getProviderIdFromDraggable } from '@kbn/securitysolution-t-grid';
14-
import { TableId } from '@kbn/securitysolution-data-table';
14+
import { DETECTIONS_TABLE_IDS } from '../../../detections/constants';
1515
import { DEFAULT_COLUMN_MIN_WIDTH } from '../../../timelines/components/timeline/body/constants';
1616
import { getScopedActions } from '../../../helpers';
1717
import type { ColumnHeaderOptions } from '../../../../common/types';
@@ -221,10 +221,9 @@ export const addFieldToColumns = ({
221221
const fieldId = getFieldIdFromDraggable(result);
222222
const allColumns = getAllFieldsByName(browserFields);
223223
const column = allColumns[fieldId];
224-
const initColumnHeader =
225-
scopeId === TableId.alertsOnAlertsPage || scopeId === TableId.alertsOnRuleDetailsPage
226-
? defaultsHeader.find((c) => c.id === fieldId) ?? {}
227-
: {};
224+
const initColumnHeader = DETECTIONS_TABLE_IDS.some((tableId) => tableId === scopeId)
225+
? defaultsHeader.find((c) => c.id === fieldId) ?? {}
226+
: {};
228227

229228
const scopedActions = getScopedActions(scopeId);
230229
if (column != null && scopedActions) {

x-pack/solutions/security/plugins/security_solution/public/common/components/events_viewer/use_timelines_events.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import type {
2828
TimelineRequestSortField,
2929
TimelineStrategyResponseType,
3030
} from '@kbn/timelines-plugin/common/search_strategy';
31-
import { dataTableActions, Direction, TableId } from '@kbn/securitysolution-data-table';
31+
import { dataTableActions, Direction } from '@kbn/securitysolution-data-table';
32+
import { DETECTIONS_TABLE_IDS } from '../../../detections/constants';
3233
import type { RunTimeMappings } from '../../../sourcerer/store/model';
3334
import { TimelineEventsQueries } from '../../../../common/search_strategy';
3435
import type { KueryFilterQueryKind } from '../../../../common/types';
@@ -39,8 +40,6 @@ import { useFetchNotes } from '../../../notes/hooks/use_fetch_notes';
3940

4041
export type InspectResponse = Inspect & { response: string[] };
4142

42-
export const detectionsTimelineIds = [TableId.alertsOnAlertsPage, TableId.alertsOnRuleDetailsPage];
43-
4443
export type Refetch = () => void;
4544

4645
export interface TimelineArgs {
@@ -168,7 +167,7 @@ export const useTimelineEventsHandler = ({
168167
const prevTimelineRequest = useRef<TimelineRequest | null>(null);
169168

170169
const clearSignalsState = useCallback(() => {
171-
if (id != null && detectionsTimelineIds.some((timelineId) => timelineId === id)) {
170+
if (id != null && DETECTIONS_TABLE_IDS.some((timelineId) => timelineId === id)) {
172171
dispatch(dataTableActions.clearEventsLoading({ id }));
173172
dispatch(dataTableActions.clearEventsDeleted({ id }));
174173
}

0 commit comments

Comments
 (0)