{% include 'head.html' %} {%- macro mpick(all_items, sel, cls) -%}
{%- if sel -%}{%- for v in sel[:2] -%}{{ v | e }}{%- endfor -%}{%- if sel|length > 2 %}+{{ sel|length - 2 }}{%- endif -%}{%- else -%}(none){%- endif -%}
{%- endmacro %} {% include 'nav.html' %}

Settings

Edit server configuration — changes are staged until you publish them to .hb.yaml.

{% for section in sections %}

{{ section.title }}

{% if section.description %}

{{ section.description }}

{% endif %}
{# ---- Users CRUD ---- #} {% if section.id == 'users' %}
{% for f in section.fields %} {% if f.editable %}
{{ f.label }}
{% if f.description %}

{{ f.description }}

{% endif %}
{% endif %} {% endfor %}
{% for u in section.users %} {% endfor %}
UsernameDisplay nameAvatar URL AdminChannelsNew password
{{ u.username | e }} {{ mpick(all_channel_names, u.notification_channels, 'user-ch-select') }}
{# ---- OAuth CRUD ---- #} {% elif section.id == 'oauth' %}
{% for p in section.providers %} {% endfor %}
Name (slug)TypeURLClient ID Client SecretLabelLogo URL
{{ p.name | e }}
{# ---- Hosts CRUD table ---- #} {% elif section.section_mode == 'hosts' %}
{% for h in section.hosts %} {% endfor %}
Hostname Watch DynDNS Owner Managers Monitors Threshold config Channels
{{ h.name | e }} {{ mpick(all_usernames, h.managers, 'host-managers') }} {{ mpick(all_usernames, h.monitors, 'host-monitors') }} {{ mpick(all_threshold_configs, h.threshold_configs, 'host-tc') }} {{ mpick(all_channel_names, h.notification_channels, 'host-channels') }}
{# ---- Notification channels (form-based, live CRUD) ---- #} {% elif section.section_mode == 'channels' %} {% for f in section.fields %}
{{ f.label }}
{% if f.type == 'list' %} {% if f.value %}{% for item in f.value %}{{ item }}{% endfor %} {% else %}None{% endif %} {% else %}
{{ f.value if f.value is not none else '' }}
{% endif %} {% if f.description %}

{{ f.description }}

{% endif %}
{% endfor %}
{% for ch in section.channels %}
{{ ch.name | e }} {{ ch.type_label | e }} {% if ch.min_level and ch.min_level != 'WARNING' %}{{ ch.min_level | e }}+{% endif %} {% if ch.private %}private{% endif %} {% if ch.owner %}{{ ch.owner | e }}{% endif %}
{% for f in ch.fields %}
{{ f.label }} {% if f.sensitive %}•••{% elif f.value %}{{ f.value | e }}{% else %}{% endif %}
{% endfor %}
{% endfor %} {% if not section.channels %}

No channels configured yet.

{% endif %}
{# ---- Threshold configurations (form-based) ---- #} {% elif section.section_mode == 'thresholds' %} {% for f in section.fields %}
{{ f.label }}
{% for tc in section.threshold_configs %} {% if f.description %}

{{ f.description }}

{% endif %}
{% endfor %}
{% for tc in section.threshold_configs %}
{{ tc.name | e }} {% if tc.name != 'default' %} {% endif %}
{% for m in tc.metrics %} {% endfor %}
Metric pathOp WarningCritical HysteresisCount Grace Display En
{{ m.metric | e }}
{% endfor %}
{# ---- YAML editor section ---- #} {% elif section.section_mode == 'yaml' %}
{# ---- Form section (generic fields) ---- #} {% else %} {% for f in section.fields %}
{{ f.label }}
{% if f.editable and section.api_section %} {% if f.type == 'boolean' %} {% elif f.type in ('number', 'port', 'size') %} {% elif f.type == 'list' %} {% else %} {% endif %} {% if f.description %}

{{ f.description }}

{% endif %} {% elif f.sensitive %}
••••••••
{% elif f.type == 'boolean' %}
{{ 'Enabled' if f.value else 'Disabled' }}
{% elif f.type == 'list' %}
{% if f.value %}{% for item in f.value %}{{ item }}{% endfor %} {% else %}None{% endif %}
{% else %}
{{ f.value if f.value is not none else '' }}
{% endif %} {% if f.description and not f.editable %}

{{ f.description }}

{% endif %}
{% endfor %} {% if section.api_section %} {% endif %} {% endif %}
{% endfor %}
{# /settings-main #}
{# /settings-layout #}
{# /container #}