Merge pull request #5905 from ldir-EDB0/dashboard
authorJo-Philipp Wich <jo@mein.io>
Sat, 30 Jul 2022 11:58:45 +0000 (13:58 +0200)
committerGitHub <noreply@github.com>
Sat, 30 Jul 2022 11:58:45 +0000 (13:58 +0200)
luci-mod-dashboard: show IPv6 connection uptime

modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js
modules/luci-mod-dashboard/po/templates/dashboard.pot

index e1ea347d591d7939a71837b3506d2b26929e8be7..c43e2ca544ad071cdbef9612ff25198d27f3e493 100644 (file)
@@ -146,6 +146,8 @@ return baseclass.extend({
                         var ifc = data[i];
 
                         if (v6) {
+                               var uptime = ifc.getUptime();
+                               this.params.internet.v6.uptime.value = (uptime > 0) ? '%t'.format(uptime) : '-';
                                this.params.internet.v6.ipprefixv6.value =  ifc.getIP6Prefix() || '-';
                                this.params.internet.v6.gatewayv6.value =  ifc.getGateway6Addr() || '-';
                                this.params.internet.v6.protocol.value=  ifc.getI18n() || E('em', _('Not connected'));
@@ -178,7 +180,7 @@ return baseclass.extend({
                                },
 
                                uptime: {
-                                       title: _('Connected since'),
+                                       title: _('Uptime'),
                                        visible: true,
                                        value: '-'
                                },
@@ -218,7 +220,7 @@ return baseclass.extend({
                                },
 
                                uptime: {
-                                       title: _('Connected since'),
+                                       title: _('Uptime'),
                                        visible: true,
                                        value: '-'
                                },
index af5a664af4251685aa54908862509733a9754e86..6faa0cbcc9940ea6ea425543c7617dd3c293df90 100644 (file)
@@ -30,7 +30,7 @@ msgstr ""
 
 #: modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js:181
 #: modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/10_router.js:221
-msgid "Connected since"
+msgid "Uptime"
 msgstr ""
 
 #: modules/luci-mod-dashboard/htdocs/luci-static/resources/view/dashboard/include/20_lan.js:13