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

Bugfix/1003: Hosts Loading Messaging #1087

Merged
merged 5 commits into from Mar 28, 2017

Conversation

cryptoquick
Copy link
Contributor

@cryptoquick cryptoquick commented Mar 27, 2017

  • CHANGELOG.md updated
  • Rebased/mergable
  • Tests pass
  • Sign CLA (if not already signed)

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.

Copy link
Contributor

@121watts 121watts left a 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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be the change 👍

addFlashMessage({type: 'error', text: reason})
this.setState({
hostsError: reason.toString(),
hostsLoading: false,
Copy link
Contributor

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

@121watts 121watts merged commit e7e7a45 into master Mar 28, 2017
@121watts 121watts deleted the bugfix/1003-hosts-loading-message branch March 28, 2017 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants