mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
Add descriptions for plugin names (#15643)
* Add descriptions for plugin names * Update serializers to display plugin and plugin description * Add function to extract plugin name descriptions * Add description for scm * Conditionalize scm and file descriptions
This commit is contained in:
@@ -2325,8 +2325,11 @@ class InventorySourceOptionsSerializer(BaseSerializer):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
if 'source' in self.fields:
|
||||
self.fields['source'].choices = load_combined_inventory_source_options()
|
||||
source_options = load_combined_inventory_source_options()
|
||||
|
||||
self.fields['source'].choices = [(plugin, description) for plugin, description in source_options.items()]
|
||||
|
||||
def get_related(self, obj):
|
||||
res = super(InventorySourceOptionsSerializer, self).get_related(obj)
|
||||
|
||||
Reference in New Issue
Block a user