diff --git a/applications/luci-app-watchcat/Makefile b/applications/luci-app-watchcat/Makefile index 58e12ecbf5..c3c7aada9d 100644 --- a/applications/luci-app-watchcat/Makefile +++ b/applications/luci-app-watchcat/Makefile @@ -1,13 +1,9 @@ -# -# Copyright (C) 2008-2014 The LuCI Team -# # This is free software, licensed under the Apache License, Version 2.0 . -# include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for Watchcat -LUCI_DEPENDS:=+luci-compat +watchcat +LUCI_DEPENDS:=+watchcat include ../../luci.mk diff --git a/applications/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js b/applications/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js new file mode 100644 index 0000000000..835536a300 --- /dev/null +++ b/applications/luci-app-watchcat/htdocs/luci-static/resources/view/watchcat.js @@ -0,0 +1,101 @@ +'use strict'; +'require view'; +'require form'; +'require tools.widgets as widgets'; + +return view.extend({ + render: function () { + var m, s, o; + + m = new form.Map('watchcat', + _('Watchcat'), + _("Here you can set up several checks and actions to take in the event that a host becomes unreachable. \ + Click the Add button at the bottom to set up more than one action.")); + + s = m.section(form.TypedSection, 'watchcat', _('Watchcat'), _('These rules will govern how this device reacts to network events.')); + s.anonymous = true; + s.addremove = true; + + s.tab('general', _('General Settings')); + + o = s.taboption('general', form.ListValue, 'mode', + _('Mode'), + _("Ping Reboot: Reboot this device if a ping to a specified host fails for a specified duration of time.
\ + Periodic Reboot: Reboot this device after a specified interval of time.
\ + Restart Interface: Restart a network interface if a ping to a specified host fails for a specified duration of time.")); + o.value('ping_reboot', _('Ping Reboot')); + o.value('periodic_reboot', _('Periodic Reboot')); + o.value('restart_iface', _('Restart Interface')); + + o = s.taboption('general', form.Value, 'period', + _('Period'), + _("In Periodic Reboot mode, it defines how often to reboot.
\ + In Ping Reboot mode, it defines the longest period of \ + time without a reply from the Host To Check before a reboot is engaged.
\ + In Network Restart mode, it defines the longest period of \ + time without a reply from the Host to Check before the interface is restarted. \ +

The default unit is seconds, without a suffix, but you can use the \ + suffix m for minutes, h for hours or d \ + for days.

Examples: