Skip to content

Commit f4131da

Browse files
committed
luci-app-watchcat: Add support for ping timeout
Signed-off-by: Mathieu <[email protected]>
1 parent ec585c2 commit f4131da

File tree

1 file changed

+11
-3
lines changed
  • applications/luci-app-watchcat/htdocs/luci-static/resources/view

1 file changed

+11
-3
lines changed

applications/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ return view.extend({
5757
o.depends({ mode: "run_script" });
5858

5959
o = s.taboption('general', form.ListValue, 'addressfamily',
60-
_('Address family for pinging the host'));
60+
_('Address family for pinging the host'));
6161
o.default = 'any';
6262
o.depends({ mode: 'ping_reboot' });
6363
o.depends({ mode: 'restart_iface' });
@@ -66,8 +66,16 @@ return view.extend({
6666
o.value('ipv4');
6767
o.value('ipv6');
6868

69-
o = s.taboption('general', form.Value, 'pingperiod',
70-
_('Check Interval'),
69+
o = s.taboption('general', form.Value, 'pingtimeout',
70+
_('Ping timeout'),
71+
_("Time in second to wait for ping response. (default: 10s)<br />The default unit is seconds, without a suffix."));
72+
o.default = '10s';
73+
o.depends({ mode: "ping_reboot" });
74+
o.depends({ mode: "restart_iface" });
75+
o.depends({ mode: "run_script" });
76+
77+
o = s.taboption('general', form.Value, 'pingperiod',
78+
_('Check Interval'),
7179
_("How often to ping the host specified above. \
7280
<br /><br />The default unit is seconds, without a suffix, but you can use the suffix <b>m</b> for minutes, <b>h</b> for hours or <b>d</b> for days. <br /><br /> \
7381
Examples:<ul><li>10 seconds would be: <b>10</b> or <b>10s</b></li><li>5 minutes would be: <b>5m</b></li><li>1 hour would be: <b>1h</b></li><li>1 week would be: <b>7d</b></li><ul>"));

0 commit comments

Comments
 (0)