luci-app-mosdns: Customize the configuration edit page to add a reload mosdns button
This commit is contained in:
parent
5779f1413c
commit
d0bc3aa743
@ -88,6 +88,12 @@ adblock = s:option(Flag, "adblock", translate("Enable DNS ADblock"))
|
|||||||
adblock:depends( "configfile", "/etc/mosdns/config.yaml")
|
adblock:depends( "configfile", "/etc/mosdns/config.yaml")
|
||||||
adblock.default = false
|
adblock.default = false
|
||||||
|
|
||||||
|
reload_service = s:option( Button, "_reload", translate("Reload Service"), translate("Reload service to take effect of new configuration"))
|
||||||
|
reload_service.write = function()
|
||||||
|
luci.sys.exec("/etc/init.d/mosdns reload")
|
||||||
|
end
|
||||||
|
reload_service:depends( "configfile", "/etc/mosdns/config_custom.yaml")
|
||||||
|
|
||||||
config = s:option(TextValue, "manual-config")
|
config = s:option(TextValue, "manual-config")
|
||||||
config.description = translate("<font color=\"ff0000\"><strong>View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.</strong></font>")
|
config.description = translate("<font color=\"ff0000\"><strong>View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.</strong></font>")
|
||||||
config.template = "cbi/tvalue"
|
config.template = "cbi/tvalue"
|
||||||
|
@ -28,6 +28,12 @@ msgstr "将 Dnsmasq 域名解析请求转发到 MosDNS 服务器"
|
|||||||
msgid "Enable DNS ADblock"
|
msgid "Enable DNS ADblock"
|
||||||
msgstr "启用 DNS 广告过滤"
|
msgstr "启用 DNS 广告过滤"
|
||||||
|
|
||||||
|
msgid "Reload Service"
|
||||||
|
msgstr "重载服务"
|
||||||
|
|
||||||
|
msgid "Reload service to take effect of new configuration"
|
||||||
|
msgstr "重载 MosDNS 服务生效配置文件"
|
||||||
|
|
||||||
msgid "<font color=\"ff0000\"><strong>View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.</strong></font>"
|
msgid "<font color=\"ff0000\"><strong>View the Custom YAML Configuration file used by this MosDNS. You can edit it as you own need.</strong></font>"
|
||||||
msgstr "<font color=\"ff0000\"><strong>注意!此页的更改仅当配置文件为 “自定义” 时才会生效</strong></font>"
|
msgstr "<font color=\"ff0000\"><strong>注意!此页的更改仅当配置文件为 “自定义” 时才会生效</strong></font>"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user