Skip to content

Commit

Permalink
Merge pull request ceph#15668 from Liuchang0812/wip-fix-mgr-dashboard
Browse files Browse the repository at this point in the history
mgr/dashboard: fix type error in get_rate function

Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
tchaikov authored Jun 16, 2017
2 parents 765b10b + 3758580 commit 3a714e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pybind/mgr/dashboard/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def _health(self):

def get_rate(series):
if len(series) >= 2:
return (series[0][1] - series[1][1]) / float(series[0][0] - series[1][0])
return (float(series[0][1]) - float(series[1][1])) / (float(series[0][0]) - float(series[1][0]))
else:
return 0

Expand Down

0 comments on commit 3a714e8

Please sign in to comment.