1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

added admin and api views for listing all plugins, and refactored urls import

This commit is contained in:
John Anderson
2020-03-20 20:10:02 -04:00
parent e220c38b97
commit 4e84e8048f
10 changed files with 242 additions and 39 deletions

View File

@@ -0,0 +1,6 @@
{% extends "django_rq/index.html" %}
{% block sidebar %}
{{ block.super }}
{% include 'extras/admin/plugins_index.html' %}
{% endblock %}

View File

@@ -0,0 +1,14 @@
<div id="django-rq">
<div class="module">
<table>
<caption>Plugins</caption>
<tbody>
<tr>
<th>
<a href = "{% url 'plugins_list' %}">Installed plugins</a>
</th>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,60 @@
{% extends "admin/base_site.html" %}
{% block title %}Installed Plugins {{ block.super }}{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">Home</a> &rsaquo;
<a href="{% url 'plugins_list' %}">Installed Plugins</a>
</div>
{% endblock %}
{% block content_title %}<h1>Installed Plugins{{ queue.name }}</h1>{% endblock %}
{% block content %}
<div id="content-main">
<div class="module" id="changelist">
<div class="results">
<table id="result_list">
<thead>
<tr>
<th><div class = 'text'><span>Name</span></div></th>
<th><div class = 'text'><span>Package Name</span></div></th>
<th><div class = 'text'><span>Author</span></div></th>
<th><div class = 'text'><span>Author Email</span></div></th>
<th><div class = 'text'><span>Description</span></div></th>
<th><div class = 'text'><span>Version</span></div></th>
</tr>
</thead>
<tbody>
{% for plugin in plugins %}
<tr class = "{% cycle 'row1' 'row2' %}">
<td>
{{ plugin.verbose_name }}
</td>
<td>
{{ plugin.name }}
</td>
<td>
{{ plugin.author }}
</td>
<td>
{{ plugin.author_email }}
</td>
<td>
{{ plugin.description }}
</td>
<td>
{{ plugin.version }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}