Skip to content

Commit

Permalink
Merge branch 'adv_settings_componenet_reg_to_plugin' of github.com:ma…
Browse files Browse the repository at this point in the history
…ttkime/kibana into adv_settings_componenet_reg_to_plugin
  • Loading branch information
mattkime committed Jan 31, 2020
2 parents 01689f3 + ff96574 commit f7390f4
Show file tree
Hide file tree
Showing 790 changed files with 3,615 additions and 3,475 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@
**/*.scss @elastic/kibana-design

# Elasticsearch UI
/src/legacy/core_plugins/console/ @elastic/es-ui
/src/plugins/console/ @elastic/es-ui
/src/plugins/es_ui_shared/ @elastic/es-ui
/x-pack/legacy/plugins/console_extensions/ @elastic/es-ui
/x-pack/plugins/console_extensions/ @elastic/es-ui
/x-pack/legacy/plugins/cross_cluster_replication/ @elastic/es-ui
/x-pack/legacy/plugins/index_lifecycle_management/ @elastic/es-ui
/x-pack/legacy/plugins/index_management/ @elastic/es-ui
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"paths": {
"common.ui": "src/legacy/ui",
"console": "src/legacy/core_plugins/console",
"console": "src/plugins/console",
"core": "src/core",
"dashboardEmbeddableContainer": "src/plugins/dashboard_embeddable_container",
"data": [
Expand Down
13 changes: 12 additions & 1 deletion src/core/server/http/router/response_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import { ResponseObject as HapiResponseObject, ResponseToolkit as HapiResponseToolkit } from 'hapi';
import typeDetect from 'type-detect';
import Boom from 'boom';
import * as stream from 'stream';

import {
HttpResponsePayload,
Expand Down Expand Up @@ -112,8 +113,18 @@ export class HapiResponseAdapter {
return response;
}

private toError(kibanaResponse: KibanaResponse<ResponseError>) {
private toError(kibanaResponse: KibanaResponse<ResponseError | Buffer | stream.Readable>) {
const { payload } = kibanaResponse;

// Special case for when we are proxying requests and want to enable streaming back error responses opaquely.
if (Buffer.isBuffer(payload) || payload instanceof stream.Readable) {
const response = this.responseToolkit
.response(kibanaResponse.payload)
.code(kibanaResponse.status);
setHeaders(response, kibanaResponse.options.headers);
return response;
}

// we use for BWC with Boom payload for error responses - {error: string, message: string, statusCode: string}
const error = new Boom('', {
statusCode: kibanaResponse.status,
Expand Down
75 changes: 0 additions & 75 deletions src/legacy/core_plugins/console/__tests__/index.js

This file was deleted.

187 changes: 0 additions & 187 deletions src/legacy/core_plugins/console/index.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/legacy/core_plugins/console/package.json

This file was deleted.

53 changes: 0 additions & 53 deletions src/legacy/core_plugins/console/public/legacy.ts

This file was deleted.

Loading

0 comments on commit f7390f4

Please sign in to comment.