Search and contents

The configuration page

The configuration page is the browser page an integrator uses on site to look at an appliance's configuration and change it without writing JSON by hand: it shows what is staged, builds a form for a draft from the Node Type's Configuration Schema, checks the draft as it is edited, and stages, exports or rolls back. It is part of the Management API service. This document describes what it shows and how it behaves, what its tests cover and what a person still checks before a release. The routes it calls, the scopes and the token commands are in management-api.md.

GET /ui/config serves one HTML document. It needs no token, because a browser navigation cannot send one, and it holds no data: it asks for a token, keeps it in the page's memory, and calls the routes below from the same origin. It is not part of /v1 and not in GET /v1/openapi.json; the routes it calls are. It adds no way in of its own. Everything it does is a call to a route that already needs a scope, so a person can do the same from a shell with curl.

What the page doesRouteScope
Status panel GET /v1/status read
Load the draft GET /v1/config/draft read
Load the form's schema GET /v1/config/schema read
Check the draft as it is edited POST /v1/config/validate read
Version check POST /v1/config/migration read
Save, start from the staged config, start from a starting point, set a credential PUT /v1/config/draft configure
Discard the draft DELETE /v1/config/draft configure
Stage the draft POST /v1/config/draft/stage configure
Ask the assistant POST /v1/config/assist configure
Export the change GET /v1/config/draft/export configure
Save as a template POST /v1/config/draft/export configure
Stage an uploaded bundle POST /v1/config/bundle configure
Roll back POST /v1/config/rollback configure
Sync from the repository POST /v1/config/sync sync

The page does not call the connection check (POST /v1/config/check). A staged config is connection-tested by GET /v1/status, which the page shows, so staging a draft or a bundle is the way to test it.

Styling it. The page's look is decided in one block, the <style> element of engine/management/config_page.html, headed "Presentation layer". It lists the names the markup and the script use, so a restyle keeps those names and changes only what they look like. The service works out the page's security policy from the file when it starts, so an edited page needs a restart and nothing else; a page whose style or script the policy cannot name is refused at start.

Opening it and the two roles

Browse to the service's address and /ui/config. On the default loopback bind that is http://127.0.0.1:8470/ui/config from the appliance itself. On a private-network bind the service is served over the Node's own certificate, so the browser must trust the site's CA, or it will refuse the page before a token is entered.

There are two roles, and they are token scopes underneath:

  • View needs read. The page shows the status, the draft and the form, and offers nothing that changes anything.
  • Change needs read, configure and sync. configure is a person's scope and is never minted without an expiry; it does not let a token read the draft, which is why a person who changes things also carries read. Mint one with deployment/mint_management_token.sh --id NAME --scope read --scope configure --scope sync --expires-in 30d.

How the page learns its role

No route tells a token which scopes it holds, so the page learns its role from a refusal. It offers every control at first.

  • The first change the service refuses with a 403 puts the whole page in view mode. The form's inputs and every button that changes something are disabled. A note says which route was refused and which scope it needs (configure for the draft, the bundle and rollback).
  • A refused sync is an exception. It names the sync scope and turns off syncing only, because a token that may change the draft and not sync can still do everything else.
  • Reading a starting point from the repository is the same kind of exception. It needs sync as well as configure. A refusal of it turns off that one button and says which two scopes it needs. Uploading a starting point and everything else stay as they were.
  • A token with no read, or one the service stops accepting while you work, is sent back to the token entry. The edits made so far are kept in the page's memory (never a credential) and carry on when a token is entered. Only Forget token drops them.
  • While a request is in flight, the form waits for its answer.

The four views

The page is one document with four views, chosen by the tabs under the header: Status, Draft, Bring in and Template. One view shows at a time. After a token is entered the page opens on Status, and a reload asks for the token again. Each control is in one view and nowhere else:

ViewWhat it holds
Status The status card, Roll back to the prior config and the version check
Draft The draft's heading and line, the Node Type box on a fresh appliance, Start from the staged config, Start a new draft and Discard the draft, the starting-point card, the assistant card, the places to fill in, the verdict, the Jump to list, the form, the bar below, and the exported change
Bring in Sync from the repository and Upload a bundle
Template Save as a template

The notice and the question are always in view, whichever view is showing. They sit under the tabs and stay there as the page scrolls. The notice is the result of the last action, and the question is the one the page asks before an act that cannot be taken back, such as replacing the draft or rolling back. A result is therefore never out of sight, however long the form above it is, and a question is answered from the view it was asked in.

In the Draft view a bar stays at the foot of the window and holds Save the draft, Stage the draft and Export the change, with the words "Unsaved changes." and a one-line hint beside them. The three buttons are on and off by the rules they had before the bar existed. The start and discard buttons stay with the draft's heading.

Changing view builds nothing again: the edits, the open sections and a value typed and not yet sent stay as they were. Because a hidden view hides unsaved edits, the Draft tab reads Draft (unsaved) in words while there are any. Refresh keeps the view you are on. With a token that may only read, all four views load and show their content, and every control that changes something is off in every view.

What it shows

  • Status. The staged config: where it came from (a sync of a ref, a bundle, a draft made on the appliance, or a rollback), its short hash and when it was staged. A bundle's ref and commit are marked stated, not verified, because the appliance cannot check them against a repository it cannot reach; a sync's are marked verified. A staged draft, and a rollback that restored one, is marked not in the repository, with a note to commit it and stage the committed file; that is a warning and never stops a restart. Running against staged shows the Node's state, the config it runs and whether a restart is needed (restart_required, or "not known" when either config is not known). Prior config says what a rollback would restore, or that there is none. Connectors lists each connector of the staged config and whether it answered, with its target and the service's message.
  • The draft. The revision, when it was saved, what it was started from and how many credentials it holds, and whether there are unsaved changes.
  • A refusal. Whatever the service says is shown as text, in the service's own words, with its status. The page never builds markup from what a service sent.

The draft

A draft is the one configuration on the appliance that is being worked on. See The draft for what the appliance keeps. The page's buttons are:

  • Start from the staged config copies the staged config into the draft, including its credentials, which move into the draft's encrypted credentials. Start a new draft makes an empty document for the Node Type. Over an existing draft either one asks first and says what is thrown away: the draft, how many credentials it holds and any unsaved edits. On a fresh appliance that has neither a running nor a staged config, the page asks for the Node Type's name before it can load a schema.
  • Save the draft sends the whole document with the revision it replaces. A second browser that saved first makes the save a 409; the page keeps the edit on screen and offers Load the saved draft again, which drops it.
  • Discard the draft asks first and then removes the draft and its credentials. The staged config is not changed.
  • Start from a starting point replaces the draft with a starting point: a file you choose from your laptop, or a path (and, optionally, a ref) of the configured repository. See Starting points below. It asks first when there is a draft or unsaved edits, and says what is thrown away.
  • Stage the draft and Export the change (in the bar, with Save the draft) use the saved draft, so they are offered once the draft is saved. Staging replaces the staged config (which becomes the prior one) and does not restart the Node. Whatever the service refuses is shown and nothing is worked round: a draft with a credential cannot be staged where the installed staged file is a plain one, and the page repeats the service's message to reinstall with deployment/install_node_service.sh --encrypted.

The form

The form is built from the Node Type's Configuration Schema, read from GET /v1/config/schema when the page loads, so a Node Type or a field the page has never seen needs no change to the page. A control is chosen from the schema:

The schema saysThe page shows
a string a text box
an integer or a number a number box
a boolean a choice of not set, true and false
an enum or a const a choice of the listed values
an object with properties a section that opens and closes, one row for each property; a section that is optional says not set with an Add button, and Remove this section
an object whose entries are all alike a list of named entries, each with its value, and Add an entry
an array a numbered list of items, with Add an item and a Remove on each
x-exactly-one-of a choice of exactly one of the named sections; choosing another asks first when it would remove content
x-sensitive a credential control (below)
anything else, or an object with nothing declared in it a JSON box

Details of the controls

  • Blank fields. A field left blank is not set. The page does not store an empty string for it. An item of a list cannot be absent, so a list item left blank is kept as empty text, or as nothing for a number, a boolean or a choice. The service refuses that until it is filled in.
  • Values of the wrong shape. A value in the draft that is not the shape the schema describes, such as text where a list belongs, is shown as JSON so it can be mended.
  • Required fields are marked with an asterisk.
  • Help. A field's description is its help, which a "?" beside the field shows (see Field help below).
  • Edit as JSON shows any section of the form as JSON instead, for what a form does not model. It is not offered for a section that holds a credential.
  • Rules the form does not model. Rules the schema states with oneOf, if, dependentRequired and the like are not modelled by the form. The service judges them, and says so in the next check.

Jump to, and sections that start closed

A section in the form's top level starts closed, so a long form reads as a short list of names. These are drawn open instead:

  • a section with an error;
  • a section with an edit not yet saved;
  • a section holding a place a starting point left to fill in.

Above the form, the Jump to list has a button for each top-level section the draft holds, in the schema's order. An optional section the draft does not hold yet is a "not set" row in the form with an Add button, and is not in the list. Pressing a button opens that section and brings it into view, clear of the notice, the question and the bar, whatever their height.

Open all and Close all act on the top-level sections. Close all leaves open any section that holds an error and says which, so an error is never hidden. The note stays while the error does.

How open and closed state is kept:

  • A top-level section you open stays open through a redraw, such as an edit, a save, a stage or a refresh. One you close stays closed. A section once shown open stays open until you close it.
  • What you opened or closed belongs to the draft you were looking at. Starting from a starting point, from the staged config or from nothing, or discarding the draft, draws the next one afresh.
  • Sections inside a top-level section keep the rule they had: the first level below is open inside its parent, and is open again after a redraw even if you closed it.
  • Go to it on a place to fill in, and an error at a field, open the sections around the field.

Field help

The description of a field or a section in the Node Type's Configuration Schema is its help. A field or section that has one has a small ? beside it, and the help is folded until it is asked for.

  • The ? opens and closes that one text and nothing else's.
  • A ? on a section that is closed also opens the section, since the help would otherwise be in a part you cannot see.
  • Above the form, one switch, Show field help, opens the help of every field and section. Switching it off closes them all, whatever the ? buttons did before. The switch is offered only when the form has some help to show.
  • What you opened stays as you left it through a redraw (an edit, a save, a stage, a refresh, a draft started from the staged config). A ? on an item of a list follows its item when one before it is removed.
  • A reload starts with every help folded. The page writes nothing to the browser's local or session storage, so there is no stored preference to find.

The help is limited Markdown, drawn without ever being passed through HTML. It may hold:

  • paragraphs (a blank line between them; a single newline is only a space);
  • bullet lists (lines that begin with - and some text);
  • code, bold, italic and links.

A link is drawn only if its address is an absolute https: one; any other target is drawn as plain text, not a link. A link opens in a new tab without a referrer.

Nothing else is syntax. A heading, an image, a table, an HTML tag, a javascript:, data:, http: or relative address, and a marker that never closes are all shown as the characters that were written. A description can therefore never make the page run anything or load anything. Build a Node Type says how to write one.

Live validation

A moment after each edit, the page sends the draft to POST /v1/config/validate, with each credential as the placeholder "[redacted]". It shows the verdict above the form.

  • The service's error is shown at the field it is about, and the sections around it are opened.
  • An error about a place the form has no field for is shown in the verdict.
  • A valid verdict means the service accepts the document as it stands. Staging checks the whole thing again, including the rules that depend on the appliance.

Credentials

A credential field is a control that only sets: it shows set or not set, and never a value.

  • Set (or Change) opens a password box. Send credential sends the draft, with that value in it, with PUT /v1/config/draft; the appliance encrypts it with its own age key and never returns it. Sending a credential saves the draft, with any other edits you have made. The page empties the box before the request leaves, never puts the value into the document it keeps, and holds it nowhere afterwards: not in the page, the address, the browser's stored data or its log. If the request fails the credential was not stored, and the page says to type it again.
  • Remove takes the credential out of the document; it is removed on the appliance when the draft is saved, and the row says so until then.
  • The text [redacted] is the placeholder, not a credential, and the page refuses it as a value. A credential cannot be typed into a JSON box either: the box refuses any credential field that is not the placeholder.
  • A credential in a list is kept by its position. Adding or removing an item of a list that holds one moves the positions, so the service could not tell which stored credential belongs to which item. The page therefore clears each credential that was set in that list, marks its row send it again, and does not let the draft be saved until each is sent again or marked Leave unset. A credential that is not sent again is removed, never left on the wrong item. Reordering is not offered. A credential in a named entry of a map is kept by its name, so adding and removing entries needs none of this.
  • If the appliance has no age key it cannot store a credential, and the service says so (503); every edit that touches no credential still works.

Starting points

A starting point is a config skeleton for one kind of target system with places left for the site's own values and credentials. Start from this file sends a file chosen on your laptop (the page reads it in the browser; a file that is not JSON never leaves it), and Read it from the repository asks the appliance to fetch a path at a ref (blank for the configured one), which needs sync as well as configure. Either way the draft is replaced and the service says what it refuses, in its own words: a starting point for another Node Type version, one with a credential in it, one whose placeholder is in the wrong place.

A draft that came from a starting point lists its places to fill in, each by the label the file gave it, with whether it has a value yet and Go to it, which opens the field's section and puts the cursor in it. In the form the field carries the same label and mark, and an example the file gave is the hint in the box. A value placeholder counts as filled when the draft has a value there; a credential, when one is stored there (set it with the field's own control, as any credential is). A value typed and not yet saved is marked filled in, not saved yet, because the service counts the saved draft: staging and exporting are refused while a place is open, and the refusal names each by path and label. Starting over, or starting from the staged config, drops the list.

Save as a template (the Template view) is the other way: it turns the saved draft into a starting-point file. Say what it is a start for, optionally a sentence about it, and name the places to leave open, each with a path, a label and an example (write it as JSON where it is not text, such as 5). Every credential the draft holds becomes a place to fill in without being named, and no credential is in the file in any form, not even encrypted. The file is offered as a download, and dropped when the draft changes. Nothing is saved on the appliance, and committing the file is yours to do.

Asking the assistant

Ask the assistant turns a request in plain words into a proposed change to the saved draft (see The configuration assistant). It runs on the site's own inference server, which the service is given in its settings; until it is, the page says so in the service's words (the route answers 503). Save your edits first: the assistant works on the saved draft, and the button is off while there are unsaved edits. On a fresh appliance with a Node Type named but no draft, it writes a first config for that Node Type.

The page tells you, above the box, that a credential goes only in its own field in the form. The assistant never sees one and cannot set one. A request that holds a credential the draft already has is refused by the service before anything is sent, and the page empties the box. What comes back is the model's summary, each edit it proposes (set or remove a path, with the value), the values it chose itself that your request did not give (check them), and the findings worth knowing: a credential still to be set, a place of a starting point still empty. Nothing is saved by asking. Accept into the draft saves the change as the draft's next revision through the draft's own save (the same call Save the draft makes), with Stage the draft as well if ticked, which then calls the draft's own stage. Throw it away drops it. A change belongs to one revision of the draft: once the draft is saved or loaded again the change is gone, and Accept is off while edits are unsaved.

A token without configure is refused on the first ask, and the page goes to view mode naming the scope. The page adds no path of its own: it is the same POST /v1/config/assist a script calls.

Exporting the change

Export the change asks for the draft as one composed file and a patch, and offers them as downloads: the file under its own name (config.json or config.enc.json) and, when a config is staged, a unified patch against the staged file for git apply. The patch is the only diff the page offers, and only as a download: it shows no diff, history or list of versions, because the repository has those. A credential is in the file and the patch only as ciphertext that the appliance's key opens. The appliance never commits or pushes; the integrator commits what was downloaded and then stages the committed file by a sync or a bundle, which clears the not in the repository mark.

Bringing in a config

  • Sync from the repository asks the appliance to fetch a ref (blank for the configured one), check it and stage it. It does not touch the draft.
  • Upload a bundle takes a config bundle file built on a laptop (see Staging a bundle) and stages it after the same checks, for an appliance that cannot reach the repository. The page reads the file in the browser and sends its five keys; a file that is not JSON never leaves the browser, and what the service refuses is shown. A bundle's ref and commit show as stated, not verified.

Rolling back

Roll back to the prior config is offered when the status shows a prior. It asks first and the question names what it restores (where the prior config came from, when it was staged) and what it replaces, and says that rolling back again undoes it and that the Node keeps running what it runs until it is restarted. It never restarts the Node. Nothing is sent until the question is answered. With no prior there is nothing to restore, and the status says to sync a known ref.

The version check

When a Node Type's version moves, a config written for an older one is refused at its first line. Check the staged config and Check the saved draft send POST /v1/config/migration and list every problem the config has against the version this appliance runs, with the version the config states and the one expected. A problem names a place and a rule and never a value. When the draft is for another version the page offers Set the draft's version, which changes the draft's version line to the running one (you still save it). The check judges the saved draft, not unsaved edits, and says so when there are some.

What it does not do

It never commits, pushes or holds repository credentials. It never restarts the Node. It shows no diff, no history and no list of past versions. It does not run the connection check, and it keeps no library of starting points: you bring the file or name where it is. It configures the one Node on whose appliance it is open; there is no view across Nodes. It does not refresh itself: Refresh reloads the status, and the draft too unless you have unsaved changes.

What the browser tests cover

In a real browser. The page runs in a real Chromium against the shipped service, with the real draft, staging and validation code (tests/test_browser_config_page.py). The repository, the Activity Log and the sops command are stand-ins, because the browser job has no sops.

  • Each test fails on a script error, on anything the browser logs at error level (a content security policy violation among them), and on a request to another origin.
  • The field help has its own file of tests (tests/test_browser_config_page_help.py), which gives the page Node Types made to carry hostile text.

Without a browser (tests/test_management_config_page.py), these are tested:

  • the page's policy;
  • that the file has no script-injection sink and no use of browser storage;
  • that every route, body key and response field the page uses is in the served description, with the scope the page says.
What is checkedThe test
A Node Type the page has never seen renders, validates, saves and stages; a credential is a set-only control test_a_node_type_the_page_has_not_seen_renders_validates_saves_and_stages
The service's error is shown at its field and cleared when mended test_live_validation_shows_the_services_error_at_the_field
A credential is sent once and is in no document, storage, address, console or file of the appliance but the encrypted one test_a_credential_is_sent_once_and_the_page_keeps_it_nowhere
It is gone from the page before the request leaves test_the_typed_credential_is_gone_from_the_page_before_the_request_leaves
The export holds only ciphertext test_the_export_holds_only_ciphertext_and_downloads
A draft with a credential is not staged on a plain staged file, and nothing works round it test_a_draft_with_a_credential_cannot_be_staged_where_the_staged_file_is_plain
A bundle is shown as stated, not verified; a sync as verified; the prior; a restart test_a_bundle_is_shown_as_stated_not_verified_and_a_sync_as_verified, test_the_status_panel_says_whether_a_restart_is_needed
A rollback asks first, names what it restores, and a second undoes it test_a_rollback_asks_first_naming_what_it_restores_and_a_second_undoes_it
A starting point lists its places by label; a place counts once saved; staging waits; a credential placeholder is set like any credential test_a_starting_point_lists_its_places_and_stage_waits_until_each_has_a_value
A place listed can be jumped to test_a_place_listed_can_be_jumped_to
A starting point is read from the repository by path and ref test_a_starting_point_read_from_the_repository_needs_only_a_path
A token without sync cannot read one from the repository but can upload one, and the page is not view only test_a_token_without_sync_cannot_read_a_starting_point_from_the_repository_but_can_upload
A starting point the service refuses shows its reason and keeps the draft; one over a saved draft asks first test_a_starting_point_the_service_refuses_shows_its_reason_and_keeps_the_draft, test_a_starting_point_over_a_saved_draft_asks_first
A draft saved as a template downloads with no credential in it, in any form test_a_draft_saved_as_a_template_downloads_with_no_credential_in_it
A list change makes the credentials in it be sent again before a save test_a_list_change_makes_the_credentials_in_it_be_sent_again_before_the_draft_can_be_saved
A read token loads everything and its first refused change makes the page view only, naming the scope test_a_read_token_loads_everything_and_the_first_refused_change_makes_the_page_view_only
The assistant's change is shown with its words and saved only when accepted; it can be staged as it is accepted test_the_assistants_change_is_shown_with_its_words_and_saved_only_when_accepted, test_the_assistants_change_can_be_staged_as_it_is_accepted
A value the assistant chose itself is said on the page test_a_value_the_assistant_chose_itself_and_a_gap_it_found_are_said_on_the_page
A credential the assistant tries to set is refused and is nowhere on the page or in any request to the model test_a_credential_the_assistant_tries_to_set_is_refused_and_is_nowhere_on_the_page
A request that holds a credential the draft has is refused, sends nothing to the model and is not kept test_a_request_that_holds_a_credential_the_draft_has_is_refused_and_not_kept
A change cannot be accepted over unsaved edits or a draft that moved test_a_change_that_cannot_be_accepted_while_edits_are_unsaved_or_the_draft_has_moved
A read token cannot ask; an appliance with no inference endpoint says the assistant is off test_a_read_token_cannot_ask_and_the_page_goes_to_view_mode_naming_the_scope, test_an_appliance_with_no_inference_endpoint_says_the_assistant_is_off
The page opens on Status, a tab shows its view and hides the others, and a page with no token shows no tabs test_the_page_opens_on_status_and_a_tab_shows_its_view_and_hides_the_others
Each control is in the view named for it and nowhere else test_each_control_is_in_the_view_named_for_it_and_nowhere_else
The notice and the question are in view whichever view is showing test_the_notice_and_the_question_are_in_view_whichever_view_is_showing
The bar holds save, stage and export, stays in view, and follows their rules test_the_bar_holds_save_stage_and_export_stays_in_view_and_follows_their_rules
Unsaved edits, open sections and typed values survive a trip to another view; the Draft tab says "unsaved" in words test_unsaved_edits_open_sections_and_typed_values_survive_a_trip_to_another_view, test_the_draft_tab_says_unsaved_in_words_and_only_when_there_are_unsaved_edits
A read-only token sees all four views with every change control off test_a_read_only_token_sees_all_four_views_and_every_change_control_is_off
The tabs and the bar fit at 400 px and are readable in dark mode test_at_400px_the_tabs_and_the_bar_fit_and_the_marks_are_readable_in_both_schemes
A fresh form draws its top-level sections closed and the list leads to each test_a_fresh_form_draws_its_top_level_sections_closed_and_the_list_leads_to_each, test_the_real_mes_form_draws_its_sections_closed_and_the_list_names_each_in_schema_order
A section with an error or a place to fill in is open and stays so; one the person opened or closed stays as left test_a_section_with_an_error_is_open_when_drawn_and_stays_open_after_an_edit_elsewhere, test_a_section_with_a_place_to_fill_in_is_open_and_stays_so_once_it_is_filled, test_a_section_the_person_opened_stays_open_through_a_redraw_and_one_they_closed_stays_closed
Open all and Close all act on the top level and never hide an error; a place or an error still leads to its field test_open_all_and_close_all_act_on_the_top_level_and_never_hide_an_error, test_a_place_to_fill_in_and_the_verdict_still_lead_to_the_field_through_closed_sections, test_an_error_three_levels_down_opens_the_sections_around_it_when_drawn
A page with each guard removed fails the scenario it is for test_a_page_with_the_guard_removed_fails_the_scenario_the_guard_is_for
A part with a description has a "?" and one without has none; the "?" opens and closes its own text only; the switch opens and closes all of them test_a_part_with_a_description_has_a_question_mark_and_one_without_has_none, test_a_question_mark_opens_and_closes_its_own_text_and_nothing_elses, test_the_switch_opens_and_closes_every_help_and_clears_what_the_question_marks_did
Each help stays as the person left it through an edit, a refresh and a draft started from the staged config; a reload resets it and nothing is stored test_each_help_stays_as_the_person_left_it_through_every_kind_of_redraw, test_the_switch_resets_on_a_reload_and_the_page_writes_nothing_to_browser_storage
A section's help opens with its own "?" and never folds the section test_a_sections_help_opens_with_its_own_question_mark_and_never_folds_the_section
A description draws paragraphs, lists and marks; hostile text is drawn as text and runs nothing; a link is made only for an absolute https address test_a_description_draws_its_paragraphs_lists_and_marks, test_a_hostile_description_is_drawn_as_text_and_runs_nothing, test_an_allowed_link_opens_in_a_new_tab_without_a_referrer_and_is_never_made_twice
A marker that never closes is text and throws nothing; a hundred thousand characters draw in under a second test_a_marker_that_does_not_close_is_drawn_as_text_and_throws_nothing, test_a_description_of_a_hundred_thousand_characters_draws_in_under_a_second
The help fits at 400 px and is readable in both schemes; the jump list, closed sections, dock and bar still work with help open test_at_400px_every_help_fits_does_not_overlap_its_question_mark_and_is_readable, test_the_jump_list_closed_sections_and_the_dock_keep_working_with_help_open, test_the_bar_never_covers_a_help_that_has_just_been_opened

What a person still checks

The tests cannot judge how the page looks or feels on a real appliance with a real Node, so before a release someone opens it in a browser on an installed appliance. Tick each as it is done:

  • [ ] /ui/config opens, and a token with read, configure and sync is accepted; a mistyped one is refused. The page opens on the Status tab.
  • [ ] The status shows the staged config's source, its hash and whether a restart is needed, and these agree with GET /v1/status.
  • [ ] On the Draft tab, Start from the staged config fills the form from what is staged; the top-level sections start closed, and each credential, once its section is opened, shows set and never a value.
  • [ ] Changing a field shows a verdict a moment later, and breaking one shows the service's error at that field.
  • [ ] In the Draft tab's bar, Save the draft, then Stage the draft, with no scrolling to find either: the notice appears under the tabs without scrolling, and the Status tab shows the draft as not in the repository, with a prior config.
  • [ ] Export the change, also in the bar, downloads a file and a patch, and git apply of the patch to the staged file gives the file.
  • [ ] On the Status tab, Roll back asks first and names the config it restores; confirming swaps the two, and rolling back again swaps them back.
  • [ ] Setting a credential shows set; the box is empty afterwards, and the value is in no downloaded file.
  • [ ] With a token that only has read, the first change is refused and the page says which scope is needed and stops offering changes.
  • [ ] Start from this file with a starting point from examples/starting-points/ lists its places by label; filling each, saving and staging works, and staging before the last is filled is refused naming the open ones.
  • [ ] A credential place is set with Set and shows filled in; the value is in no downloaded file.
  • [ ] With a token that has configure and not sync, Read it from the repository is refused naming both scopes, and uploading still works.
  • [ ] Save as a template downloads a file with each credential as a place to fill in and no value or ciphertext of one.
  • [ ] With the assistant turned on (see The configuration assistant), Ask the assistant for a small change (for example a different poll interval) shows a summary and the edit, saves nothing until Accept into the draft, and the accepted change is in the form. A request that holds a credential is refused. With the assistant off, the page says so.
  • [ ] A button in the Jump to list opens its section and brings it into view; Close all closes the top-level sections, and leaves open, with a note, one that holds an error.
  • [ ] Make an edit, go to Status and back: the edit is still there, and the Draft tab read "Draft (unsaved)" while you were away.
  • [ ] Narrow the window to about 400 px and toggle dark mode: no horizontal scroll, the tabs and the bar fit, and the bar does not cover the last field.
  • [ ] A long notice does not cover the top of a section reached with the Jump to list. Say what you see if it does.
  • [ ] The Draft tab: say whether it still reads long above the form, with the starting-point and assistant cards before it.
  • [ ] Field help, one field: on the Draft tab, start a draft of the MES Node Type, choose mqtt under Choose exactly one of, and open the mqtt section. Press the ? beside socket_path: its text opens under the field, no other field's help opens, and pressing it again closes it. Tab to a ? and press Space or Enter: it opens and closes, and the focus stays on it.
  • [ ] Field help, all of it: press Show field help above the form and see every field's text open, in every section you open; press a ? and that one closes while the others stay open; press the switch again and every help closes. Reload the page: the switch is off again and nothing was kept.
  • [ ] Field help at 400 px and in dark mode: with Show field help on, narrow the window to about 400 px and toggle dark mode. There is no horizontal scroll, no help runs over its ? or the field above or below it, a long name in a description wraps, and the ? and the text are readable in both schemes.
  • [ ] Field help, five descriptions in five sections. Open each, read it, and say whether it tells you what you need to set the field; a "no" is a finding to bring back, with the sentence that is missing.
    • MES, costing_variance, threshold: can you tell that 0.1 is 10% over the standard cost and not 0.1%?
    • MES, instruction_bindings, Add an entry, mode: can you tell what a binding with no mode does and what limits how many may be watching?
    • PLC / Generic Device, deviation_rules, Add an item, op: can you tell which readings count as outside the limit for gt, and what happens for a value that is not one of the six?
    • ERP, rest, material_granularity: can you tell what happens if you leave it out, and that the Node still starts?
    • Production Scheduling, communication_interface, peers: can you tell whether you need to list any peer, and what production needs of an entry anyway?
  • [ ] Reloading the page asks for the token again.

Release: v0.11.0