info cleanup
This commit is contained in:
parent
7a7c204140
commit
11543f23b8
@ -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();
|
||||
|
Reference in New Issue
Block a user