summaryrefslogtreecommitdiff
path: root/config.js
blob: 814371ecd34a7a8d7ae22602ee43bde238988398 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
config = {
  device: "Device Name",
  swVersion: "1.0",
  hwVersion: "1.0",
  sections: {
    network: {
      title: "Network",
      fields: [
        {
          id: "macaddr",
          type: "mac",
          title: "MAC address",
          pattern: "[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}",
          invalidmsg: "Enter MAC address. E.g. 00:11:22:33:44:55",
          required: true,
        },
        {
          id: "ipaddr",
          type: "ip",
          title: "IP address",
          pattern: "\\d+.\\d+.\\d+.\\d+",
          hint: "192.168.4.2",
          invalidmsg: "Enter IP address. E.g. 192.168.4.2",
          required: true,
        },
        {
          id: "netmask",
          type: "netmask",
          title: "Netmask",
          pattern: "\\d+.\\d+.\\d+.\\d+",
          hint: "255.255.255.0",
          invalidmsg: "Enter network mask. E.g. 255.255.255.0",
          required: true,
        },
        {
          id: "gateway",
          type: "ip",
          title: "Gateway",
          pattern: "\\d+.\\d+.\\d+.\\d+",
        },
      ],
    },
  },
}