Skip to content

Commit

Permalink
Adding feature flag to OpenSearch Flow (#517)
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi authored Dec 9, 2024
1 parent d102519 commit ff28662
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
13 changes: 4 additions & 9 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
"requiredOSDataSourcePlugins": ["opensearch-ml", "opensearch-flow-framework"],
"configPath": ["flowFrameworkDashboards"]
}
10 changes: 9 additions & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ConfigSchema> = {
schema: configSchema,
};

// This exports static code and TypeScript types,
// as well as, OpenSearch Dashboards Platform `plugin()` initializer.
Expand Down
8 changes: 8 additions & 0 deletions server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof configSchema>;

export interface FlowFrameworkDashboardsPluginSetup {}
export interface FlowFrameworkDashboardsPluginStart {}

0 comments on commit ff28662

Please sign in to comment.