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

[DESIGN][Table] new table visualization plugin #2187

Closed
ananzh opened this issue Aug 23, 2022 · 2 comments
Closed

[DESIGN][Table] new table visualization plugin #2187

ananzh opened this issue Aug 23, 2022 · 2 comments
Assignees
Labels
de-angular de-angularize work OUI Issues that require migration to OUI tableVis table visualization visualizations Issues and PRs related to visualizations

Comments

@ananzh
Copy link
Member

ananzh commented Aug 23, 2022

Statement

Currently, table visualization is written in Angular. Angular is not supported since 12/2021 and cause high severity CVE issues. Since we decided to remove angular from current code base, table visualization needs to be refactored ore re-written in ReAct. Meanwhile, our current table visualization is old and we see requests to update.

Scope

  • Minimal learning
  • Easy to use
  • Progress not perfection

Note: This design is not final.

Solutions

deangular current vis_type_table

pros:

  • No down time.

cons:

  • Need understanding on angular which might take much longer time than a rewrite

react + OUI Table

pros:

  • No learning curve: no usage difference for customers
  • Support splitted grids.

cons:

  • Can't implement new features: adjustable columns, toolbar and etc.

react + OUI Datagrid

pros:

  • Datagrid supports sorting. So we don't need to maintain the sort state
  • Datagrid includes more feature possibilities: adjustable columns, toolbar and etc
  • Better rendering: can auto-dectect schemas and do sorting and pagination in memory

cons:

  • Datagrid doesn't support split grids. When we have split table (rows/columns), we need to render multiple datagrid components

Recommended Design

The recommendation design is to rewrite table visualization in OpenSearch Dashboards using react and OUI Datagrid.

Same user flow

same way to create table visualization

  • on home page, click the side bar menu and click visualize
  • on the top right of the visualizations list, click Create visualization
  • choose Data Table as the visualization type and then choose the index pattern
  • a table visualization should be rendered based on the default settings

same way to access table visualization

Saved table should be able to access from:

  • the list on the Visualization page
  • the saved object (Stack Management --> Saved objects)
  • Dashboard page

Features

To smooth the user experience, this new table visualization is created from the same location and will keep all the previous features. More specifically, we are proposing the following key features for OpenSearch Dashboards Table Visualization:

sort the column

  • the look is different. we won't see black up-pointing/down-pointing triangle.

Screen Shot 2022-08-22 at 22 56 49

pagination

  • pagination should be shown properly at the same location (bottom right of the table)

export table as csv

  • keep supporting the two formats: raw and formatted

split table in rows and columns

Screen Shot 2022-08-22 at 23 12 00

Screen Shot 2022-08-22 at 23 12 12

show total

  • In Options, support show total option and metric (Sum, Average, Min, Max, Count). Should show a total of the column

show partial rows

  • In Options, support Show partial rows option. When there are too many columns in the table, table should be truncated and display partial rows

show metrics for every bucket/level

  • In Options, support Show metrics for every bucket/level option. If this option is chosen, table vis should add a metric for each bucket/level.

show percentage column

  • In Options, support Percentage column option and default is Don't show
  • Once the Percentage column option is chosen, table vis should add a percentage column

[optional] adjust column width

  • support column width adjustment

Screen Shot 2022-08-22 at 23 02 27

Architechure

Workflow

The new table visualization will use the following workflow:

  • table should be an embeddable visualization on the Visualization page
  • embeddable table visualization is reloaded once there is a state change (time range, metric aggregation, bucket and etc)
  • VisualizeEmbeddable will update the expression ExpressionLoader. We still use expressions plugin to fetch data. The state changes will make a new expression which will be used to create a query to fetch data from OS
  • After the data is back, visConfig and visData are updated and expressions plugin start the render process
  • Table rendering is called and Table Visualization will be rendered

table-flow-1

table-flow-2

Saved Object

Components

Future scope

Removing angular and rewriting table visualization is our first step to bring customer a modernized table experience. We want the future table visualization is to be completely customer driven.

I see there are a lot of requests of pivot Table. I think this is definitely something we should consider. I see there are contributors implementation based on original angular base. I would like to fetch some help from our community to try similar features our table visualization.

Meanwhile, would like more community feedbacks to complete the design of future Table Visualization. Please comment here.

@kavilla kavilla added the de-angular de-angularize work label Aug 29, 2022
@joshuarrrr joshuarrrr added tableVis table visualization visualizations Issues and PRs related to visualizations labels Nov 21, 2022
@ananzh
Copy link
Member Author

ananzh commented Dec 19, 2022

Table vis has done implementation. Close this Research issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
de-angular de-angularize work OUI Issues that require migration to OUI tableVis table visualization visualizations Issues and PRs related to visualizations
Projects
Status: Done
Development

No branches or pull requests

4 participants