summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua
diff options
context:
space:
mode:
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-11-15 11:42:43 +0100
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-11-15 11:42:43 +0100
commit28d86aeec5bd47846961073846519f428a1ddff9 (patch)
tree89c380c0864f6a9c9f2cb6f68a2cd1f0135ff021 /applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua
parent1cb3adb619bdd876867f4c4da615ea850464e711 (diff)
luci-app-ddns: rollup to 2.3.0 to reflect changes on ddns-scripts
- support for new options "lookup_host", "param_enc" and "param_opt" - rewritten ddns provider handling to only show/check needed options "domain", "username", etc. - modified version check/handling incl. using new ipkg.compare_versions function - modified map.title and map.description generation - changed XHR.poll interval to 15 seconds on system status page - using new value_parse function for testing and later implementation into cbi.lua - some optimizations Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua')
-rw-r--r--applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua18
1 files changed, 5 insertions, 13 deletions
diff --git a/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua b/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua
index 2a65fd04fa..031bf513cf 100644
--- a/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua
+++ b/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua
@@ -1,9 +1,9 @@
-- Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
-- Licensed to the public under the Apache License 2.0.
-local CTRL = require "luci.controller.ddns" -- this application's controller
local DISP = require "luci.dispatcher"
local SYS = require "luci.sys"
+local CTRL = require "luci.controller.ddns" -- this application's controller
local DDNS = require "luci.tools.ddns" -- ddns multiused functions
-- check supported options -- ##################################################
@@ -11,8 +11,6 @@ local DDNS = require "luci.tools.ddns" -- ddns multiused functions
has_ssl = DDNS.check_ssl() -- HTTPS support and --bind-network / --interface
has_proxy = DDNS.check_proxy() -- Proxy support
has_dnstcp = DDNS.check_bind_host() -- DNS TCP support
--- correct ddns-scripts version
-need_update = DDNS.ipkg_ver_compare(DDNS.ipkg_ver_installed("ddns-scripts"), "<<", CTRL.DDNS_MIN)
-- html constants
font_red = [[<font color="red">]]
@@ -22,15 +20,9 @@ bold_off = [[</strong>]]
-- cbi-map definition -- #######################################################
m = Map("ddns")
-
-m.title = [[<a href="]] .. DISP.build_url("admin", "services", "ddns") .. [[">]] ..
- translate("Dynamic DNS") .. [[</a>]]
-
-m.description = translate("Dynamic DNS allows that your router can be reached with " ..
- "a fixed hostname while having a dynamically changing " ..
- "IP address.")
-
-m.redirect = DISP.build_url("admin", "services", "ddns")
+m.title = CTRL.app_title_back()
+m.description = CTRL.app_description()
+m.redirect = DISP.build_url("admin", "services", "ddns")
-- SimpleSection definition -- #################################################
-- show Hints to optimize installation and script usage
@@ -39,7 +31,7 @@ s = m:section( SimpleSection,
translate("Below a list of configuration tips for your system to run Dynamic DNS updates without limitations") )
-- ddns_scripts needs to be updated for full functionality
-if need_update then
+if not CTRL.service_ok() then
local dv = s:option(DummyValue, "_update_needed")
dv.titleref = DISP.build_url("admin", "system", "packages")
dv.rawhtml = true