Skip to content

Commit

Permalink
Rename to opensearch flow
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Nov 8, 2024
1 parent 8c20543 commit 8460c2b
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 18 deletions.
4 changes: 2 additions & 2 deletions common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
} from './interfaces';
import { customStringify } from './utils';

export const PLUGIN_ID = 'search-studio';
export const PLUGIN_NAME = 'Search Studio';
export const PLUGIN_ID = 'opensearch-flow';
export const PLUGIN_NAME = 'OpenSearch Flow';

/**
* BACKEND FLOW FRAMEWORK APIs
Expand Down
1 change: 1 addition & 0 deletions public/general_components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@

export { MultiSelectFilter } from './multi_select_filter';
export { ProcessorsTitle } from './processors_title';
export * from './service_card';
6 changes: 6 additions & 0 deletions public/general_components/service_card/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

export { registerPluginCard } from './plugin_card';
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import { i18n } from '@osd/i18n';
import { PLUGIN_ID } from '../../../common';
import { ContentManagementPluginStart } from '../../../../../src/plugins/content_management/public';
import { CoreStart } from '../../../../../src/core/public';
import searchStudioIcon from './icon.svg';
import pluginIcon from './icon.svg';

export const registerSearchStudioCard = (
export const registerPluginCard = (
contentManagement: ContentManagementPluginStart,
core: CoreStart
) => {
const icon = (
<EuiIcon
size="original"
aria-label="Design and test your search solutions with ease"
type={searchStudioIcon}
type={pluginIcon}
/>
);

Expand All @@ -36,28 +36,31 @@ export const registerSearchStudioCard = (
core.application.navigateToApp(PLUGIN_ID);
}}
>
{i18n.translate('flowFrameworkDashboards.searchStudioCard.footer', {
defaultMessage: 'Try OpenSearch Studio',
{i18n.translate('flowFrameworkDashboards.opensearchFlowCard.footer', {
defaultMessage: 'Try OpenSearch Flow',
})}
</EuiSmallButton>
</EuiFlexItem>
</EuiFlexGroup>
);

contentManagement.registerContentProvider({
id: 'search_studio_card',
id: 'opensearch_flow_card',
getContent: () => ({
id: 'search_studio',
id: 'opensearch_flow',
kind: 'card',
order: 20,
title: i18n.translate('flowFrameworkDashboards.searchStudioCard.title', {
defaultMessage: 'Design and test your search solutions with ease',
}),
title: i18n.translate(
'flowFrameworkDashboards.opensearchFlowCard.title',
{
defaultMessage: 'Design and test your search solutions with ease',
}
),
description: i18n.translate(
'flowFrameworkDashboards.searchStudioCard.description',
'flowFrameworkDashboards.opensearchFlowCard.description',
{
defaultMessage:
'OpenSearch Studio is a visual editor for creating search AI flows to power advanced search and generative AI solutions.',
'OpenSearch Flow is a visual editor for creating search AI flows to power advanced search and generative AI solutions.',
}
),
getIcon: () => icon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function ImportWorkflowModal(props: ImportWorkflowModalProps) {
<>
<EuiFlexItem>
<EuiCallOut
title="The uploaded file may not be compatible with Search Studio. You may not be able to edit or run this file with Search Studio."
title="The uploaded file may not be compatible with OpenSearch Flow. You may not be able to edit or run this file with OpenSearch Flow."
iconType={'help'}
color="warning"
/>
Expand Down
6 changes: 3 additions & 3 deletions public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
FlowFrameworkDashboardsPluginSetup,
AppPluginStartDependencies,
} from './types';
import { registerSearchStudioCard } from './general_components/service_card/search_studio_card';
import { registerPluginCard } from './general_components';
import { PLUGIN_ID, PLUGIN_NAME } from '../common';
import {
setCore,
Expand Down Expand Up @@ -84,14 +84,14 @@ export class FlowFrameworkDashboardsPlugin

public start(
core: CoreStart,
{ navigation, contentManagement }: AppPluginStartDependencies,
{ navigation, contentManagement }: AppPluginStartDependencies
): FlowFrameworkDashboardsPluginStart {
setNotifications(core.notifications);
setSavedObjectsClient(core.savedObjects.client);
setNavigationUI(navigation.ui);
setApplication(core.application);
if (contentManagement) {
registerSearchStudioCard(contentManagement, core);
registerPluginCard(contentManagement, core);
}
return {};
}
Expand Down

0 comments on commit 8460c2b

Please sign in to comment.