mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 13:47:52 +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.device_type = resin.models.device.getDisplayName(application.device_type)
|
||||||
application['Online Devices'] = _.where(application.device, is_online: 1).length
|
application['Online Devices'] = _.where(application.device, is_online: 1).length
|
||||||
application['All Devices'] = application.device?.length or 0
|
application['All Devices'] = application.device?.length or 0
|
||||||
delete application.git_repository
|
|
||||||
delete application.device
|
|
||||||
return application
|
return application
|
||||||
, [ 'ID', 'Name', 'Device Type', 'Online Devices', 'All Devices' ]
|
, [ '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) ->
|
log.out ui.widgets.table.vertical application, (application) ->
|
||||||
application.device_type = resin.models.device.getDisplayName(application.device_type)
|
application.device_type = resin.models.device.getDisplayName(application.device_type)
|
||||||
delete application.device
|
|
||||||
return application
|
return application
|
||||||
, [ 'ID', 'Name', 'Device Type', 'Git Repository', 'Commit' ]
|
, [ '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) ->
|
log.out ui.widgets.table.horizontal devices, (device) ->
|
||||||
device.application = device.application[0].app_name
|
device.application = device.application[0].app_name
|
||||||
device.device_type = resin.models.device.getDisplayName(device.device_type)
|
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
|
return device
|
||||||
, [ 'ID', 'Name', 'Device Type', 'Is Online', 'Application', 'Status', 'Last Seen' ]
|
, [ 'ID', 'Name', 'Device Type', 'Is Online', 'Application', 'Status', 'Last Seen' ]
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@ exports.list = permissions.user ->
|
|||||||
return example
|
return example
|
||||||
|
|
||||||
log.out ui.widgets.table.horizontal examplesData, (example) ->
|
log.out ui.widgets.table.horizontal examplesData, (example) ->
|
||||||
delete example.description
|
|
||||||
delete example.name
|
|
||||||
example.author ?= 'Unknown'
|
example.author ?= 'Unknown'
|
||||||
return example
|
return example
|
||||||
, [ 'ID', 'Display Name', 'Repository', 'Author' ]
|
, [ 'ID', 'Display Name', 'Repository', 'Author' ]
|
||||||
@ -32,7 +30,6 @@ exports.info = permissions.user (params) ->
|
|||||||
errors.handle(error)
|
errors.handle(error)
|
||||||
|
|
||||||
log.out ui.widgets.table.vertical example, (example) ->
|
log.out ui.widgets.table.vertical example, (example) ->
|
||||||
delete example.name
|
|
||||||
example.id = id
|
example.id = id
|
||||||
example.author ?= 'Unknown'
|
example.author ?= 'Unknown'
|
||||||
return example
|
return example
|
||||||
|
@ -13,10 +13,7 @@ exports.list = permissions.user ->
|
|||||||
resin.models.key.getAll (error, keys) ->
|
resin.models.key.getAll (error, keys) ->
|
||||||
errors.handle(error) if error?
|
errors.handle(error) if error?
|
||||||
|
|
||||||
log.out ui.widgets.table.horizontal keys, (key) ->
|
log.out ui.widgets.table.horizontal keys, _.identity, [ 'ID', 'Title' ]
|
||||||
delete key.public_key
|
|
||||||
return key
|
|
||||||
, [ 'ID', 'Title' ]
|
|
||||||
|
|
||||||
exports.info = permissions.user (params) ->
|
exports.info = permissions.user (params) ->
|
||||||
resin.models.key.get params.id, (error, key) ->
|
resin.models.key.get params.id, (error, key) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user