mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 08:25:17 -06:00
9045 remove fields from forms and tables
This commit is contained in:
parent
827fa76d61
commit
d0b3930f9a
@ -20,10 +20,6 @@ __all__ = (
|
|||||||
|
|
||||||
|
|
||||||
class ProviderBulkEditForm(NetBoxModelBulkEditForm):
|
class ProviderBulkEditForm(NetBoxModelBulkEditForm):
|
||||||
asn = forms.IntegerField(
|
|
||||||
required=False,
|
|
||||||
label='ASN (legacy)'
|
|
||||||
)
|
|
||||||
asns = DynamicModelMultipleChoiceField(
|
asns = DynamicModelMultipleChoiceField(
|
||||||
queryset=ASN.objects.all(),
|
queryset=ASN.objects.all(),
|
||||||
label=_('ASNs'),
|
label=_('ASNs'),
|
||||||
@ -34,20 +30,6 @@ class ProviderBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
required=False,
|
required=False,
|
||||||
label='Account number'
|
label='Account number'
|
||||||
)
|
)
|
||||||
portal_url = forms.URLField(
|
|
||||||
required=False,
|
|
||||||
label='Portal'
|
|
||||||
)
|
|
||||||
noc_contact = forms.CharField(
|
|
||||||
required=False,
|
|
||||||
widget=SmallTextarea,
|
|
||||||
label='NOC contact'
|
|
||||||
)
|
|
||||||
admin_contact = forms.CharField(
|
|
||||||
required=False,
|
|
||||||
widget=SmallTextarea,
|
|
||||||
label='Admin contact'
|
|
||||||
)
|
|
||||||
comments = CommentField(
|
comments = CommentField(
|
||||||
widget=SmallTextarea,
|
widget=SmallTextarea,
|
||||||
label='Comments'
|
label='Comments'
|
||||||
@ -55,10 +37,10 @@ class ProviderBulkEditForm(NetBoxModelBulkEditForm):
|
|||||||
|
|
||||||
model = Provider
|
model = Provider
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, ('asn', 'asns', 'account', 'portal_url', 'noc_contact', 'admin_contact')),
|
(None, ('asns', 'account', )),
|
||||||
)
|
)
|
||||||
nullable_fields = (
|
nullable_fields = (
|
||||||
'asn', 'asns', 'account', 'portal_url', 'noc_contact', 'admin_contact', 'comments',
|
'asns', 'account', 'comments',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,10 +41,10 @@ class ProviderTable(NetBoxTable):
|
|||||||
class Meta(NetBoxTable.Meta):
|
class Meta(NetBoxTable.Meta):
|
||||||
model = Provider
|
model = Provider
|
||||||
fields = (
|
fields = (
|
||||||
'pk', 'id', 'name', 'asn', 'asns', 'account', 'portal_url', 'noc_contact', 'admin_contact', 'asn_count',
|
'pk', 'id', 'name', 'asns', 'account', 'asn_count',
|
||||||
'circuit_count', 'comments', 'contacts', 'tags', 'created', 'last_updated',
|
'circuit_count', 'comments', 'contacts', 'tags', 'created', 'last_updated',
|
||||||
)
|
)
|
||||||
default_columns = ('pk', 'name', 'asn', 'account', 'circuit_count')
|
default_columns = ('pk', 'name', 'account', 'circuit_count')
|
||||||
|
|
||||||
|
|
||||||
class ProviderNetworkTable(NetBoxTable):
|
class ProviderNetworkTable(NetBoxTable):
|
||||||
|
@ -19,17 +19,6 @@
|
|||||||
<h5 class="card-header">Provider</h5>
|
<h5 class="card-header">Provider</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table class="table table-hover attr-table">
|
<table class="table table-hover attr-table">
|
||||||
<tr>
|
|
||||||
<th scope="row">ASN</th>
|
|
||||||
<td>
|
|
||||||
{% if object.asn %}
|
|
||||||
<div class="float-end text-warning">
|
|
||||||
<i class="mdi mdi-alert" title="This field will be removed in a future release. Please migrate this data to ASN objects."></i>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{{ object.asn|placeholder }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">ASNs</th>
|
<th scope="row">ASNs</th>
|
||||||
<td>
|
<td>
|
||||||
@ -44,24 +33,6 @@
|
|||||||
<th scope="row">Account</th>
|
<th scope="row">Account</th>
|
||||||
<td>{{ object.account|placeholder }}</td>
|
<td>{{ object.account|placeholder }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<th scope="row">Customer Portal</th>
|
|
||||||
<td>
|
|
||||||
{% if object.portal_url %}
|
|
||||||
<a href="{{ object.portal_url }}">{{ object.portal_url }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ ''|placeholder }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">NOC Contact</th>
|
|
||||||
<td>{{ object.noc_contact|markdown|placeholder }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Admin Contact</th>
|
|
||||||
<td>{{ object.admin_contact|markdown|placeholder }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Circuits</th>
|
<th scope="row">Circuits</th>
|
||||||
<td>
|
<td>
|
||||||
|
Loading…
Reference in New Issue
Block a user