diff --git a/lib/do_info.js b/lib/do_info.js index 7a26ab2..0017798 100644 --- a/lib/do_info.js +++ b/lib/do_info.js @@ -65,12 +65,12 @@ function do_info(subcmd, opts, args, callback) { data.name = name; data.email = out.account.email; data.url = self.triton.cloudapi.url; - data.totalInstances = out.machines.length; data.totalDisk = disk; data.totalMemory = memory; if (opts.json) { - data.machines = states; + data.totalInstances = out.machines.length; + data.instances = states; console.log(JSON.stringify(data)); } else { data.totalDisk = common.humanSizeFromBytes(disk); @@ -78,8 +78,9 @@ function do_info(subcmd, opts, args, callback) { Object.keys(data).forEach(function (key) { console.log('%s: %s', key, data[key]); }); + console.log('instances: %d', out.machines.length); Object.keys(states).forEach(function (key) { - console.log('machines.%s: %s', key, states[key]); + console.log(' %s: %d', key, states[key]); }); } callback();