mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Rename newPlatform.start
to newPlatform.setup
in legacy (#33708)
This commit is contained in:
parent
c6699c7986
commit
8aa8c55002
8 changed files with 11 additions and 11 deletions
|
@ -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));
|
||||
|
||||
|
|
|
@ -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,
|
||||
}));
|
||||
|
|
|
@ -27,7 +27,7 @@ describe('getEsShardTimeout', () => {
|
|||
const req = {
|
||||
server: {
|
||||
newPlatform: {
|
||||
start: {
|
||||
setup: {
|
||||
core: {
|
||||
elasticsearch: { legacy: { config$: of({ shardTimeout: moment.duration(12345) }) } }
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -42,7 +42,7 @@ export default function () {
|
|||
}
|
||||
},
|
||||
newPlatform: {
|
||||
start: {
|
||||
setup: {
|
||||
core: {
|
||||
elasticsearch: {
|
||||
legacy: { config$: of({ shardTimeout: moment.duration(30000) }) }
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -57,7 +57,7 @@ export default class KbnServer {
|
|||
const { plugins, elasticsearch, serverOptions, handledConfigPaths } = core;
|
||||
|
||||
this.newPlatform = {
|
||||
start: {
|
||||
setup: {
|
||||
core: {
|
||||
elasticsearch,
|
||||
},
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue