{% extends "htmx/form_base.html" %} {% load htmx %} {% block form %} {# hx-target/include/swap are inherited by every hx-post element below #}
{# Card header: namespace selector, counts, and refresh #}
Kubernetes
{% if available and not error %} {{ running_count }} running {{ pod_count }} pod{{ pod_count|pluralize }} {% endif %}
{# Scale results #} {% include "htmx/partials/action_alert.html" %}
{% if not available %}
kubectl not installed
{% elif error %}
{{ error }}
{% else %} {# Deployments #}
Deployments
{% if not deployments %}
No deployments
{% else %}
{% if show_namespace %}{% endif %} {% for d in deployments %} {% if show_namespace %}{% endif %} {% endfor %}
NameNamespaceReady Up-to-date Available Replicas
{{ d.name }}{{ d.namespace }} {% if d.replicas == 0 %} {{ d.ready }}/{{ d.replicas }} {% elif d.ready == d.replicas %} {{ d.ready }}/{{ d.replicas }} {% else %} {{ d.ready }}/{{ d.replicas }} {% endif %} {{ d.up_to_date }} {{ d.available }}
{{ d.replicas }}
{% if d.replicas > 0 %} {% endif %}
{% endif %} {# Pods #}
Pods
{% if not pods %}
No pods
{% else %}
{% if show_namespace %}{% endif %} {% for pod in pods %} {% if show_namespace %}{% endif %} {% endfor %}
NameNamespaceReady Status Restarts Age Actions
{{ pod.name }}{{ pod.namespace }}{{ pod.ready }} {% if pod.status == "Running" %} Running {% elif pod.status == "Completed" %} {{ pod.status }} {% elif pod.status == "Pending" or pod.status == "ContainerCreating" %} {{ pod.status }} {% else %} {{ pod.status }} {% endif %} {{ pod.restarts }} {{ pod.age }}
{% endif %} {% endif %}
{# Log viewer for the selected pod #} {% if selected %} {% include "dev_tools/partials/log_viewer.html" with title=selected.namespace|add:"/"|add:selected.name %} {% endif %}
{% endblock %}