Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup #71849

Merged
merged 4 commits into from
Jul 15, 2020
Merged

Cleanup #71849

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/data/common/field_formats/converters/url.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand All @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/data/common/field_formats/converters/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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}`;
Expand Down