1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Humanized Circuit speed display

This commit is contained in:
Jeremy Stretch
2016-06-20 15:58:18 -04:00
parent c456248e0c
commit ccc52348be
6 changed files with 34 additions and 9 deletions

View File

@ -62,12 +62,12 @@ class CircuitTable(tables.Table):
type = tables.Column(verbose_name='Type')
provider = tables.LinkColumn('circuits:provider', args=[Accessor('provider.slug')], verbose_name='Provider')
site = tables.LinkColumn('dcim:site', args=[Accessor('site.slug')], verbose_name='Site')
port_speed = tables.Column(verbose_name='Port Speed')
commit_rate = tables.Column(verbose_name='Commit (Mbps)')
port_speed_human = tables.Column(verbose_name='Port Speed')
commit_rate_human = tables.Column(verbose_name='Commit Rate')
class Meta:
model = Circuit
fields = ('pk', 'cid', 'type', 'provider', 'site', 'port_speed', 'commit_rate')
fields = ('pk', 'cid', 'type', 'provider', 'site', 'port_speed_human', 'commit_rate_human')
empty_text = "No circuits found."
attrs = {
'class': 'table table-hover',