-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Convert to using new status, and remove legacy plugin #75806
Convert to using new status, and remove legacy plugin #75806
Conversation
Pinging @elastic/stack-monitoring (Team:Monitoring) |
this.kibanaStatusGetter = getter; | ||
this.kibanaStatus = null; | ||
this.kibanaStatusGetter$ = statusGetter$.subscribe((nextStatus) => { | ||
this.kibanaStatus = nextStatus.level.toString(); |
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.
nit: instead of converting to a string, you could import ServiceStatusLevels
from core/server
and do comparisons below:
if (this.kibanaStatus === ServiceStatusLevels.available) { }
// etc
This will make refactoring easier if we ever decide to change the names of these.
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.
Yes, great point. I had assumed incorrectly I couldn't import it because it was a typescript interface but it's just a constant.
f5880a5
to
d5c2677
Compare
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededBuild metricsdistributable file count
History
To update your PR or re-run it, just comment with: |
|
||
setKibanaStatusGetter(getter) { | ||
this.kibanaStatusGetter = getter; | ||
this.kibanaStatus = null; |
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.
nit: I don't think you need to do this, since the constructor is only executed once (and the default value is already undefined
)
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.
Happy to see this change 👍
Backport: 7.x: ed93d27 |
Refers to #75503
Now that the status API is now available, we can deprecate the legacy monitoring plugin entirely and leverage the new status API to get status information.