modules/admin-full: do not show protocol warning for empty interfaces, link to physic...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 22 Apr 2012 13:35:58 +0000 (13:35 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 22 Apr 2012 13:35:58 +0000 (13:35 +0000)
modules/admin-full/luasrc/view/admin_network/iface_overview.htm

index 0e03b912b34fe8dff5a67309bc8308934f87609c..9577ed0fde9d065f9ed02dfdbfc85000061f8eb5 100644 (file)
@@ -8,8 +8,6 @@ You may obtain a copy of the License at
 
        http://www.apache.org/licenses/LICENSE-2.0
 
-$Id$
-
 -%>
 
 <%-
@@ -164,6 +162,14 @@ $Id$
 
                                                d.innerHTML = html;
                                        }
+                                       else if (d && !ifc.ifname)                                     
+                                       {
+                                               d.innerHTML = String.format(
+                                                       '<em><%:Network without interfaces.%></em><br />' +
+                                                       '<a href="<%=luci.dispatcher.build_url("admin/network/network/%s")%>?tab.network.%s=physical"><%:Assign interfaces...%></a>',
+                                                               ifc.name, ifc.name
+                                               );
+                                       }
                                        else if (d && !ifc.proto)
                                        {
                                                var e = document.getElementById(ifc.id + '-ifc-edit');