hermesandhermes 2e48d11b77 feat(ui): pre-fill branch filter from ?filter=<text> GET-param (#67)
## Summary

Lets the brencher UI pre-fill its branch filter from a `?filter=<text>` query
parameter on initial page load.

## Use case

Deep-link filtered views from external tooling (runbooks, Gitea issues,
dashboards). For example:

- `https://brencher.rudolf.keenetic.link/?filter=connectivity_tester` — go straight to the new stack after #65 lands.
- `https://brencher.rudolf.keenetic.link/?filter=hermes_infra%20v0.4.0` — multiple words (current filter does substring match on all).

## Changes

`frontend/app.js`: IIFE on initial load reads `URLSearchParams`, sets
`branchFilter.value`, calls `filterBranches()`. Empty / missing param
leaves the filter empty (no pre-fill, no apply) — same as before.

## Acceptance

- `?filter=foo` pre-fills the input AND applies the filter on initial render.
- Empty `?filter=` is a no-op (param present but empty string).
- No param at all is a no-op (no pre-fill, no apply).
- Existing inline typing behaviour unchanged.

## Resolves

- admin/brencher#66 (brencher UI: support ?filter=<text> GET-param that auto-fills the filter input)

## Related

- admin/brencher#65 (PR feat(configs): add connectivity_tester stack) — once #65 merges, the link `/<brencher-host>/?filter=connectivity_tester` becomes a one-click entry point to the new stack.

---------

Co-authored-by: hermes <hermes@rudolf.keenetic.link>
Reviewed-on: admin/brencher#67
Co-authored-by: hermes <rudolfss13+hermes@gmail.com>
2026-09-14 18:43:01 +02:00
2026-03-19 17:01:23 +01:00
2026-03-19 19:34:35 +01:00
2026-08-12 21:09:07 +02:00
2026-05-09 17:31:50 +02:00
2026-03-19 17:01:23 +01:00
2026-01-20 22:49:40 +01:00
2026-03-19 17:01:23 +01:00
2026-03-20 14:00:56 +01:00
2026-03-19 17:01:23 +01:00

Technical description

Use language python.

Locally run in venv create with uv tool. Use venv with uv for Python environment management and dependency installation. Keep requirements.txt updated.

Backend server flask.

UI - use plain javascript

App should be delivered as docker image.

Generate docker compose file to deploy to docker swarm.

Local start

python ./backend/app.py brencher_local1:docker_swarm_check_by_version noweb

Prod recovery

uv venv --python 3.12.3 .venv

uv pip install -r requirements.txt

python ./backend/app.py brencher:docker_swarm_check_by_version noweb

Update docker secret

docker service scale brencher_brencher-backend=0 brencher2_brencher-backend=0 docker service update --secret-rm brencher-secrets brencher_brencher-backend docker service update --secret-rm brencher-secrets brencher2_brencher-backend docker secret rm brencher-secrets

printf "GIT_USERNAME=git\nGIT_PASSWORD=TODO\n" |
docker secret create brencher-secrets -

docker service update --secret-add brencher-secrets brencher_brencher-backend docker service update --secret-add brencher-secrets brencher2_brencher-backend docker service scale brencher_brencher-backend=1 brencher2_brencher-backend=1

S
Description
No description provided
Readme
1.2 MiB
Languages
Python 84.3%
JavaScript 12.1%
CSS 2.1%
HTML 0.9%
Dockerfile 0.6%