Skip to content

Commit

Permalink
Fix app health detail calculations
Browse files Browse the repository at this point in the history
Ensure that none of the values is divided by 0.

Closes mesosphere/marathon#3063
  • Loading branch information
Orlando Hohmeier committed Jan 22, 2016
1 parent 55336ab commit 727018f
Show file tree
Hide file tree
Showing 2 changed files with 409 additions and 142 deletions.
2 changes: 1 addition & 1 deletion src/js/components/AppHealthDetailComponent.jsx
Expand Up @@ -43,7 +43,7 @@ var AppHealthDetailComponent = React.createClass({

renderItem: function (state) {
var health = this.getHealth(state);
var totalInstances = this.props.model.instances;
var totalInstances = this.props.model.instances || 1;
var instances = health.quantity;
var percentage = Math.round((instances / totalInstances) * 100);
var label = healthStatusLabels[state];
Expand Down

0 comments on commit 727018f

Please sign in to comment.