-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Legacy ES plugin pre-removal cleanup #75779
Changes from all commits
ecd14b9
da65cc4
66ef034
af8f5c6
046594f
6e7c5f0
e8294f2
40aa20e
67e57fb
6948185
141cd83
3ab16bf
606183c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,14 +19,12 @@ | |
import { first } from 'rxjs/operators'; | ||
import { Cluster } from './server/lib/cluster'; | ||
import { createProxy } from './server/lib/create_proxy'; | ||
import { handleESError } from './server/lib/handle_es_error'; | ||
import { versionHealthCheck } from './lib/version_health_check'; | ||
|
||
export default function (kibana) { | ||
let defaultVars; | ||
|
||
return new kibana.Plugin({ | ||
require: ['kibana'], | ||
require: [], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't it affect an execution order? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, the |
||
|
||
uiExports: { injectDefaultVars: () => defaultVars }, | ||
|
||
|
@@ -61,25 +59,6 @@ export default function (kibana) { | |
return clusters.get(name); | ||
}); | ||
|
||
server.expose('createCluster', (name, clientConfig = {}) => { | ||
// NOTE: Not having `admin` and `data` clients provided by the core in `clusters` | ||
// map implicitly allows to create custom `data` and `admin` clients. This is | ||
// allowed intentionally to support custom `admin` cluster client created by the | ||
// x-pack/monitoring bulk uploader. We should forbid that as soon as monitoring | ||
// bulk uploader is refactored, see https://github.com/elastic/kibana/issues/31934. | ||
if (clusters.has(name)) { | ||
throw new Error(`cluster '${name}' already exists`); | ||
} | ||
|
||
const cluster = new Cluster( | ||
server.newPlatform.setup.core.elasticsearch.legacy.createClient(name, clientConfig) | ||
); | ||
|
||
clusters.set(name, cluster); | ||
|
||
return cluster; | ||
}); | ||
|
||
server.events.on('stop', () => { | ||
for (const cluster of clusters.values()) { | ||
cluster.close(); | ||
|
@@ -88,17 +67,7 @@ export default function (kibana) { | |
clusters.clear(); | ||
}); | ||
|
||
server.expose('handleESError', handleESError); | ||
|
||
createProxy(server); | ||
|
||
const waitUntilHealthy = versionHealthCheck( | ||
this, | ||
server.logWithMetadata, | ||
server.newPlatform.__internals.elasticsearch.esNodesCompatibility$ | ||
); | ||
|
||
server.expose('waitUntilReady', () => waitUntilHealthy); | ||
}, | ||
}); | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove this comment as well
kibana/src/core/server/ui_settings/integration_tests/index.test.ts
Line 35 in bf04235