Skip to content

Commit

Permalink
[Table Visualization] remove legacy table and add table visualization (
Browse files Browse the repository at this point in the history
…opensearch-project#2279)

To convert the table visualization into React & OUI DataGrid component,
in this PR, we did two main things:
* clean out legacy angular code
* restore table vis in react
* Datagrid component does not support splitted grids. For future transfer
to OUI Datagrid, we create a tableGroup in visData for splitted grids.

issue resolved:
opensearch-project#2212
https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2213a

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

rename visTable back to opensearch_dashboards_table and add stronger type

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] add a plain datagrid component (opensearch-project#2390)

implement a plain OuiDataGrid component use the basic
pagenation, sort and format.

Partially resolve:
opensearch-project#2305

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] restore datagrid columns (opensearch-project#2411)

* restore datagrid columns
* display column title correctly
* deangular and re-use formatted column
* convert formatted column to data grid column
* restore filter in and filter out value functions

Partially resolve:
opensearch-project#2305

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] restore pagination to table vis (opensearch-project#2461)

* add pagination

patically resolved:
opensearch-project#2305

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] make table vis column resizable (opensearch-project#2464)

* add resizable state to column

Partially resolve:
opensearch-project#2305

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] make table vis column sortable (opensearch-project#2502)

* add sort state (asc | desc)  to column
* fix pagination issue

Partially resolve:
opensearch-project#2305

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] format table cell and restore showTotal feature (opensearch-project#2562)

* format table cell to show Date and percent
* restore showTotal feature: it allows table vis to show total,
avg, min, max and count statics on count
* fix some type errors

Partically resolved:
opensearch-project#2379

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization]restore export csv feature to table vis (opensearch-project#2568)

* add addtional action in toolbar to allow export data to csv.
there are two types of csv, raw and formatted. raw is the original
data and formatted is to show formatted Date and percentage data
when needed.
* when table is not saved, export csv file will be named as
unsaved-raw.csv if choose raw. when table is saved with a filename,
it will be saved as [filename]-[raw/formatted].csv

Partically resolved:
opensearch-project#2379

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] split table in rows and columns

This PR implement a group component TableVisGroupComponent utilizing
TableVisComponent as sub component. It also adds a title to TableVisComponent.

Partically resolved:
opensearch-project#2379

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] remove local state

* remove local col width state to allow split tables to fetch
updated col width state
* fix type errors in usePagination

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization] remove repeated column from split tables

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

[Table Visualization][BUG] partical rows option generate repeated metrics

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
  • Loading branch information
ananzh committed Oct 23, 2022
1 parent 68baac1 commit bde624f
Show file tree
Hide file tree
Showing 52 changed files with 1,062 additions and 4,018 deletions.
6 changes: 6 additions & 0 deletions src/plugins/data/common/field_formats/field_format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ export abstract class FieldFormat {
*/
public type: any = this.constructor;

/**
* @property {boolean} - allow numeric aggregation
* @private
*/
allowsNumericalAggregations?: boolean;

protected readonly _params: any;
protected getConfig: FieldFormatsGetConfigFn | undefined;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/vis_type_table/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Contains the data table visualization, that allows presenting data in a simple table format.
Contains the data table visualization, that allows presenting data using OUI datagrid.
8 changes: 4 additions & 4 deletions src/plugins/vis_type_table/opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"requiredPlugins": [
"expressions",
"visualizations",
"data",
"opensearchDashboardsLegacy"
"data"
],
"requiredBundles": [
"opensearchDashboardsUtils",
"share",
"opensearchDashboardsReact",
"charts",
"share",
"visDefaultEditor"
]
}
}

This file was deleted.

23 changes: 0 additions & 23 deletions src/plugins/vis_type_table/public/_table_vis.scss

This file was deleted.

42 changes: 0 additions & 42 deletions src/plugins/vis_type_table/public/agg_table/_agg_table.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/plugins/vis_type_table/public/agg_table/_index.scss

This file was deleted.

34 changes: 0 additions & 34 deletions src/plugins/vis_type_table/public/agg_table/agg_table.html

This file was deleted.

Loading

0 comments on commit bde624f

Please sign in to comment.