mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Cleanup (#71849)
* chore: 🤖 update codeowners file * refactor: 💡 rename whitelist -> allow-list in data plugin * Update .github/CODEOWNERS Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
05b0789312
commit
a3767d24b2
3 changed files with 28 additions and 26 deletions
42
.github/CODEOWNERS
vendored
42
.github/CODEOWNERS
vendored
|
@ -24,29 +24,20 @@
|
|||
/src/plugins/vis_type_xy/ @elastic/kibana-app
|
||||
/src/plugins/visualize/ @elastic/kibana-app
|
||||
|
||||
# Core UI
|
||||
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
|
||||
/src/plugins/home/public @elastic/kibana-core-ui
|
||||
/src/plugins/home/server/*.ts @elastic/kibana-core-ui
|
||||
/src/plugins/home/server/services/ @elastic/kibana-core-ui
|
||||
# Exclude tutorial resources folder for now because they are not owned by Kibana app and most will move out soon
|
||||
/src/legacy/core_plugins/kibana/public/home/*.ts @elastic/kibana-core-ui
|
||||
/src/legacy/core_plugins/kibana/public/home/*.scss @elastic/kibana-core-ui
|
||||
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-core-ui
|
||||
|
||||
# App Architecture
|
||||
/examples/bfetch_explorer/ @elastic/kibana-app-arch
|
||||
/examples/dashboard_embeddable_examples/ @elastic/kibana-app-arch
|
||||
/examples/demo_search/ @elastic/kibana-app-arch
|
||||
/examples/developer_examples/ @elastic/kibana-app-arch
|
||||
/examples/embeddable_examples/ @elastic/kibana-app-arch
|
||||
/examples/embeddable_explorer/ @elastic/kibana-app-arch
|
||||
/examples/state_container_examples/ @elastic/kibana-app-arch
|
||||
/examples/ui_actions_examples/ @elastic/kibana-app-arch
|
||||
/examples/ui_actions_explorer/ @elastic/kibana-app-arch
|
||||
/examples/url_generators_examples/ @elastic/kibana-app-arch
|
||||
/examples/url_generators_explorer/ @elastic/kibana-app-arch
|
||||
/packages/kbn-interpreter/ @elastic/kibana-app-arch
|
||||
/packages/elastic-datemath/ @elastic/kibana-app-arch
|
||||
/src/legacy/core_plugins/embeddable_api/ @elastic/kibana-app-arch
|
||||
/src/legacy/core_plugins/interpreter/ @elastic/kibana-app-arch
|
||||
/src/legacy/core_plugins/kibana_react/ @elastic/kibana-app-arch
|
||||
/src/legacy/core_plugins/kibana/public/management/ @elastic/kibana-app-arch
|
||||
/src/legacy/core_plugins/kibana/server/routes/api/management/ @elastic/kibana-app-arch
|
||||
/src/legacy/core_plugins/visualizations/ @elastic/kibana-app-arch
|
||||
/src/legacy/server/index_patterns/ @elastic/kibana-app-arch
|
||||
/packages/kbn-interpreter/ @elastic/kibana-app-arch
|
||||
/src/plugins/advanced_settings/ @elastic/kibana-app-arch
|
||||
/src/plugins/bfetch/ @elastic/kibana-app-arch
|
||||
/src/plugins/data/ @elastic/kibana-app-arch
|
||||
|
@ -61,9 +52,10 @@
|
|||
/src/plugins/share/ @elastic/kibana-app-arch
|
||||
/src/plugins/ui_actions/ @elastic/kibana-app-arch
|
||||
/src/plugins/visualizations/ @elastic/kibana-app-arch
|
||||
/x-pack/plugins/advanced_ui_actions/ @elastic/kibana-app-arch
|
||||
/x-pack/examples/ui_actions_enhanced_examples/ @elastic/kibana-app-arch
|
||||
/x-pack/plugins/data_enhanced/ @elastic/kibana-app-arch
|
||||
/x-pack/plugins/drilldowns/ @elastic/kibana-app-arch
|
||||
/x-pack/plugins/embeddable_enhanced/ @elastic/kibana-app-arch
|
||||
/x-pack/plugins/ui_actions_enhanced/ @elastic/kibana-app-arch
|
||||
|
||||
# APM
|
||||
/x-pack/plugins/apm/ @elastic/apm-ui
|
||||
|
@ -79,6 +71,16 @@
|
|||
/x-pack/plugins/canvas/ @elastic/kibana-canvas
|
||||
/x-pack/test/functional/apps/canvas/ @elastic/kibana-canvas
|
||||
|
||||
# Core UI
|
||||
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
|
||||
/src/plugins/home/public @elastic/kibana-core-ui
|
||||
/src/plugins/home/server/*.ts @elastic/kibana-core-ui
|
||||
/src/plugins/home/server/services/ @elastic/kibana-core-ui
|
||||
# Exclude tutorial resources folder for now because they are not owned by Kibana app and most will move out soon
|
||||
/src/legacy/core_plugins/kibana/public/home/*.ts @elastic/kibana-core-ui
|
||||
/src/legacy/core_plugins/kibana/public/home/*.scss @elastic/kibana-core-ui
|
||||
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-core-ui
|
||||
|
||||
# Observability UIs
|
||||
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
|
||||
/x-pack/plugins/infra/ @elastic/logs-metrics-ui
|
||||
|
|
|
@ -167,8 +167,8 @@ describe('UrlFormat', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('whitelist', () => {
|
||||
test('should assume a relative url if the value is not in the whitelist without a base path', () => {
|
||||
describe('allow-list', () => {
|
||||
test('should assume a relative url if the value is not in the allow-list without a base path', () => {
|
||||
const parsedUrl = {
|
||||
origin: 'http://kibana',
|
||||
basePath: '',
|
||||
|
@ -193,7 +193,7 @@ describe('UrlFormat', () => {
|
|||
);
|
||||
});
|
||||
|
||||
test('should assume a relative url if the value is not in the whitelist with a basepath', () => {
|
||||
test('should assume a relative url if the value is not in the allow-list with a basepath', () => {
|
||||
const parsedUrl = {
|
||||
origin: 'http://kibana',
|
||||
basePath: '/xyz',
|
||||
|
|
|
@ -161,8 +161,8 @@ export class UrlFormat extends FieldFormat {
|
|||
|
||||
return this.generateImgHtml(url, imageLabel);
|
||||
default:
|
||||
const inWhitelist = allowedUrlSchemes.some((scheme) => url.indexOf(scheme) === 0);
|
||||
if (!inWhitelist && !parsedUrl) {
|
||||
const allowed = allowedUrlSchemes.some((scheme) => url.indexOf(scheme) === 0);
|
||||
if (!allowed && !parsedUrl) {
|
||||
return url;
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ export class UrlFormat extends FieldFormat {
|
|||
* UNSUPPORTED
|
||||
* - app/kibana
|
||||
*/
|
||||
if (!inWhitelist) {
|
||||
if (!allowed) {
|
||||
// Handles urls like: `#/discover`
|
||||
if (url[0] === '#') {
|
||||
prefix = `${origin}${pathname}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue