diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index 4da07bf2..2c16c410 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -5,18 +5,13 @@ "server": true, "ui": true, "requiredBundles": [], - "requiredPlugins": [ - "navigation", - "opensearchDashboardsUtils" - ], + "requiredPlugins": ["navigation", "opensearchDashboardsUtils"], "optionalPlugins": [ "dataSource", "dataSourceManagement", "contentManagement" ], "supportedOSDataSourceVersions": ">=2.18.0 <4.0.0", - "requiredOSDataSourcePlugins": [ - "opensearch-ml", - "opensearch-flow-framework" - ] -} \ No newline at end of file + "requiredOSDataSourcePlugins": ["opensearch-ml", "opensearch-flow-framework"], + "configPath": ["flowFrameworkDashboards"] +} diff --git a/server/index.ts b/server/index.ts index 4fb14f86..a6f543bd 100644 --- a/server/index.ts +++ b/server/index.ts @@ -3,8 +3,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { PluginInitializerContext } from '../../../src/core/server'; +import { + PluginConfigDescriptor, + PluginInitializerContext, +} from '../../../src/core/server'; import { FlowFrameworkDashboardsPlugin } from './plugin'; +import { configSchema, ConfigSchema } from '../server/types'; + +export const config: PluginConfigDescriptor = { + schema: configSchema, +}; // This exports static code and TypeScript types, // as well as, OpenSearch Dashboards Platform `plugin()` initializer. diff --git a/server/types.ts b/server/types.ts index a0216b06..60bdbbb1 100644 --- a/server/types.ts +++ b/server/types.ts @@ -3,5 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { schema, TypeOf } from '@osd/config-schema'; + +export const configSchema = schema.object({ + enabled: schema.maybe(schema.boolean()), +}); + +export type ConfigSchema = TypeOf; + export interface FlowFrameworkDashboardsPluginSetup {} export interface FlowFrameworkDashboardsPluginStart {}