feat(itim): Ability to add external link to cluster

ref: #244 #71 #6
This commit is contained in:
2024-08-18 15:41:05 +09:30
parent 6b28569bca
commit bfb20dab0f
9 changed files with 123 additions and 192 deletions

View File

@ -21,8 +21,8 @@
<th>Name</th>
<th>Organization</th>
</tr>
{% if item.nodes.all %}
{% for node in item.nodes.all %}
{% if cluster.nodes.all %}
{% for node in cluster.nodes.all %}
<tr>
<td><a href="{% url 'ITAM:_device_view' node.pk %}">{{ node }}</a></td>
<td>{{ node.organization }}</td>
@ -46,8 +46,8 @@
<th>Name</th>
<th>Organization</th>
</tr>
{% if item.devices.all %}
{% for device in item.devices.all %}
{% if cluster.devices.all %}
{% for device in cluster.devices.all %}
<tr>
<td><a href="{% url 'ITAM:_device_view' device.pk %}">{{ device }}</a></td>
<td>{{ device.organization }}</td>
@ -73,8 +73,8 @@
<th>Name</th>
<th>Ports</th>
</tr>
{% if item.services.all %}
{% for device in item.devices.all %}
{% if cluster.services.all %}
{% for device in cluster.devices.all %}
<tr>
<td></td>
<td></td>
@ -91,7 +91,7 @@
<div style="display: block; width: 100%;">
<h3>Config</h3>
<pre>{{ item.config | json_pretty }}</pre>
<pre>{{ cluster.config | json_pretty }}</pre>
</div>
</div>

View File

@ -134,7 +134,7 @@ class Index(IndexView):
class View(ChangeView):
context_object_name = "item"
context_object_name = "cluster"
form_class = DetailForm