Skip to content

Commit

Permalink
Remove legacy elasticsearch client usage from the reporting plugin (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dokmic committed Apr 15, 2021
1 parent 2fb8b92 commit 6db15cd
Show file tree
Hide file tree
Showing 19 changed files with 638 additions and 645 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/reporting/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export interface LayoutParams {
export interface ReportDocumentHead {
_id: string;
_index: string;
_seq_no: unknown;
_primary_term: unknown;
_seq_no: number;
_primary_term: number;
}

export interface TaskRunResult {
Expand Down
7 changes: 0 additions & 7 deletions x-pack/plugins/reporting/server/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as Rx from 'rxjs';
import { first, map, take } from 'rxjs/operators';
import {
BasePath,
ElasticsearchServiceSetup,
IClusterClient,
KibanaRequest,
PluginInitializerContext,
Expand Down Expand Up @@ -38,7 +37,6 @@ export interface ReportingInternalSetup {
basePath: Pick<BasePath, 'set'>;
router: ReportingPluginRouter;
features: FeaturesPluginSetup;
elasticsearch: ElasticsearchServiceSetup;
licensing: LicensingPluginSetup;
security?: SecurityPluginSetup;
spaces?: SpacesPluginSetup;
Expand Down Expand Up @@ -212,11 +210,6 @@ export class ReportingCore {
return this.pluginSetupDeps;
}

// NOTE: Uses the Legacy API
public getElasticsearchService() {
return this.getPluginSetupDeps().elasticsearch;
}

private async getSavedObjectsClient(request: KibanaRequest) {
const { savedObjects } = await this.getPluginStartDeps();
return savedObjects.getScopedClient(request) as SavedObjectsClientContract;
Expand Down
Loading

0 comments on commit 6db15cd

Please sign in to comment.