modules/admin-full: fix some problems with b43
[project/luci.git] / modules / admin-full / luasrc / view / admin_network / wifi_overview.htm
index 580fe9a..72fe39e 100644 (file)
@@ -65,7 +65,7 @@ $Id$
 
                -- dunno yet
                else
-                       return "Unkown 802.11 Wireless Controller"
+                       return "Generic 802.11 Wireless Controller"
                end
        end
 
@@ -160,8 +160,10 @@ $Id$
                                <td style="width:34px"><img src="<%=resource%>/icons/wifi<%=state.active and "" or "_disabled"%>.png" style="float:left; margin-right:10px" /></td>
                                <td colspan="2" style="text-align:left">
                                        <big><strong><%=state.hwname%> (<%=dev%>)</strong></big><br />
-                                       <strong>Channel:</strong> <%=find_wifi_frequency(state)%> |
-                                       <strong>Bitrate:</strong> <%=(state and state.networks[1]) and (state.networks[1].info.bitrate / 1000) .. " Mb/s" or "n/a"%>
+                                       <% if state.networks[1] and state.networks[1].info then %>
+                                               <strong>Channel:</strong> <%=find_wifi_frequency(state)%> |
+                                               <strong>Bitrate:</strong> <%=state.networks[1].info.bitrate and (state.networks[1].info.bitrate / 1000) .. " Mb/s" or "n/a"%>
+                                       <% end %>
                                </td>
                                <td style="width:40px">
                                        <a href="<%=luci.dispatcher.build_url("admin/network/wireless_join?device="..dev)%>"><img style="border:none" src="<%=resource%>/cbi/find.gif" alt="Find and join network" title="Find and join network" /></a>
@@ -176,14 +178,14 @@ $Id$
                                <tr class="cbi-section-table-row cbi-rowstyle-<%=1 + ((i-1) % 2)%>">
                                        <td></td>
                                        <td class="cbi-value-field" style="width:16px; padding:3px">
-                                               <img src="<%=guess_wifi_signal(net.info)%>" title="Signal: <%=net.info.signal%> dBm / Noise: <%=net.info.noise%> dBm" /><br />
+                                               <img src="<%=guess_wifi_signal(net.info)%>" title="Signal: <%=net.info.signal or 0%> dBm / Noise: <%=net.info.noise or 0%> dBm" /><br />
                                                <small><%=percent_wifi_signal(net.info)%>%</small>
                                        </td>
                                        <td class="cbi-value-field" style="vertical-align:middle; text-align:left; padding:3px">
                                                <strong>SSID:</strong> <%=utl.pcdata(net.info.ssid)%> |
                                                <strong>Mode:</strong> <%=net.info.mode%><br />
                                                <strong>BSSID:</strong> <%=net.info.bssid%> |
-                                               <strong>Encryption:</strong> <%=net.info.enctype%>
+                                               <strong>Encryption:</strong> <%=net.info.enctype or "None"%>
                                        </td>
                                        <td class="cbi-value-field" style="width:40px">
                                                <a href="<%=REQUEST_URI%>/<%=dev%>"><img style="border:none" src="<%=resource%>/cbi/edit.gif" alt="Edit this network" title="Edit this network" /></a>