custom fields on devices and ports in the web from config (#945)
* custom device field web display and edit * make display work; relies on T::T calling dict slot or method with same syntax * add storing port custom fields * use resultset method instead, use cf_ prefix * update Pg min ver for jsonb * allow override of position and default for port custom fields * support hidden for custom fields * update description of Objects API class * allow left and mid position for custom fields * add custom fields in csv * change port control sidebar label * fix default missing bug on backend jobs
This commit is contained in:
@@ -24,7 +24,7 @@ ajax '/ajax/portcontrol' => require_any_role [qw(admin port_control)] => sub {
|
||||
'c_power' => 'power',
|
||||
);
|
||||
|
||||
my $action = $action_map{ param('field') };
|
||||
my $action = ($action_map{ param('field') } || param('field') || '');
|
||||
my $subaction = ($action =~ m/^(?:power|portcontrol)/
|
||||
? (param('action') ."-other")
|
||||
: param('value'));
|
||||
@@ -34,6 +34,7 @@ ajax '/ajax/portcontrol' => require_any_role [qw(admin port_control)] => sub {
|
||||
my $act = "$action $subaction";
|
||||
$act =~ s/-other$//;
|
||||
$act =~ s/^portcontrol/port/;
|
||||
$act =~ s/^device_port_custom_field_/custom_field: /;
|
||||
|
||||
schema(vars->{'tenant'})->resultset('DevicePortLog')->create({
|
||||
ip => param('device'),
|
||||
|
||||
Reference in New Issue
Block a user