mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
- Introduces the Script model to represent individual Python classes within a ScriptModule file - Automatically migrates jobs & event rules --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
41 lines
1.5 KiB
HTML
41 lines
1.5 KiB
HTML
{% extends 'generic/object.html' %}
|
|
{% load helpers %}
|
|
{% load form_helpers %}
|
|
{% load log_levels %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{{ script }}{% endblock %}
|
|
|
|
{% block object_identifier %}
|
|
{{ script.full_name }}
|
|
{% endblock object_identifier %}
|
|
|
|
{% block breadcrumbs %}
|
|
<li class="breadcrumb-item"><a href="{% url 'extras:script_list' %}">{% trans "Scripts" %}</a></li>
|
|
<li class="breadcrumb-item"><a href="{% url 'extras:script_list' %}#module{{ script.module.pk }}">{{ script.module|bettertitle }}</a></li>
|
|
{% endblock breadcrumbs %}
|
|
|
|
{% block subtitle %}
|
|
<div class="text-secondary fs-5">
|
|
{{ script.Meta.description|markdown }}
|
|
</div>
|
|
{% endblock subtitle %}
|
|
|
|
{% block controls %}{% endblock %}
|
|
|
|
{% block tabs %}
|
|
<ul class="nav nav-tabs">
|
|
<li class="nav-item" role="presentation">
|
|
<a class="nav-link{% if not tab %} active{% endif %}{% if not script.is_executable %} disabled{% endif %}" href="{{ script.get_absolute_url }}">{% trans "Script" %}</a>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<a class="nav-link{% if tab == 'source' %} active{% endif %}{% if not script.is_executable %} disabled{% endif %}" href="{% url 'extras:script_source' script.id %}">{% trans "Source" %}</a>
|
|
</li>
|
|
<li class="nav-item" role="presentation">
|
|
<a class="nav-link{% if tab == 'jobs' %} active{% endif %}" href="{% url 'extras:script_jobs' script.id %}">
|
|
{% trans "Jobs" %} {% badge job_count %}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
{% endblock tabs %}
|