globalsconfig.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. -- Copyright 2017 Florian Eckert <fe@dev.tdt.de>
  2. -- Licensed to the public under the GNU General Public License v2.
  3. local net = require "luci.model.network".init()
  4. local s, m, mask, rtmon, rtlookup
  5. m = Map("mwan3", translate("MWAN - Globals"))
  6. s = m:section(NamedSection, "globals", "globals", nil)
  7. mask = s:option(
  8. Value,
  9. "mmx_mask",
  10. translate("Firewall mask"),
  11. translate("Enter value in hex, starting with <code>0x</code>"))
  12. mask.datatype = "hex(4)"
  13. mask.default = "0xff00"
  14. rtmon = s:option(
  15. Value,
  16. "rtmon_interval",
  17. translate("Update interval"),
  18. translate("How often should rtmon update the interface routing table"))
  19. rtmon.datatype = "integer"
  20. rtmon.default = "5"
  21. rtmon:value("1", translatef("%d second", 1))
  22. rtmon:value("3", translatef("%d seconds", 3))
  23. rtmon:value("5", translatef("%d seconds", 5))
  24. rtmon:value("7", translatef("%d seconds", 7))
  25. rtmon:value("10", translatef("%d seconds", 10))
  26. rtlookup = s:option(DynamicList,
  27. "rt_table_lookup",
  28. translate("Routing table lookup"),
  29. translate("Also scan this Routing table for connected networks"))
  30. rtlookup.datatype = "integer"
  31. rtlookup:value("1", translatef("Routing table %d", 1))
  32. rtlookup:value("2", translatef("Routing table %d", 2))
  33. rtlookup:value("220", translatef("Routing table %d", 220))
  34. return m