pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pheus/netbox-aci-plugin/commit/11590fa74ec182b42ec79e91c32a1aa0ad1ffc8b

/> feat(templates): Add templates for ACINode · pheus/netbox-aci-plugin@11590fa · GitHub
Skip to content

Commit 11590fa

Browse files
committed
feat(templates): Add templates for ACINode
Introduces templates for ACINode-related views, including detailed pages, fabric-specific nodes, and pod-specific nodes. Enhances user interface for managing ACINodes within the plugin.
1 parent 92c34b7 commit 11590fa

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
{% extends 'generic/object.html' %}
3+
{% load render_table from django_tables2 %}
4+
{% load i18n %}
5+
6+
{% block breadcrumbs %}
7+
{{ block.super }}
8+
<li class="breadcrumb-item"><a href="{% url 'plugins:netbox_aci_plugin:acinode_list' %}?aci_fabric_id={{ object.aci_fabric.pk }}">{{ object.aci_fabric }}</a></li>
9+
<li class="breadcrumb-item"><a href="{% url 'plugins:netbox_aci_plugin:acinode_list' %}?aci_pod_id={{ object.aci_pod.pk }}">{{ object.aci_pod }}</a></li>
10+
{% endblock breadcrumbs %}
11+
12+
{% block content %}
13+
<div class="row">
14+
<div class="col col-md-6">
15+
<div class="card">
16+
<h2 class="card-header">{% trans "ACI Node" %}</h2>
17+
<table class="table table-hover attr-table">
18+
<tr>
19+
<th scope="row">{% trans "ACI Fabric" %}</th>
20+
<td>{{ object.aci_fabric|linkify }}</td>
21+
</tr>
22+
<tr>
23+
<th scope="row">{% trans "ACI Pod" %}</th>
24+
<td>{{ object.aci_pod|linkify }}</td>
25+
</tr>
26+
<tr>
27+
<th scope="row">{% trans "Name Alias" %}</th>
28+
<td>{{ object.name_alias|placeholder }}</td>
29+
</tr>
30+
<tr>
31+
<th scope="row">{% trans "Description" %}</th>
32+
<td>{{ object.description|placeholder }}</td>
33+
</tr>
34+
<tr>
35+
<th scope="row">{% trans "Node ID" %}</th>
36+
<td>{{ object.node_id }}</td>
37+
</tr>
38+
<tr>
39+
<th scope="row">{% trans "Node" %}</th>
40+
<td>{{ object.node_object|linkify }} ({% trans object.node_object_type.name %})</td>
41+
</tr>
42+
<tr>
43+
<th scope="row">{% trans "NetBox Tenant" %}</th>
44+
<td>
45+
{% if object.nb_tenant.group %}
46+
{{ object.nb_tenant.group|linkify }} /
47+
{% endif %}
48+
{{ object.nb_tenant|linkify|placeholder }}
49+
</td>
50+
</tr>
51+
</table>
52+
</div>
53+
<div class="card">
54+
<h2 class="card-header">{% trans "Infrastructure" %}</h2>
55+
<table class="table table-hover attr-table">
56+
<tr>
57+
<th scope="row">{% trans "Role" %}</th>
58+
<td>{% badge object.get_role_display bg_color=object.get_role_color %}</td>
59+
</tr>
60+
<tr>
61+
<th scope="row">{% trans "Type" %}</th>
62+
<td>{% badge object.get_node_type_display bg_color=object.get_node_type_color %}</td>
63+
</tr>
64+
<tr>
65+
<th scope="row">{% trans "TEP IP Address" %}</th>
66+
<td>{{ object.tep_ip_address|linkify|placeholder }}</td>
67+
</tr>
68+
</table>
69+
</div>
70+
{% include 'inc/panels/custom_fields.html' %}
71+
</div>
72+
<div class="col col-md-6">
73+
{% include 'inc/panels/tags.html' %}
74+
{% include 'inc/panels/comments.html' %}
75+
</div>
76+
</div>
77+
{% endblock content %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends 'generic/object_children.html' %}
2+
{% load helpers %}
3+
{% load i18n %}
4+
5+
{% block extra_controls %}
6+
{% if perms.netbox_aci_plugin.add_acinode %}
7+
{% with viewname=object|viewname:"" %}
8+
<a href="{% url 'plugins:netbox_aci_plugin:acinode_add' %}?aci_fabric={{ object.pk }}&nb_tenant={{ object.nb_tenant.pk }}&return_url={% url viewname pk=object.pk %}" class="btn btn-primary">
9+
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Node" %}
10+
</a>
11+
{% endwith %}
12+
{% endif %}
13+
{% endblock %}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends 'generic/object_children.html' %}
2+
{% load helpers %}
3+
{% load i18n %}
4+
5+
{% block extra_controls %}
6+
{% if perms.netbox_aci_plugin.add_acinode %}
7+
{% with viewname=object|viewname:"" %}
8+
<a href="{% url 'plugins:netbox_aci_plugin:acinode_add' %}?aci_pod={{ object.pk }}&nb_tenant={{ object.nb_tenant.pk }}&return_url={% url viewname pk=object.pk %}" class="btn btn-primary">
9+
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Node" %}
10+
</a>
11+
{% endwith %}
12+
{% endif %}
13+
{% endblock %}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy