Skip to content

Commit

Permalink
Merge branch 'main' into geoip/add_table
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaStoeva authored Oct 15, 2024
2 parents 157c755 + adb558a commit 372bbf1
Show file tree
Hide file tree
Showing 240 changed files with 5,312 additions and 882 deletions.
48 changes: 48 additions & 0 deletions .buildkite/pipeline-resource-definitions/kibana-vm-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: bk-kibana-vm-images
description: Build CI agent VM images for Kibana
links:
- url: 'https://buildkite.com/elastic/kibana-vm-images'
title: Pipeline link
spec:
type: buildkite-pipeline
owner: group:kibana-operations
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: kibana / vm images
description: Build CI agent VM images for Kibana
spec:
env:
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
default_branch: main
repository: elastic/ci-agent-images
pipeline_file: vm-images/.buildkite/pipeline.yml
skip_intermediate_builds: false
provider_settings:
trigger_mode: none
schedules:
daily kibana image build:
branch: main
cronline: '0 0 * * *'
env:
IMAGES_CONFIG: kibana/images.yml
message: Builds Kibana VM images daily
daily kibana fips image build:
branch: main
cronline: '0 4 * * *' # make sure this runs after the daily kibana image build
env:
BASE_IMAGES_CONFIG: 'core/images.yml,kibana/images.yml'
IMAGES_CONFIG: kibana/fips.yml
message: Builds Kibana FIPS VM image daily
teams:
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: BUILD_AND_READ
1 change: 1 addition & 0 deletions .buildkite/pipeline-resource-definitions/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release-testing.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-vm-images.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/scalability_testing-daily.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-ess/security-solution-ess.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-defend-workflows.yml
Expand Down
13 changes: 6 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ module.exports = {
'error',
{
patterns: ['**/legacy_uptime/*'],
paths: RESTRICTED_IMPORTS,
},
],
},
Expand Down Expand Up @@ -1055,6 +1056,7 @@ module.exports = {
{
// prevents UI code from importing server side code and then webpack including it when doing builds
patterns: ['**/server/*'],
paths: RESTRICTED_IMPORTS,
},
],
},
Expand Down Expand Up @@ -1113,6 +1115,7 @@ module.exports = {
{
// prevents UI code from importing server side code and then webpack including it when doing builds
patterns: ['**/server/*'],
paths: RESTRICTED_IMPORTS,
},
],
},
Expand Down Expand Up @@ -1184,13 +1187,7 @@ module.exports = {
// to help deprecation and prevent accidental re-use/continued use of code we plan on removing. If you are
// finding yourself turning this off a lot for "new code" consider renaming the file and functions if it is has valid uses.
patterns: ['*legacy*'],
paths: [
{
name: 'react-router-dom',
importNames: ['Route'],
message: "import { Route } from '@kbn/kibana-react-plugin/public'",
},
],
paths: RESTRICTED_IMPORTS,
},
],
},
Expand Down Expand Up @@ -1348,6 +1345,7 @@ module.exports = {
{
// prevents UI code from importing server side code and then webpack including it when doing builds
patterns: ['**/server/*'],
paths: RESTRICTED_IMPORTS,
},
],
},
Expand Down Expand Up @@ -1525,6 +1523,7 @@ module.exports = {
// to help deprecation and prevent accidental re-use/continued use of code we plan on removing. If you are
// finding yourself turning this off a lot for "new code" consider renaming the file and functions if it has valid uses.
patterns: ['*legacy*'],
paths: RESTRICTED_IMPORTS,
},
],
},
Expand Down
10 changes: 7 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,8 @@ x-pack/test_serverless/**/test_suites/observability/ai_assistant @elastic/obs-ai
/x-pack/dev-tools @elastic/kibana-operations
/catalog-info.yaml @elastic/kibana-operations @elastic/kibana-tech-leads
/.devcontainer/ @elastic/kibana-operations
/.eslintrc.js @elastic/kibana-operations
/.eslintignore @elastic/kibana-operations

# Appex QA
/x-pack/test_serverless/tsconfig.json @elastic/appex-qa
Expand Down Expand Up @@ -1394,9 +1396,9 @@ x-pack/test_serverless/api_integration/test_suites/common/security_response_head
# Kibana Telemetry
/.telemetryrc.json @elastic/kibana-core
/x-pack/.telemetryrc.json @elastic/kibana-core
/src/plugins/telemetry/schema/ @elastic/kibana-core @elastic/kibana-telemetry
/x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/kibana-telemetry
x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kibana-core @elastic/kibana-telemetry @shahinakmal
/src/plugins/telemetry/schema/ @elastic/kibana-core
/x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core
x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kibana-core @shahinakmal

# Kibana Localization
/src/dev/i18n_tools/ @elastic/kibana-localization @elastic/kibana-core
Expand Down Expand Up @@ -1750,6 +1752,8 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/cti @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/field_maps @elastic/security-detection-engine
/x-pack/test/functional/es_archives/entity/risks @elastic/security-detection-engine
/x-pack/test/functional/es_archives/entity/host_risk @elastic/security-detection-engine

/x-pack/plugins/security_solution/public/sourcerer @elastic/security-threat-hunting-investigations
/x-pack/plugins/security_solution/public/detection_engine/rule_creation @elastic/security-detection-engine
Expand Down
18 changes: 18 additions & 0 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -5077,6 +5077,15 @@
"responses": {
"204": {
"description": "Indicates a successful call."
},
"400": {
"description": "Indicates an invalid schema or parameters."
},
"403": {
"description": "Indicates that this call is forbidden."
},
"404": {
"description": "Indicates a rule with the given ID does not exist."
}
},
"summary": "Mute all alerts",
Expand Down Expand Up @@ -5124,6 +5133,15 @@
"responses": {
"204": {
"description": "Indicates a successful call."
},
"400": {
"description": "Indicates an invalid schema or parameters."
},
"403": {
"description": "Indicates that this call is forbidden."
},
"404": {
"description": "Indicates a rule with the given ID does not exist."
}
},
"summary": "Unmute all alerts",
Expand Down
18 changes: 18 additions & 0 deletions oas_docs/bundle.serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -5077,6 +5077,15 @@
"responses": {
"204": {
"description": "Indicates a successful call."
},
"400": {
"description": "Indicates an invalid schema or parameters."
},
"403": {
"description": "Indicates that this call is forbidden."
},
"404": {
"description": "Indicates a rule with the given ID does not exist."
}
},
"summary": "Mute all alerts",
Expand Down Expand Up @@ -5124,6 +5133,15 @@
"responses": {
"204": {
"description": "Indicates a successful call."
},
"400": {
"description": "Indicates an invalid schema or parameters."
},
"403": {
"description": "Indicates that this call is forbidden."
},
"404": {
"description": "Indicates a rule with the given ID does not exist."
}
},
"summary": "Unmute all alerts",
Expand Down
12 changes: 12 additions & 0 deletions oas_docs/output/kibana.serverless.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4217,6 +4217,12 @@ paths:
responses:
'204':
description: Indicates a successful call.
'400':
description: Indicates an invalid schema or parameters.
'403':
description: Indicates that this call is forbidden.
'404':
description: Indicates a rule with the given ID does not exist.
summary: Mute all alerts
tags:
- alerting
Expand Down Expand Up @@ -4248,6 +4254,12 @@ paths:
responses:
'204':
description: Indicates a successful call.
'400':
description: Indicates an invalid schema or parameters.
'403':
description: Indicates that this call is forbidden.
'404':
description: Indicates a rule with the given ID does not exist.
summary: Unmute all alerts
tags:
- alerting
Expand Down
12 changes: 12 additions & 0 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4217,6 +4217,12 @@ paths:
responses:
'204':
description: Indicates a successful call.
'400':
description: Indicates an invalid schema or parameters.
'403':
description: Indicates that this call is forbidden.
'404':
description: Indicates a rule with the given ID does not exist.
summary: Mute all alerts
tags:
- alerting
Expand Down Expand Up @@ -4248,6 +4254,12 @@ paths:
responses:
'204':
description: Indicates a successful call.
'400':
description: Indicates an invalid schema or parameters.
'403':
description: Indicates that this call is forbidden.
'404':
description: Indicates a rule with the given ID does not exist.
summary: Unmute all alerts
tags:
- alerting
Expand Down
12 changes: 12 additions & 0 deletions oas_docs/output/kibana.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4598,6 +4598,12 @@ paths:
responses:
'204':
description: Indicates a successful call.
'400':
description: Indicates an invalid schema or parameters.
'403':
description: Indicates that this call is forbidden.
'404':
description: Indicates a rule with the given ID does not exist.
summary: Mute all alerts
tags:
- alerting
Expand Down Expand Up @@ -4629,6 +4635,12 @@ paths:
responses:
'204':
description: Indicates a successful call.
'400':
description: Indicates an invalid schema or parameters.
'403':
description: Indicates that this call is forbidden.
'404':
description: Indicates a rule with the given ID does not exist.
summary: Unmute all alerts
tags:
- alerting
Expand Down
12 changes: 12 additions & 0 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4598,6 +4598,12 @@ paths:
responses:
'204':
description: Indicates a successful call.
'400':
description: Indicates an invalid schema or parameters.
'403':
description: Indicates that this call is forbidden.
'404':
description: Indicates a rule with the given ID does not exist.
summary: Mute all alerts
tags:
- alerting
Expand Down Expand Up @@ -4629,6 +4635,12 @@ paths:
responses:
'204':
description: Indicates a successful call.
'400':
description: Indicates an invalid schema or parameters.
'403':
description: Indicates that this call is forbidden.
'404':
description: Indicates a rule with the given ID does not exist.
summary: Unmute all alerts
tags:
- alerting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ export const transformUpdateRuleBody: RewriteResponseCase<UpdateRuleBody> = ({
...(uuid && { uuid }),
};
}),
...(alertDelay ? { alert_delay: alertDelay } : {}),
...(alertDelay !== undefined ? { alert_delay: alertDelay } : {}),
...(flapping !== undefined ? { flapping: transformUpdateRuleFlapping(flapping) } : {}),
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
*/

// Feature flag for frontend rule specific flapping in rule flyout
export const IS_RULE_SPECIFIC_FLAPPING_ENABLED = false;
export const IS_RULE_SPECIFIC_FLAPPING_ENABLED = true;
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
import { useMutation } from '@tanstack/react-query';
import type { HttpStart, IHttpFetchError } from '@kbn/core-http-browser';
import { createRule, CreateRuleBody } from '../apis/create_rule';
import { Rule } from '../types';

export interface UseCreateRuleProps {
http: HttpStart;
onSuccess?: (formData: CreateRuleBody) => void;
onSuccess?: (rule: Rule) => void;
onError?: (error: IHttpFetchError<{ message: string }>) => void;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ export interface UseLoadConnectorsProps {
http: HttpStart;
includeSystemActions?: boolean;
enabled?: boolean;
cacheTime?: number;
}

export const useLoadConnectors = (props: UseLoadConnectorsProps) => {
const { http, includeSystemActions = false, enabled = true } = props;
const { http, includeSystemActions = false, enabled = true, cacheTime } = props;

const queryFn = () => {
return fetchConnectors({ http, includeSystemActions });
Expand All @@ -27,6 +28,7 @@ export const useLoadConnectors = (props: UseLoadConnectorsProps) => {
const { data, isLoading, isFetching, isInitialLoading } = useQuery({
queryKey: ['useLoadConnectors', includeSystemActions],
queryFn,
cacheTime,
refetchOnWindowFocus: false,
enabled,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ export interface UseLoadRuleTypeAadTemplateFieldProps {
http: HttpStart;
ruleTypeId?: string;
enabled: boolean;
cacheTime?: number;
}

export const useLoadRuleTypeAadTemplateField = (props: UseLoadRuleTypeAadTemplateFieldProps) => {
const { http, ruleTypeId, enabled } = props;
const { http, ruleTypeId, enabled, cacheTime } = props;

const queryFn = () => {
if (!ruleTypeId) {
Expand All @@ -43,6 +44,7 @@ export const useLoadRuleTypeAadTemplateField = (props: UseLoadRuleTypeAadTemplat
description: getDescription(d.name, EcsFlat),
}));
},
cacheTime,
refetchOnWindowFocus: false,
enabled,
});
Expand Down
Loading

0 comments on commit 372bbf1

Please sign in to comment.