From c9eb2b64fba295a5a8a66df5fda362f9cd9b8a20 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Mon, 19 Dec 2022 11:18:37 -0800 Subject: [PATCH 1/7] Add new plugin_integration plugin Signed-off-by: Tyler Ohlsen --- .../opensearch_dashboards.json | 7 ++ .../plugin_integration/public/index.ts | 38 ++++++++++ .../plugin_integration/public/plugin.ts | 70 +++++++++++++++++++ .../plugin_integration/server/index.ts | 41 +++++++++++ .../plugin_integration/server/plugin.ts | 63 +++++++++++++++++ yarn.lock | 5 -- 6 files changed, 219 insertions(+), 5 deletions(-) create mode 100644 src/plugins/plugin_integration/opensearch_dashboards.json create mode 100644 src/plugins/plugin_integration/public/index.ts create mode 100644 src/plugins/plugin_integration/public/plugin.ts create mode 100644 src/plugins/plugin_integration/server/index.ts create mode 100644 src/plugins/plugin_integration/server/plugin.ts diff --git a/src/plugins/plugin_integration/opensearch_dashboards.json b/src/plugins/plugin_integration/opensearch_dashboards.json new file mode 100644 index 000000000000..dda963e2996d --- /dev/null +++ b/src/plugins/plugin_integration/opensearch_dashboards.json @@ -0,0 +1,7 @@ +{ + "id": "pluginIntegration", + "version": "opensearchDashboards", + "server": true, + "ui": true, + "requiredPlugins": ["data", "visualizations", "savedObjects", "opensearchDashboardsUtils"] +} diff --git a/src/plugins/plugin_integration/public/index.ts b/src/plugins/plugin_integration/public/index.ts new file mode 100644 index 000000000000..6985d8372093 --- /dev/null +++ b/src/plugins/plugin_integration/public/index.ts @@ -0,0 +1,38 @@ +/* + * 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 'src/core/public'; +import { PluginIntegrationPlugin, PluginIntegrationSetup, PluginIntegrationStart } from './plugin'; +export function plugin(initializerContext: PluginInitializerContext) { + return new PluginIntegrationPlugin(initializerContext); +} + +/** @public types */ +export { PluginIntegrationSetup, PluginIntegrationStart }; diff --git a/src/plugins/plugin_integration/public/plugin.ts b/src/plugins/plugin_integration/public/plugin.ts new file mode 100644 index 000000000000..38c7d93003ec --- /dev/null +++ b/src/plugins/plugin_integration/public/plugin.ts @@ -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, + { data }: PluginIntegrationSetupDeps + ): PluginIntegrationSetup { + return {}; + } + + public start(core: CoreStart, { data }: PluginIntegrationStartDeps): PluginIntegrationStart { + return {}; + } + + public stop() {} +} diff --git a/src/plugins/plugin_integration/server/index.ts b/src/plugins/plugin_integration/server/index.ts new file mode 100644 index 000000000000..4bc5823bbff4 --- /dev/null +++ b/src/plugins/plugin_integration/server/index.ts @@ -0,0 +1,41 @@ +/* + * 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'; + +// This exports static code and TypeScript types, +// as well as, OpenSearch Dashboards Platform `plugin()` initializer. + +export function plugin(initializerContext: PluginInitializerContext) { + return new PluginIntegrationPlugin(initializerContext); +} + +export { PluginIntegrationPluginSetup, PluginIntegrationPluginStart } from './plugin'; diff --git a/src/plugins/plugin_integration/server/plugin.ts b/src/plugins/plugin_integration/server/plugin.ts new file mode 100644 index 000000000000..5c2e7784eb89 --- /dev/null +++ b/src/plugins/plugin_integration/server/plugin.ts @@ -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 { + 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() {} +} diff --git a/yarn.lock b/yarn.lock index 822684d097bd..b40434b8fc20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16566,11 +16566,6 @@ strip-json-comments@3.1.1, strip-json-comments@^3.0.1, strip-json-comments@^3.1. resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - strong-log-transformer@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" From 865a312bff578d377c4d3af9df928ed30040064b Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Mon, 19 Dec 2022 11:48:15 -0800 Subject: [PATCH 2/7] Revert yarn.lock change Signed-off-by: Tyler Ohlsen --- yarn.lock | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yarn.lock b/yarn.lock index b40434b8fc20..822684d097bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16566,6 +16566,11 @@ strip-json-comments@3.1.1, strip-json-comments@^3.0.1, strip-json-comments@^3.1. resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strong-log-transformer@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" From 2a22cb0839c95e1961295adb6015d7fb8aec1e89 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Mon, 19 Dec 2022 11:57:25 -0800 Subject: [PATCH 3/7] Remove unneeded comments Signed-off-by: Tyler Ohlsen --- src/plugins/plugin_integration/public/index.ts | 1 - src/plugins/plugin_integration/server/index.ts | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/plugins/plugin_integration/public/index.ts b/src/plugins/plugin_integration/public/index.ts index 6985d8372093..240a8d2614c0 100644 --- a/src/plugins/plugin_integration/public/index.ts +++ b/src/plugins/plugin_integration/public/index.ts @@ -34,5 +34,4 @@ export function plugin(initializerContext: PluginInitializerContext) { return new PluginIntegrationPlugin(initializerContext); } -/** @public types */ export { PluginIntegrationSetup, PluginIntegrationStart }; diff --git a/src/plugins/plugin_integration/server/index.ts b/src/plugins/plugin_integration/server/index.ts index 4bc5823bbff4..2624e9d518cf 100644 --- a/src/plugins/plugin_integration/server/index.ts +++ b/src/plugins/plugin_integration/server/index.ts @@ -31,9 +31,6 @@ import { PluginInitializerContext } from '../../../core/server'; import { PluginIntegrationPlugin } from './plugin'; -// This exports static code and TypeScript types, -// as well as, OpenSearch Dashboards Platform `plugin()` initializer. - export function plugin(initializerContext: PluginInitializerContext) { return new PluginIntegrationPlugin(initializerContext); } From bbbf10f1c44680a905184a5ff47541f3494b3011 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Mon, 19 Dec 2022 11:59:27 -0800 Subject: [PATCH 4/7] Fix spacing Signed-off-by: Tyler Ohlsen --- src/plugins/plugin_integration/public/index.ts | 2 +- src/plugins/plugin_integration/server/index.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/plugin_integration/public/index.ts b/src/plugins/plugin_integration/public/index.ts index 240a8d2614c0..9011382f5759 100644 --- a/src/plugins/plugin_integration/public/index.ts +++ b/src/plugins/plugin_integration/public/index.ts @@ -30,8 +30,8 @@ import { PluginInitializerContext } from 'src/core/public'; import { PluginIntegrationPlugin, PluginIntegrationSetup, PluginIntegrationStart } from './plugin'; + export function plugin(initializerContext: PluginInitializerContext) { return new PluginIntegrationPlugin(initializerContext); } - export { PluginIntegrationSetup, PluginIntegrationStart }; diff --git a/src/plugins/plugin_integration/server/index.ts b/src/plugins/plugin_integration/server/index.ts index 2624e9d518cf..7b9659f90f42 100644 --- a/src/plugins/plugin_integration/server/index.ts +++ b/src/plugins/plugin_integration/server/index.ts @@ -34,5 +34,4 @@ import { PluginIntegrationPlugin } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { return new PluginIntegrationPlugin(initializerContext); } - export { PluginIntegrationPluginSetup, PluginIntegrationPluginStart } from './plugin'; From cc5d77c2844da68ec526183fed707bfa9e5dd513 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Tue, 20 Dec 2022 09:22:58 -0800 Subject: [PATCH 5/7] Remove dep; fix license headers Signed-off-by: Tyler Ohlsen --- .../opensearch_dashboards.json | 2 +- .../plugin_integration/public/index.ts | 27 +------------------ .../plugin_integration/public/plugin.ts | 27 +------------------ .../plugin_integration/server/index.ts | 27 +------------------ .../plugin_integration/server/plugin.ts | 27 +------------------ 5 files changed, 5 insertions(+), 105 deletions(-) diff --git a/src/plugins/plugin_integration/opensearch_dashboards.json b/src/plugins/plugin_integration/opensearch_dashboards.json index dda963e2996d..c87b0a10ce35 100644 --- a/src/plugins/plugin_integration/opensearch_dashboards.json +++ b/src/plugins/plugin_integration/opensearch_dashboards.json @@ -3,5 +3,5 @@ "version": "opensearchDashboards", "server": true, "ui": true, - "requiredPlugins": ["data", "visualizations", "savedObjects", "opensearchDashboardsUtils"] + "requiredPlugins": ["data", "savedObjects", "opensearchDashboardsUtils"] } diff --git a/src/plugins/plugin_integration/public/index.ts b/src/plugins/plugin_integration/public/index.ts index 9011382f5759..e3f63d5aa0ee 100644 --- a/src/plugins/plugin_integration/public/index.ts +++ b/src/plugins/plugin_integration/public/index.ts @@ -1,31 +1,6 @@ /* + * Copyright OpenSearch Contributors * 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 'src/core/public'; diff --git a/src/plugins/plugin_integration/public/plugin.ts b/src/plugins/plugin_integration/public/plugin.ts index 38c7d93003ec..78c079b6b9b5 100644 --- a/src/plugins/plugin_integration/public/plugin.ts +++ b/src/plugins/plugin_integration/public/plugin.ts @@ -1,31 +1,6 @@ /* + * Copyright OpenSearch Contributors * 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'; diff --git a/src/plugins/plugin_integration/server/index.ts b/src/plugins/plugin_integration/server/index.ts index 7b9659f90f42..25adbc15fd57 100644 --- a/src/plugins/plugin_integration/server/index.ts +++ b/src/plugins/plugin_integration/server/index.ts @@ -1,31 +1,6 @@ /* + * Copyright OpenSearch Contributors * 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'; diff --git a/src/plugins/plugin_integration/server/plugin.ts b/src/plugins/plugin_integration/server/plugin.ts index 5c2e7784eb89..c5fedf3fcd97 100644 --- a/src/plugins/plugin_integration/server/plugin.ts +++ b/src/plugins/plugin_integration/server/plugin.ts @@ -1,31 +1,6 @@ /* + * Copyright OpenSearch Contributors * 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 { From 2dbd27ebe29f6c85356bb6f53aeda08c00642c47 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Wed, 21 Dec 2022 17:28:07 -0800 Subject: [PATCH 6/7] Rename plugin to vis_augmenter Signed-off-by: Tyler Ohlsen --- src/plugins/vis_augmenter/README.md | 1 + .../opensearch_dashboards.json | 2 +- .../public/index.ts | 6 ++--- .../public/plugin.ts | 25 ++++++++----------- .../server/index.ts | 6 ++--- .../server/plugin.ts | 12 ++++----- 6 files changed, 24 insertions(+), 28 deletions(-) create mode 100644 src/plugins/vis_augmenter/README.md rename src/plugins/{plugin_integration => vis_augmenter}/opensearch_dashboards.json (83%) rename src/plugins/{plugin_integration => vis_augmenter}/public/index.ts (50%) rename src/plugins/{plugin_integration => vis_augmenter}/public/plugin.ts (50%) rename src/plugins/{plugin_integration => vis_augmenter}/server/index.ts (53%) rename src/plugins/{plugin_integration => vis_augmenter}/server/plugin.ts (65%) diff --git a/src/plugins/vis_augmenter/README.md b/src/plugins/vis_augmenter/README.md new file mode 100644 index 000000000000..947674d2f5b9 --- /dev/null +++ b/src/plugins/vis_augmenter/README.md @@ -0,0 +1 @@ +Contains interfaces and type definitions used for allowing external plugins to augment Visualizations. Registers the new saved object type and expression functions. diff --git a/src/plugins/plugin_integration/opensearch_dashboards.json b/src/plugins/vis_augmenter/opensearch_dashboards.json similarity index 83% rename from src/plugins/plugin_integration/opensearch_dashboards.json rename to src/plugins/vis_augmenter/opensearch_dashboards.json index c87b0a10ce35..e9cd25618d01 100644 --- a/src/plugins/plugin_integration/opensearch_dashboards.json +++ b/src/plugins/vis_augmenter/opensearch_dashboards.json @@ -1,5 +1,5 @@ { - "id": "pluginIntegration", + "id": "visAugmenter", "version": "opensearchDashboards", "server": true, "ui": true, diff --git a/src/plugins/plugin_integration/public/index.ts b/src/plugins/vis_augmenter/public/index.ts similarity index 50% rename from src/plugins/plugin_integration/public/index.ts rename to src/plugins/vis_augmenter/public/index.ts index e3f63d5aa0ee..e931e2ac2e03 100644 --- a/src/plugins/plugin_integration/public/index.ts +++ b/src/plugins/vis_augmenter/public/index.ts @@ -4,9 +4,9 @@ */ import { PluginInitializerContext } from 'src/core/public'; -import { PluginIntegrationPlugin, PluginIntegrationSetup, PluginIntegrationStart } from './plugin'; +import { VisAugmenterPlugin, VisAugmenterSetup, VisAugmenterStart } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { - return new PluginIntegrationPlugin(initializerContext); + return new VisAugmenterPlugin(initializerContext); } -export { PluginIntegrationSetup, PluginIntegrationStart }; +export { VisAugmenterSetup, VisAugmenterStart }; diff --git a/src/plugins/plugin_integration/public/plugin.ts b/src/plugins/vis_augmenter/public/plugin.ts similarity index 50% rename from src/plugins/plugin_integration/public/plugin.ts rename to src/plugins/vis_augmenter/public/plugin.ts index 78c079b6b9b5..cbc7a24800de 100644 --- a/src/plugins/plugin_integration/public/plugin.ts +++ b/src/plugins/vis_augmenter/public/plugin.ts @@ -7,37 +7,32 @@ import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../.. import { DataPublicPluginSetup, DataPublicPluginStart } from '../../data/public'; // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface PluginIntegrationSetup {} +export interface VisAugmenterSetup {} // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface PluginIntegrationStart {} +export interface VisAugmenterStart {} -export interface PluginIntegrationSetupDeps { +export interface VisAugmenterSetupDeps { data: DataPublicPluginSetup; } -export interface PluginIntegrationStartDeps { +export interface VisAugmenterStartDeps { data: DataPublicPluginStart; } -export class PluginIntegrationPlugin +export class VisAugmenterPlugin implements - Plugin< - PluginIntegrationSetup, - PluginIntegrationStart, - PluginIntegrationSetupDeps, - PluginIntegrationStartDeps - > { + Plugin { constructor(initializerContext: PluginInitializerContext) {} public setup( - core: CoreSetup, - { data }: PluginIntegrationSetupDeps - ): PluginIntegrationSetup { + core: CoreSetup, + { data }: VisAugmenterSetupDeps + ): VisAugmenterSetup { return {}; } - public start(core: CoreStart, { data }: PluginIntegrationStartDeps): PluginIntegrationStart { + public start(core: CoreStart, { data }: VisAugmenterStartDeps): VisAugmenterStart { return {}; } diff --git a/src/plugins/plugin_integration/server/index.ts b/src/plugins/vis_augmenter/server/index.ts similarity index 53% rename from src/plugins/plugin_integration/server/index.ts rename to src/plugins/vis_augmenter/server/index.ts index 25adbc15fd57..cc6530649a8e 100644 --- a/src/plugins/plugin_integration/server/index.ts +++ b/src/plugins/vis_augmenter/server/index.ts @@ -4,9 +4,9 @@ */ import { PluginInitializerContext } from '../../../core/server'; -import { PluginIntegrationPlugin } from './plugin'; +import { VisAugmenterPlugin } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { - return new PluginIntegrationPlugin(initializerContext); + return new VisAugmenterPlugin(initializerContext); } -export { PluginIntegrationPluginSetup, PluginIntegrationPluginStart } from './plugin'; +export { VisAugmenterPluginSetup, VisAugmenterPluginStart } from './plugin'; diff --git a/src/plugins/plugin_integration/server/plugin.ts b/src/plugins/vis_augmenter/server/plugin.ts similarity index 65% rename from src/plugins/plugin_integration/server/plugin.ts rename to src/plugins/vis_augmenter/server/plugin.ts index c5fedf3fcd97..d921126a1f66 100644 --- a/src/plugins/plugin_integration/server/plugin.ts +++ b/src/plugins/vis_augmenter/server/plugin.ts @@ -12,12 +12,12 @@ import { } from '../../../core/server'; // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface PluginIntegrationPluginSetup {} +export interface VisAugmenterPluginSetup {} // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface PluginIntegrationPluginStart {} +export interface VisAugmenterPluginStart {} -export class PluginIntegrationPlugin - implements Plugin { +export class VisAugmenterPlugin + implements Plugin { private readonly logger: Logger; constructor(initializerContext: PluginInitializerContext) { @@ -25,12 +25,12 @@ export class PluginIntegrationPlugin } public setup(core: CoreSetup) { - this.logger.debug('pluginIntegration: Setup'); + this.logger.debug('VisAugmenter: Setup'); return {}; } public start(core: CoreStart) { - this.logger.debug('pluginIntegration: Started'); + this.logger.debug('VisAugmenter: Started'); return {}; } From 241c133dd14f557d0ac47d905f4f4933328c2191 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Wed, 21 Dec 2022 17:30:32 -0800 Subject: [PATCH 7/7] Tune README Signed-off-by: Tyler Ohlsen --- src/plugins/vis_augmenter/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/vis_augmenter/README.md b/src/plugins/vis_augmenter/README.md index 947674d2f5b9..fb9d4fbdcaae 100644 --- a/src/plugins/vis_augmenter/README.md +++ b/src/plugins/vis_augmenter/README.md @@ -1 +1 @@ -Contains interfaces and type definitions used for allowing external plugins to augment Visualizations. Registers the new saved object type and expression functions. +Contains interfaces and type definitions used for allowing external plugins to augment Visualizations. Registers the relevant saved object types and expression functions.