Skip to content

Commit

Permalink
[Vis Builder] Update vislib params and misc fixes (opensearch-project…
Browse files Browse the repository at this point in the history
…#2610) (opensearch-project#2630)

* Updates bar, line, area visbuilder config

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* Misc fixes from functional testing

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

* Adds Changelog entry

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
(cherry picked from commit 33aed0a)
  • Loading branch information
opensearch-trigger-bot[bot] authored and Peter Fitzgibbons committed Dec 1, 2022
1 parent 37a6314 commit ff2cb92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/plugins/wizard/public/embeddable/wizard_embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
} from '../../../data/public';
import { validateSchemaState } from '../application/utils/validate_schema_state';
import { getExpressionLoader, getTypeService } from '../plugin_services';
import { PersistedState } from '../../../visualizations/public';

// Apparently this needs to match the saved object type for the clone and replace panel actions to work
export const WIZARD_EMBEDDABLE = WIZARD_SAVED_OBJECT;
Expand Down Expand Up @@ -65,6 +66,7 @@ export class WizardEmbeddable extends Embeddable<SavedObjectEmbeddableInput, Wiz
private node?: HTMLElement;
private savedWizard?: WizardSavedObjectAttributes;
private serializedState?: { visualization: string; style: string };
private uiState?: PersistedState;

constructor(
timefilter: TimefilterContract,
Expand All @@ -90,6 +92,7 @@ export class WizardEmbeddable extends Embeddable<SavedObjectEmbeddableInput, Wiz
);

this.savedWizard = savedWizard;
this.uiState = new PersistedState();

this.autoRefreshFetchSubscription = timefilter
.getAutoRefreshFetch$()
Expand Down Expand Up @@ -219,6 +222,7 @@ export class WizardEmbeddable extends Embeddable<SavedObjectEmbeddableInput, Wiz
query: this.input.query,
filters: this.input.filters,
},
uiState: this.uiState,
};
if (this.abortController) {
this.abortController.abort();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@ export class WizardEmbeddableFactoryDefinition
): Promise<WizardEmbeddable | ErrorEmbeddable | DisabledEmbeddable> {
try {
const savedWizard = await getSavedWizardLoader().get(savedObjectId);

const editPath = `${EDIT_PATH}/${savedObjectId}`;

const editUrl = getHttp().basePath.prepend(`/app/${PLUGIN_ID}${editPath}`);

const isLabsEnabled = getUISettings().get<boolean>(VISUALIZE_ENABLE_LABS_SETTING);

if (!isLabsEnabled) {
Expand Down

0 comments on commit ff2cb92

Please sign in to comment.