Skip to content

Commit bae5505

Browse files
Merge branch 'master' of github.com:elastic/kibana into fix/timeline-multiple-draggables
# Conflicts: # x-pack/legacy/plugins/siem/public/components/drag_and_drop/draggable_wrapper.tsx # x-pack/legacy/plugins/siem/public/components/event_details/event_fields_browser.tsx # x-pack/legacy/plugins/siem/public/components/timeline/body/renderers/formatted_field.test.tsx
2 parents ebd55ba + 9d5603a commit bae5505

9,077 files changed

Lines changed: 312211 additions & 211081 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/packer_cache.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
4444
x-pack/legacy/plugins/*/node_modules \
4545
x-pack/legacy/plugins/reporting/.chromium \
4646
test/plugin_functional/plugins/*/node_modules \
47+
examples/*/node_modules \
4748
.es \
4849
.chromedriver \
4950
.geckodriver;

.eslintrc.js

Lines changed: 44 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,6 @@ module.exports = {
131131
'react-hooks/exhaustive-deps': 'off',
132132
},
133133
},
134-
{
135-
files: ['src/plugins/eui_utils/**/*.{js,ts,tsx}'],
136-
rules: {
137-
'react-hooks/exhaustive-deps': 'off',
138-
},
139-
},
140134
{
141135
files: ['src/plugins/kibana_react/**/*.{js,ts,tsx}'],
142136
rules: {
@@ -170,13 +164,6 @@ module.exports = {
170164
'react-hooks/rules-of-hooks': 'off',
171165
},
172166
},
173-
{
174-
files: ['x-pack/legacy/plugins/infra/**/*.{js,ts,tsx}'],
175-
rules: {
176-
'react-hooks/exhaustive-deps': 'off',
177-
'react-hooks/rules-of-hooks': 'off',
178-
},
179-
},
180167
{
181168
files: ['x-pack/legacy/plugins/lens/**/*.{js,ts,tsx}'],
182169
rules: {
@@ -202,60 +189,6 @@ module.exports = {
202189
'react-hooks/exhaustive-deps': 'off',
203190
},
204191
},
205-
{
206-
files: ['x-pack/legacy/plugins/uptime/**/*.{js,ts,tsx}'],
207-
rules: {
208-
'react-hooks/exhaustive-deps': 'off',
209-
'react-hooks/rules-of-hooks': 'off',
210-
},
211-
},
212-
{
213-
files: ['x-pack/legacy/plugins/watcher/**/*.{js,ts,tsx}'],
214-
rules: {
215-
'react-hooks/rules-of-hooks': 'off',
216-
'react-hooks/exhaustive-deps': 'off',
217-
},
218-
},
219-
220-
/**
221-
* Prettier
222-
*/
223-
{
224-
files: [
225-
'.eslintrc.js',
226-
'packages/kbn-utility-types/**/*',
227-
'packages/kbn-eslint-plugin-eslint/**/*',
228-
'packages/kbn-config-schema/**/*',
229-
'packages/kbn-pm/**/*',
230-
'packages/kbn-es/**/*',
231-
'packages/elastic-datemath/**/*',
232-
'packages/kbn-i18n/**/*',
233-
'packages/kbn-dev-utils/**/*',
234-
'packages/kbn-plugin-helpers/**/*',
235-
'packages/kbn-plugin-generator/**/*',
236-
'packages/kbn-test-subj-selector/**/*',
237-
'packages/kbn-test/**/*',
238-
'packages/kbn-eslint-import-resolver-kibana/**/*',
239-
'src/legacy/server/saved_objects/**/*',
240-
'x-pack/legacy/plugins/apm/**/*',
241-
'x-pack/legacy/plugins/canvas/**/*',
242-
'**/*.{ts,tsx}',
243-
'src/legacy/core_plugins/metrics/**/*.js',
244-
],
245-
plugins: ['prettier'],
246-
rules: Object.assign(
247-
{
248-
'prettier/prettier': [
249-
'error',
250-
{
251-
endOfLine: 'auto',
252-
},
253-
],
254-
},
255-
require('eslint-config-prettier').rules,
256-
require('eslint-config-prettier/react').rules
257-
),
258-
},
259192

260193
/**
261194
* Files that require Apache 2.0 headers, settings
@@ -317,7 +250,8 @@ module.exports = {
317250
'src/legacy/**/*',
318251
'x-pack/**/*',
319252
'!x-pack/**/*.test.*',
320-
'src/plugins/**/(public|server)/**/*',
253+
'!x-pack/test/**/*',
254+
'(src|x-pack)/plugins/**/(public|server)/**/*',
321255
'src/core/(public|server)/**/*',
322256
],
323257
from: [
@@ -337,16 +271,35 @@ module.exports = {
337271
'!src/core/server/types',
338272
'!src/core/server/*.test.mocks.ts',
339273

340-
'src/plugins/**/public/**/*',
341-
'!src/plugins/**/public/index.{js,ts,tsx}',
342-
343-
'src/plugins/**/server/**/*',
344-
'!src/plugins/**/server/index.{js,ts,tsx}',
274+
'(src|x-pack)/plugins/**/(public|server)/**/*',
275+
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,ts,tsx}',
345276
],
346277
allowSameFolder: true,
278+
errorMessage: 'Plugins may only import from top-level public and server modules.',
347279
},
348280
{
349-
target: ['src/core/**/*'],
281+
target: [
282+
'(src|x-pack)/plugins/**/*',
283+
'!(src|x-pack)/plugins/*/server/**/*',
284+
285+
'src/legacy/core_plugins/**/*',
286+
'!src/legacy/core_plugins/*/server/**/*',
287+
'!src/legacy/core_plugins/*/index.{js,ts,tsx}',
288+
289+
'x-pack/legacy/plugins/**/*',
290+
'!x-pack/legacy/plugins/*/server/**/*',
291+
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
292+
],
293+
from: [
294+
'src/core/server',
295+
'src/core/server/**/*',
296+
'(src|x-pack)/plugins/*/server/**/*',
297+
],
298+
errorMessage:
299+
'Server modules cannot be imported into client modules or shared modules.',
300+
},
301+
{
302+
target: ['src/**/*'],
350303
from: ['x-pack/**/*'],
351304
errorMessage: 'OSS cannot import x-pack files.',
352305
},
@@ -360,6 +313,11 @@ module.exports = {
360313
],
361314
errorMessage: 'The core cannot depend on any plugins.',
362315
},
316+
{
317+
target: ['(src|x-pack)/plugins/*/public/**/*'],
318+
from: ['ui/**/*', 'uiExports/**/*'],
319+
errorMessage: 'Plugins cannot import legacy UI code.',
320+
},
363321
{
364322
from: ['src/legacy/ui/**/*', 'ui/**/*'],
365323
target: [
@@ -720,8 +678,6 @@ module.exports = {
720678
'accessor-pairs': 'error',
721679
'array-callback-return': 'error',
722680
'no-array-constructor': 'error',
723-
// This will be turned on after bug fixes are mostly completed
724-
// 'arrow-body-style': ['warn', 'as-needed'],
725681
complexity: 'warn',
726682
// This will be turned on after bug fixes are mostly completed
727683
// 'consistent-return': 'warn',
@@ -751,7 +707,6 @@ module.exports = {
751707
'no-extra-bind': 'error',
752708
'no-extra-boolean-cast': 'error',
753709
'no-extra-label': 'error',
754-
'no-floating-decimal': 'error',
755710
'no-func-assign': 'error',
756711
'no-implicit-globals': 'error',
757712
'no-implied-eval': 'error',
@@ -792,8 +747,6 @@ module.exports = {
792747
'prefer-spread': 'error',
793748
// This style will be turned on after most bugs are fixed
794749
// 'prefer-template': 'warn',
795-
// This style will be turned on after most bugs are fixed
796-
// quotes: ['warn', 'single', { avoidEscape: true }],
797750
'react/boolean-prop-naming': 'error',
798751
'react/button-has-type': 'error',
799752
'react/forbid-dom-props': 'error',
@@ -829,13 +782,10 @@ module.exports = {
829782
'react/jsx-sort-default-props': 'error',
830783
// might be introduced after the other warns are fixed
831784
// 'react/jsx-sort-props': 'error',
832-
'react/jsx-tag-spacing': 'error',
833785
// might be introduced after the other warns are fixed
834786
'react-hooks/exhaustive-deps': 'off',
835787
'require-atomic-updates': 'error',
836-
'rest-spread-spacing': ['error', 'never'],
837788
'symbol-description': 'error',
838-
'template-curly-spacing': 'error',
839789
'vars-on-top': 'error',
840790
},
841791
},
@@ -870,8 +820,6 @@ module.exports = {
870820
{
871821
files: ['x-pack/legacy/plugins/monitoring/**/*.js'],
872822
rules: {
873-
'block-spacing': ['error', 'always'],
874-
curly: ['error', 'all'],
875823
'no-unused-vars': ['error', { args: 'all', argsIgnorePattern: '^_' }],
876824
'no-else-return': 'error',
877825
},
@@ -888,7 +836,6 @@ module.exports = {
888836
files: ['x-pack/legacy/plugins/canvas/**/*.js'],
889837
rules: {
890838
radix: 'error',
891-
curly: ['error', 'all'],
892839

893840
// module importing
894841
'import/order': [
@@ -906,7 +853,6 @@ module.exports = {
906853
'react/self-closing-comp': 'error',
907854
'react/sort-comp': 'error',
908855
'react/jsx-boolean-value': 'error',
909-
'react/jsx-wrap-multilines': 'error',
910856
'react/no-unescaped-entities': ['error', { forbid: ['>', '}'] }],
911857
'react/forbid-elements': [
912858
'error',
@@ -983,5 +929,17 @@ module.exports = {
983929
'import/no-default-export': 'error',
984930
},
985931
},
932+
933+
/**
934+
* Prettier disables all conflicting rules, listing as last override so it takes precedence
935+
*/
936+
{
937+
files: ['**/*'],
938+
rules: {
939+
...require('eslint-config-prettier').rules,
940+
...require('eslint-config-prettier/react').rules,
941+
...require('eslint-config-prettier/@typescript-eslint').rules,
942+
},
943+
},
986944
],
987945
};

.github/CODEOWNERS

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@
55
# App
66
/x-pack/legacy/plugins/lens/ @elastic/kibana-app
77
/x-pack/legacy/plugins/graph/ @elastic/kibana-app
8+
/src/plugins/share/ @elastic/kibana-app
9+
/src/legacy/server/url_shortening/ @elastic/kibana-app
810
/src/legacy/server/sample_data/ @elastic/kibana-app
11+
/src/legacy/core_plugins/kibana/public/dashboard/ @elastic/kibana-app
12+
/src/legacy/core_plugins/kibana/public/discover/ @elastic/kibana-app
13+
/src/legacy/core_plugins/kibana/public/visualize/ @elastic/kibana-app
14+
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
15+
/src/legacy/core_plugins/kibana/public/home/ @elastic/kibana-app
16+
/src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
17+
/src/plugins/home/ @elastic/kibana-app
18+
/src/plugins/kibana_legacy/ @elastic/kibana-app
19+
/src/plugins/timelion/ @elastic/kibana-app
20+
/src/plugins/dev_tools/ @elastic/kibana-app
921

1022
# App Architecture
1123
/src/plugins/data/ @elastic/kibana-app-arch
@@ -14,7 +26,6 @@
1426
/src/plugins/kibana_react/ @elastic/kibana-app-arch
1527
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
1628
/src/plugins/navigation/ @elastic/kibana-app-arch
17-
/src/plugins/share/ @elastic/kibana-app-arch
1829
/src/plugins/ui_actions/ @elastic/kibana-app-arch
1930
/src/plugins/visualizations/ @elastic/kibana-app-arch
2031
/x-pack/plugins/advanced_ui_actions/ @elastic/kibana-app-arch
@@ -28,7 +39,6 @@
2839
/src/legacy/core_plugins/kibana/server/routes/api/suggestions/ @elastic/kibana-app-arch
2940
/src/legacy/core_plugins/visualizations/ @elastic/kibana-app-arch
3041
/src/legacy/server/index_patterns/ @elastic/kibana-app-arch
31-
/src/legacy/server/url_shortening/ @elastic/kibana-app-arch
3242

3343
# APM
3444
/x-pack/legacy/plugins/apm/ @elastic/apm-ui
@@ -57,6 +67,13 @@
5767
/x-pack/test/functional/services/transform_ui/ @elastic/ml-ui
5868
/x-pack/test/functional/services/transform.ts @elastic/ml-ui
5969

70+
# Maps
71+
/x-pack/legacy/plugins/maps/ @elastic/kibana-gis
72+
/x-pack/test/api_integration/apis/maps/ @elastic/kibana-gis
73+
/x-pack/test/functional/apps/maps/ @elastic/kibana-gis
74+
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
75+
/x-pack/test/visual_regression/tests/maps/index.js @elastic/kibana-gis
76+
6077
# Operations
6178
/src/dev/ @elastic/kibana-operations
6279
/src/setup_node_env/ @elastic/kibana-operations
@@ -80,32 +97,38 @@
8097
/x-pack/plugins/licensing/ @elastic/kibana-platform
8198
/packages/kbn-config-schema/ @elastic/kibana-platform
8299
/src/legacy/server/config/ @elastic/kibana-platform
83-
/src/legacy/server/csp/ @elastic/kibana-platform
84100
/src/legacy/server/http/ @elastic/kibana-platform
85101
/src/legacy/server/i18n/ @elastic/kibana-platform
86102
/src/legacy/server/logging/ @elastic/kibana-platform
87103
/src/legacy/server/saved_objects/ @elastic/kibana-platform
88104
/src/legacy/server/status/ @elastic/kibana-platform
89105

90106
# Security
107+
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-platform
91108
/x-pack/legacy/plugins/security/ @elastic/kibana-security
92109
/x-pack/legacy/plugins/spaces/ @elastic/kibana-security
93110
/x-pack/plugins/spaces/ @elastic/kibana-security
94111
/x-pack/legacy/plugins/encrypted_saved_objects/ @elastic/kibana-security
95112
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
96-
/src/legacy/server/csp/ @elastic/kibana-security
97113
/x-pack/plugins/security/ @elastic/kibana-security
98114
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security
99115

100-
# Kibana Stack Services
101-
/src/dev/i18n @elastic/kibana-stack-services
102-
/packages/kbn-analytics/ @elastic/kibana-stack-services
103-
/src/legacy/core_plugins/ui_metric/ @elastic/kibana-stack-services
104-
/src/plugins/usage_collection/ @elastic/kibana-stack-services
105-
/x-pack/legacy/plugins/telemetry @elastic/kibana-stack-services
106-
/x-pack/legacy/plugins/alerting @elastic/kibana-stack-services
107-
/x-pack/legacy/plugins/actions @elastic/kibana-stack-services
108-
/x-pack/legacy/plugins/task_manager @elastic/kibana-stack-services
116+
# Kibana Localization
117+
/src/dev/i18n @elastic/kibana-localization
118+
119+
# Pulse
120+
/packages/kbn-analytics/ @elastic/pulse
121+
/src/legacy/core_plugins/ui_metric/ @elastic/pulse
122+
/src/plugins/usage_collection/ @elastic/pulse
123+
/x-pack/legacy/plugins/telemetry @elastic/pulse
124+
125+
# Kibana Alerting Services
126+
/x-pack/legacy/plugins/alerting @elastic/kibana-alerting-services
127+
/x-pack/legacy/plugins/actions @elastic/kibana-alerting-services
128+
/x-pack/legacy/plugins/task_manager @elastic/kibana-alerting-services
129+
/x-pack/test/alerting_api_integration @elastic/kibana-alerting-services
130+
/x-pack/test/plugin_api_integration/plugins/task_manager @elastic/kibana-alerting-services
131+
/x-pack/test/plugin_api_integration/test_suites/task_manager @elastic/kibana-alerting-services
109132

110133
# Design
111134
**/*.scss @elastic/kibana-design

.github/labeler.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
pull_request:
3+
types: [labeled, unlabeled]
4+
5+
jobs:
6+
assign_to_project:
7+
runs-on: ubuntu-latest
8+
name: Assign a PR to project based on label
9+
steps:
10+
- name: Assign to project
11+
uses: elastic/github-actions/project-assigner@v1.0.0
12+
id: project_assigner
13+
with:
14+
issue-mappings: |
15+
[
16+
{ "label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173897 },
17+
{ "label": "Feature:Lens", "projectName": "Lens", "columnId": 6219362 },
18+
{ "label": "Team:Platform", "projectName": "kibana-platform", "columnId": 5514360 },
19+
{"label": "Team:Canvas", "projectName": "canvas", "columnId": 6187580}
20+
]
21+
ghToken: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
issues:
3+
types: [labeled, unlabeled]
4+
5+
jobs:
6+
assign_to_project:
7+
runs-on: ubuntu-latest
8+
name: Assign issue or PR to project based on label
9+
steps:
10+
- name: Assign to project
11+
uses: elastic/github-actions/project-assigner@v1.0.0
12+
id: project_assigner
13+
with:
14+
issue-mappings: '[{"label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173895}, {"label": "Feature:Lens", "projectName": "Lens", "columnId": 6219363}, {"label": "Team:Canvas", "projectName": "canvas", "columnId": 6187593}]'
15+
ghToken: ${{ secrets.GITHUB_TOKEN }}
16+
17+

0 commit comments

Comments
 (0)