show port error disable state in device ports view

This commit is contained in:
Oliver Gorwits
2018-02-22 07:27:11 +00:00
parent 5584865052
commit b69ad22a52
5 changed files with 42 additions and 5 deletions

View File

@@ -104,6 +104,32 @@ sub only_free_ports {
);
}
=head2 with_properties
This is a modifier for any C<search()> which
will add the following additional synthesized columns to the result set:
=over 4
=item error_disable_cause
=back
=cut
sub with_properties {
my ($rs, $cond, $attrs) = @_;
return $rs
->search_rs($cond, $attrs)
->search({},
{
'+select' => ['properties.error_disable_cause'],
'+as' => ['properties_error_disable_cause'],
join => 'properties',
});
}
=head2 with_vlan_count
This is a modifier for any C<search()> (including the helpers below) which