Make % online round to two decimal places (#1427)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
* Fix rounding error when showing % of online hosts
|
||||
|
||||
## Kolide 1.0.3 (April 3, 2017)
|
||||
|
||||
* Log rotation is no longer the default setting for Osquery status and results logs. To enable log rotation use the `--osquery_enable_log_rotation` flag.
|
||||
|
||||
+2
-1
@@ -23,7 +23,8 @@ class TargetDetails extends Component {
|
||||
|
||||
onlineHosts = (labelBaseClass, count, online) => {
|
||||
const offline = count - online;
|
||||
const percentOnline = ((count - offline) / count) * 100;
|
||||
const percentCount = ((count - offline) / count) * 100;
|
||||
const percentOnline = parseFloat(percentCount.toFixed(2));
|
||||
|
||||
if (online > 0) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user