diff options
Diffstat (limited to 'applications/luci-app-vnstat2')
7 files changed, 183 insertions, 24 deletions
diff --git a/applications/luci-app-vnstat2/Makefile b/applications/luci-app-vnstat2/Makefile index 420bf548a4..e611a98a27 100644 --- a/applications/luci-app-vnstat2/Makefile +++ b/applications/luci-app-vnstat2/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for vnStat 2 -LUCI_DEPENDS:=+luci-lib-jsonc +vnstat2 +vnstati2 +LUCI_DEPENDS:=+luci-base +luci-lib-jsonc +vnstat2 +vnstati2 PKG_LICENSE:=Apache-2.0 PKG_MAINTAINER:=Jan Hoffmann <jan@3e8.eu> diff --git a/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js b/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js index 10cd85641c..4d4bfd0dbe 100644 --- a/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js +++ b/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js @@ -58,13 +58,10 @@ return view.extend({ o = s.option(form.DummyValue, '_database'); o.load = function(section_id) { - return fs.exec('/usr/bin/vnstat', ['--json', 'f', '1']).then(L.bind(function(result) { + return fs.exec('/usr/bin/vnstat', ['--dbiflist', '1']).then(L.bind(function(result) { var databaseInterfaces = []; if (result.code == 0) { - var vnstatData = JSON.parse(result.stdout); - for (var i = 0; i < vnstatData.interfaces.length; i++) { - databaseInterfaces.push(vnstatData.interfaces[i].name); - } + databaseInterfaces = result.stdout.trim().split('\n'); } var configInterfaces = uci.get_first('vnstat', 'vnstat', 'interface') || []; diff --git a/applications/luci-app-vnstat2/po/en/vnstat2.po b/applications/luci-app-vnstat2/po/en/vnstat2.po index 30d1d9f75e..24cafb6844 100644 --- a/applications/luci-app-vnstat2/po/en/vnstat2.po +++ b/applications/luci-app-vnstat2/po/en/vnstat2.po @@ -1,14 +1,14 @@ msgid "" msgstr "" -"PO-Revision-Date: 2022-07-03 10:18+0000\n" -"Last-Translator: Hannu Nyman <hannu.nyman@iki.fi>\n" +"PO-Revision-Date: 2023-11-30 14:34+0000\n" +"Last-Translator: rygle <pittos@post.com>\n" "Language-Team: English <https://hosted.weblate.org/projects/openwrt/" "luciapplicationsvnstat2/en/>\n" "Language: en\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.13.1-dev\n" +"X-Generator: Weblate 5.3-dev\n" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:113 msgid "5 Minute" @@ -17,7 +17,7 @@ msgstr "" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:21 #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:40 msgid "Cancel" -msgstr "" +msgstr "Cancel" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:130 msgid "Clear data for all interfaces" @@ -25,7 +25,7 @@ msgstr "" #: applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json:27 msgid "Configuration" -msgstr "" +msgstr "Configuration" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:78 msgid "Could not load graph, no data available:" @@ -67,7 +67,7 @@ msgstr "" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:81 msgid "Interface" -msgstr "" +msgstr "Interface" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:45 msgid "Interfaces" diff --git a/applications/luci-app-vnstat2/po/fi/vnstat2.po b/applications/luci-app-vnstat2/po/fi/vnstat2.po index 5743b6ccc9..3a0fd1c03d 100644 --- a/applications/luci-app-vnstat2/po/fi/vnstat2.po +++ b/applications/luci-app-vnstat2/po/fi/vnstat2.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2022-04-21 23:00+0000\n" +"PO-Revision-Date: 2023-10-18 05:43+0000\n" "Last-Translator: Jiri Grönroos <jiri.gronroos@iki.fi>\n" "Language-Team: Finnish <https://hosted.weblate.org/projects/openwrt/" "luciapplicationsvnstat2/fi/>\n" @@ -8,7 +8,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.12-dev\n" +"X-Generator: Weblate 5.1\n" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:113 msgid "5 Minute" @@ -21,7 +21,7 @@ msgstr "Peruuta" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:130 msgid "Clear data for all interfaces" -msgstr "" +msgstr "Tyhjennä kaikki sovittimien data" #: applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json:27 msgid "Configuration" @@ -43,7 +43,7 @@ msgstr "Poista" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:34 msgid "Delete data for ALL interfaces" -msgstr "" +msgstr "Poista KAIKKIEN sovittimien data" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:15 msgid "Delete interface <em>%h</em>" diff --git a/applications/luci-app-vnstat2/po/he/vnstat2.po b/applications/luci-app-vnstat2/po/he/vnstat2.po index 3a2c6b106a..b779c2427c 100644 --- a/applications/luci-app-vnstat2/po/he/vnstat2.po +++ b/applications/luci-app-vnstat2/po/he/vnstat2.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"PO-Revision-Date: 2021-01-15 22:31+0000\n" +"PO-Revision-Date: 2023-09-07 08:58+0000\n" "Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n" "Language-Team: Hebrew <https://hosted.weblate.org/projects/openwrt/" "luciapplicationsvnstat2/he/>\n" @@ -9,7 +9,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n == 1) ? 0 : ((n == 2) ? 1 : ((n > 10 && " "n % 10 == 0) ? 2 : 3));\n" -"X-Generator: Weblate 4.5-dev\n" +"X-Generator: Weblate 5.0.1-dev\n" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:113 msgid "5 Minute" @@ -72,7 +72,7 @@ msgstr "מנשק" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:45 msgid "Interfaces" -msgstr "" +msgstr "מנשקים" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:71 msgid "Loading graphs…" diff --git a/applications/luci-app-vnstat2/po/it/vnstat2.po b/applications/luci-app-vnstat2/po/it/vnstat2.po index bf2ea994df..91d4a45d46 100644 --- a/applications/luci-app-vnstat2/po/it/vnstat2.po +++ b/applications/luci-app-vnstat2/po/it/vnstat2.po @@ -1,18 +1,18 @@ msgid "" msgstr "" -"PO-Revision-Date: 2023-05-17 11:53+0000\n" -"Last-Translator: Daniele Olivo <daniele.olivo1996@gmail.com>\n" +"PO-Revision-Date: 2023-09-10 12:33+0000\n" +"Last-Translator: Random <random-r@users.noreply.hosted.weblate.org>\n" "Language-Team: Italian <https://hosted.weblate.org/projects/openwrt/" "luciapplicationsvnstat2/it/>\n" "Language: it\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.18-dev\n" +"X-Generator: Weblate 5.0.1-dev\n" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:113 msgid "5 Minute" -msgstr "5 Minuti" +msgstr "5 minuti" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:21 #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:40 @@ -33,7 +33,7 @@ msgstr "Non sono riuscito a caricare il grafico, nessun dato disponibile:" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:115 msgid "Daily" -msgstr "" +msgstr "Giornaliero" #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:26 #: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:82 diff --git a/applications/luci-app-vnstat2/po/lt/vnstat2.po b/applications/luci-app-vnstat2/po/lt/vnstat2.po new file mode 100644 index 0000000000..129c6d95d7 --- /dev/null +++ b/applications/luci-app-vnstat2/po/lt/vnstat2.po @@ -0,0 +1,162 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2023-08-28 01:55+0000\n" +"Last-Translator: Džiugas J <dziugas1959@hotmail.com>\n" +"Language-Team: Lithuanian <https://hosted.weblate.org/projects/openwrt/" +"luciapplicationsvnstat2/lt/>\n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n % 10 == 1 && (n % 100 < 11 || n % 100 > " +"19)) ? 0 : ((n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) ? " +"1 : 2);\n" +"X-Generator: Weblate 5.0.1-dev\n" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:113 +msgid "5 Minute" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:21 +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:40 +msgid "Cancel" +msgstr "Atšaukti" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:130 +msgid "Clear data for all interfaces" +msgstr "" + +#: applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json:27 +msgid "Configuration" +msgstr "Konfigūravimas" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:78 +msgid "Could not load graph, no data available:" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:115 +msgid "Daily" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:26 +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:82 +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:59 +msgid "Delete" +msgstr "Ištrinti" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:34 +msgid "Delete data for ALL interfaces" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:15 +msgid "Delete interface <em>%h</em>" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:95 +msgid "Delete…" +msgstr "" + +#: applications/luci-app-vnstat2/root/usr/share/rpcd/acl.d/luci-app-vnstat2.json:3 +msgid "Grant access to LuCI app vnstat2" +msgstr "" + +#: applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json:18 +msgid "Graphs" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:114 +msgid "Hourly" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:81 +msgid "Interface" +msgstr "Sąsaja ir Sietuvas" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:45 +msgid "Interfaces" +msgstr "Sąsajos ir Sietuvai" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:71 +msgid "Loading graphs…" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:49 +msgid "Monitor interfaces" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:116 +msgid "Monthly" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:118 +msgid "" +"No monitored interfaces have been found. Go to the configuration to enable " +"monitoring for one or more interfaces." +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:99 +msgid "No unconfigured interfaces found in database." +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:111 +msgid "Summary" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:35 +msgid "" +"The data will be removed from the database permanently. This cannot be " +"undone." +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:16 +msgid "" +"The interface will be removed from the database permanently. This cannot be " +"undone." +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:49 +msgid "" +"The selected interfaces are automatically added to the vnStat database upon " +"startup." +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:104 +msgid "" +"These interfaces are present in the vnStat database, but are not configured " +"above." +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:112 +msgid "Top" +msgstr "" + +#: applications/luci-app-vnstat2/root/usr/share/luci/menu.d/luci-app-vnstat2.json:3 +msgid "Traffic Monitor" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:102 +msgid "Unconfigured interfaces" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:108 +msgid "Warning: The service is not running, graphs will not be updated!" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:117 +msgid "Yearly" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:43 +msgid "vnStat" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js:106 +msgid "vnStat Graphs" +msgstr "" + +#: applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/config.js:43 +msgid "" +"vnStat is a network traffic monitor for Linux that keeps a log of network " +"traffic for the selected interface(s)." +msgstr "" |