Skip to content

Commit e8a7dd9

Browse files
committed
Change save object type, wizard id and name to visBuilder (opensearch-project#2673)
* Change save object type, wizard ID and Name to visBuilder Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Rename wizard in functional tests Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Finalize plugin-id and plugin-name and saved-object-type Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Change official name to VisBuilder Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Delete migration Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Fix functional test Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> * Update snapshot Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com> Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
1 parent 81f5950 commit e8a7dd9

29 files changed

+73
-232
lines changed

config/opensearch_dashboards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222

223223
# Set the value of this setting to true to start exploring wizard
224224
# functionality in Visualization.
225-
# wizard.enabled: false
225+
# vis_builder.enabled: false
226226

227227
# Set the value of this setting to true to enable the experimental multiple data source
228228
# support feature. Use with caution.

src/plugins/saved_objects/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Saved object
22

3-
The saved object plugin provides all the core services and functionalities of saved objects. It is utilized by many core plugins such as [`visualization`](../visualizations/), [`dashboard`](../dashboard/) and [`wizard`](../wizard/), as well as external plugins. Saved object is the primary way to store app and plugin data in a standardized form in OpenSearch Dashboards. They allow plugin developers to manage creating, saving, editing and retrieving data for the application. They can also make reference to other saved objects and have useful features out of the box, such as migrations and strict typings. The saved objects can be managed by the Saved Object Management UI.
3+
The saved object plugin provides all the core services and functionalities of saved objects. It is utilized by many core plugins such as [`visualization`](../visualizations/), [`dashboard`](../dashboard/) and [`visBuilder`](../vis_builder/), as well as external plugins. Saved object is the primary way to store app and plugin data in a standardized form in OpenSearch Dashboards. They allow plugin developers to manage creating, saving, editing and retrieving data for the application. They can also make reference to other saved objects and have useful features out of the box, such as migrations and strict typings. The saved objects can be managed by the Saved Object Management UI.
44

55
## Save relationships to index pattern
66

src/plugins/saved_objects_management/opensearch_dashboards.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"server": true,
55
"ui": true,
66
"requiredPlugins": ["management", "data"],
7-
"optionalPlugins": ["dashboard", "visualizations", "discover", "home", "wizard"],
7+
"optionalPlugins": ["dashboard", "visualizations", "discover", "home", "visBuilder"],
88
"extraPublicDirs": ["public/lib"],
99
"requiredBundles": ["opensearchDashboardsReact", "home"]
1010
}

src/plugins/saved_objects_management/public/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import { i18n } from '@osd/i18n';
3232
import { CoreSetup, CoreStart, Plugin } from 'src/core/public';
3333

34-
import { WizardStart } from '../../vis_builder/public';
34+
import { VisBuilderStart } from '../../vis_builder/public';
3535
import { ManagementSetup } from '../../management/public';
3636
import { DataPublicPluginStart } from '../../data/public';
3737
import { DashboardStart } from '../../dashboard/public';
@@ -76,7 +76,7 @@ export interface StartDependencies {
7676
dashboard?: DashboardStart;
7777
visualizations?: VisualizationsStart;
7878
discover?: DiscoverStart;
79-
wizard?: WizardStart;
79+
visBuilder?: VisBuilderStart;
8080
}
8181

8282
export class SavedObjectsManagementPlugin

src/plugins/saved_objects_management/public/register_services.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const registerServices = async (
3636
registry: ISavedObjectsManagementServiceRegistry,
3737
getStartServices: StartServicesAccessor<StartDependencies, SavedObjectsManagementPluginStart>
3838
) => {
39-
const [, { dashboard, visualizations, discover, wizard }] = await getStartServices();
39+
const [, { dashboard, visualizations, discover, visBuilder }] = await getStartServices();
4040

4141
if (dashboard) {
4242
registry.register({
@@ -62,11 +62,11 @@ export const registerServices = async (
6262
});
6363
}
6464

65-
if (wizard) {
65+
if (visBuilder) {
6666
registry.register({
67-
id: 'savedWizard',
68-
title: 'wizard',
69-
service: wizard.savedWizardLoader,
67+
id: 'savedVisBuilder',
68+
title: 'visBuilder',
69+
service: visBuilder.savedVisBuilderLoader,
7070
});
7171
}
7272
};

src/plugins/vis_builder/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Wizard
1+
# VisBuilder
22

33
An OpenSearch Dashboards plugin for a visualization experience that makes exploring data and creating visualizations much easier. It will act as an additional way to create visualizations alongside the exiting tools within the current visualizations plugin. The tool will be incremental to the visualization tools available to users in OpenSearch Dashboards today.
44

55
## Usage
66

77
To use this plugin, navigate to:
88

9-
Visualize -> Create Visualization -> Wizard
9+
Visualize -> Create Visualization -> VisBuilder
1010

1111
## Add a visualization
1212

src/plugins/vis_builder/common/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
export const PLUGIN_ID = 'wizard';
7-
export const PLUGIN_NAME = 'Wizard';
6+
export const PLUGIN_ID = 'vis-builder';
7+
export const PLUGIN_NAME = 'VisBuilder';
88
export const VISUALIZE_ID = 'visualize';
99
export const EDIT_PATH = '/edit';
1010
export const VIS_BUILDER_CHART_TYPE = 'VisBuilder';

src/plugins/vis_builder/common/vis_builder_saved_object_attributes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { SavedObjectAttributes } from '../../../core/types';
77

8-
export const VISBUILDER_SAVED_OBJECT = 'wizard';
8+
export const VISBUILDER_SAVED_OBJECT = 'visualization-visbuilder';
99

1010
export interface VisBuilderSavedObjectAttributes extends SavedObjectAttributes {
1111
title: string;

src/plugins/vis_builder/opensearch_dashboards.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "wizard",
2+
"id": "visBuilder",
33
"version": "1.0.0",
44
"opensearchDashboardsVersion": "opensearchDashboards",
55
"server": true,

src/plugins/vis_builder/public/application/utils/get_top_nav_config.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
import { VisBuilderServices } from '../..';
4040
import { VisBuilderVisSavedObject } from '../../types';
4141
import { AppDispatch } from './state_management';
42-
import { EDIT_PATH } from '../../../common';
42+
import { EDIT_PATH, VISBUILDER_SAVED_OBJECT } from '../../../common';
4343
import { setEditorState } from './state_management/metadata_slice';
4444
export interface TopNavConfigParams {
4545
visualizationIdFromUrl: string;
@@ -81,7 +81,7 @@ export const getTopNavConfig = (
8181
: i18n.translate('visBuilder.topNavMenu.saveVisualizationButtonLabel', {
8282
defaultMessage: 'save',
8383
}),
84-
testId: 'wizardSaveButton',
84+
testId: 'visBuilderSaveButton',
8585
disableButton: !!saveDisabledReason,
8686
tooltip: saveDisabledReason,
8787
run: (_anchorElement) => {
@@ -120,7 +120,7 @@ export const getTopNavConfig = (
120120
defaultMessage: 'Finish editing visBuilder and return to the last app',
121121
}
122122
),
123-
testId: 'wizardsaveAndReturnButton',
123+
testId: 'visBuilderSaveAndReturnButton',
124124
disableButton: !!saveDisabledReason,
125125
tooltip: saveDisabledReason,
126126
run: async () => {
@@ -207,7 +207,7 @@ export const getOnSave = (
207207
if (newlyCreated && stateTransfer) {
208208
// create new embeddable to transfer to originatingApp
209209
stateTransfer.navigateToWithEmbeddablePackage(originatingApp, {
210-
state: { type: 'wizard', input: { savedObjectId: id } },
210+
state: { type: VISBUILDER_SAVED_OBJECT, input: { savedObjectId: id } },
211211
});
212212
return { id };
213213
} else {

0 commit comments

Comments
 (0)