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

[Monitoring] Remove angular dependency from Stack Monitoring #90254

Closed
igoristic opened this issue Feb 3, 2021 · 2 comments
Closed

[Monitoring] Remove angular dependency from Stack Monitoring #90254

igoristic opened this issue Feb 3, 2021 · 2 comments
Assignees
Labels
blocker chore enhancement New value added to drive a business result Feature:Dependencies R&D Research and development ticket (not meant to produce code, but to make a decision) Team:Monitoring Stack Monitoring team v7.16.0

Comments

@igoristic
Copy link
Contributor

AngularJS will no longer be supported, context here: #90145

We need to investigate what it would take to completely remove angularjs (and its rough timeline). Currently our plugin relies on angularjs (sorted by most complex order) for:


- Directives

SM is currently wrapped in a pretty large angular directive, example. This will probably be the hardest and the most time consuming thing to port over to react. This will involve breaking things down into their own components and decoupling any global relationships/dependancies


- Routing/Navigation (with passing url params as state to routes)

Routing in angular is very different than in react. The first step would probably involve changing all our angular route controllers (that are used inside .when()), and their respective html views into react components, and the next step would be to only render our whole app (from react-dom) once (instead of the individual components)

Possible alternative:

  • react-router-dom
  • Implement a simple react useContext with our current GlobalState class in url_state.ts

- Breadcrumbs

This hooks into kibana's top nav header, and we have full control over it (so should be pretty straight forward)

Possible alternative:

  • Convert the current angular provider into a hook/context in react
  • Construct breadcrumbs based on the current URL (rather than on the fly). This could be incorporated into our routing hook

- Timefilter refresh execution

This just updates angular's scope digestion along with anything else we put into executor.register which is an event interval from EuiSuperDatePicker

Possible alternative:

  • Use a react hook that would be triggered in onRefreshChange by EuiSuperDatePicker

There are couple of other things that I don't think are worth a mention since Kibana's NP core features has the alternatives we need

@igoristic igoristic added chore enhancement New value added to drive a business result Team:Monitoring Stack Monitoring team v8.0.0 Feature:Dependencies labels Feb 3, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring (Team:Monitoring)

@jasonrhodes
Copy link
Member

Replaced by #109791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker chore enhancement New value added to drive a business result Feature:Dependencies R&D Research and development ticket (not meant to produce code, but to make a decision) Team:Monitoring Stack Monitoring team v7.16.0
Projects
None yet
Development

No branches or pull requests

6 participants