mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 12:06:53 -06:00
Enabled export templates for virtual chassis
This commit is contained in:
parent
85efdf8e00
commit
67dbe02deb
@ -2267,6 +2267,7 @@ class VirtualChassis(ChangeLoggedModel):
|
|||||||
tags = TaggableManager()
|
tags = TaggableManager()
|
||||||
|
|
||||||
serializer = 'dcim.api.serializers.VirtualChassisSerializer'
|
serializer = 'dcim.api.serializers.VirtualChassisSerializer'
|
||||||
|
csv_headers = ['master', 'domain']
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ['master']
|
ordering = ['master']
|
||||||
@ -2286,3 +2287,9 @@ class VirtualChassis(ChangeLoggedModel):
|
|||||||
raise ValidationError({
|
raise ValidationError({
|
||||||
'master': "The selected master is not assigned to this virtual chassis."
|
'master': "The selected master is not assigned to this virtual chassis."
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def to_csv(self):
|
||||||
|
return (
|
||||||
|
self.master,
|
||||||
|
self.domain,
|
||||||
|
)
|
||||||
|
@ -50,7 +50,7 @@ GRAPH_TYPE_CHOICES = (
|
|||||||
EXPORTTEMPLATE_MODELS = [
|
EXPORTTEMPLATE_MODELS = [
|
||||||
'provider', 'circuit', # Circuits
|
'provider', 'circuit', # Circuits
|
||||||
'site', 'region', 'rack', 'rackgroup', 'manufacturer', 'devicetype', 'device', # DCIM
|
'site', 'region', 'rack', 'rackgroup', 'manufacturer', 'devicetype', 'device', # DCIM
|
||||||
'consoleport', 'powerport', 'interfaceconnection', # DCIM
|
'consoleport', 'powerport', 'interfaceconnection', 'virtualchassis', # DCIM
|
||||||
'aggregate', 'prefix', 'ipaddress', 'vlan', 'vrf', # IPAM
|
'aggregate', 'prefix', 'ipaddress', 'vlan', 'vrf', # IPAM
|
||||||
'tenant', # Tenancy
|
'tenant', # Tenancy
|
||||||
'cluster', 'virtualmachine', # Virtualization
|
'cluster', 'virtualmachine', # Virtualization
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
{% extends '_base.html' %}
|
{% extends '_base.html' %}
|
||||||
|
{% load buttons %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="pull-right">
|
||||||
|
{% export_button content_type %}
|
||||||
|
</div>
|
||||||
<h1>{% block title %}Virtual Chassis{% endblock %}</h1>
|
<h1>{% block title %}Virtual Chassis{% endblock %}</h1>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
|
Loading…
Reference in New Issue
Block a user