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
|
'use strict';
'require baseclass';
'require form';
'require tools.widgets as widgets';
return baseclass.extend({
title: _('Unixsock Plugin Configuration'),
description: _('The unixsock plugin creates a unix socket which can be used to read collected data from a running collectd instance.'),
addFormOptions(s) {
let o;
o = s.option(form.Flag, 'enable', _('Enable this plugin'));
o = s.option(form.Value, 'SocketFile', _('Socket path'));
o.default = '/var/run/collectd/query.sock';
o.depends('enable', '1');
o = s.option(widgets.GroupSelect, 'SocketGroup', _('Socket group'), _('Change the ownership of the socket file to the specified group.'));
o.placeholder = 'nogroup';
o.optional = true;
o.rmempty = true;
o.depends('enable', '1');
o = s.option(form.Value, 'SocketPerms', _('Socket permissions'));
o.placeholder = '0770';
o.optional = true;
o.rmempty = true;
o.depends('enable', '1');
},
configSummary(section) {
if (section.SocketFile)
return _('Socket %s active').format(section.SocketFile);
}
});
|