-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Stack monitoring] Add global state context and routeInit component #109790
[Stack monitoring] Add global state context and routeInit component #109790
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
const isExpired = (license: any): boolean => { | ||
const { expiry_date_in_millis: expiryDateInMillis } = license; | ||
|
||
if (expiryDateInMillis !== undefined) { | ||
return new Date().getTime() >= expiryDateInMillis; | ||
} | ||
return false; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from the license service in Angular. It stores the license of the cluster viewed.
This service seems to be used in a couple of places, so I don't think is worth it to keep it as part of the state. We can extract this code to a separate file later if it's used in more places
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…lastic#109790) * Add global state to stack monitoring react app * Add type for state * Add some todos * Add route_init migration Co-authored-by: Kibana Machine <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…109790) (#110181) * Add global state to stack monitoring react app * Add type for state * Add some todos * Add route_init migration Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Ester Martí Vilaseca <[email protected]>
Summary
This PR is part of the Angular migration:
GlobalState
context. It makes use of the existingGlobalState
, which is responsible for storing the global state and keep it in sync with the URL query params.RouteInit
component that requests the clusters and does some redirects based on the response. This replaces the routeInit provider from Angular, used in almost all the routes definitions on the resolve property.