Rename newPlatform.start to newPlatform.setup in legacy (#33708)

This commit is contained in:
Josh Dover 2019-03-25 10:01:20 -05:00 committed by GitHub
parent c6699c7986
commit 8aa8c55002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 11 deletions

View file

@ -103,7 +103,7 @@ export default function (kibana) {
}
const config = server.config();
const legacyEsConfig = await server.newPlatform.start.core.elasticsearch.legacy.config$.pipe(first()).toPromise();
const legacyEsConfig = await server.newPlatform.setup.core.elasticsearch.legacy.config$.pipe(first()).toPromise();
const proxyConfigCollection = new ProxyConfigCollection(options.proxyConfig);
const proxyPathFilters = options.proxyFilter.map(str => new RegExp(str));

View file

@ -36,9 +36,9 @@ export default function (kibana) {
// value from all observables here to be able to synchronously return and create
// cluster clients afterwards.
const [esConfig, adminCluster, dataCluster] = await combineLatest(
server.newPlatform.start.core.elasticsearch.legacy.config$,
server.newPlatform.start.core.elasticsearch.adminClient$,
server.newPlatform.start.core.elasticsearch.dataClient$
server.newPlatform.setup.core.elasticsearch.legacy.config$,
server.newPlatform.setup.core.elasticsearch.adminClient$,
server.newPlatform.setup.core.elasticsearch.dataClient$
).pipe(
first(),
map(([config, adminClusterClient, dataClusterClient]) => [
@ -80,7 +80,7 @@ export default function (kibana) {
// We fill all the missing properties in the `clientConfig` using the default
// Elasticsearch config so that we don't depend on default values set and
// controlled by underlying Elasticsearch JS client.
const cluster = new Cluster(server.newPlatform.start.core.elasticsearch.createClient(name, {
const cluster = new Cluster(server.newPlatform.setup.core.elasticsearch.createClient(name, {
...esConfig,
...clientConfig,
}));

View file

@ -27,7 +27,7 @@ describe('getEsShardTimeout', () => {
const req = {
server: {
newPlatform: {
start: {
setup: {
core: {
elasticsearch: { legacy: { config$: of({ shardTimeout: moment.duration(12345) }) } }
}

View file

@ -19,7 +19,7 @@
import { first, map } from 'rxjs/operators';
export async function getEsShardTimeout(req) {
return await req.server.newPlatform.start.core.elasticsearch.legacy.config$.pipe(
return await req.server.newPlatform.setup.core.elasticsearch.legacy.config$.pipe(
first(),
map(config => config.shardTimeout.asMilliseconds())
).toPromise();

View file

@ -42,7 +42,7 @@ export default function () {
}
},
newPlatform: {
start: {
setup: {
core: {
elasticsearch: {
legacy: { config$: of({ shardTimeout: moment.duration(30000) }) }

View file

@ -127,7 +127,7 @@ export default new Datasource('es', {
});
}
const esShardTimeout = await tlConfig.server.newPlatform.start.core.elasticsearch.legacy.config$.pipe(
const esShardTimeout = await tlConfig.server.newPlatform.setup.core.elasticsearch.legacy.config$.pipe(
first(),
map(config => config.shardTimeout.asMilliseconds())
).toPromise();

View file

@ -57,7 +57,7 @@ export default class KbnServer {
const { plugins, elasticsearch, serverOptions, handledConfigPaths } = core;
this.newPlatform = {
start: {
setup: {
core: {
elasticsearch,
},

View file

@ -216,7 +216,7 @@ export function uiRenderMixin(kbnServer, server, config) {
// Get the list of new platform plugins.
// Convert the Map into an array of objects so it is JSON serializable and order is preserved.
const uiPlugins = [
...kbnServer.newPlatform.start.plugins.uiPlugins.public.entries()
...kbnServer.newPlatform.setup.plugins.uiPlugins.public.entries()
].map(([id, plugin]) => ({ id, plugin }));
const nonce = await generateCSPNonce();