Skip to content

Commit

Permalink
Fixes netbox-community#406: Corrected ordering of port_speed and comm…
Browse files Browse the repository at this point in the history
…it_rate in CircuitTable
  • Loading branch information
jeremystretch committed Aug 2, 2016
1 parent e09e542 commit 7d17baa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions netbox/circuits/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ class CircuitTable(BaseTable):
provider = tables.LinkColumn('circuits:provider', args=[Accessor('provider.slug')], verbose_name='Provider')
tenant = tables.LinkColumn('tenancy:tenant', args=[Accessor('tenant.slug')], verbose_name='Tenant')
site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')], verbose_name='Site')
port_speed_human = tables.Column(verbose_name='Port Speed')
commit_rate_human = tables.Column(verbose_name='Commit Rate')
port_speed = tables.Column(accessor=Accessor('port_speed_human'), order_by=Accessor('port_speed'),
verbose_name='Port Speed')
commit_rate = tables.Column(accessor=Accessor('commit_rate_human'), order_by=Accessor('commit_rate'),
verbose_name='Commit Rate')

class Meta(BaseTable.Meta):
model = Circuit
fields = ('pk', 'cid', 'type', 'provider', 'tenant', 'site', 'port_speed_human', 'commit_rate_human')
fields = ('pk', 'cid', 'type', 'provider', 'tenant', 'site', 'port_speed', 'commit_rate')

0 comments on commit 7d17baa

Please sign in to comment.