OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
Remove AngularJS
We need to track the work required to remove AngularJS from the project. As of January 2022 it is EOL: https://blog.angular.io/discontinued-long-term-support-for-angularjs-cc066b82e65a
#1558 is the first CVE that has been identified, and there is no other option to resolve it (or any other CVEs that are found) other than removing the dependency.
Angular in Dashboards:
Overall App
- Will need to remove actual angular dependency from package.json
- Will need to update all docs with angular mentions
- Will need to update markdown files
- Will need to update examples directory
- Will likely need to update fonts and bootstrap code
Discover (2.10)
- Discover angular directory
- Doc Table needs to be reworked
- Data Grid needs to be reworked
- Need to migrate to React Router
- Doc Views
- Discover controller will need to be reworked
- Discover Context view
Discover 2.0 tracking issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/4216
Dashboards (2.9)
- /public/plugin.ts
- application.ts
- application/_hacks.scss
- dashboard_app_controller.ts
Dashboards tracking issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3365
Timeline (completed)
- Timeline is written in angular and will need to be reworked
Timeline tracking issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3366
Visualizations (completed)
- vis_type_vislib will need to be reworked Issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2137 PR: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2138
- vis_type_table will need to be reworked Issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2139, https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2187 PR: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2863
i18n Framework (2.10)
- https://github.com/opensearch-project/OpenSearch-Dashboards/issues/4018
UI Shared Deps Package
- osd-ui-shared-deps relies on angular and will need to be changed
OpenSearch Dashboards Legacy
- https://github.com/opensearch-project/OpenSearch-Dashboards/issues/4020
Tile Map & Region Map
- Remove
angular-sanitizefrom tile_map plugin - Clean out
opensearch_dashboards_legacyusages in tile map and region map
Data plugin
- Remove
toAngularJSONfrom data plugin (src/plugins/data)
Clean css files
- Remove angular (
angular-ui-select) specific styles and formats from css files
How well do we understand or cover all the functionality of these components? Should part of this conversion process to add enough functional testing to make sure we maintain feature parity, or are there other ways we might be able to validate the conversions?
How well do we understand or cover all the functionality of these components? Should part of this conversion process to add enough functional testing to make sure we maintain feature parity, or are there other ways we might be able to validate the conversions?
@joshuarrrr great point. I know we have some functional tests for Discover, the Discover Context view, etc. but I'm not confident that the coverage is great. I think investing in functional tests ahead of the migration React is a great step, and we can take that opportunity to write them in Cypress as well (Ã la #754).
What's the status of this initiative and how much work is left?
@tmarkley - @ananzh is the dev lead of the overall de-angularization initiative. The first phase of work has been a re-write of the vis_type_table plugin: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2139
That work is targeting the 2.5.0 release. You can track the progress of the related tasks via the https://github.com/opensearch-project/OpenSearch-Dashboards/labels/tableVis label.
After that, Discover will be the largest remaining project, but we may also tackle the timeline vis and/or dashboards plugin in parallel. Frankly, there's a lot of remaining effort left, and we'd welcome community assistance in this effort.
Hey @tmarkley, sorry I just notice this message. There are three main blocks for de-angular: visualzations, discover, dashboards.
- Currently we are working on cleaning visualizations. The two main parts are table and timeline.
- Discover re-write/replace is in progress. We are trying to make an alignment by collecting more customer usages and feedbacks. Then we will decide what features from Discover we want to keep and what we would like to add. This evaluation work is done by @ahopp .
- Dashboards: there are some work left here but not a lot.
After these three blocks, we will clean packages and make a final cleaning. I think we still have a lot of work to do. Currently, there is no one working on timeline and dashboards.
Current status:
| Plugin | Depends on | Status | Tracking issue |
|---|---|---|---|
| Discover | - | In progress (2.10) | #4216 |
| Dashboards | - | In progress (Cleanup) | #3365 |
| Timeline | - | Completed | #3366 |
| Visualizations | - | Completed | #2137, #2187 |
| i18n Framework | Discover | In progress (2.10) | #4018 |
| UI Shared Deps Package | TODO | Not started | TODO |
| OpenSearch Dashboards Legacy | Discover | Not started | #4020 |
| Tile Map & Region Map | TODO | Not started | TODO |
| Data plugin | TODO | Not started | TODO |
| Clean css files | TODO | Not started | TODO |