-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Sidecar collector rename #4903
Sidecar collector rename #4903
Changes from all commits
2057d26
32b24d5
988f125
d872b57
cb1ae98
1f9b63f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ import Routes from 'routing/Routes'; | |
import SidecarStatus from 'components/sidecars/sidecars/SidecarStatus'; | ||
|
||
const { SidecarsActions } = CombinedProvider.get('Sidecars'); | ||
const { CollectorsActions } = CombinedProvider.get('Collectors'); | ||
|
||
class SidecarStatusPage extends React.Component { | ||
static propTypes = { | ||
|
@@ -25,6 +26,7 @@ class SidecarStatusPage extends React.Component { | |
|
||
componentDidMount() { | ||
this.reloadSidecar(); | ||
this.reloadCollectors(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we also need to automatically reload collectors, or is it fine to only load them on page load? I guess the second option is fine, but want to double-check :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Loading them once is good enough. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ |
||
this.interval = setInterval(this.reloadSidecar, 5000); | ||
} | ||
|
||
|
@@ -38,9 +40,14 @@ class SidecarStatusPage extends React.Component { | |
SidecarsActions.getSidecar(this.props.params.sidecarId).then(sidecar => this.setState({ sidecar })); | ||
}; | ||
|
||
reloadCollectors = () => { | ||
CollectorsActions.all().then(collectors => this.setState({ collectors })); | ||
}; | ||
|
||
render() { | ||
const sidecar = this.state.sidecar; | ||
const isLoading = !sidecar; | ||
const collectors = this.state.collectors; | ||
const isLoading = !sidecar || !collectors; | ||
|
||
if (isLoading) { | ||
return <DocumentTitle title="Sidecar status"><Spinner /></DocumentTitle>; | ||
|
@@ -72,7 +79,7 @@ class SidecarStatusPage extends React.Component { | |
</ButtonToolbar> | ||
</PageHeader> | ||
|
||
<SidecarStatus sidecar={sidecar} /> | ||
<SidecarStatus sidecar={sidecar} collectors={collectors} /> | ||
</span> | ||
</DocumentTitle> | ||
); | ||
|
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.
Going to a sidecar details page, I'm seeing the following in my JS console: