Files
FabledSteward/plugins/syslog/templates/syslog/edit.html
T
bvandeusenandClaude Opus 5.5 fcd58224de
CI / lint (push) Successful in 2s
CI / unit (push) Successful in 1m32s
CI / integration (push) Successful in 1m42s
CI / publish (push) Successful in 20s
feat(syslog): a device through Docker's address is placed by its name, or a device address set on it (#6096)
The SNMP poll asks each device's sysName in the same GET and keeps it
(snmp_003_sys_name). A syslog source told apart by name finds its own
address from the SNMP device (reported or given name) or host of that
name, so its lines reach the SNMP device's and host's pages again; the
edit page gains Device address, which always wins (syslog_004).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:24:58 -04:00

54 lines
3.5 KiB
HTML

{# plugins/syslog/templates/syslog/edit.html — a source's name and host, and
Remove, which deletes the lines kept from it (#5999). #}
{% extends "base.html" %}
{% from "_macros.html" import crumbs, page_header %}
{% block title %}Edit {{ label }} — Steward{% endblock %}
{% block breadcrumb %}{{ crumbs([("Syslog", "/plugins/syslog/"), (label, "/plugins/syslog/sources/" ~ source.id), ("Edit", "")]) }}{% endblock %}
{% block content %}
{{ page_header("Edit " ~ label) }}
<div class="form-page">
<form method="post" action="/plugins/syslog/sources/{{ source.id }}/edit">{{ csrf_field() }}
<section class="card form-section" aria-labelledby="syslog-source">
<h2 id="syslog-source" class="section-title">Source</h2>
<div class="form-pair">
<div class="field">
<label class="field-label" for="syslog-name">Name</label>
<input class="input" id="syslog-name" name="name" maxlength="100" value="{{ source.name }}" placeholder="{{ source.hostname_seen or source.address }}" autocomplete="off">
</div>
<div class="field">
<span class="field-label">Lines come from</span>
<span class="mono">{{ source.address }}{% if source.sender %} as {{ source.sender }}{% endif %}</span>
<span class="field-hint">{% if source.sender %}Docker's address, through Swarm's ingress: this device is told apart by the name in its lines.{% else %}Lines are matched to a source by the address they come from.{% endif %}</span>
</div>
<div class="field">
<label class="field-label" for="syslog-device-address">Device address</label>
<input class="input mono" id="syslog-device-address" name="device_address" maxlength="255" value="{{ source.device_address }}" placeholder="{{ found if found != source.address else '' }}" autocomplete="off">
<span class="field-hint">The device's own address, which places its lines on its SNMP device's and host's pages.{% if source.sender %} {% if found != source.address %}Found as <span class="mono">{{ found }}</span> from the SNMP device or host named {{ source.sender }}; set it only to override that.{% else %}No SNMP device or host is named {{ source.sender }}, so set it here.{% endif %}{% else %} Leave it empty: it is the address the lines come from.{% endif %}</span>
</div>
<div class="field">
<label class="field-label" for="syslog-host">Show on host</label>
<select class="input" id="syslog-host" name="host_id">
<option value="">No host</option>
{% for h in hosts %}<option value="{{ h.id }}"{% if source.host_id == h.id %} selected{% endif %}>{{ h.name }}</option>{% endfor %}
</select>
<span class="field-hint">Which host's page shows this source's lines.</span>
</div>
</div>
</section>
<div class="page-actions">
<button type="submit" class="btn">Save</button>
<a href="/plugins/syslog/sources/{{ source.id }}" class="btn btn-ghost">Cancel</a>
</div>
</form>
<section class="card form-section" aria-labelledby="syslog-remove" style="margin-top:1.5rem;">
<h2 id="syslog-remove" class="section-title">Remove</h2>
<p class="field-hint" style="margin:0 0 0.75rem;">Deletes the source and every line kept from it. If the device is still sending, it is offered again.</p>
<form method="post" action="/plugins/syslog/sources/{{ source.id }}/delete" data-confirm="Remove {{ label }} and the lines kept from it?" style="margin:0;">{{ csrf_field() }}
<button type="submit" class="btn btn-danger btn-sm">Remove source</button>
</form>
</section>
</div>
{% endblock %}