mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
Add variable data to admin.
This commit is contained in:
parent
3c90f91453
commit
932b1ed620
@ -165,7 +165,7 @@ class HostAdmin(BaseModelAdmin):
|
|||||||
list_filter = ('inventory', 'active')
|
list_filter = ('inventory', 'active')
|
||||||
#form = HostAdminForm
|
#form = HostAdminForm
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, {'fields': (('name', 'active'), 'inventory', 'description', #'vdata'
|
(None, {'fields': (('name', 'active'), 'inventory', 'description', 'variable_data',
|
||||||
)}),
|
)}),
|
||||||
(_('Tags'), {'fields': ('tags',)}),
|
(_('Tags'), {'fields': ('tags',)}),
|
||||||
(_('Audit Trail'), {'fields': ('creation_date', 'created_by', 'audit_trail',)}),
|
(_('Audit Trail'), {'fields': ('creation_date', 'created_by', 'audit_trail',)}),
|
||||||
|
@ -487,7 +487,7 @@ class VariableData(CommonModelNameNotUnique):
|
|||||||
|
|
||||||
#host = models.OneToOneField('Host', null=True, default=None, blank=True, on_delete=SET_NULL, related_name='variable_data')
|
#host = models.OneToOneField('Host', null=True, default=None, blank=True, on_delete=SET_NULL, related_name='variable_data')
|
||||||
#group = models.OneToOneField('Group', null=True, default=None, blank=True, on_delete=SET_NULL, related_name='variable_data')
|
#group = models.OneToOneField('Group', null=True, default=None, blank=True, on_delete=SET_NULL, related_name='variable_data')
|
||||||
data = models.TextField() # FIXME: JsonField
|
data = models.TextField() # FIXME: JsonField (and validation)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return '%s = %s' % (self.name, self.data)
|
return '%s = %s' % (self.name, self.data)
|
||||||
|
Loading…
Reference in New Issue
Block a user