nexusLIMS.tui.apps.config.screens#

Screens for the NexusLIMS configuration TUI.

Provides ConfigScreen (the main tabbed form) and FieldDetailScreen (popup help modal for configuration fields).

Module Contents#

Classes#

FieldDetailScreen

Modal popup displaying extended help text for a configuration field.

LabArchivesGetUidDialog

Modal dialog to look up a LabArchives user ID.

ConfigScreen

Main configuration screen with 7 tabbed sections.

API#

class nexusLIMS.tui.apps.config.screens.FieldDetailScreen(field_name: str, detail_text: str, **kwargs)[source]#

Bases: textual.screen.ModalScreen

Modal popup displaying extended help text for a configuration field.

Invoked by pressing F1 while an Input or Select is focused in ConfigScreen. Dismisses on Escape, F1, or the Close button.

Parameters:
  • field_name (str) – The environment variable / field name shown as the popup title.

  • detail_text (str) – The extended description to display in the scrollable body.

CSS_PATH#

Type: typing.ClassVar

BINDINGS#

[(‘escape’, ‘dismiss_detail’, ‘Close’), (‘f1’, ‘dismiss_detail’, ‘Close’)]

Type: typing.ClassVar

compose() textual.app.ComposeResult[source]#

Compose the modal layout.

action_dismiss_detail() None[source]#

Dismiss this modal.

class nexusLIMS.tui.apps.config.screens.LabArchivesGetUidDialog(base_url: str, akid: str, access_password: str, **kwargs)[source]#

Bases: textual.screen.ModalScreen[str | None]

Modal dialog to look up a LabArchives user ID.

Prompts for the user’s email and LabArchives account password/app token, calls the user_access_info API endpoint, and dismisses with the returned UID string on success or None on cancel / error.

Parameters:
  • base_url (str) – LabArchives API base URL including the /api path (e.g. "https://api.labarchives.com/api").

  • akid (str) – Access Key ID (NX_LABARCHIVES_ACCESS_KEY_ID).

  • access_password (str) – HMAC signing secret (NX_LABARCHIVES_ACCESS_PASSWORD).

CSS_PATH#

Type: typing.ClassVar

BINDINGS#

[(‘escape’, ‘cancel_dialog’, ‘Cancel’)]

Type: typing.ClassVar

compose() textual.app.ComposeResult[source]#

Compose the dialog layout.

action_cancel_dialog() None[source]#

Dismiss without a result.

class nexusLIMS.tui.apps.config.screens.ConfigScreen(env_path: Path, **kwargs)[source]#

Bases: textual.screen.Screen

Main configuration screen with 7 tabbed sections.

Reads an existing .env file (if present), pre-populates all fields, and writes a new .env when the user saves.

Parameters:

env_path (Path) – Path to the .env file to read/write.

CSS_PATH#

Type: typing.ClassVar

BINDINGS#

[(‘ctrl+s’, ‘save’, ‘Save’), (‘escape’, ‘cancel’, ‘Cancel’), (‘f1’, ‘show_field_detail’, ‘Field Help…

Type: typing.ClassVar

compose() textual.app.ComposeResult[source]#

Compose the tabbed config form layout.

on_mount() None[source]#

Populate NEMO harvester groups and configure toggle rows after mount.

on_button_pressed(event: textual.widgets.Button.Pressed) None[source]#

Handle delete buttons on individual NEMO harvester groups.

action_save() None[source]#

Validate all fields and write the .env file.

action_cancel() None[source]#

Exit without saving, prompting if there are unsaved changes.

action_next_tab() None[source]#

Activate the next tab.

action_previous_tab() None[source]#

Activate the previous tab.

action_show_field_detail() None[source]#

Show extended help popup for the currently focused input or select.