luci-mod-admin-full: mount points SWAP fix

SWAP section was showing an error. Fixed it to display the devices/size properly.
pull/371/head
Andrija Vucinic 2015-04-25 23:35:33 +02:00
parent f322842265
commit 64b052bbd8
1 changed files with 6 additions and 1 deletions

View File

@ -190,7 +190,12 @@ dev.cfgvalue = function(self, section)
if v then return "Label: %s" % v end
v = Value.cfgvalue(self, section) or "?"
return size[v] and "%s (%s MB)" % {v, size[v]} or v
e = v and devices[v]
if v and e and e.size then
return "%s (%s MB)" % {v, e.size}
else
return v
end
end
return m