-
Notifications
You must be signed in to change notification settings - Fork 8
/
config.js
53 lines (50 loc) · 1.07 KB
/
config.js
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
45
46
47
48
49
50
51
52
53
import { Regex } from '@companion-module/base'
// Return config fields for web config
export function getConfigFields() {
let cf = [
{
type: 'textinput',
id: 'host',
label: 'Target IP',
tooltip: 'The IP of the MR / XR console',
width: 6,
default: '0.0.0.0',
regex: Regex.IP,
},
{
type: 'checkbox',
id: 'scan',
label: 'Scan network for XAir mixers?',
default: true,
width: 12,
},
{
type: 'dropdown',
id: 'model',
label: 'Select Model',
tooltip: 'This model is assumed when mixer is offline',
width: 6,
default: 'X18',
choices: this.MIXER_CHOICES,
},
]
let ch = []
if (Object.keys(this.unitsFound || {}).length == 0) {
ch = [{ id: 'none', label: 'No XAir units located' }]
} else {
let unit = this.unitsFound
for (let u in unit) {
ch.push({ id: unit[u].m_name, label: `${unit[u].m_name} (${unit[u].m_ip})` })
}
}
cf.push({
type: 'dropdown',
id: 'mixer',
label: 'Select Mixer by Name',
tooltip: 'Name and IP of mixers on the network',
width: 12,
default: ch[0].id,
choices: ch,
})
return cf
}