From 39aa6cd4814a51252145f67b96d94363ea2e0732 Mon Sep 17 00:00:00 2001 From: Will Piers Date: Thu, 10 Nov 2016 13:30:44 -0800 Subject: [PATCH] Accomodate telegraf setups without system plugin --- ui/src/hosts/components/HostsTable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/hosts/components/HostsTable.js b/ui/src/hosts/components/HostsTable.js index 4e436d47a5..4a4a0211bf 100644 --- a/ui/src/hosts/components/HostsTable.js +++ b/ui/src/hosts/components/HostsTable.js @@ -103,10 +103,10 @@ const HostsTable = React.createClass({ hosts.map(({name, cpu, load, apps = []}) => { return ( - {name} + {name}
- {`${cpu.toFixed(2)}%`} - {`${load.toFixed(2)}`} + {isNaN(cpu) ? 'N/A' : `${cpu.toFixed(2)}%`} + {isNaN(load) ? 'N/A' : `${load.toFixed(2)}`} {apps.map((app) => { return {app};