Parcourir la source

Allow editing of platform RPC client

Jeremy Stretch il y a 8 ans
Parent
commit
3e6a99fc22
2 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 1 1
      netbox/dcim/forms.py
  2. 2 1
      netbox/dcim/tables.py

+ 1 - 1
netbox/dcim/forms.py

@@ -496,7 +496,7 @@ class PlatformForm(BootstrapMixin, forms.ModelForm):
 
     class Meta:
         model = Platform
-        fields = ['name', 'slug']
+        fields = ['name', 'slug', 'rpc_client']
 
 
 #

+ 2 - 1
netbox/dcim/tables.py

@@ -347,12 +347,13 @@ class PlatformTable(BaseTable):
     name = tables.LinkColumn(verbose_name='Name')
     device_count = tables.Column(verbose_name='Devices')
     slug = tables.Column(verbose_name='Slug')
+    rpc_client = tables.Column(accessor='get_rpc_client_display', orderable=False, verbose_name='RPC Client')
     actions = tables.TemplateColumn(template_code=PLATFORM_ACTIONS, attrs={'td': {'class': 'text-right'}},
                                     verbose_name='')
 
     class Meta(BaseTable.Meta):
         model = Platform
-        fields = ('pk', 'name', 'device_count', 'slug', 'actions')
+        fields = ('pk', 'name', 'device_count', 'slug', 'rpc_client', 'actions')
 
 
 #