Use network properties for the network column, since they get updated in real time.

This commit is contained in:
Simo Kinnunen
2017-09-05 00:00:11 +09:00
parent 0a5b0324c0
commit 0d32a2a4cf
2 changed files with 19 additions and 1 deletions

View File

@@ -128,7 +128,19 @@ module.exports = function DeviceColumnService($filter, gettext) {
, network: TextCell({
title: gettext('Network')
, value: function(device) {
return device.phone ? device.phone.network : ''
if (!device.network) {
return ''
}
if (!device.network.connected) {
return ''
}
if (device.network.subtype) {
return (device.network.type + ' (' + device.network.subtype + ')').toUpperCase()
}
return (device.network.type || '').toUpperCase()
}
})
, display: TextCell({