Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit f505a84f authored by Digital Factory's avatar Digital Factory
Browse files

NTT Digital factory version v0.5.0 export

parent 20ee9690
Branches
1 merge request!3NTT Digital factory version v0.5.0 export
Pipeline #63508 passed
This diff is collapsed.
......@@ -3,7 +3,7 @@ from setuptools import find_packages, setup
setup(
name='netbox-rps-plugin',
version='0.1.0',
description='An example NetBox plugin',
description='A Netbox plugin to add RPS resources',
install_requires=[],
packages=find_packages('./src'),
include_package_data=True,
......
......@@ -19,7 +19,8 @@ mapping_butons = [
mappingItem = PluginMenuItem(
link='plugins:netbox_rps_plugin:mapping_list',
link_text='Mappings',
buttons=mapping_butons
buttons=mapping_butons,
permissions=['netbox_rps_plugin.view_mapping'],
),
menu = (
......
......@@ -6,6 +6,7 @@ from .models import Mapping
class MappingTable(NetBoxTable):
authentication = ChoiceFieldColumn()
source = tables.Column(linkify=True)
class Meta(NetBoxTable.Meta):
model = Mapping
......
......@@ -13,7 +13,13 @@
</tr>
<tr>
<th scope="row">Comment</th>
<td>{{ object.Comment|placeholder }}</td>
<td>
{% if object.Comment %}
{{ object.Comment }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
</table>
</div>
......@@ -27,41 +33,35 @@
<div class="card-body">
<table class="table table-hover attr-table">
<tr>
<th scope="row">Protocol</th>
<td>{{ object.get_protocol_display }}</td>
<th scope="row">Source</th>
<td>{{ object.source }}</td>
</tr>
<tr>
<th scope="row">Source Prefix</th>
<td>
{% if object.source_prefix %}
<a href="{{ object.source_prefix.get_absolute_url }}">{{ object.source_prefix }}</a>
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
<th scope="row">Target</th>
<td>{{ object.target }}</td>
</tr>
<tr>
<th scope="row">Authentication</th>
<td>{{ object.authentication }}</td>
</tr>
<tr>
<th scope="row">Testing page</th>
<td>{{ object.testingpage }}</td>
</tr>
<tr>
<th scope="row">Source Ports</th>
<td>{{ object.source_ports|join:", "|placeholder }}</td>
<th scope="row">Webdav</th>
<td>{{ object.webdav }}</td>
</tr>
<tr>
<th scope="row">Destination Prefix</th>
<th scope="row">Comment</th>
<td>
{% if object.destination_prefix %}
<a href="{{ object.destination_prefix.get_absolute_url }}">{{ object.destination_prefix }}</a>
{% if object.Comment %}
{{ object.Comment }}
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Destination Ports</th>
<td>{{ object.destination_ports|join:", "|placeholder }}</td>
</tr>
<tr>
<th scope="row">Action</th>
<td>{{ object.get_action_display }}</td>
</tr>
</table>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment