<%# LuCI - Lua Configuration Interface Copyright 2008 Steven Barth Copyright 2008-2009 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id: upgrade.htm 5458 2009-10-31 20:03:27Z jow $ -%> <%- --[[ Ordered table iterator, allow to iterate on the natural order of the keys of a table. ]] function __genOrderedIndex( t ) local orderedIndex = {} for key in pairs(t) do table.insert( orderedIndex, key ) end table.sort( orderedIndex ) return orderedIndex end function orderedNext(t, state) -- Equivalent of the next function, but returns the keys in the alphabetic -- order. We use a temporary ordered key table that is stored in the -- table being iterated. --print("orderedNext: state = "..tostring(state) ) if state == nil then -- the first time, generate the index t.__orderedIndex = __genOrderedIndex( t ) key = t.__orderedIndex[1] return key, t[key] end -- fetch the next value key = nil for i = 1,table.getn(t.__orderedIndex) do if t.__orderedIndex[i] == state then key = t.__orderedIndex[i+1] end end if key then return key, t[key] end -- no more value to return, cleanup t.__orderedIndex = nil return end function orderedPairs(t) -- Equivalent of the pairs() function on tables. Allows to iterate -- in order return orderedNext, t, nil end -%> <%+header%> <% if (info) then luci.http.write(info) end --[[ for node_address,node_info in orderedPairs(nodes) do luci.http.write(node_address .. " - " .. node_info.key .. " (".. node_info.enable .. ")
") end ]]-- %>

Node Whitelist

When security is enabled in the JenNet-IP network, only known nodes are allowed to join the network. Here the nodes that are allowed to join the network can be configured.
The list below shows all nodes that have requested to join the network. Nodes that are whitelisted to join the network can be selected using the "Allowed" checkboxes.
<% if (action == "apply") then %>
Applying changes Loading Waiting for router...
<% end %>
>Note: There are unsaved changes
Known Nodes
<% local row_number = 0 for node_address,node_info in orderedPairs(nodes) do %> <% row_number=row_number+1 end %>
Allowed MAC Address Commisioning Key  
/>
<%=node_address %>
Delete
<%+footer%>