{% extends 'generic/object.html' %} {% load ninja_tags %} {% load static %} {% block content %} {% if 0 %}
Ninja Template
Name {{ object.name }}
Output type {% badge object.output_type bg_color=object.get_output_type_color %}
{% include 'inc/panels/tags.html' %}
Object Types
{% for object_type in object.object_types.all %} {% empty %} {% endfor %}
{{ object_type }}
No object types assigned
Object Type Filters
{% for object_type in object.object_type_filters.all %} {% empty %} {% endfor %}
{{ object_type }}
No object type filters assigned
String Filters
{% for string_filter in object.string_filters.all %} {% empty %} {% endfor %}
{{ string_filter }}
No string filters assigned
{% if not object.object_types.all.count %}
Rendered {% include "netbox_ninja_plugin/_ninja_template_filters_button.html" with ninja_template=ninja_template_card %}
{% include "netbox_ninja_plugin/_ninja_template_filters_collapse.html" with ninja_template=ninja_template_card reset_action_url=object.get_absolute_url %} {% if object.output_type == 'drawio' %}
{% else %}
{% render_object object target_object=object filters=ninja_template_card.filter_values %}
{% endif %}
View in API.
{% with ninja_templates=ninja_template_card|as_list %} {% if object.output_type == 'drawio' %} {% include "netbox_ninja_plugin/_drawio_script.html" with return_url_base=object.get_absolute_url %} {% endif %} {% endwith %} {% else %}
Rendered
See target objects to view rendered template when object types are set.
{% endif %}
Code
{{ object.code }}
{% endif %}
{% if not object.object_types.all.count %}
Rendered
Output: {% badge object.output_type bg_color=object.get_output_type_color %} API {% include "netbox_ninja_plugin/_ninja_template_filters_button.html" with ninja_template=ninja_template_card %}
{% include "netbox_ninja_plugin/_ninja_template_filters_collapse.html" with ninja_template=ninja_template_card reset_action_url=object.get_absolute_url %} {% if object.output_type == 'drawio' %}
{% else %}
{% render_object object target_object=object filters=ninja_template_card.filter_values %}
{% endif %}
{% with ninja_templates=ninja_template_card|as_list %} {% if object.output_type == 'drawio' %} {% include "netbox_ninja_plugin/_drawio_script.html" with return_url_base=object.get_absolute_url %} {% endif %} {% endwith %} {% else %}
Rendered
Output: {% badge object.output_type bg_color=object.get_output_type_color %} API
See target objects to view rendered template when object types are set.
{% endif %}
Code
{{ object.code }}
{% include 'inc/panels/tags.html' %}
Object Types
{% for object_type in object.object_types.all %} {% empty %} {% endfor %}
{{ object_type }}
No object types assigned
Object Type Filters
{% for object_type in object.object_type_filters.all %} {% empty %} {% endfor %}
{{ object_type }}
No object type filters assigned
String Filters
{% for string_filter in object.string_filters.all %} {% empty %} {% endfor %}
{{ string_filter }}
No string filters assigned
{% endblock %}