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 4 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", "visualizations", "savedObjects", "opensearchDashboardsUtils"]
ohltyler marked this conversation as resolved.
Show resolved Hide resolved
}
37 changes: 37 additions & 0 deletions src/plugins/plugin_integration/public/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

/*
* Licensed to Elasticsearch B.V. under one or more contributor
ohltyler marked this conversation as resolved.
Show resolved Hide resolved
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

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

export function plugin(initializerContext: PluginInitializerContext) {
return new PluginIntegrationPlugin(initializerContext);
}
export { PluginIntegrationSetup, PluginIntegrationStart };
70 changes: 70 additions & 0 deletions src/plugins/plugin_integration/public/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

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() {}
}
37 changes: 37 additions & 0 deletions src/plugins/plugin_integration/server/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

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

export function plugin(initializerContext: PluginInitializerContext) {
return new PluginIntegrationPlugin(initializerContext);
}
export { PluginIntegrationPluginSetup, PluginIntegrationPluginStart } from './plugin';
63 changes: 63 additions & 0 deletions src/plugins/plugin_integration/server/plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

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() {}
}