opsdash-app/opsdash/tools
blade34242 846503ebb8
Some checks failed
Nextcloud Server Tests / version-consistency (push) Successful in 33s
Nextcloud Server Tests / matrix-config (push) Successful in 31s
Nextcloud Server Tests / Nextcloud stable30 / PHP 8.2 (stable30, 8.2) (push) Successful in 17m29s
Nextcloud Server Tests / Nextcloud stable31 / PHP 8.2 (stable31, 8.2) (push) Successful in 18m9s
Nextcloud Server Tests / Nextcloud stable31 / PHP 8.3 (stable31, 8.3) (push) Successful in 16m50s
Nextcloud Server Tests / Nextcloud stable32 / PHP 8.2 (stable32, 8.2) (push) Successful in 15m25s
Nextcloud Server Tests / Nextcloud stable32 / PHP 8.3 (stable32, 8.3) (push) Has been cancelled
Nextcloud Server Tests / Nextcloud stable33 / PHP 8.3 (stable33, 8.3) (push) Has been cancelled
Nextcloud Server Tests / Nextcloud stable33 / PHP 8.2 (stable33, 8.2) (push) Has been cancelled
Fix Deck seed passwords
2026-05-15 07:43:35 +07:00
..
release Unify packaging flow on make appstore 2026-03-07 11:52:30 +07:00
security Finalize release hardening and README refresh 2026-02-14 14:38:45 +07:00
capture_opsdash_fixtures.sh Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00
README.md Add past-only screenshot feed workflow 2026-05-06 08:00:18 +07:00
SCREENSHOT_FEEDS.md Add past-only screenshot feed workflow 2026-05-06 08:00:18 +07:00
seed_deck_boards.php Fix Deck seed runner 2026-05-15 07:13:06 +07:00
seed_opsdash.sh Fix Deck seed passwords 2026-05-15 07:43:35 +07:00
seed_qa_calendars.php Refactor opsdash load flow and services 2026-01-13 12:26:48 +07:00
seed_qa_ics.ics ci: import QA ICS dataset 2025-11-11 18:09:42 +07:00
seed_screenshot_feed.sh Add past-only screenshot feed workflow 2026-05-06 08:00:18 +07:00
smoke_overview_load.sh Refactor opsdash presets, widgets registry, onboarding 2025-12-14 10:55:21 +07:00

Opsdash Tools (Dev/QA Only)

Utility scripts that are not shipped in the production app. Use them for local dev, CI seeding, and fixture capture. Safe to re-run; none of this is wired into runtime code.

Seed everything (calendars + Deck)

Run inside a Nextcloud container (adjust names/paths as needed):

docker exec -it nc31-dev bash -lc '
  cd /var/www/html &&
  BASE=http://localhost:8088 \
  ADMIN_USER=admin ADMIN_PASS=admin \
  QA_USER=qa QA_PASS=qa \
  QA2_USER=qa2 QA2_PASS=qa2 \
  WEEKS=4 \
  APP_PATH=/var/www/html/apps-extra/opsdash \
  bash /var/www/html/apps-extra/opsdash/tools/seed_opsdash.sh
'
  • Seeds users (admin/qa/qa2), calendars (35 per user), and 5 Deck boards with open/done/archived cards.
  • Past-only events for the last WEEKS (default 4), realistic work + weekend mix. No future events. Re-runs reuse boards/titles.
  • NC_ROOT auto-resolved by the script; override if needed.

Capture fixtures (after seeding)

BASE=http://localhost:8088 ADMIN_USER=admin ADMIN_PASS=admin \
  bash tools/capture_opsdash_fixtures.sh

Writes tools/fixtures/load-week.json, load-month.json, deck-boards.json.

Screenshot-ready feed

  • For README/marketplace assets, prefer the balanced demo feed in SCREENSHOT_FEEDS.md.
  • Seed it inside the Nextcloud container/app checkout with:
BASE=http://localhost USER=admin PASS=admin WEEKS=4 \
  bash /var/www/html/apps-extra/opsdash/tools/seed_screenshot_feed.sh
  • This feed is past-only: the last WEEKS including today, with future days in the current week intentionally skipped.
  • The script prints the exact onboarding mapping after seeding:
    • Work -> Opsdash · Deep Work + Opsdash · Meetings
    • Hobby -> Opsdash · Personal + Opsdash · Learning
    • Sport -> Opsdash · Sport + Opsdash · Recovery

CI usage

  • .forgejo/workflows/server-tests.yml runs tools/seed_opsdash.sh after starting the PHP server so Playwright always sees seeded data.
  • Keep tooling here; do not bundle in runtime artifacts or app packages.

Frontend asset rule

  • Keep app-wide stylesheet changes in css/style.css and load them through the normal Nextcloud path in OverviewController with \OCP\Util::addStyle($appName, 'style').
  • Do not move the main stylesheet into a custom Vite CSS manifest flow just to solve a local cache symptom. For Opsdash, the Nextcloud-standard css/style.css path is the intended source of truth.
  • After changing css/style.css, rebuild JS if needed and do a hard reload when verifying in a browser session that already had Opsdash open. The stylesheet URL stays stable, so dev-time browser cache can mislead you into thinking Docker did not pick up the change.