autoupdater.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. LuCI - Lua Configuration Interface
  3. Copyright 2013 Nils Schneider <nils@nilsschneider.net>
  4. Copyright 2016 Karsten Böddeker <freifunk@kb-light.de>
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. $Id$
  10. ]]--
  11. m = Map("autoupdater", translate("Automatic updates"))
  12. s = m:section(TypedSection, "autoupdater", nil)
  13. s.addremove = false
  14. s.anonymous = true
  15. s:option(Flag, "enabled", translate("Enable"))
  16. f = s:option(ListValue, "branch", translate("Branch"))
  17. uci.cursor():foreach("autoupdater", "branch", function (section) f:value(section[".name"]) end)
  18. m2 = Map("autoupdater-wifi-fallback", translate("Wifi fallback updates"))
  19. s2 = m2:section(TypedSection, "autoupdater-wifi-fallback", nil)
  20. s2.addremove = false
  21. s2.anonymous = true
  22. s2:option(Flag, "enabled", translate("Enable"))
  23. local c = Compound(m, m2)
  24. c.pageaction = false
  25. c.template = "cbi/simpleform"
  26. return c