OpenSearch-Dashboards icon indicating copy to clipboard operation
OpenSearch-Dashboards copied to clipboard

Remove AngularJS

Open tmarkley opened this issue 3 years ago • 3 comments

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.

tmarkley avatar May 06 '22 18:05 tmarkley

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

OpenSearch Dashboards Legacy

  • https://github.com/opensearch-project/OpenSearch-Dashboards/issues/4020

Tile Map & Region Map

  • Remove angular-sanitize from tile_map plugin
  • Clean out opensearch_dashboards_legacy usages in tile map and region map

Data plugin

  • Remove toAngularJSON from data plugin (src/plugins/data)

Clean css files

  • Remove angular (angular-ui-select) specific styles and formats from css files

boktorbb avatar May 06 '22 21:05 boktorbb

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 avatar May 10 '22 22:05 joshuarrrr

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).

tmarkley avatar May 17 '22 14:05 tmarkley

What's the status of this initiative and how much work is left?

tmarkley avatar Nov 30 '22 19:11 tmarkley

@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.

joshuarrrr avatar Dec 09 '22 19:12 joshuarrrr

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.

ananzh avatar Dec 25 '22 08:12 ananzh

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

ashwin-pc avatar Jul 19 '23 20:07 ashwin-pc