Skip to content

Conversation

@gehrleib
Copy link

Summary

Fixes dashboard tile state synchronization and container/stack action execution.

Changes

Dashboard stack actions (stop/start/restart):

  • Map action names correctly to compose_util.php endpoints (composeUp, composeStop, composeUpRecreate)
  • Execute the returned command URL via openBox() — previously the response was silently ignored
  • Refresh stacks after command completes

Dashboard container actions (stop/start/restart):

  • Use plugin's own exec.php?action=containerAction with container name
  • Was incorrectly posting to Unraid's Events.php with container ID (never worked)
  • Refresh both Compose Stacks and Docker Containers tiles after action completes
  • Only refresh Docker tile when compose containers are visible there

Expanded stack state preserved across refreshes:

  • Use folder-based stable IDs (stack-<folder>) instead of index-based (stack-0, stack-1)
  • Restore expanded state and re-fetch container data after DOM rebuild
  • Fix \.closest()\ → \.prev()\ for sibling container div lookup

Port display:

  • Remove 3-port limit on container port/LAN IP:Port columns (was \.slice(0, 3)\ with ...)

Resolves #24

- Fix stack actions (stop/start/restart) not executing from dashboard
  - Map action names correctly to compose_util.php endpoints
  - Execute returned command URL via openBox() instead of ignoring it
- Fix container actions using wrong endpoint and parameter
  - Use plugin's exec.php containerAction with container name
  - Was posting to Events.php with container ID (never worked)
- Fix expanded stacks collapsing on refresh
  - Use folder-based stable IDs instead of index-based IDs
  - Restore expanded state and re-fetch containers after DOM rebuild
  - Fix .closest() to .prev() for sibling container div lookup
- Only refresh Docker Containers tile when compose containers are visible
- Remove 3-port limit on container port display

Resolves mstrhakr#24
When compose containers are visible in the Docker tile, loadlist()
already triggers loadComposeStacks() via the hook wrapper. Calling
both caused the dashboard to flash twice. Now dockerAction() calls
only one or the other depending on hideDockerComposeContainers.
- Console now opens via /webterminal/ nginx proxy which supports
  read/write WebSocket connections, fixing non-interactive terminal
- Logs and stack operations remain on /logterminal/ (read-only)
- show_ttyd.php: flexbox layout, conditional Done button, scrollbar
  styling, beforeunload suppression, resize dispatch
- Dashboard + Compose page: console/logs open in new window popups
- Stack operations (up/down/etc) retain Shadowbox with Done button
@gehrleib gehrleib changed the title Fix dashboard state sync and container actions WIP: Fix dashboard state sync and container actions Feb 11, 2026
- Revert console URL to /logterminal/ (/webterminal/ proxies to /var/run/
  but our sockets are in /var/tmp/ — both paths support full bidirectional
  WebSocket; read-only is controlled by ttyd -R flag, not nginx)
- Use pkill -f for robust ttyd kill (ensures stale -R instances are gone)
- Add 300ms delay after kill for clean process exit
- Fix white bar: inline background #2b2b2b on html+body tags, reduced
  Done button padding, added box-sizing: border-box
- Console: use ttyd-exec wrapper (same as Unraid native docker console)
  with -s9 -om1 flags for writable interactive terminal
- Container logs: revert to custom AJAX + window.open() via show_ttyd.php,
  matching stack logs behavior
- Shadowbox: inject CSS into parent document to darken all Shadowbox
  container elements (#sb-body, #sb-info, etc.) with !important overrides
- Use pkill -f for robust ttyd process cleanup with 300ms delay
…column

- Display Docker Compose version (e.g. v2.40.3) next to page title via docker compose version --short
- Remove redundant per-row Compose version column (was always the same value)
- Redistribute column widths: description 22%→26%, path 29%→32%
- Fix description word-wrap: use overflow-wrap instead of word-break to wrap at word boundaries
- Improve dialog messaging: stack name in titles, softer stop language, terser confirm buttons
- Fix update column not refreshing after compose up/down with refreshStackRow() AJAX
- Fix race condition: skipNextComposeLoadlist one-shot flag prevents stale data overwrite
- Show previously-checked update status for stopped stacks instead of generic 'stopped'
@gehrleib gehrleib changed the title WIP: Fix dashboard state sync and container actions Fix dashboard state sync and container actions Feb 11, 2026
@mstrhakr mstrhakr merged commit 6d6c031 into mstrhakr:main Feb 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Stopping a docker on dashboard doesn't update compose stack dashboard

2 participants