summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-olsr
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-olsr')
-rw-r--r--applications/luci-app-olsr/luasrc/controller/olsr.lua8
-rw-r--r--applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm8
-rw-r--r--applications/luci-app-olsr/po/pt-br/olsr.po17
3 files changed, 13 insertions, 20 deletions
diff --git a/applications/luci-app-olsr/luasrc/controller/olsr.lua b/applications/luci-app-olsr/luasrc/controller/olsr.lua
index 9a997bdc12..0564bd4ea7 100644
--- a/applications/luci-app-olsr/luasrc/controller/olsr.lua
+++ b/applications/luci-app-olsr/luasrc/controller/olsr.lua
@@ -87,8 +87,8 @@ function action_json()
local v4_port = uci:get("olsrd", "olsrd_jsoninfo", "port") or 9090
local v6_port = uci:get("olsrd6", "olsrd_jsoninfo", "port") or 9090
- jsonreq4 = utl.exec("(echo /status | nc 127.0.0.1 " .. v4_port .. ") 2>/dev/null" )
- jsonreq6 = utl.exec("(echo /status | nc ::1 " .. v6_port .. ") 2>/dev/null")
+ jsonreq4 = utl.exec("(echo /status | nc 127.0.0.1 " .. v4_port .. " | sed -n '/^[}{ ]/p') 2>/dev/null" )
+ jsonreq6 = utl.exec("(echo /status | nc ::1 " .. v6_port .. " | sed -n '/^[}{ ]/p') 2>/dev/null")
http.prepare_content("application/json")
if not jsonreq4 or jsonreq4 == "" then
jsonreq4 = "{}"
@@ -375,8 +375,8 @@ function fetch_jsoninfo(otable)
local v4_port = uci:get("olsrd", "olsrd_jsoninfo", "port") or 9090
local v6_port = uci:get("olsrd6", "olsrd_jsoninfo", "port") or 9090
- jsonreq4 = utl.exec("(echo /" .. otable .. " | nc 127.0.0.1 " .. v4_port .. ") 2>/dev/null")
- jsonreq6 = utl.exec("(echo /" .. otable .. " | nc ::1 " .. v6_port .. ") 2>/dev/null")
+ jsonreq4 = utl.exec("(echo /" .. otable .. " | nc 127.0.0.1 " .. v4_port .. " | sed -n '/^[}{ ]/p') 2>/dev/null")
+ jsonreq6 = utl.exec("(echo /" .. otable .. " | nc ::1 " .. v6_port .. " | sed -n '/^[}{ ]/p') 2>/dev/null")
local jsondata4 = {}
local jsondata6 = {}
local data4 = {}
diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm
index 31dd7d05ac..c077c20486 100644
--- a/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm
+++ b/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm
@@ -12,8 +12,8 @@ local i = 1
if luci.http.formvalue("status") == "1" then
local rv = {}
for k, link in ipairs(links) do
- link.linkCost = tonumber(link.linkCost)/1024 or 0
- if link.linkCost == 4096 then
+ link.linkCost = tonumber(link.linkCost) or 0
+ if link.linkCost == 4194304 then
link.linkCost = 0
end
local color = olsrtools.etx_color(link.linkCost)
@@ -129,8 +129,8 @@ end
<tbody id="olsr_neigh_table">
<% local i = 1
for k, link in ipairs(links) do
- link.linkCost = tonumber(link.linkCost)/1024 or 0
- if link.linkCost == 4096 then
+ link.linkCost = tonumber(link.linkCost) or 0
+ if link.linkCost == 4194304 then
link.linkCost = 0
end
diff --git a/applications/luci-app-olsr/po/pt-br/olsr.po b/applications/luci-app-olsr/po/pt-br/olsr.po
index 1461c1dd8b..499176c16b 100644
--- a/applications/luci-app-olsr/po/pt-br/olsr.po
+++ b/applications/luci-app-olsr/po/pt-br/olsr.po
@@ -1,17 +1,17 @@
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-06-10 03:41+0200\n"
-"PO-Revision-Date: 2014-06-21 19:36+0200\n"
-"Last-Translator: Éder <eder.grigorio@openmailbox.org>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
+"PO-Revision-Date: 2017-02-20 18:01-0300\n"
+"Last-Translator: Luiz Angelo Daros de Luca <luizluca@gmail.com>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Pootle 2.0.6\n"
+"X-Generator: Poedit 1.8.11\n"
+"Language-Team: \n"
msgid "Active MID announcements"
msgstr ""
@@ -59,7 +59,6 @@ msgstr ""
"Somente pode ser um endereço IPv4 ou IPv6 válidos ou um endereço 'padrão'"
# 20140621: edersg: tradução
-#, fuzzy
msgid "Can only be a valid IPv6 address or 'default'"
msgstr ""
"Somente pode ser um endereço IPv4 ou IPv6 válidos ou um endereço 'padrão'"
@@ -173,7 +172,6 @@ msgstr ""
"Validade do <abbr title=\"Host and network association, Associação de "
"equipamentos e redes\">HNA</abbr>"
-#, fuzzy
msgid "HNA6 Announcements"
msgstr ""
"Anúncios do <abbr title=\"Host and network association, Associação de "
@@ -215,7 +213,6 @@ msgstr ""
"Equipamentos em uma rede roteada por OLSR podem anunciar conectividade para "
"redes externas usando mensagens HNA."
-#, fuzzy
msgid ""
"Hosts in a OLSR routed network can announce connecitivity to external "
"networks using HNA6 messages."
@@ -496,7 +493,6 @@ msgstr ""
"> reduzir LQ para todos os nós nesta interface em 20%: padrão 0.8"
# 20140621: edersg: tradução
-#, fuzzy
msgid ""
"Multiply routes with the factor given here. Allowed values are between 0.01 "
"and 1.0. It is only used when LQ-Level is greater than 0. Examples:<br /"
@@ -551,7 +547,6 @@ msgstr ""
"OLSR - Anúncios <abbr title=\"Host and network association, Associação de "
"equipamentos e redes\">HNA</abbr>"
-#, fuzzy
msgid "OLSR - HNA6-Announcements"
msgstr ""
"OLSR - Anúncios <abbr title=\"Host and network association, Associação de "
@@ -654,7 +649,6 @@ msgstr ""
"durante o funcionamento do olsrd. O padrão é 0.0.0.0, que faz com que o "
"endereço da primeira interface seja usado."
-#, fuzzy
msgid ""
"Sets the main IP (originator ip) of the router. This IP will NEVER change "
"during the uptime of olsrd. Default is ::, which triggers usage of the IP of "
@@ -857,7 +851,6 @@ msgstr ""
"and network association, Associação de equipamentos e redes\">HNA</abbr> "
"local de 0.0.0.0/0, ::ffff:0:0/96 ou 2000::/3. O padrão é \"ambos\"."
-#, fuzzy
msgid ""
"Which kind of uplink is exported to the other mesh nodes. An uplink is "
"detected by looking for a local HNA6 ::ffff:0:0/96 or 2000::/3. Default "