Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][VisBuilder] filter (_q) is not saved which causes un-persistent state #5643

Closed
ananzh opened this issue Dec 28, 2023 · 0 comments · Fixed by #6460
Closed

[BUG][VisBuilder] filter (_q) is not saved which causes un-persistent state #5643

ananzh opened this issue Dec 28, 2023 · 0 comments · Fixed by #6460
Labels
bug Something isn't working v2.14.0 vis builder

Comments

@ananzh
Copy link
Member

ananzh commented Dec 28, 2023

Describe the bug
There are three types of state in OpenSearch Dashboards visualizations.

  • _g : the global state (time range), which is shared across OSD. _g is not saved in saved objects. Once _g is changed, like changing time range, all visualizations, discover, dashboards, & reload a saved object will reflect the updated _g.
  • _a: the application state, which represents the application-specific state. This part is saved in saved object. For example, discover _a state is saved in saved search.
  • _q: query and filter state, which includes both the query string and the filters applied. In both visualization, except vis builder, and discover, _q is saved in saved object.

For example, in visualization

savedVis.searchSourceFields = vis.data.searchSource?.getSerializedFields();

For example, in discover, it updates searchSource in saved search via this function:

In VisBuilder, searchSource is undefined. _q is not saved. Therefore, _q is not persistent among different saved objects. If you saved filter filter1 and query1 in vis builder, then you load a diff saved visualization (for example a bar chart) with filter 2 and query2, you will observer filter2 and query2 in vis builder. Currently vis builder has an issue of loading query, so you will see filter2. I will open a different issue on missing query. But I think save _q in vis builder will resolve both issue.

To Reproduce

q.persistency.bug.mov

Expected behavior
Expect vis builder to have persistent query and filter _q like other visualization types.

OpenSearch Version
2.10

Dashboards Version
2.10

Plugins

NA

@ananzh ananzh added v2.13.0 and removed v2.12.0 labels Feb 7, 2024
@ashwin-pc ashwin-pc added v2.14.0 and removed v2.13.0 labels Mar 19, 2024
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 17, 2024
In this PR:
add filter and query in vb
remove saveDisabledReason
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5645
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 17, 2024
In this PR:
add filter and query in vb
remove saveDisabledReason
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5645
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 17, 2024
In this PR:
add filter and query in vb
remove saveDisabledReason
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5645
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 17, 2024
In this PR:
add filter and query in vb
remove saveDisabledReason
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5645
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 18, 2024
In this PR:
add filter and query in vb
remove saveDisabledReason
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5645
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 18, 2024
In this PR:
add filter and query in vb
remove saveDisabledReason
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5645
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit that referenced this issue Apr 22, 2024
In this PR:
add filter and query in vb
remove saveDisabledReason
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
#5643
#5644
#5645
#5646
#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 25, 2024
In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 29, 2024
In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 29, 2024
In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 29, 2024
In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 29, 2024
In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Apr 30, 2024
In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>
ananzh added a commit that referenced this issue Apr 30, 2024
* [VisBuilder] Fix filter and query bugs

In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
#5643
#5644
#5646
#6512

Signed-off-by: Anan Zhuang <[email protected]>


---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Apr 30, 2024
* [VisBuilder] Fix filter and query bugs

In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
#5643
#5644
#5646
#6512

Signed-off-by: Anan Zhuang <[email protected]>

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
(cherry picked from commit 0ac9db3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ananzh pushed a commit that referenced this issue Apr 30, 2024
…6686)

* [VisBuilder] Fix filter and query bugs

In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
#5643
#5644
#5646
#6512

Signed-off-by: Anan Zhuang <[email protected]>

---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
(cherry picked from commit 0ac9db3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
LDrago27 pushed a commit to LDrago27/OpenSearch-Dashboards that referenced this issue Jun 3, 2024
…rch-project#6460)

* [VisBuilder] Fix filter and query bugs

In this PR:
add filter and query in vb
clean filterManager when start vb
add opensearch_dashboards_context to embeddable. This can add filter and query in the expression.

Issue Resolve
opensearch-project#5643
opensearch-project#5644
opensearch-project#5646
opensearch-project#6512

Signed-off-by: Anan Zhuang <[email protected]>


---------

Signed-off-by: Anan Zhuang <[email protected]>
Co-authored-by: Miki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.14.0 vis builder
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants