Rework LuCI build system
[project/luci.git] / applications / luci-app-diag-devinfo / luasrc / model / cbi / luci_diag / smap_devinfo_config.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 (c) 2009 Daniel Dickinson
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14
15 require("luci.controller.luci_diag.devinfo_common")
16
17 m = Map("luci_devinfo", translate("SIP Device Scanning Configuration"), translate("Configure scanning for supported SIP devices on specified networks. Decreasing \'Timeout\', \'Repeat Count\', and/or \'Sleep Between Requests\' may speed up scans, but also may fail to find some devices."))
18
19 s = m:section(SimpleSection, "", translate("Use Configuration"))
20 b = s:option(DummyValue, "_scans", translate("Perform Scans (this can take a few minutes)"))
21 b.value = ""
22 b.titleref = luci.dispatcher.build_url("admin", "status", "smap_devinfo")
23
24 scannet = m:section(TypedSection, "smap_scannet", translate("Scanning Configuration"), translate("Networks to scan for supported devices"))
25 scannet.addremove = true
26 scannet.anonymous = false
27
28 local ports
29 ports = scannet:option(Value, "ports", translate("Ports"))
30 ports.optional = true
31 ports.rmempty = true
32
33 luci.controller.luci_diag.devinfo_common.config_devinfo_scan(m, scannet)
34
35 return m