mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
Remove unnecessary object keys deletion
This commit is contained in:
parent
6931e2cbfc
commit
45a4f8eda0
@ -37,8 +37,6 @@ exports.list = permissions.user ->
|
||||
application.device_type = resin.models.device.getDisplayName(application.device_type)
|
||||
application['Online Devices'] = _.where(application.device, is_online: 1).length
|
||||
application['All Devices'] = application.device?.length or 0
|
||||
delete application.git_repository
|
||||
delete application.device
|
||||
return application
|
||||
, [ 'ID', 'Name', 'Device Type', 'Online Devices', 'All Devices' ]
|
||||
|
||||
@ -48,7 +46,6 @@ exports.info = permissions.user (params) ->
|
||||
|
||||
log.out ui.widgets.table.vertical application, (application) ->
|
||||
application.device_type = resin.models.device.getDisplayName(application.device_type)
|
||||
delete application.device
|
||||
return application
|
||||
, [ 'ID', 'Name', 'Device Type', 'Git Repository', 'Commit' ]
|
||||
|
||||
|
@ -16,10 +16,6 @@ exports.list = permissions.user (params, options) ->
|
||||
log.out ui.widgets.table.horizontal devices, (device) ->
|
||||
device.application = device.application[0].app_name
|
||||
device.device_type = resin.models.device.getDisplayName(device.device_type)
|
||||
delete device.note
|
||||
delete device.supervisor_version
|
||||
delete device.uuid
|
||||
delete device.download_progress
|
||||
return device
|
||||
, [ 'ID', 'Name', 'Device Type', 'Is Online', 'Application', 'Status', 'Last Seen' ]
|
||||
|
||||
|
@ -17,8 +17,6 @@ exports.list = permissions.user ->
|
||||
return example
|
||||
|
||||
log.out ui.widgets.table.horizontal examplesData, (example) ->
|
||||
delete example.description
|
||||
delete example.name
|
||||
example.author ?= 'Unknown'
|
||||
return example
|
||||
, [ 'ID', 'Display Name', 'Repository', 'Author' ]
|
||||
@ -32,7 +30,6 @@ exports.info = permissions.user (params) ->
|
||||
errors.handle(error)
|
||||
|
||||
log.out ui.widgets.table.vertical example, (example) ->
|
||||
delete example.name
|
||||
example.id = id
|
||||
example.author ?= 'Unknown'
|
||||
return example
|
||||
|
@ -13,10 +13,7 @@ exports.list = permissions.user ->
|
||||
resin.models.key.getAll (error, keys) ->
|
||||
errors.handle(error) if error?
|
||||
|
||||
log.out ui.widgets.table.horizontal keys, (key) ->
|
||||
delete key.public_key
|
||||
return key
|
||||
, [ 'ID', 'Title' ]
|
||||
log.out ui.widgets.table.horizontal keys, _.identity, [ 'ID', 'Title' ]
|
||||
|
||||
exports.info = permissions.user (params) ->
|
||||
resin.models.key.get params.id, (error, key) ->
|
||||
|
Loading…
Reference in New Issue
Block a user