forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new
vis_augmenter
plugin (opensearch-project#3107)
This PR only sets up the boilerplate code for the new plugin. The additions of the new saved object type and expression function types will be added in later PRs. Breaking it up for readability purposes. Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
- Loading branch information
Showing
6 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Contains interfaces and type definitions used for allowing external plugins to augment Visualizations. Registers the relevant saved object types and expression functions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"id": "visAugmenter", | ||
"version": "opensearchDashboards", | ||
"server": true, | ||
"ui": true, | ||
"requiredPlugins": ["data", "savedObjects", "opensearchDashboardsUtils"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { VisAugmenterPlugin, VisAugmenterSetup, VisAugmenterStart } from './plugin'; | ||
|
||
export function plugin(initializerContext: PluginInitializerContext) { | ||
return new VisAugmenterPlugin(initializerContext); | ||
} | ||
export { VisAugmenterSetup, VisAugmenterStart }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* 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 VisAugmenterSetup {} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface VisAugmenterStart {} | ||
|
||
export interface VisAugmenterSetupDeps { | ||
data: DataPublicPluginSetup; | ||
} | ||
|
||
export interface VisAugmenterStartDeps { | ||
data: DataPublicPluginStart; | ||
} | ||
|
||
export class VisAugmenterPlugin | ||
implements | ||
Plugin<VisAugmenterSetup, VisAugmenterStart, VisAugmenterSetupDeps, VisAugmenterStartDeps> { | ||
constructor(initializerContext: PluginInitializerContext) {} | ||
|
||
public setup( | ||
core: CoreSetup<VisAugmenterStartDeps, VisAugmenterStart>, | ||
{ data }: VisAugmenterSetupDeps | ||
): VisAugmenterSetup { | ||
return {}; | ||
} | ||
|
||
public start(core: CoreStart, { data }: VisAugmenterStartDeps): VisAugmenterStart { | ||
return {}; | ||
} | ||
|
||
public stop() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { VisAugmenterPlugin } from './plugin'; | ||
|
||
export function plugin(initializerContext: PluginInitializerContext) { | ||
return new VisAugmenterPlugin(initializerContext); | ||
} | ||
export { VisAugmenterPluginSetup, VisAugmenterPluginStart } from './plugin'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 VisAugmenterPluginSetup {} | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface VisAugmenterPluginStart {} | ||
|
||
export class VisAugmenterPlugin | ||
implements Plugin<VisAugmenterPluginSetup, VisAugmenterPluginStart> { | ||
private readonly logger: Logger; | ||
|
||
constructor(initializerContext: PluginInitializerContext) { | ||
this.logger = initializerContext.logger.get(); | ||
} | ||
|
||
public setup(core: CoreSetup) { | ||
this.logger.debug('VisAugmenter: Setup'); | ||
return {}; | ||
} | ||
|
||
public start(core: CoreStart) { | ||
this.logger.debug('VisAugmenter: Started'); | ||
return {}; | ||
} | ||
|
||
public stop() {} | ||
} |