2021-03-26 20:19:19 -04:00
{% extends 'virtualization/virtualmachine/base.html' %}
2019-12-06 16:13:52 -05:00
{% load buttons %}
2020-01-06 20:18:44 +00:00
{% load static %}
2017-08-04 17:02:52 -04:00
{% load helpers %}
2020-03-15 23:45:18 -04:00
{% load plugins %}
2017-08-04 17:02:52 -04:00
2018-06-14 16:15:14 -04:00
{% block content %}
2021-04-17 18:15:53 -07:00
< div class = "row my-3" >
2021-04-30 15:55:37 -07:00
< div class = "col col-md-6" >
2021-04-17 18:15:53 -07:00
< div class = "card" >
< h5 class = "card-header" >
Virtual Machine
< / h5 >
< div class = "card-body" >
< table class = "table table-hover attr-table" >
< tr >
< th scope = "row" > Name< / th >
< td > {{ object }}< / td >
< / tr >
< tr >
< th scope = "row" > Status< / th >
2022-02-11 14:25:13 -05:00
< td > {% badge object.get_status_display bg_color=object.get_status_color %}< / td >
2021-04-17 18:15:53 -07:00
< / tr >
< tr >
< th scope = "row" > Role< / th >
2022-03-22 14:51:20 -04:00
< td > {{ object.role|linkify|placeholder }}< / td >
2021-04-17 18:15:53 -07:00
< / tr >
< tr >
< th scope = "row" > Platform< / th >
2022-03-22 14:51:20 -04:00
< td > {{ object.platform|linkify|placeholder }}< / td >
2021-04-17 18:15:53 -07:00
< / tr >
2022-11-04 08:28:09 -04:00
< tr >
< th scope = "row" > Description< / th >
< td > {{ object.description|placeholder }}< / td >
< / tr >
2021-04-17 18:15:53 -07:00
< tr >
< th scope = "row" > Tenant< / th >
< td >
2022-03-22 15:29:05 -04:00
{% if object.tenant.group %}
{{ object.tenant.group|linkify }} /
2017-08-16 17:00:17 -04:00
{% endif %}
2022-03-22 15:29:05 -04:00
{{ object.tenant|linkify|placeholder }}
2021-04-17 18:15:53 -07:00
< / td >
< / tr >
< tr >
< th scope = "row" > Primary IPv4< / th >
< td >
2021-12-15 08:28:58 -05:00
{% if object.primary_ip4 %}
< a href = "{% url 'ipam:ipaddress' pk=object.primary_ip4.pk %}" > {{ object.primary_ip4.address.ip }}< / a >
{% if object.primary_ip4.nat_inside %}
(NAT for < a href = "{{ object.primary_ip4.nat_inside.get_absolute_url }}" > {{ object.primary_ip4.nat_inside.address.ip }}< / a > )
2022-08-22 15:18:25 -05:00
{% elif object.primary_ip4.nat_outside.exists %}
2022-10-26 08:23:50 -04:00
(NAT: {% for nat in object.primary_ip4.nat_outside.all %}< a href = "{{ nat.get_absolute_url }}" > {{ nat.address.ip }}< / a > {% if not forloop.last %}, {% endif %}{% endfor %})
2017-08-29 15:26:35 -04:00
{% endif %}
2021-12-15 08:28:58 -05:00
{% else %}
2022-06-15 22:33:21 +02:00
{{ ''|placeholder }}
2021-12-15 08:28:58 -05:00
{% endif %}
2021-04-17 18:15:53 -07:00
< / td >
< / tr >
< tr >
< th scope = "row" > Primary IPv6< / th >
< td >
2021-12-15 08:28:58 -05:00
{% if object.primary_ip6 %}
< a href = "{% url 'ipam:ipaddress' pk=object.primary_ip6.pk %}" > {{ object.primary_ip6.address.ip }}< / a >
{% if object.primary_ip6.nat_inside %}
(NAT for < a href = "{{ object.primary_ip6.nat_inside.get_absolute_url }}" > {{ object.primary_ip6.nat_inside.address.ip }}< / a > )
2022-08-22 15:22:53 -05:00
{% elif object.primary_ip6.nat_outside.exists %}
2022-10-26 08:23:50 -04:00
(NAT: {% for nat in object.primary_ip6.nat_outside.all %}< a href = "{{ nat.get_absolute_url }}" > {{ nat.address.ip }}< / a > {% if not forloop.last %}, {% endif %}{% endfor %})
2017-08-29 15:26:35 -04:00
{% endif %}
2021-12-15 08:28:58 -05:00
{% else %}
2022-06-15 22:33:21 +02:00
{{ ''|placeholder }}
2021-12-15 08:28:58 -05:00
{% endif %}
2021-04-17 18:15:53 -07:00
< / td >
< / tr >
< / table >
< / div >
2017-08-16 17:00:17 -04:00
< / div >
2021-10-19 14:21:31 -04:00
{% include 'inc/panels/custom_fields.html' %}
2021-10-21 11:23:31 -04:00
{% include 'inc/panels/tags.html' %}
2021-10-19 14:21:31 -04:00
{% include 'inc/panels/comments.html' %}
2020-11-19 12:24:52 -05:00
{% plugin_left_page object %}
2017-11-03 16:58:56 -04:00
< / div >
2021-04-30 15:55:37 -07:00
< div class = "col col-md-6" >
2021-04-17 18:15:53 -07:00
< div class = "card" >
2022-05-25 16:01:10 -04:00
< h5 class = "card-header" > Cluster< / h5 >
2021-04-17 18:15:53 -07:00
< div class = "card-body" >
< table class = "table table-hover attr-table" >
2022-05-26 14:59:49 -04:00
< tr >
< th scope = "row" > Site< / th >
< td >
{{ object.site|linkify|placeholder }}
< / td >
< / tr >
2021-04-17 18:15:53 -07:00
< tr >
< th scope = "row" > Cluster< / th >
< td >
{% if object.cluster.group %}
2022-03-22 14:51:20 -04:00
{{ object.cluster.group|linkify }} /
2021-04-17 18:15:53 -07:00
{% endif %}
2022-05-26 14:59:49 -04:00
{{ object.cluster|linkify|placeholder }}
2021-04-17 18:15:53 -07:00
< / td >
< / tr >
< tr >
< th scope = "row" > Cluster Type< / th >
< td > {{ object.cluster.type }}< / td >
< / tr >
2022-05-25 16:01:10 -04:00
< tr >
< th scope = "row" > Device< / th >
< td >
{{ object.device|linkify|placeholder }}
< / td >
< / tr >
2021-04-17 18:15:53 -07:00
< / table >
2017-09-29 11:13:41 -04:00
< / div >
< / div >
2021-04-17 18:15:53 -07:00
< div class = "card" >
2022-05-25 16:01:10 -04:00
< h5 class = "card-header" > Resources< / h5 >
2021-04-17 18:15:53 -07:00
< div class = "card-body" >
< table class = "table table-hover attr-table" >
< tr >
< th scope = "row" > < i class = "mdi mdi-gauge" > < / i > Virtual CPUs< / th >
< td > {{ object.vcpus|placeholder }}< / td >
< / tr >
< tr >
< th scope = "row" > < i class = "mdi mdi-chip" > < / i > Memory< / th >
< td >
{% if object.memory %}
2021-08-31 09:41:54 -04:00
{{ object.memory|humanize_megabytes }}
2021-04-17 18:15:53 -07:00
{% else %}
2022-06-15 22:33:21 +02:00
{{ ''|placeholder }}
2021-04-17 18:15:53 -07:00
{% endif %}
< / td >
< / tr >
< tr >
< th scope = "row" > < i class = "mdi mdi-harddisk" > < / i > Disk Space< / th >
< td >
{% if object.disk %}
{{ object.disk }} GB
{% else %}
2022-06-15 22:33:21 +02:00
{{ ''|placeholder }}
2021-04-17 18:15:53 -07:00
{% endif %}
< / td >
< / tr >
< / table >
2017-08-16 17:00:17 -04:00
< / div >
2017-08-04 17:02:52 -04:00
< / div >
2023-01-25 20:25:06 -05:00
< div class = "card" >
< h5 class = "card-header" > Services< / h5 >
< div class = "card-body htmx-container table-responsive"
hx-get="{% url 'ipam:service_list' %}?virtual_machine_id={{ object.pk }}"
hx-trigger="load"
>< / div >
{% if perms.ipam.add_service %}
< div class = "card-footer text-end noprint" >
< a href = "{% url 'ipam:service_add' %}?virtual_machine={{ object.pk }}" class = "btn btn-sm btn-primary" >
< span class = "mdi mdi-plus-thick" aria-hidden = "true" > < / span > Add a service
< / a >
< / div >
{% endif %}
< / div >
2021-10-19 14:21:31 -04:00
{% include 'inc/panels/contacts.html' %}
2020-11-19 12:24:52 -05:00
{% plugin_right_page object %}
2020-03-15 23:45:18 -04:00
< / div >
< / div >
< div class = "row" >
2021-04-30 15:55:37 -07:00
< div class = "col col-md-12" >
2020-11-19 12:24:52 -05:00
{% plugin_full_width_page object %}
2017-08-04 17:02:52 -04:00
< / div >
2017-11-03 16:58:56 -04:00
< / div >
2017-08-04 17:02:52 -04:00
{% endblock %}