{% extends "resources/base.html" %} {% import "site_shell/_macros.html" as ui %} {% block title %}Edit {{ resource.name }} - Pychestrate Resources{% endblock %} {% block content %}
{{ ui.error_summary(errors, error_labels) }}

Resource name cannot be changed

Resource type cannot be changed

{% set chosen_pool = (form_data.get('pool_id') if form_data else '') or (resource.pool_id | string) %} {{ ui.field_error(errors, 'pool_id') }}

Moving a resource keeps its history and its current allocations.

Number of concurrent allocations allowed

{{ ui.field_error(errors, 'capacity') }}
{% set current_status = resource.health_status %} {% if current_status == 'online' %} Online {% elif current_status == 'offline' %} Offline {% elif current_status == 'degraded' %} Degraded {% elif current_status == 'maintenance' %} Maintenance {% else %} {{ current_status | capitalize }} {% endif %}

Health status changes require a reason for the audit trail -- update it on the health page.

{% set listed_tag_names = all_tags | map(attribute='name') | list %}
{#- Unticked checkboxes are not submitted; this marker tells the handler the tag list was on the form, so unticking every tag removes them all instead of changing nothing (RES-07). #}
{% for tag in all_tags %} {% endfor %} {#- The resource's own tags always appear, even beyond the listed page of tags, so saving never drops one unseen. #} {% for tag_name in resource.tags if tag_name not in listed_tag_names %} {% endfor %}
{{ ui.field_error(errors, 'tags') }}
{{ ui.field_error(errors, 'new_tags') }}

Tags that do not exist yet, separated by commas or spaces. They are created when you save.

Optional key-value metadata in JSON format

{{ ui.field_error(errors, 'metadata') }}
Cancel
{% endblock %}