luci-app-statistics: add support for MaxMissed
authorJohn Kohl <jtk.git@bostonpog.org>
Sat, 14 Aug 2021 19:34:47 +0000 (15:34 -0400)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 15 Aug 2021 07:39:31 +0000 (10:39 +0300)
Signed-off-by: John Kohl <jtk.git@bostonpog.org>
applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/plugins/ping.js
applications/luci-app-statistics/root/usr/share/luci/statistics/plugins/ping.json

index 47ce7fff5295c102a8a2b4a43aa935ecc26a623b..e08ff6497b570acb69ffd8f573002034255c191f 100644 (file)
@@ -13,7 +13,7 @@ return baseclass.extend({
 
                o = s.option(form.DynamicList, 'Hosts', _('Monitor hosts'));
                o.default = '127.0.0.1';
-               o.datatype = 'ipaddr("nomask")';
+               o.datatype = 'host';
                o.depends('enable', '1');
 
                o = s.option(form.ListValue, 'AddressFamily', _('Address family'));
@@ -32,6 +32,13 @@ return baseclass.extend({
                o.default = '30';
                o.datatype = 'ufloat';
                o.depends('enable', '1');
+
+           o=s.option(form.Value,'MaxMissed',_('Maximum Missed Packets'),
+                      _('When a host has not replied to this number of packets in a row, re-resolve the hostname in DNS.  Useful for dynamic DNS hosts.'));
+               o.placeholder = '10';
+               o.datatype = 'uinteger';
+               o.optional = true;
+               o.depends('enable', '1');
        },
 
        configSummary: function(section) {
index 094360512943a818e2054bc0ca05ffc0d3229e25..f14e82d1b4d061ee5565ecbd648b73dfb7f63ae9 100644 (file)
@@ -2,7 +2,7 @@
        "title": "Ping",
        "category": "network",
        "legend": [
-               ["TTL", "Interval", "AddressFamily"],
+               ["TTL", "Interval", "AddressFamily", "MaxMissed"],
                [],
                ["Hosts"]
        ]