Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into fix/console/a…
Browse files Browse the repository at this point in the history
…lways-use-first-text-object

* 'master' of github.com:elastic/kibana:
  [Console] Move out of legacy + migrate server side to New Platform (elastic#55690)
  • Loading branch information
jloleysens committed Jan 30, 2020
2 parents 61ca60f + 952b61e commit 26138e1
Show file tree
Hide file tree
Showing 613 changed files with 1,345 additions and 1,081 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
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 26138e1

Please sign in to comment.