Skip to content
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

Add a new vis_augmenter plugin #3107

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/plugins/plugin_integration/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"id": "pluginIntegration",
"version": "opensearchDashboards",
"server": true,
"ui": true,
"requiredPlugins": ["data", "savedObjects", "opensearchDashboardsUtils"]
ohltyler marked this conversation as resolved.
Show resolved Hide resolved
}
12 changes: 12 additions & 0 deletions src/plugins/plugin_integration/public/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import { PluginInitializerContext } from 'src/core/public';
import { PluginIntegrationPlugin, PluginIntegrationSetup, PluginIntegrationStart } from './plugin';

export function plugin(initializerContext: PluginInitializerContext) {
return new PluginIntegrationPlugin(initializerContext);
}
export { PluginIntegrationSetup, PluginIntegrationStart };
45 changes: 45 additions & 0 deletions src/plugins/plugin_integration/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../core/public';
import { DataPublicPluginSetup, DataPublicPluginStart } from '../../data/public';

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface PluginIntegrationSetup {}

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface PluginIntegrationStart {}

export interface PluginIntegrationSetupDeps {
data: DataPublicPluginSetup;
}

export interface PluginIntegrationStartDeps {
data: DataPublicPluginStart;
}

export class PluginIntegrationPlugin
implements
Plugin<
PluginIntegrationSetup,
PluginIntegrationStart,
PluginIntegrationSetupDeps,
PluginIntegrationStartDeps
> {
constructor(initializerContext: PluginInitializerContext) {}

public setup(
core: CoreSetup<PluginIntegrationStartDeps, PluginIntegrationStart>,
{ data }: PluginIntegrationSetupDeps
): PluginIntegrationSetup {
return {};
}

public start(core: CoreStart, { data }: PluginIntegrationStartDeps): PluginIntegrationStart {
return {};
}

public stop() {}
}
12 changes: 12 additions & 0 deletions src/plugins/plugin_integration/server/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import { PluginInitializerContext } from '../../../core/server';
import { PluginIntegrationPlugin } from './plugin';

export function plugin(initializerContext: PluginInitializerContext) {
return new PluginIntegrationPlugin(initializerContext);
}
export { PluginIntegrationPluginSetup, PluginIntegrationPluginStart } from './plugin';
38 changes: 38 additions & 0 deletions src/plugins/plugin_integration/server/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import {
PluginInitializerContext,
CoreSetup,
CoreStart,
Plugin,
Logger,
} from '../../../core/server';

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface PluginIntegrationPluginSetup {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface PluginIntegrationPluginStart {}

export class PluginIntegrationPlugin
implements Plugin<PluginIntegrationPluginSetup, PluginIntegrationPluginStart> {
private readonly logger: Logger;

constructor(initializerContext: PluginInitializerContext) {
this.logger = initializerContext.logger.get();
}

public setup(core: CoreSetup) {
this.logger.debug('pluginIntegration: Setup');
return {};
}

public start(core: CoreStart) {
this.logger.debug('pluginIntegration: Started');
return {};
}

public stop() {}
}