mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* WIP * Add config_template field to Device * Pre-fetch referenced templates * Correct up_to_date callable * Add config_template FK to Device * Update & merge migrations * Add config_template FK to Platform * Add tagging support for ConfigTemplate * Catch exceptions when rendering device templates in UI * Refactor ConfigTemplate.render() * Add support for returning plain text content * Add ConfigTemplate model documentation * Add feature documentation for config rendering
37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
import graphene
|
|
|
|
from netbox.graphql.fields import ObjectField, ObjectListField
|
|
from .types import *
|
|
|
|
|
|
class ExtrasQuery(graphene.ObjectType):
|
|
config_context = ObjectField(ConfigContextType)
|
|
config_context_list = ObjectListField(ConfigContextType)
|
|
|
|
config_template = ObjectField(ConfigTemplateType)
|
|
config_template_list = ObjectListField(ConfigTemplateType)
|
|
|
|
custom_field = ObjectField(CustomFieldType)
|
|
custom_field_list = ObjectListField(CustomFieldType)
|
|
|
|
custom_link = ObjectField(CustomLinkType)
|
|
custom_link_list = ObjectListField(CustomLinkType)
|
|
|
|
export_template = ObjectField(ExportTemplateType)
|
|
export_template_list = ObjectListField(ExportTemplateType)
|
|
|
|
image_attachment = ObjectField(ImageAttachmentType)
|
|
image_attachment_list = ObjectListField(ImageAttachmentType)
|
|
|
|
saved_filter = ObjectField(SavedFilterType)
|
|
saved_filter_list = ObjectListField(SavedFilterType)
|
|
|
|
journal_entry = ObjectField(JournalEntryType)
|
|
journal_entry_list = ObjectListField(JournalEntryType)
|
|
|
|
tag = ObjectField(TagType)
|
|
tag_list = ObjectListField(TagType)
|
|
|
|
webhook = ObjectField(WebhookType)
|
|
webhook_list = ObjectListField(WebhookType)
|