Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoblaz committed Dec 2, 2024
1 parent b8aee1b commit 15dcb5a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions x-pack/plugins/asset_inventory/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ import type {

import type { AssetInventoryPluginSetup, AssetInventoryPluginStart } from './types';
import { defineRoutes } from './routes';
import { initializeTransforms } from './create_transforms/create_transforms';
// TODO Uncomment this line when initialize() is enabled
// import { initializeTransforms } from './create_transforms/create_transforms';

export class AssetInventoryPlugin
implements Plugin<AssetInventoryPluginSetup, AssetInventoryPluginStart>
{
private readonly logger: Logger;

private isInitialized: boolean = false;
// TODO Uncomment this line when initialize() is enabled
// private isInitialized: boolean = false;

constructor(initializerContext: PluginInitializerContext) {
this.logger = initializerContext.logger.get();
Expand Down Expand Up @@ -51,10 +53,11 @@ export class AssetInventoryPlugin
/**
* Initialization is idempotent and required for (re)creating indices and transforms.
*/
async initialize(core: CoreStart): Promise<void> {
this.logger.debug('initialize');
const esClient = core.elasticsearch.client.asInternalUser;
await initializeTransforms(esClient, this.logger);
this.isInitialized = true;
}
// TODO Uncomment these lines when initialize() is enabled
// async initialize(core: CoreStart): Promise<void> {
// this.logger.debug('initialize');
// const esClient = core.elasticsearch.client.asInternalUser;
// await initializeTransforms(esClient, this.logger);
// this.isInitialized = true;
// }
}

0 comments on commit 15dcb5a

Please sign in to comment.