style fixes

This commit is contained in:
Dave Eddy 2015-09-04 13:01:55 -04:00
parent 3dd84362d0
commit 7a7c204140

View File

@ -30,6 +30,7 @@ var columnsDefaultLong = 'id,name,default,memory,swap,disk';
var sortDefault = '_groupPlus,memory'; var sortDefault = '_groupPlus,memory';
function do_packages(subcmd, opts, args, callback) { function do_packages(subcmd, opts, args, callback) {
var i;
if (opts.help) { if (opts.help) {
this.do_help('help', {}, [subcmd], callback); this.do_help('help', {}, [subcmd], callback);
return; return;
@ -44,7 +45,7 @@ function do_packages(subcmd, opts, args, callback) {
columns = columns.split(','); columns = columns.split(',');
var rightAligned = {memory: true, disk: true, swap: true, var rightAligned = {memory: true, disk: true, swap: true,
vcpus: true, lwps: true}; vcpus: true, lwps: true};
for (var i = 0; i < columns.length; i++) { for (i = 0; i < columns.length; i++) {
if (rightAligned[columns[i]]) { if (rightAligned[columns[i]]) {
columns[i] = {lookup: columns[i], align: 'right'}; columns[i] = {lookup: columns[i], align: 'right'};
} }
@ -68,7 +69,7 @@ function do_packages(subcmd, opts, args, callback) {
if (opts.json) { if (opts.json) {
common.jsonStream(pkgs); common.jsonStream(pkgs);
} else { } else {
for (var i = 0; i < pkgs.length; i++) { for (i = 0; i < pkgs.length; i++) {
var pkg = pkgs[i]; var pkg = pkgs[i];
pkg.shortid = pkg.id.split('-', 1)[0]; pkg.shortid = pkg.id.split('-', 1)[0];