{
    "i18n": true,
    "type": "tabs",
    "items": {
        "tabSettings": {
            "type": "panel",
            "label": "Settings",
            "items": {
                "_headerScan": {
                    "type": "header",
                    "size": 2,
                    "text": "Scan"
                },
                "startBrowse": {
                    "newLine": true,
                    "type": "sendTo",
                    "command": "startBrowse",
                    "jsonData": "{ \"methods\": ${JSON.stringify(data.autoDetectMethods || [])} }",
                    "useNative": false,
                    "variant": "contained",
                    "showProcess": true,
                    "label": "Start a scan now",
                    "help": "Runs the methods selected below. The scan keeps going after this dialog is closed.",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "scanRunning": {
                    "newLine": true,
                    "type": "state",
                    "oid": "scanRunning",
                    "control": "text",
                    "addColon": true,
                    "label": "Scan running",
                    "falseText": "not running",
                    "falseTextStyle": {
                        "color": "grey"
                    },
                    "trueText": "running",
                    "trueTextStyle": {
                        "color": "green"
                    },
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 2
                },
                "devicesProgress": {
                    "newLine": true,
                    "type": "state",
                    "oid": "devicesProgress",
                    "control": "text",
                    "unit": "%",
                    "addColon": true,
                    "label": "Searching devices",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 6,
                    "xl": 6
                },
                "servicesProgress": {
                    "newLine": true,
                    "type": "state",
                    "oid": "servicesProgress",
                    "control": "text",
                    "unit": "%",
                    "addColon": true,
                    "label": "Testing devices",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 6,
                    "xl": 6
                },
                "devicesFound": {
                    "newLine": true,
                    "type": "state",
                    "oid": "devicesFound",
                    "control": "text",
                    "addColon": true,
                    "label": "Devices found",
                    "xs": 12,
                    "sm": 6,
                    "md": 3,
                    "lg": 2,
                    "xl": 2
                },
                "instancesFound": {
                    "type": "state",
                    "oid": "instancesFound",
                    "control": "text",
                    "addColon": true,
                    "label": "Adapters proposed",
                    "xs": 12,
                    "sm": 6,
                    "md": 3,
                    "lg": 2,
                    "xl": 2
                },
                "_headerAuto": {
                    "newLine": true,
                    "type": "header",
                    "size": 2,
                    "text": "Scheduled scan"
                },
                "autoDetect": {
                    "newLine": true,
                    "type": "checkbox",
                    "label": "Run a scan on a timer",
                    "help": "Without this the adapter only scans when it is asked to.",
                    "default": true,
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "autoDetectInterval": {
                    "newLine": true,
                    "type": "number",
                    "min": 5,
                    "max": 10080,
                    "default": 60,
                    "disabled": "!data.autoDetect",
                    "label": "Minutes between two scans",
                    "help": "A scan puts load on the network, five minutes is the shortest interval accepted.",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "autoDetectMethods": {
                    "newLine": true,
                    "type": "selectSendTo",
                    "command": "getMethodList",
                    "multiple": true,
                    "default": [
                        "mdns",
                        "ping",
                        "udp",
                        "upnp"
                    ],
                    "label": "Methods to run",
                    "help": "Used by the scheduled scan and by the button above. Nothing selected falls back to mdns, ping, udp and upnp: serial opens every serial port of this host, tr064 and SMA Speedwire only have something to say where such a device lives.",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 8,
                    "xl": 8
                },
                "_headerPing": {
                    "newLine": true,
                    "type": "header",
                    "size": 2,
                    "text": "Ping"
                },
                "pingTimeout": {
                    "newLine": true,
                    "type": "number",
                    "min": 100,
                    "max": 10000,
                    "default": 1000,
                    "label": "Timeout of a single ping (ms)",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "pingBlock": {
                    "type": "number",
                    "min": 1,
                    "max": 255,
                    "default": 20,
                    "label": "Addresses pinged at once",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "pingOwnIP": {
                    "newLine": true,
                    "type": "text",
                    "label": "Scan only this local address",
                    "help": "Empty means every interface of this host.",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "pingOwnNetmask": {
                    "type": "text",
                    "label": "Netmask for that address",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "pingFallbackTcp": {
                    "newLine": true,
                    "type": "checkbox",
                    "default": true,
                    "label": "Scan with TCP when ping is not permitted",
                    "help": "An unprivileged LXC container may not send ICMP packets. Instead of finding nothing, the scan then tries to connect to the ports below.",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "pingFallbackPorts": {
                    "type": "text",
                    "default": "80,443,22,8080,8443,1883",
                    "disabled": "!data.pingFallbackTcp",
                    "label": "Ports of the TCP scan",
                    "help": "A device that refuses the connection is found as well, so a closed port is not a wasted probe. Every port lengthens the scan.",
                    "xs": 12,
                    "sm": 12,
                    "md": 6,
                    "lg": 4,
                    "xl": 4
                },
                "_headerGeneral": {
                    "newLine": true,
                    "type": "header",
                    "size": 2,
                    "text": "Proposals"
                },
                "onlyLocal": {
                    "newLine": true,
                    "type": "checkbox",
                    "label": "Propose only adapters that are installed here",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 8,
                    "xl": 8
                }
            }
        },
        "tabDevices": {
            "type": "panel",
            "label": "Devices",
            "items": {
                "_devicesHint": {
                    "type": "staticText",
                    "text": "What the last scan found. The same information is in the object tree below discovery.0.devices.",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                },
                "foundDevices": {
                    "newLine": true,
                    "type": "custom",
                    "url": "custom/customComponents.js",
                    "name": "ConfigCustomDiscoverySet/Components/DiscoveryDevicesComponent",
                    "i18n": true,
                    "guiApi": 2,
                    "bundlerType": "module",
                    "xs": 12,
                    "sm": 12,
                    "md": 12,
                    "lg": 12,
                    "xl": 12
                }
            }
        }
    }
}
