{% extends "resources/base.html" %} {% import "site_shell/_macros.html" as ui %} {% block title %}IP Pool - {{ pool.name }} - Pychestrate Resources{% endblock %} {% block content %} {% set typed = form_data or {} %}

Pool Information

ID {{ pool.id }}
Name {{ pool.name }}
CIDR {{ pool.cidr }}
IP Version {{ pool.ip_version }}
Gateway {{ pool.gateway or '—' }}
DNS Servers {{ pool.dns_servers | join(', ') if pool.dns_servers else '-' }}
Reserved Addresses {#- Never handed out: the gateway and in-range DNS servers (reserved automatically), then the pool's reserved list. #} {% for address, role in pool.infrastructure_ips.items() %}
{{ address }} ({{ role }})
{% endfor %} {% for address in pool.reserved_ips if address not in pool.infrastructure_ips %}
{{ address }}
{% endfor %} {% if not pool.infrastructure_ips and not pool.reserved_ips %}{{ none | display }}{% endif %}
Description {{ pool.description or '—' }}

Pool Statistics

{{ pool.total_addresses | humanize_count }}
Total
{{ pool.available_count | humanize_count }}
Available
{{ pool.allocated_count | humanize_count }}
Allocated
{{ pool.reserved_count | humanize_count }}
Reserved

Active Allocations

{% if allocations %}
{% for alloc in allocations %} {% endfor %}
IP Address Held by Job ID Reason Check Out Time Actions
{{ alloc.ip_address }} {{ alloc.username or 'Unknown' }}{% if (alloc.user_id | string) == (current_user_id | string) %} (you){% endif %} {{ alloc.job_id or '—' }} {{ alloc.reason or '—' }} {{ alloc.checkout_time | format_datetime('%Y-%m-%d %H:%M', '—') }} {% if (alloc.user_id | string) == (current_user_id | string) %}
{% elif can_manage %}
{% endif %}
{% else %}

No active allocations

{% endif %}
{% if available_ips %}

Available IPs (Preview)

{% for ip in available_ips %} {{ ip }} {% endfor %} {% if pool.available_count > 10 %} ... and {{ (pool.available_count - 10) | humanize_count }} more {% endif %}
{% endif %}
{% if can_manage %}

Actions

{{ ui.icon("edit") }} Edit Pool
{% endif %} {% if pool.available_count > 0 %}

Check Out IP

{{ ui.error_summary(errors, error_labels) }}
{{ ui.field_error(errors, "count") }}
{{ ui.field_error(errors, "specific_ip") }}
{{ ui.field_error(errors, "timeout_minutes") }}
{% else %}

Check Out IP

This pool is at capacity: every usable address is reserved or checked out. Check an address back in{% if can_manage %}, or create another pool{% else %}, or ask a lab manager to add another pool{% endif %}, to make room. A pool's range cannot be changed once it is made.

{% endif %} {% if allocations %}

Bulk Check In by Job

{% endif %}
{% endblock %}