Merge pull request from resin-io/jviotti/fix/151/ssh-key-list

Print ssh key separately from the information table
This commit is contained in:
Juan Cruz Viotti 2015-08-17 08:01:32 -04:00
commit 1da1d2e6fc
2 changed files with 11 additions and 2 deletions
build/actions
lib/actions

@ -38,7 +38,8 @@
permission: 'user',
action: function(params, options, done) {
return resin.models.key.get(params.id).then(function(key) {
return console.log(visuals.table.vertical(key, ['id', 'title', 'public_key']));
console.log(visuals.table.vertical(key, ['id', 'title']));
return console.log('\n' + key.public_key);
}).nodeify(done);
}
};

@ -37,7 +37,15 @@ exports.info =
permission: 'user'
action: (params, options, done) ->
resin.models.key.get(params.id).then (key) ->
console.log visuals.table.vertical key, [ 'id', 'title', 'public_key' ]
console.log visuals.table.vertical key, [
'id'
'title'
]
# Since the public key string is long, it might
# wrap to lines below, causing the table layout to break.
# See https://github.com/resin-io/resin-cli/issues/151
console.log('\n' + key.public_key)
.nodeify(done)
exports.remove =