{# The Configuration page (spec §7.1, task 104). Two forms and a table, in that order: the things that can be changed while the gateway runs, then everything that cannot. The table is last because it is read once, when something is not behaving the way the file says it should. The username and password boxes sit in a reveal panel governed by the switch, so a gateway meant to stay open does not show two boxes nobody will fill in. With no script the panel is simply visible and the form submits the same fields — see static/js/forms.js. #} {% extends "base.html" %} {% from "partials/field.html" import choice, field, generate, secret, switch %} {% block title %}Configuration · mcp-api-gateway{% endblock %} {% block scripts %} {% endblock %} {% block content %}
{# The bearer token on /mcp (task 126). Second rather than last: this and the card above it are the gateway's two doors, and a page with one of them at the top and the other below the metrics export would make them look unrelated. Two nested reveal panels, as on the export card: the switch governs the whole thing, and "Replace the token" governs the box holding one — which is only offered when there is a token to replace. The Generate button is hidden until forms.js unhides it, because a button that fills a box needs a script to fill it with; without one the hint says how to make a token at a shell. #} {# The metrics export (task 125). Two nested reveal panels: the switch governs the whole thing, and inside it "Replace the licence key" governs the box holding one — which is only offered when there is a key to replace. With no script both panels are simply visible and the form submits the same fields. #} {# Its own form, because it is its own decision: everywhere else on this page an empty box means "leave this alone", so taking a secret away has to be asked for rather than done by clearing a field. #} {% if export.has_key %} {% endif %}{{ config_note }} These take a restart to change.
| Setting | Value | Where it came from |
|---|---|---|
{{ fact.key }} |
{{ fact.value }} | {{ fact.source }} |