mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-22 06:57:48 +00:00
Stop using table map feature
This commit is contained in:
parent
19e151e521
commit
57c86f920c
@ -33,20 +33,25 @@ exports.list = permissions.user ->
|
||||
resin.models.application.getAll (error, applications) ->
|
||||
errors.handle(error) if error?
|
||||
|
||||
log.out ui.widgets.table.horizontal applications, (application) ->
|
||||
application.device_type = application.device_display_name
|
||||
application.all_devices = application.devices_length
|
||||
return application
|
||||
, [ 'ID', 'Name', 'Device Type', 'Online Devices', 'All Devices' ]
|
||||
log.out ui.widgets.table.horizontal applications, _.identity, [
|
||||
'ID'
|
||||
'Name'
|
||||
'Device Display Name'
|
||||
'Online Devices'
|
||||
'Devices Length'
|
||||
]
|
||||
|
||||
exports.info = permissions.user (params) ->
|
||||
resin.models.application.get params.id, (error, application) ->
|
||||
errors.handle(error) if error?
|
||||
|
||||
log.out ui.widgets.table.vertical application, (application) ->
|
||||
application.device_type = application.device_display_name
|
||||
return application
|
||||
, [ 'ID', 'Name', 'Device Type', 'Git Repository', 'Commit' ]
|
||||
log.out ui.widgets.table.vertical application, _.identity, [
|
||||
'ID'
|
||||
'Name'
|
||||
'Device Display Name'
|
||||
'Git Repository'
|
||||
'Commit'
|
||||
]
|
||||
|
||||
exports.restart = permissions.user (params) ->
|
||||
resin.models.application.restart params.id, (error) ->
|
||||
|
@ -16,10 +16,16 @@ exports.list = permissions.user ->
|
||||
example.id = index + 1
|
||||
return example
|
||||
|
||||
log.out ui.widgets.table.horizontal examplesData, (example) ->
|
||||
examplesData = _.map examplesData, (example) ->
|
||||
example.author ?= 'Unknown'
|
||||
return example
|
||||
, [ 'ID', 'Display Name', 'Repository', 'Author' ]
|
||||
|
||||
log.out ui.widgets.table.horizontal examplesData, _.identity, [
|
||||
'ID'
|
||||
'Display Name'
|
||||
'Repository'
|
||||
'Author'
|
||||
]
|
||||
|
||||
exports.info = permissions.user (params) ->
|
||||
id = params.id - 1
|
||||
@ -29,11 +35,10 @@ exports.info = permissions.user (params) ->
|
||||
error = new Error("Unknown example: #{id}")
|
||||
errors.handle(error)
|
||||
|
||||
log.out ui.widgets.table.vertical example, (example) ->
|
||||
example.id = id
|
||||
example.author ?= 'Unknown'
|
||||
return example
|
||||
, [
|
||||
|
||||
log.out ui.widgets.table.vertical example, _.identity, [
|
||||
'ID'
|
||||
'Display Name'
|
||||
'Description'
|
||||
|
Loading…
Reference in New Issue
Block a user