-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
14728 Move installed plugins list from admin UI to NetBox UI (#14768)
* 14728 move plugins view from admin * 14728 move plugins view from admin * 14728 remove plugins view from admin * Update template for #12128 * 14728 review fixes * 14728 review fixes * 14728 review fixes * 14728 review fixes * 14728 configure table * Clean up table columns * Fix app config lookup for plugins referenced by dotted path * Move template; fix table display * Fix user table configuration * Remove nonfunctional quick search * Limit PluginListView to staff users --------- Co-authored-by: Jeremy Stretch <[email protected]>
- Loading branch information
1 parent
073c2dc
commit ef5e10d
Showing
11 changed files
with
118 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .config import * | ||
from .data import * | ||
from .jobs import * | ||
from .plugins import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import django_tables2 as tables | ||
from django.utils.translation import gettext_lazy as _ | ||
from netbox.tables import BaseTable | ||
|
||
__all__ = ( | ||
'PluginTable', | ||
) | ||
|
||
|
||
class PluginTable(BaseTable): | ||
name = tables.Column( | ||
accessor=tables.A('verbose_name'), | ||
verbose_name=_('Name') | ||
) | ||
version = tables.Column( | ||
verbose_name=_('Version') | ||
) | ||
package = tables.Column( | ||
accessor=tables.A('name'), | ||
verbose_name=_('Package') | ||
) | ||
author = tables.Column( | ||
verbose_name=_('Author') | ||
) | ||
author_email = tables.Column( | ||
verbose_name=_('Author Email') | ||
) | ||
description = tables.Column( | ||
verbose_name=_('Description') | ||
) | ||
|
||
class Meta(BaseTable.Meta): | ||
empty_text = _('No plugins found') | ||
fields = ( | ||
'name', 'version', 'package', 'author', 'author_email', 'description', | ||
) | ||
default_columns = ( | ||
'name', 'version', 'package', 'author', 'author_email', 'description', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{% extends 'generic/_base.html' %} | ||
{% load buttons %} | ||
{% load helpers %} | ||
{% load i18n %} | ||
{% load render_table from django_tables2 %} | ||
|
||
{% block title %}{% trans "Plugins" %}{% endblock %} | ||
|
||
{% block tabs %} | ||
<ul class="nav nav-tabs px-3"> | ||
<li class="nav-item" role="presentation"> | ||
<a class="nav-link active" role="tab">{% trans "Plugins" %}</a> | ||
</li> | ||
</ul> | ||
{% endblock tabs %} | ||
|
||
{% block content %} | ||
<div class="row mb-3"> | ||
<div class="col-auto ms-auto d-print-none"> | ||
{# Table configuration button #} | ||
<div class="table-configure input-group"> | ||
<button type="button" data-bs-toggle="modal" title="{% trans "Configure Table" %}" data-bs-target="#ObjectTable_config" class="btn"> | ||
<i class="mdi mdi-cog"></i> {% trans "Configure Table" %} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="card"> | ||
{% render_table table %} | ||
</div> | ||
{% endblock content %} | ||
|
||
{% block modals %} | ||
{% table_config_form table table_name="ObjectTable" %} | ||
{% endblock modals %} |
This file was deleted.
Oops, something went wrong.