projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b014410
)
Attempt #3
author
Steven Barth
<steven@midlink.org>
Sun, 17 Aug 2008 20:54:26 +0000
(20:54 +0000)
committer
Steven Barth
<steven@midlink.org>
Sun, 17 Aug 2008 20:54:26 +0000
(20:54 +0000)
applications/luci-olsr/luasrc/controller/olsr.lua
patch
|
blob
|
history
applications/luci-olsr/luasrc/view/status-olsr/index.htm
patch
|
blob
|
history
applications/luci-olsr/luasrc/view/status-olsr/topology.htm
patch
|
blob
|
history
diff --git
a/applications/luci-olsr/luasrc/controller/olsr.lua
b/applications/luci-olsr/luasrc/controller/olsr.lua
index
577f596
..
96226d8
100644
(file)
--- a/
applications/luci-olsr/luasrc/controller/olsr.lua
+++ b/
applications/luci-olsr/luasrc/controller/olsr.lua
@@
-156,11
+156,11
@@
function fetch_txtinfo(otable)
local data = {}
local data = {}
- local tables = luci.util.split(luci.util.trim(rawdata), "\
n\n"
)
+ local tables = luci.util.split(luci.util.trim(rawdata), "\
r?\n\r?\n", nil, true
)
for i, tbl in ipairs(tables) do
for i, tbl in ipairs(tables) do
- local lines = luci.util.split(tbl, "\
n"
)
+ local lines = luci.util.split(tbl, "\
r?\n", nil, true
)
local name = table.remove(lines, 1):sub(8)
local keys = luci.util.split(table.remove(lines, 1), "\t")
local split = #keys - 1
local name = table.remove(lines, 1):sub(8)
local keys = luci.util.split(table.remove(lines, 1), "\t")
local split = #keys - 1
@@
-178,7
+178,7
@@
function fetch_txtinfo(otable)
data[name][j].LinkQuality,
data[name][j].NLQ,
data[name][j].ETX =
data[name][j].LinkQuality,
data[name][j].NLQ,
data[name][j].ETX =
- data[name][j].Linkcost:match("(
.*)/(.*)\t(.*
)")
+ data[name][j].Linkcost:match("(
[%w.]+)/([%w.]+)[%s]+([%w.]+
)")
end
end
end
end
end
end
diff --git
a/applications/luci-olsr/luasrc/view/status-olsr/index.htm
b/applications/luci-olsr/luasrc/view/status-olsr/index.htm
index
7d85e93
..
035d6dd
100644
(file)
--- a/
applications/luci-olsr/luasrc/view/status-olsr/index.htm
+++ b/
applications/luci-olsr/luasrc/view/status-olsr/index.htm
@@
-25,9
+25,6
@@
$Id$
<th>ETX</th>
</tr>
<% for k, link in ipairs(links) do
<th>ETX</th>
</tr>
<% for k, link in ipairs(links) do
- if link.Linkcost then
- link.LinkQuality, link.NLQ, link.ETX = link.Linkcost:match("(.*)/(.*)\t(.*)")
- end
local color = "#bb3333"
link.ETX = tonumber(link.ETX) or 0
local color = "#bb3333"
link.ETX = tonumber(link.ETX) or 0
diff --git
a/applications/luci-olsr/luasrc/view/status-olsr/topology.htm
b/applications/luci-olsr/luasrc/view/status-olsr/topology.htm
index
3b705f0
..
c7bd935
100644
(file)
--- a/
applications/luci-olsr/luasrc/view/status-olsr/topology.htm
+++ b/
applications/luci-olsr/luasrc/view/status-olsr/topology.htm
@@
-24,9
+24,6
@@
$Id$
<th>ETX</th>
</tr>
<% for k, route in ipairs(routes) do
<th>ETX</th>
</tr>
<% for k, route in ipairs(routes) do
- if route.Linkcost then
- route.LQ, route.ILQ, route.ETX = route.Linkcost:match("(.*)/(.*)\t(.*)")
- end
%>
<tr>
<td><a href="http://<%=route["Destination IP"]%>"><%=route["Destination IP"]%></a></td>
%>
<tr>
<td><a href="http://<%=route["Destination IP"]%>"><%=route["Destination IP"]%></a></td>