Repository navigation
Rework the UI to work like Kubri, with a read-only switch - #21
Merged
Merged
Conversation
…pace - New shell: grouped sidebar with pinned services and a find box; top bar with back/forward, connection, stack picker, command search, theme and a read-only badge; status bar with live state and the page's keys - Stacks, Services, Tasks and Nodes as lists with filter, tabs, sortable columns, an action bar naming the target, j/k cursor and Enter drill-down - Service and node panels dock beside the list as an inspector that follows the cursor; service tabs Overview, Events, Config, Logs, Errors - Log workspace at the bottom: tabs that keep following while you browse - : / Ctrl K command palette with commands, ? key overlay, g-prefixed jumps - e2e tests moved to the new layout, plus navigation tests
… scale Every connection starts read-only and the server refuses changes until it is switched off; --read-only (STACKLINE_READ_ONLY) keeps every connection locked. With changes allowed, services and containers can be restarted, stopped, started and scaled. Each change asks first and shows its docker command. Nothing is created or removed.
- Read the state again right after a change, so the next look (and the next change) sees it; start right after stop said everything was running - Stop and start only containers Docker can stop or start (paused, dead) - Say how many calls went through when a later one fails - The palette matches the names of commands, so "allow changes" finds it - The confirm dialog keeps Enter, Esc and Tab after a click on its text, takes no other keys, and calls scaling to 0 what it is - A refresh that was under way no longer flips the read-only switch or the log collection back for a moment
On macOS and Linux, ssh now forwards the remote Docker socket to a socket file in a folder made with mode 0700 (StreamLocalBindMask=0177), instead of a TCP port on 127.0.0.1 that every local program, and a web page, could reach. The folder is removed with the tunnel. Windows keeps the port for now. Requests to Docker also give up when no headers come within 30 seconds, so a hung daemon or tunnel no longer stops log collection for good.
- A clear can no longer leave a batch behind: the store checks the clear counter under its write lock and moves the cursor in the same step - Another server behind a connection pauses collecting and asks whether to keep or delete the old logs, instead of deleting them silently - Over the size limit, connections share the space equally; only those above their share lose lines - First reads of a replica run in the background, two at a time, so a slow one no longer holds up the other replicas and the events - Deploys are looked up by kind instead of among the newest 5,000 events
- --host beyond this computer answers any IP address of the machine (names stay refused) and warns that the link travels unencrypted - A settings file that cannot be read is set aside as config.broken.json; Stackline starts with the defaults and says so in the UI - CSV cells that start like a formula start with an apostrophe
# Conflicts: # CHANGELOG.md # ui/src/App.svelte
- Switching read-only off remembers the server the connection reaches (swarm or engine id). Changes are refused while the connection reaches any other server, so an SSH alias that starts pointing elsewhere never inherits the switch. Switching needs a live connection. - The dry run returns a fingerprint of its calls; the confirmed request sends it back and is refused (409) when the plan made then differs, for example because a container was replaced in between.
Each restart, stop, start or scale is stored as an event of kind "action" with its docker command and how it went. The Overview chart marks it, and the service's Events tab lists it with the lines after it.
The fake slow replica answered after 4 s, and two polls may wait 2 s each for first reads, so on a busy runner it finished during the second poll. It now takes 8 s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworks the whole UI to work like Kubri, for Docker stacks and swarms. Stackline keeps its name, logo, colors and fonts. Read-only becomes a switch per connection, like Kubri's: locked by default, and when unlocked Stackline can restart, stop, start and scale. Delete, shell and edit did not come over.
What changes
Shell. The sidebar groups the pages (Overview; Workloads: Stacks, Services, Tasks; Cluster: Nodes; Logs), lists pinned services, and has a box that finds a page or service. The top bar has Back/Forward, the connection, a stack picker that narrows every list (like Kubri's namespace picker), "Search or run a command", the theme and the read-only switch. A status bar shows live state and the keys of the page.
Lists. Stacks, Services, Tasks (Containers without swarm) and Nodes each get a breadcrumb, title with count,
/filter, tabs (All / Needs attention / Pinned or Running), sortable columns and an action bar that names the row it acts on.j/kor the arrow keys move the cursor, which only shows once moved, so nothing acts on a row out of sight. Enter drills down: stack to services, service to tasks, node to tasks. Back restores the list with its filter and cursor. Filter and tab survive a restart.Inspector. The service and node panels dock beside the list instead of covering it. A click or
dopens one, and it follows the cursor. Service tabs: Overview (likely problem, top error, at a glance, replicas), Events (deploys, stops, crashes), Config, Logs, Errors. The expand button lets it use the whole page.Log workspace.
lon any row (or Tail below) opens a tab at the bottom that keeps following its lines while you browse. It can be resized, shrunk withw, and is remembered per connection.Read-only switch. Every connection starts read-only and the server refuses any change until Read-only in the top bar is clicked and confirmed (or "Allow changes" is run from the palette). The badge then turns amber and says Changes allowed; one click locks it again. Changing a connection's host or kind locks it.
stackline serve --read-only(orSTACKLINE_READ_ONLY=1) keeps every connection locked, and the update restart keeps the flag.Changes. With changes allowed, the Services and Containers lists and the inspector offer:
rrestart (swarm:docker service update --force),xstop andustart (Compose and lone containers, per service or per container),cscale (replicated swarm services, 0 to 100). Each change first asks in a dialog that shows thedockercommand it amounts to, worked out by the server in a dry run. Nothing is created or removed. Changes that fit no row in a list are left out of its action bar.Keys.
:or Ctrl K opens the palette, which now also runs commands.?lists every key.gplus a letter jumps to a page; Alt ←/→ go back and forward.Tests
svelte-checkclean,vite buildokcargo test,cargo clippy --all-targets,cargo fmt --checkclean. New unit tests for the plans and spec changes, and an API test that a connection refuses changes until unlocked and locks again when its host changeschanges.spec.tschecks that the API refuses changes while locked, that unlocking asks first, thatrand Stop show the rightdockercommand and cancel cleanly, and that the inspector offers the changes. Existing tests were moved to the new layout, andnavigation.spec.tswas added for drill-down plus Back, the inspector following the cursor, the workspace surviving a page change and a reload, the stack picker,:and?Screenshots (light and dark) are in the project files under
screens/kubri-ux/.