{% extends 'generic/object.html' %} {% block content %}
{# ================= LEFT COLUMN ================= #}
{# --- Image panel --- #}
Image
Name
{{ object.name }}
Registry
{{ object.registry }}
Default Tag
{% if object.default_tag %}{{ object.default_tag }}{% else %}{% endif %}
Comments
{% if object.comments %}
{{ object.comments }}
{% else %} {% endif %}
{# --- Tags panel --- #}
Tags
{% if object.tags.count %}
{% for tag in object.tags.all %} {{ tag.name }} {% endfor %}
{% else %} No tags {% endif %}
{# ================= RIGHT COLUMN ================= #}
{# --- Image Tags panel --- #}
Image Tags
{% if object.image_tags.exists %}
{% for t in object.image_tags.all|dictsort:"image_tag" %} {% endfor %}
Tag OS Arch Size Digest
{{ t.image_tag|default:"latest" }} {% if t.os %} {{ t.get_os_display }} {% else %} {% endif %} {% if t.arch %} {{ t.get_arch_display }} {% else %} {% endif %} {% if t.size %} {{ t.size|filesizeformat }} {% else %} {% endif %} {% if t.digest %} {{ t.digest|slice:":12" }}…{{ t.digest|slice:"-5:" }} {% else %} {% endif %}
{% else %} No tags defined for this image. {% endif %}
{# --- Pods panel --- #}
Pods
{% if object.pods.exists %}
{% for pod in object.pods.all|dictsort:"name" %} {% endfor %}
Name User Status
{{ pod }} {{ pod.user|default:"—" }} {{ pod.get_status_display|default:"—" }}
{% else %} No pods associated. {% endif %}
{# --- Devices panel --- #}
Devices
{% if object.devices.exists %}
{% for d in object.devices.all|dictsort:"name" %} {% endfor %}
Name Status Primary IPv4 Primary IPv6
{{ d }} {% with s=d.status %} {% if s == "active" %} {{ d.get_status_display }} {% elif s == "offline" %} {{ d.get_status_display }} {% elif s == "planned" or s == "staged" %} {{ d.get_status_display }} {% elif s == "failed" %} {{ d.get_status_display }} {% else %} {{ d.get_status_display }} {% endif %} {% endwith %} {% if d.primary_ip4 %} {{ d.primary_ip4 }} {% else %}{% endif %} {% if d.primary_ip6 %} {{ d.primary_ip6 }} {% else %}{% endif %}
{% else %} No devices associated. {% endif %}
{# --- Virtual Machines panel --- #}
Virtual Machines
{% if object.virtual_machines.exists %}
{% for vm in object.virtual_machines.all|dictsort:"name" %} {% endfor %}
Name Status Primary IPv4 Primary IPv6
{{ vm }} {% with s=vm.status %} {% if s == "active" %} {{ vm.get_status_display }} {% elif s == "offline" %} {{ vm.get_status_display }} {% elif s == "planned" or s == "staged" %} {{ vm.get_status_display }} {% else %} {{ vm.get_status_display }} {% endif %} {% endwith %} {% if vm.primary_ip4 %} {{ vm.primary_ip4 }} {% else %}{% endif %} {% if vm.primary_ip6 %} {{ vm.primary_ip6 }} {% else %}{% endif %}
{% else %} No virtual machines associated. {% endif %}
{% endblock %}