mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-20 09:26:42 +00:00
Move device display name logic to application model
This commit is contained in:
parent
c311738dd1
commit
be2b556d91
@ -44,7 +44,7 @@ exports.info = permissions.user (params) ->
|
||||
errors.handle(error) if error?
|
||||
|
||||
log.out ui.widgets.table.vertical application, (application) ->
|
||||
application.device_type = resin.models.device.getDisplayName(application.device_type)
|
||||
application.device_type = application.device_display_name
|
||||
return application
|
||||
, [ 'ID', 'Name', 'Device Type', 'Git Repository', 'Commit' ]
|
||||
|
||||
|
@ -60,6 +60,8 @@ exports.get = (id, callback) ->
|
||||
if not application?
|
||||
return callback(new errors.NotFound("application #{id}"))
|
||||
|
||||
application.device_display_name = deviceModel.getDisplayName(application.device_type)
|
||||
|
||||
return callback(null, application)
|
||||
|
||||
.catch (error) ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user