6 class, type, name and id are used to build a reference for the uci config. E.g.
8 config http_headers '0aef1fa8f9a045bdaf51a35ce99eb5c5'
14 return baseclass.extend({
17 class_i18n: _('HTTP'),
20 type_i18n: _('Headers'),
22 name: 'X-Foobar', // to make visual ID in UCI config easy
23 id: '0aef1fa8f9a045bdaf51a35ce99eb5c5', // cat /proc/sys/kernel/random/uuid | tr -d -
24 title: _('X-Foobar Example Plugin'),
25 description: _('This plugin sets an X-Foobar HTTP header.'),
30 o = s.option(form.Flag, 'enabled', _('Enabled'));
32 o = s.option(form.Value, 'foo', _('Foo'));
34 o.depends('enabled', '1');
36 o = s.option(form.Value, 'bar', _('Bar'));
38 o.depends('enabled', '1');
41 configSummary(section) {
42 return _('I am class %s, type %s, name %s, bar: %d').format(this.class_i18n, this.type_i18n, this.name, section.bar || 1000);