mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Added description to ConfigContext
This commit is contained in:
@@ -140,7 +140,9 @@ class ConfigContextSerializer(ValidatedModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = ConfigContext
|
||||
fields = ['name', 'weight', 'is_active', 'regions', 'sites', 'roles', 'platforms', 'tenants', 'data']
|
||||
fields = [
|
||||
'name', 'weight', 'description', 'is_active', 'regions', 'sites', 'roles', 'platforms', 'tenants', 'data',
|
||||
]
|
||||
|
||||
|
||||
#
|
||||
|
@@ -197,7 +197,9 @@ class ConfigContextForm(BootstrapMixin, forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = ConfigContext
|
||||
fields = ['name', 'weight', 'is_active', 'regions', 'sites', 'roles', 'platforms', 'tenants', 'data']
|
||||
fields = [
|
||||
'name', 'weight', 'description', 'is_active', 'regions', 'sites', 'roles', 'platforms', 'tenants', 'data',
|
||||
]
|
||||
|
||||
|
||||
#
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 2.0.6 on 2018-06-27 17:45
|
||||
# Generated by Django 2.0.6 on 2018-06-29 13:34
|
||||
|
||||
import django.contrib.postgres.fields.jsonb
|
||||
from django.db import migrations, models
|
||||
@@ -20,6 +20,7 @@ class Migration(migrations.Migration):
|
||||
('name', models.CharField(max_length=100, unique=True)),
|
||||
('weight', models.PositiveSmallIntegerField(default=1000)),
|
||||
('is_active', models.BooleanField(default=True)),
|
||||
('description', models.CharField(blank=True, max_length=100)),
|
||||
('data', django.contrib.postgres.fields.jsonb.JSONField()),
|
||||
('platforms', models.ManyToManyField(blank=True, related_name='_configcontext_platforms_+', to='dcim.Platform')),
|
||||
('regions', models.ManyToManyField(blank=True, related_name='_configcontext_regions_+', to='dcim.Region')),
|
@@ -646,6 +646,10 @@ class ConfigContext(models.Model):
|
||||
weight = models.PositiveSmallIntegerField(
|
||||
default=1000
|
||||
)
|
||||
description = models.CharField(
|
||||
max_length=100,
|
||||
blank=True
|
||||
)
|
||||
is_active = models.BooleanField(
|
||||
default=True,
|
||||
)
|
||||
|
@@ -70,7 +70,7 @@ class ConfigContextTable(BaseTable):
|
||||
|
||||
class Meta(BaseTable.Meta):
|
||||
model = ConfigContext
|
||||
fields = ('pk', 'name', 'weight', 'is_active')
|
||||
fields = ('pk', 'name', 'weight', 'is_active', 'description', 'actions')
|
||||
|
||||
|
||||
class ObjectChangeTable(BaseTable):
|
||||
|
Reference in New Issue
Block a user