Settings

The Settings tab is the admin-only, central environment-profile editor. An environment (env) is a named settings blob — base URLs, credentials, emulator/ACS targets, MCP services, ClickHouse, Platform DB, Log Server, TestRail — stored centrally in the gateway profiles table (not in any single container’s run-reports/settings.json). A run picks an env via the Env: dropdown on the Tests tab; the gateway then materializes that env’s settings onto a worker (PUT /api/settings as admin) immediately before starting the run.

Settings tab — central environment-profile editor

Non-admins cannot see this tab at all (x-show="tab === 'settings' && isAdmin()"). They still select an env per run from the Tests-tab Env: dropdown — they just can’t view or edit the profiles behind it. See Accounts, Roles & Audit and Running Tests for the run-time selection.

At a glance
  • Settings is where an admin defines environments. Pick an existing profile from the Environment profile dropdown to edit it, or choose New to author a fresh one, then Save to store it back centrally on the gateway.

  • Save-as / New profile, list & select, Delete, and Export / Import (JSON of one or all profiles) all live in the profile bar at the top of the tab.

  • A profile can be bound to a stand; deleting a profile can also tear down the mcp-tr-emul-<env> emulator wrapper it provisioned.

  • New fields beyond the original base-URL set: Platform DB (MySQL/Oracle), Log Server (SSH), and a jira_base_url used to render the case Reference as a link.

  • Secrets are redacted (**) in every Settings GET response — the UI round-trips the mask so saving never overwrites a stored secret.

A profile populates defaults — individual YAML cases still override per-test via their own base_url / credentials / emulator_serial fields. For the full env model, gateway routing, and stand binding see Environments & the Gateway.

Environment Profiles

The profile bar at the top of the tab manages the central profile set. All profile mutations are admin-only and persist in the gateway profiles table (scripts/auth_db.pyname, settings_json, created_by, updated_at).

Control Behaviour

Environment profile (dropdown)

Lists every central profile (GET /api/gateway/profiles). New clears the form to author a fresh env; selecting a name loads that env’s settings (GET /api/gateway/profiles/{name}) into the form below.

Save

Upserts the current form as the selected (or newly named) profile (POST /api/gateway/profiles with {name, settings}). Saving a new env that carries an emulator_url but no emulator_mcp_url can auto-provision an mcp-tr-emul-<env> wrapper and write its URL back into the profile.

Delete

Removes the selected profile (DELETE /api/gateway/profiles/{name}). With teardown enabled it also best-effort deletes the provisioned mcp-tr-emul-<env> emulator-wrapper Portainer stack.

Export all / Export selected

Downloads a JSON backup — all profiles, or just the selected one — for versioning or transfer to another gateway.

Import

Uploads a previously exported JSON file and upserts the profiles it contains.

A profile can be bound to a stand so that stand defaults to that env. Stand binding and worker provisioning are covered in Environments & the Gateway.

What Lives in an Env Profile

These are the core fields stored in each profile. Switching environments is a matter of selecting (or authoring) a profile with the right set — you no longer hand-edit four URLs on a shared container.

Field Notes

Support Portal URL

Where the agent navigates for tests with portal: support. Hint shown inline, e.g. http://ui.test-agent.rd.friendly-tech.com/support-portal.

Management Portal URL

Same for portal: management.

Backend UI URL

FtApiClient uses this for monitoring rules, group updates, device tree queries (was labelled "Backend API URL"). Default: http://ui-backend.test-agent.rd.friendly-tech.com.

Emulator URL

TR-069 emulator HTTP API base for direct parameter queries (/apiV2/parametersByPrefix). Default: http://tr069-emulator.test-agent.rd.friendly-tech.com.

Emulator MCP URL

mcp-tr-emul sidecar — used by EmulatorMCP for start_serial_from_shared_folder, set_parameters_batch, invoke_event etc. Default http://mcp-tr-emul:8082 (resolved inside the worker’s docker network). New envs with an emulator_url but blank MCP URL can have an mcp-tr-emul-<env> wrapper auto-provisioned and this field filled in on save.

ACS URL

The ACS endpoint the emulated device reports to (written to Device.ManagementServer.URL right after start_from_shared / start_protocol). Must point at the same environment as the Backend / Emulator URLs, otherwise the device materialises on the wrong ACS and the portal the test navigates to won’t see it. Default: http://ftacs.test-agent.rd.friendly-tech.com/ftacs/ACS.

ACS Username / Password

Basic/Digest credentials for authenticated CWMP registration. Empty = no auth (use the plain /ftacs/ACS endpoint); to exercise auth set the ACS URL to the /ftacs-basic/ACS or /ftacs-digest/ACS endpoint and fill these in.

Username / Password

Default portal credentials when a YAML leaves them blank. Default: admin / admin.

Keep the portal, backend, emulator, and ACS hosts inside one environment within a single profile. A mixed profile sets parameters on one emulator and reads state from another.

Platform DB

Drives the db_query step type (scripts/platform_db.py) — a state-read against the platform’s primary relational DB (one of MySQL / Oracle).

Field Notes

Platform DB Type

mysql, oracle, or empty to disable the feature.

Platform DB Host

DB host. Default rd.friendly-tech.com.

Platform DB Port

Blank/invalid falls back to the engine default (MySQL 3306, Oracle 1521). Default 30304.

Platform DB Name

Schema name for MySQL; the service_name for Oracle thin-mode DSN (host:port/service_name).

Platform DB User / Password

Connection credentials.

Log Server

Drives the log_check step type (scripts/log_server.py) — an SSH login that greps device/server logs for error patterns after a test runs. Stand-specific: an empty host disables the feature.

Field Notes

Log SSH Host

SSH host. Empty = log checks disabled.

Log SSH Port

Default 22.

Log SSH User / Password

SSH credentials.

Log Dir

Directory the log files live in.

Log Error Pattern

Regex / substring the check scans for.

MCP Services

Field Used by

BBF Tree MCP URL

The Generate Tree button in the Editor (NL → XML tree) and the converter’s Stage 2 LLM enrichment (fetch_bbf_spec_context) to ground prompts in TR-181 / TR-098 spec snippets. Deployed sidecar: http://bbf-tree-mcp:7020/sse.

Qdrant MCP URL

Direct Qdrant access for the converter’s ft_code lookup (legacy backend-RAG path, off by default — see importing-tests.adoc#xml-api). Production: http://ai.friendly-tech.com:8095.

Knowledge MCP URL

Stateless retrieval over ft_docs_v2 (AsciiDoc + Java) and ft_ui_map (widget catalog). Used by both the converter (TR-181 spec context for widget-scoring tests) and the test-runner Claude (proactive widget catalog prompt for interact steps). Defaults via the KNOWLEDGE_MCP_URL docker-compose env to http://ai.friendly-tech.com:7030/sse.

The TR-069 emulator MCP and the Playwright MCP are launched inside the worker container — no URL configuration needed.

ClickHouse

Optional block (collapsed by default — click the arrow to expand).

Used only when INTERFERENCE_DASHBOARD_SEED=true and a test has the RUN_INTERFERENCE_DIAGNOSTICS UI precondition. The agent writes synthetic points into ftacs_qoe_ui_data so the interference history widget renders deterministic colours / counts.

Field Default

ClickHouse URL

http://95.217.35.86:8123

Database

ftacs_qoe_ui_data

User

ftacs

Password

(redacted in GET responses)

TestRail Credentials & Links

Mandatory before any TestRail-import / reimport flow works.

Field Notes

TestRail URL

https://friendlytechnologies.testrail.io

TestRail Email

Personal SSO email or team account.

TestRail API Key

Generated from TestRail user profile → API Keys. Redacted in GET responses.

Auto-sync Interval (min)

0 disables; positive integer enables the background sync loop that re-converts modified cases.

Jira Base URL (jira_base_url)

Browse-URL prefix used to render a case’s Reference field as a clickable link. Default https://friendly-tech.atlassian.net/browse/.

The connection pill on the Tests tab and inside the TestRail modal reflects the current credential validity.

Secret Redaction

Secret fields are never returned verbatim over the Settings HTTP API — a GET masks each non-empty secret as **. The redacted keys are password, acs_password, clickhouse_password, platform_db_password, log_ssh_password, nbi_password, and testrail_api_key.

When the UI re-submits a profile it round-trips the mask for any secret the user did not change; the server swaps the mask back for the stored value on save, so a save never overwrites a real secret with the mask. An empty secret stays empty (so the UI can tell "unset" from "set"). Internal callers read the real values directly via load_settings().

Saving

  • Save — upserts the form as the selected/named central profile (POST /api/gateway/profiles). URLs are validated (must parse as http(s)://…​).

  • Reload / profile re-select — re-reads the profile from the gateway.

  • The status text next to the buttons shows the result (green = saved, red = validation error).

Settings take effect for new runs (the env is materialized onto the worker at run start) and new conversions. Already-running tests are not interrupted.

Environment Variable Overrides

For Docker Compose / Portainer deployments where a worker’s local settings.json is the source of truth (e.g. the gateway is not materializing an env), every field can be set via environment variables. Env vars take precedence over settings.json at server startup; the UI shows the effective value but persisting overwrites it on next save.

Field Env variable

Support Portal URL

BASE_URL_SUPPORT

Management Portal URL

BASE_URL_MANAGEMENT

Backend UI URL

FT_PORTAL_URL

Emulator URL

EMULATOR_URL

Emulator MCP URL

EMULATOR_MCP_URL

ACS URL

TR069_ACS_URL

ACS Username

TR069_ACS_USERNAME

ACS Password

TR069_ACS_PASSWORD

Username

FT_PORTAL_USER

Password

FT_PORTAL_PASSWORD

BBF Tree MCP URL

BBF_TREE_MCP_URL

Qdrant MCP URL

QDRANT_MCP_URL

Knowledge MCP URL

KNOWLEDGE_MCP_URL

ClickHouse URL

CLICKHOUSE_URL

ClickHouse Database

CLICKHOUSE_DB

ClickHouse User

CLICKHOUSE_USER

ClickHouse Password

CLICKHOUSE_PASS

Platform DB Type

PLATFORM_DB_TYPE

Platform DB Host

PLATFORM_DB_HOST

Platform DB Port

PLATFORM_DB_PORT

Platform DB Name

PLATFORM_DB_NAME

Platform DB User

PLATFORM_DB_USER

Platform DB Password

PLATFORM_DB_PASSWORD

Log SSH Host

LOG_SSH_HOST

Log SSH Port

LOG_SSH_PORT

Log SSH User

LOG_SSH_USER

Log SSH Password

LOG_SSH_PASSWORD

Log Dir

LOG_DIR

Log Error Pattern

LOG_ERROR_PATTERN

Jira Base URL

JIRA_BASE_URL

TestRail URL

TESTRAIL_URL

TestRail Email

TESTRAIL_EMAIL

TestRail API Key

TESTRAIL_API_KEY

TestRail Auto-sync minutes

TESTRAIL_SYNC_INTERVAL

QA Notes Pipeline (not exposed in the UI)

These are not editable from Settings — they configure the wiring between test-runner-agent and knowledge-mcp (stack 12) and are set in the Portainer stack env. See qa-notes.adoc#env.

Variable Stack Purpose

QA_NOTES_DIR

test-runner

On-disk root for the QA Notes YAMLs. Defaults to /data/qa-notes. The qa-notes named volume mounts here.

KNOWLEDGE_MCP_REST_URL

test-runner

Webhook target. Defaults to http://ai.friendly-tech.com:7030. Test-runner POSTs /admin/refresh-notes here after every note save.

KNOWLEDGE_ADMIN_TOKEN

both

Shared secret authenticating /admin/refresh-notes calls. Must match on both stacks. Empty disables the endpoint (503).

QA_NOTES_SOURCE_URL

knowledge-mcp

Pull endpoint on the test-runner — defaults to http://ai.friendly-tech.com:8083/api/notes/raw. QaNotesIndex.refresh() reads from here.

QA_NOTES_COLLECTION

knowledge-mcp

Qdrant collection name. Defaults to ft_qa_notes.

For one-off retargeting prefer authoring or editing a profile in the UI; the env-var path is for deploy-time configuration that should track with the container image.