Skip to content

Commit

Permalink
Update default
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Dec 6, 2024
1 parent f8d4e93 commit 34c1a8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export const BEDROCK_DIMENSIONS = {
* Various constants pertaining to Workflow configs
*/

export const UI_METADATA_SCHEMA_VERSION = 1;

// frontend-specific workflow types, derived from the available preset templates
export enum WORKFLOW_TYPE {
SEMANTIC_SEARCH = 'Semantic search',
Expand Down
2 changes: 1 addition & 1 deletion common/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ type ReactFlowViewport = {
};

export type UIState = {
schema_version: 1;
schema_version: number;
config: WorkflowConfig;
type: WORKFLOW_TYPE;
// Will be used in future when changing from form-based to flow-based configs via drag-and-drop
Expand Down
4 changes: 2 additions & 2 deletions public/pages/workflows/new_workflow/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import {
KNN_QUERY,
HYBRID_SEARCH_QUERY_MATCH_KNN,
WorkflowConfig,
UI_METADATA_SCHEMA_VERSION,
} from '../../../../common';
import { generateId } from '../../../utils';
import * as pluginManifest from '../../../../opensearch_dashboards.json';

// Fn to produce the complete preset template with all necessary UI metadata.
export function enrichPresetWorkflowWithUiMetadata(
Expand Down Expand Up @@ -75,7 +75,7 @@ export function enrichPresetWorkflowWithUiMetadata(

export function fetchEmptyMetadata(): UIState {
return {
version: pluginManifest.version,
schema_version: UI_METADATA_SCHEMA_VERSION,
type: WORKFLOW_TYPE.CUSTOM,
config: fetchEmptyUIConfig(),
};
Expand Down

0 comments on commit 34c1a8e

Please sign in to comment.