Skip to content

Commit

Permalink
Merge branch 'main' into renovate/main-ftr
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz authored Sep 9, 2024
2 parents 483c089 + 3d8fad5 commit 2707f73
Show file tree
Hide file tree
Showing 398 changed files with 10,226 additions and 11,110 deletions.
8 changes: 8 additions & 0 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7269,6 +7269,14 @@ paths:
summary: Import saved objects
tags:
- saved objects
x-codeSamples:
- label: Import with createNewCopies
lang: cURL
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
/api/status:
get:
operationId: '%2Fapi%2Fstatus#0'
Expand Down
8 changes: 8 additions & 0 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10201,6 +10201,14 @@ paths:
summary: Import saved objects
tags:
- saved objects
x-codeSamples:
- label: Import with createNewCopies
lang: cURL
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
/api/saved_objects/_resolve_import_errors:
post:
description: >
Expand Down
9 changes: 8 additions & 1 deletion packages/core/saved-objects/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,14 @@
}
}
}
}
},
"x-codeSamples": [
{
"lang": "cURL",
"label": "Import with createNewCopies",
"source": "curl \\\n -X POST api/saved_objects/_import?createNewCopies=true\n -H \"kbn-xsrf: true\"\n --form file=@file.ndjson\n"
}
]
}
},
"/api/saved_objects/_resolve_import_errors": {
Expand Down
8 changes: 8 additions & 0 deletions packages/core/saved-objects/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,14 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/400_response'
x-codeSamples:
- lang: cURL
label: Import with createNewCopies
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
/api/saved_objects/_resolve_import_errors:
post:
summary: Resolve import errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,14 @@
}
}
}
}
},
"x-codeSamples": [
{
"lang": "cURL",
"label": "Import with createNewCopies",
"source": "curl \\\n -X POST api/saved_objects/_import?createNewCopies=true\n -H \"kbn-xsrf: true\"\n --form file=@file.ndjson\n"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/400_response'
x-codeSamples:
- lang: cURL
label: Import with createNewCopies
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
components:
parameters:
kbn_xsrf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ post:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
x-codeSamples:
- lang: cURL
label: Import with createNewCopies
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import {
EVENT_KIND,
EVENT_ORIGINAL,
TAGS,
ALERT_INTENDED_TIMESTAMP,
} from '@kbn/rule-data-utils';
import { MultiField } from './types';

Expand Down Expand Up @@ -133,6 +134,11 @@ export const alertFieldMap = {
array: false,
required: false,
},
[ALERT_INTENDED_TIMESTAMP]: {
type: 'date',
array: false,
required: false,
},
[ALERT_RULE_EXECUTION_UUID]: {
type: 'keyword',
array: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const AlertOptional = rt.partial({
'kibana.alert.end': schemaDate,
'kibana.alert.flapping': schemaBoolean,
'kibana.alert.flapping_history': schemaBooleanArray,
'kibana.alert.intended_timestamp': schemaDate,
'kibana.alert.last_detected': schemaDate,
'kibana.alert.maintenance_window_ids': schemaStringArray,
'kibana.alert.previous_action_group': schemaString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const SecurityAlertOptional = rt.partial({
'kibana.alert.group.id': schemaString,
'kibana.alert.group.index': schemaNumber,
'kibana.alert.host.criticality_level': schemaString,
'kibana.alert.intended_timestamp': schemaDate,
'kibana.alert.last_detected': schemaDate,
'kibana.alert.maintenance_window_ids': schemaStringArray,
'kibana.alert.new_terms': schemaStringArray,
Expand Down
5 changes: 5 additions & 0 deletions packages/kbn-rule-data-utils/src/default_alerts_as_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ const ALERT_INSTANCE_ID = `${ALERT_NAMESPACE}.instance.id` as const;
// kibana.alert.last_detected - timestamp when the alert was last seen
const ALERT_LAST_DETECTED = `${ALERT_NAMESPACE}.last_detected` as const;

// kiana.alert.intended_timestamp - timestamp when the alert was intended to be detected, useful for backfilling
const ALERT_INTENDED_TIMESTAMP = `${ALERT_NAMESPACE}.intended_timestamp` as const;

// kibana.alert.reason - human readable reason that this alert is active
const ALERT_REASON = `${ALERT_NAMESPACE}.reason` as const;

Expand Down Expand Up @@ -141,6 +144,7 @@ const fields = {
ALERT_RULE_CATEGORY,
ALERT_RULE_CONSUMER,
ALERT_RULE_EXECUTION_TIMESTAMP,
ALERT_INTENDED_TIMESTAMP,
ALERT_RULE_EXECUTION_UUID,
ALERT_RULE_NAME,
ALERT_RULE_PARAMETERS,
Expand Down Expand Up @@ -185,6 +189,7 @@ export {
ALERT_RULE_CATEGORY,
ALERT_RULE_CONSUMER,
ALERT_RULE_EXECUTION_TIMESTAMP,
ALERT_INTENDED_TIMESTAMP,
ALERT_RULE_EXECUTION_UUID,
ALERT_RULE_NAME,
ALERT_RULE_PARAMETERS,
Expand Down
12 changes: 0 additions & 12 deletions src/plugins/dashboard/public/dashboard_actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ import { CopyToDashboardAction } from './copy_to_dashboard_action';
import { ExpandPanelAction } from './expand_panel_action';
import { ExportCSVAction } from './export_csv_action';
import { FiltersNotificationAction } from './filters_notification_action';
import { LegacyLibraryNotificationAction } from './legacy_library_notification_action';
import { UnlinkFromLibraryAction } from './unlink_from_library_action';
import { LegacyUnlinkFromLibraryAction } from './legacy_unlink_from_library_action';
import { LibraryNotificationAction } from './library_notification_action';

interface BuildAllDashboardActionsProps {
core: CoreStart;
Expand Down Expand Up @@ -64,20 +62,10 @@ export const buildAllDashboardActions = async ({
uiActions.registerAction(unlinkFromLibraryAction);
uiActions.attachAction(CONTEXT_MENU_TRIGGER, unlinkFromLibraryAction.id);

const libraryNotificationAction = new LibraryNotificationAction(unlinkFromLibraryAction);
uiActions.registerAction(libraryNotificationAction);
uiActions.attachAction(PANEL_NOTIFICATION_TRIGGER, libraryNotificationAction.id);

const legacyUnlinkFromLibraryAction = new LegacyUnlinkFromLibraryAction();
uiActions.registerAction(legacyUnlinkFromLibraryAction);
uiActions.attachAction(CONTEXT_MENU_TRIGGER, legacyUnlinkFromLibraryAction.id);

const legacyLibraryNotificationAction = new LegacyLibraryNotificationAction(
legacyUnlinkFromLibraryAction
);
uiActions.registerAction(legacyLibraryNotificationAction);
uiActions.attachAction(PANEL_NOTIFICATION_TRIGGER, legacyLibraryNotificationAction.id);

const copyToDashboardAction = new CopyToDashboardAction(core);
uiActions.registerAction(copyToDashboardAction);
uiActions.attachAction(CONTEXT_MENU_TRIGGER, copyToDashboardAction.id);
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2707f73

Please sign in to comment.