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
Bugfix/1003: Hosts Loading Messaging #1087
Conversation
# Conflicts: # CHANGELOG.md
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.
Look solid. Very minor cleanup and it will be ready to 🚢
shape, | ||
string, | ||
} = PropTypes | ||
|
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.
Be the change 👍
ui/src/hosts/containers/HostsPage.js
Outdated
addFlashMessage({type: 'error', text: reason}) | ||
this.setState({ | ||
hostsError: reason.toString(), | ||
hostsLoading: 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.
I don't think you need the toString()
here
Connect #1003
The problem
If there are zero hosts available, often this isn't a sign of an error, it just means there are actually zero hosts available. If there is an actual error, it was not displayed.
The Solution
Separate the branching conditions so hosts and errors are handled separately. Loading is handled separately as well.