4 'require tools.widgets as widgets';
6 return baseclass
.extend({
7 title
: _('Unixsock Plugin Configuration'),
8 description
: _('The unixsock plugin creates a unix socket which can be used to read collected data from a running collectd instance.'),
10 addFormOptions: function(s
) {
13 o
= s
.option(form
.Flag
, 'enable', _('Enable this plugin'));
15 o
= s
.option(form
.Value
, 'SocketFile', _('Socket path'));
16 o
.default = '/var/run/collect-query.socket';
17 o
.depends('enable', '1');
19 o
= s
.option(widgets
.GroupSelect
, 'SocketGroup', _('Socket group'), _('Change the ownership of the socket file to the specified group.'));
20 o
.placeholder
= 'nogroup';
23 o
.depends('enable', '1');
25 o
= s
.option(form
.Value
, 'SocketPerms', _('Socket permissions'));
26 o
.placeholder
= '0770';
29 o
.depends('enable', '1');
32 configSummary: function(section
) {
33 if (section
.SocketFile
)
34 return _('Socket %s active').format(section
.SocketFile
);