mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Tweaked Aggregate get_utilization for table display
This commit is contained in:
parent
41af9c8900
commit
084b86cab1
@ -14,7 +14,7 @@ RIR_ACTIONS = """
|
|||||||
|
|
||||||
UTILIZATION_GRAPH = """
|
UTILIZATION_GRAPH = """
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% utilization_graph record.get_utilization %}
|
{% utilization_graph value %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ROLE_ACTIONS = """
|
ROLE_ACTIONS = """
|
||||||
@ -125,13 +125,13 @@ class AggregateTable(BaseTable):
|
|||||||
prefix = tables.LinkColumn('ipam:aggregate', args=[Accessor('pk')], verbose_name='Aggregate')
|
prefix = tables.LinkColumn('ipam:aggregate', args=[Accessor('pk')], verbose_name='Aggregate')
|
||||||
rir = tables.Column(verbose_name='RIR')
|
rir = tables.Column(verbose_name='RIR')
|
||||||
child_count = tables.Column(verbose_name='Prefixes')
|
child_count = tables.Column(verbose_name='Prefixes')
|
||||||
utilization = tables.TemplateColumn(UTILIZATION_GRAPH, orderable=False, verbose_name='Utilization')
|
get_utilization = tables.TemplateColumn(UTILIZATION_GRAPH, orderable=False, verbose_name='Utilization')
|
||||||
date_added = tables.DateColumn(format="Y-m-d", verbose_name='Added')
|
date_added = tables.DateColumn(format="Y-m-d", verbose_name='Added')
|
||||||
description = tables.Column(orderable=False, verbose_name='Description')
|
description = tables.Column(orderable=False, verbose_name='Description')
|
||||||
|
|
||||||
class Meta(BaseTable.Meta):
|
class Meta(BaseTable.Meta):
|
||||||
model = Aggregate
|
model = Aggregate
|
||||||
fields = ('pk', 'prefix', 'rir', 'child_count', 'utilization', 'date_added', 'description')
|
fields = ('pk', 'prefix', 'rir', 'child_count', 'get_utilization', 'date_added', 'description')
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user