mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-07 11:26:41 +00:00
Make use of simplified table widget
This commit is contained in:
parent
21d501d6e5
commit
a275de436d
@ -63,11 +63,11 @@ exports.list =
|
||||
resin.models.application.getAll (error, applications) ->
|
||||
return done(error) if error?
|
||||
console.log visuals.widgets.table.horizontal applications, [
|
||||
'ID'
|
||||
'Name'
|
||||
'Device Display Name'
|
||||
'Online Devices'
|
||||
'Devices Length'
|
||||
'id'
|
||||
'app_name'
|
||||
'device_display_name'
|
||||
'online_devices'
|
||||
'devices_length'
|
||||
]
|
||||
return done()
|
||||
|
||||
@ -85,11 +85,11 @@ exports.info =
|
||||
resin.models.application.get params.id, (error, application) ->
|
||||
return done(error) if error?
|
||||
console.log visuals.widgets.table.vertical application, [
|
||||
'ID'
|
||||
'Name'
|
||||
'Device Display Name'
|
||||
'Git Repository'
|
||||
'Commit'
|
||||
'id'
|
||||
'app_name'
|
||||
'device_display_name'
|
||||
'git_repository'
|
||||
'commit'
|
||||
]
|
||||
return done()
|
||||
|
||||
|
@ -22,13 +22,13 @@ exports.list =
|
||||
resin.models.device.getAllByApplication options.application, (error, devices) ->
|
||||
return done(error) if error?
|
||||
console.log visuals.widgets.table.horizontal devices, [
|
||||
'ID'
|
||||
'Name'
|
||||
'Device Display Name'
|
||||
'Is Online'
|
||||
'Application Name'
|
||||
'Status'
|
||||
'Last Seen'
|
||||
'id'
|
||||
'name'
|
||||
'device_display_name'
|
||||
'is_online'
|
||||
'application_name'
|
||||
'status'
|
||||
'last_seen'
|
||||
]
|
||||
|
||||
return done()
|
||||
@ -47,19 +47,19 @@ exports.info =
|
||||
resin.models.device.get params.id, (error, device) ->
|
||||
return done(error) if error?
|
||||
console.log visuals.widgets.table.vertical device, [
|
||||
'ID'
|
||||
'Name'
|
||||
'Device Display Name'
|
||||
'Is Online'
|
||||
'IP Address'
|
||||
'Application Name'
|
||||
'Status'
|
||||
'Last Seen'
|
||||
'UUID'
|
||||
'Commit'
|
||||
'Supervisor Version'
|
||||
'Is Web Accessible'
|
||||
'Note'
|
||||
'id'
|
||||
'name'
|
||||
'device_display_name'
|
||||
'is_online'
|
||||
'ip_address'
|
||||
'application_name'
|
||||
'status'
|
||||
'last_seen'
|
||||
'uuid'
|
||||
'commit'
|
||||
'supervisor_version'
|
||||
'is_web_accessible'
|
||||
'note'
|
||||
]
|
||||
|
||||
return done()
|
||||
|
@ -36,7 +36,12 @@ exports.list =
|
||||
if not options.verbose
|
||||
environmentVariables = _.reject(environmentVariables, resin.models.environmentVariables.isSystemVariable)
|
||||
|
||||
console.log(visuals.widgets.table.horizontal(environmentVariables))
|
||||
console.log visuals.widgets.table.horizontal environmentVariables, [
|
||||
'id'
|
||||
'name'
|
||||
'value'
|
||||
]
|
||||
|
||||
return done()
|
||||
|
||||
exports.remove =
|
||||
|
@ -27,10 +27,10 @@ exports.list =
|
||||
return example
|
||||
|
||||
console.log visuals.widgets.table.horizontal examplesData, [
|
||||
'ID'
|
||||
'Display Name'
|
||||
'Repository'
|
||||
'Author'
|
||||
'id'
|
||||
'display_name'
|
||||
'repository'
|
||||
'author'
|
||||
]
|
||||
|
||||
exports.info =
|
||||
@ -54,11 +54,11 @@ exports.info =
|
||||
example.author ?= 'Unknown'
|
||||
|
||||
console.log visuals.widgets.table.vertical example, [
|
||||
'ID'
|
||||
'Display Name'
|
||||
'Description'
|
||||
'Author'
|
||||
'Repository'
|
||||
'id'
|
||||
'display_name'
|
||||
'description'
|
||||
'author'
|
||||
'repository'
|
||||
]
|
||||
|
||||
return done()
|
||||
|
@ -20,7 +20,7 @@ exports.list =
|
||||
action: (params, options, done) ->
|
||||
resin.models.key.getAll (error, keys) ->
|
||||
return done(error) if error?
|
||||
console.log visuals.widgets.table.horizontal keys, [ 'ID', 'Title' ]
|
||||
console.log visuals.widgets.table.horizontal keys, [ 'id', 'title' ]
|
||||
return done()
|
||||
|
||||
exports.info =
|
||||
@ -37,7 +37,7 @@ exports.info =
|
||||
resin.models.key.get params.id, (error, key) ->
|
||||
return done(error) if error?
|
||||
key.public_key = '\n' + _.str.chop(key.public_key, resin.settings.get('sshKeyWidth')).join('\n')
|
||||
console.log(visuals.widgets.table.vertical(key, [ 'ID', 'Title', 'Public Key' ]))
|
||||
console.log(visuals.widgets.table.vertical(key, [ 'id', 'title', 'public_key' ]))
|
||||
return done()
|
||||
|
||||
exports.remove =
|
||||
|
Loading…
x
Reference in New Issue
Block a user