#5290 "Host page: the health tiles span the card's width; even spacing above Ansible": the four tiles take equal quarters (halves on a phone) and their sparklines stretch across them; the Monitors + Agent row drops the Agent card's own margin, so the gap above Ansible is 1rem like every other. #5291 "Add host opens as a dialog over the Hosts list": a native <dialog> on /hosts/, opened by Add host or /hosts/?add=1. A name clash re-renders the list with it open, the error and what was typed. GET /hosts/new is gone; hosts/form.html is Edit only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
1.8 KiB
HTML
36 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_macros.html" import crumbs, page_header %}
|
|
{# Edit a host; `values` holds what was typed when a clash sends the form back.
|
|
Adding one is a dialog on the Hosts list (#5291). #}
|
|
{% block title %}Edit {{ host.name }} — Steward{% endblock %}
|
|
{% block breadcrumb %}{{ crumbs([("Hosts", "/hosts/"), (host.name, "/hosts/" ~ host.id), ("Edit", "")]) }}{% endblock %}
|
|
{% block content %}
|
|
{% set v = values or {} %}
|
|
{{ page_header("Edit host") }}
|
|
|
|
<div class="card" style="max-width:760px;">
|
|
{% if error %}<p class="field-error" role="alert">{{ error }}</p>{% endif %}
|
|
<form method="post" action="/hosts/{{ host.id }}" style="display:grid;gap:0.6rem;">{{ csrf_field() }}
|
|
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:0.6rem;align-items:end;">
|
|
<div>
|
|
<label class="field-label" for="h-name">Name <span class="tone-crit" aria-hidden="true">*</span></label>
|
|
<input type="text" id="h-name" name="name" value="{{ v.name if v.name is defined else host.name }}"
|
|
placeholder="nas, web-1, …" autocomplete="off" required autofocus class="input">
|
|
</div>
|
|
<div>
|
|
<label class="field-label" for="h-address">Address</label>
|
|
<input type="text" id="h-address" name="address" value="{{ v.address if v.address is defined else host.address }}"
|
|
placeholder="hostname or IP; empty resolves by name" autocomplete="off" class="input">
|
|
</div>
|
|
</div>
|
|
<p class="field-hint" style="margin:0;">
|
|
Renaming carries the host's agent and container history, and the alert rules on it, to the new name.
|
|
</p>
|
|
<div style="display:flex;gap:0.5rem;">
|
|
<button type="submit" class="btn btn-sm">Save</button>
|
|
<a href="/hosts/{{ host.id }}" class="btn btn-sm btn-ghost">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|