Commit Graph

9 Commits

Author SHA1 Message Date
ske087 b4c3f65636 Dashboard: move Recent Activity under Playlist Overview and split out heartbeats
Moves the Recent Activity card into the main column, directly beneath
Playlist Overview, so the two cards that describe "what the server and
its players are doing" sit together. System Status stays full-width below
the grid.

While moving it, the card was showing almost nothing useful: player
feedback ("Feedback received from ...") is a ~15s heartbeat that makes up
84% of all log rows (423/506) and 18 of the newest 20, so the list was a
wall of repeated one-line status reports that pushed real events off the
screen.

The card is now tabbed:
  - "Activity" (default) - uploads, logins, HTTPS changes, deployments...
  - "Player heartbeats"  - the raw status stream, on demand

get_recent_logs() gains exclude_prefix / include_prefix so the split
happens in SQL. Filtering a single wide window in Python instead gave only
7 useful entries, because the number returned depends on heartbeat volume
and would fall further as more players are added. Both queries now return
25. Prefixes are passed with autoescape=True so a literal '%' or '_' in a
prefix matches itself rather than acting as a LIKE wildcard.

UI: the list is capped at 320px and scrolls, so a long log cannot make
the card dominate the page. Long messages wrap instead of pushing the
timestamp off-screen (previously float:right), and the debug level now
has its own colour instead of rendering as "info" green.

Verified: 25/25 entries per tab, no cross-contamination, no horizontal
overflow at 500-1400px, tabs wrap below the title under ~600px, and dark
mode uses the theme variables.
2026-09-11 15:42:45 +03:00
ske087 84b5cd3d48 Dashboard: add Playlist Overview card and compact the sidebar
Restructure the dashboard into a two-column layout: a wide main column
holding the new Playlist Overview card, and a narrow (220px) right
sidebar with the compacted Quick Actions and Workflow Guide cards.

The Overview card answers "which playlist should I add media to, and
who will see it?" without opening each playlist. Per playlist it shows:
  - name, linked to that playlist's content manager
  - item count, total duration and current version
  - "N/M online" coverage, or a "no players" warning
  - one chip per assigned player, with an online/offline dot, linking
    to that player's manage page
  - an explicit empty state when no player is assigned

Players with no playlist are surfaced in a separate warning, since they
silently display nothing.

main.py builds this in a fixed number of queries: players are fetched
once and grouped by playlist_id, rather than calling
Playlist.players per row (which would be one query per playlist).

Layout notes:
- minmax(0, 1fr) on the main column so long names cannot widen the grid
- sidebar is sticky on tall screens and collapses below the main column
  under 900px, where the two small cards sit side by side
- sidebar cards used the global .card hover lift; suppressed for these

Also fixes a corrupted emoji (U+FFFD) in the System Status card.

Verified at 1600/1200/950/850/600px: no overflow, no button label
wrapping, and correct dark-mode colours.
2026-09-11 14:28:49 +03:00
Quality App Developer a4262da7c9 chore: fix file permissions and ownership across project
- Changed ownership of all files to scheianu:scheianu
- Set directories to 755 permissions (rwxr-xr-x)
- Set files to 644 permissions (rw-r--r--)
- Made shell scripts executable (755)
- Allows development without requiring sudo for file modifications
- Improves development workflow and security
2026-01-15 22:39:51 +02:00
Quality App Developer 48f1bfbcad Add HTTPS configuration management system
- Add HTTPSConfig model for managing HTTPS settings
- Add admin routes for HTTPS configuration management
- Add beautiful admin template for HTTPS configuration
- Add database migration for https_config table
- Add CLI utility for HTTPS management
- Add setup script for automated configuration
- Add Caddy configuration generator and manager
- Add comprehensive documentation (3 guides)
- Add HTTPS Configuration card to admin dashboard
- Implement input validation and security features
- Add admin-only access control with audit trail
- Add real-time configuration preview
- Integrate with existing Caddy reverse proxy

Features:
- Enable/disable HTTPS from web interface
- Configure domain, hostname, IP address, port
- Automatic SSL certificate management via Let's Encrypt
- Real-time Caddyfile generation and reload
- Full audit trail with admin username and timestamps
- Support for HTTPS and HTTP fallback access points
- Beautiful, mobile-responsive UI

Modified files:
- app/models/__init__.py (added HTTPSConfig import)
- app/blueprints/admin.py (added HTTPS routes)
- app/templates/admin/admin.html (added HTTPS card)
- docker-compose.yml (added Caddyfile mount and admin port)

New files:
- app/models/https_config.py
- app/blueprints/https_config.html
- app/utils/caddy_manager.py
- https_manager.py
- setup_https.sh
- migrations/add_https_config_table.py
- migrations/add_email_to_https_config.py
- HTTPS_STATUS.txt
- Documentation files (3 markdown guides)
2026-01-14 12:02:49 +02:00
ske087 d395240dce Apply timezone fix to all templates - convert UTC to local time 2025-11-28 15:51:10 +02:00
DigiServer Developer 9d4f932a95 Add dark mode support and replace group assignment with playlist assignment
- Added comprehensive dark mode styling to all pages:
  * Dashboard (workflow guide, secondary text, log items)
  * Admin panel with user management system
  * Content/playlist management page
  * Upload media page
  * Add player page

- Implemented user management system:
  * Create/edit/delete users
  * Two role types (user/admin)
  * Reset password functionality
  * Role-based permissions

- Replaced group assignment with playlist assignment:
  * Players now directly assigned to playlists
  * Updated add player form and backend
  * Removed group selection from player creation

- Fixed bugs:
  * Updated instance_path configuration for SQLite
  * Fixed import path in app factory
  * Updated dependencies (Pillow 11.0.0, removed gevent)

- Added start.sh script for easy development server launch
2025-11-14 22:16:52 +02:00
ske087 498c03ef00 Replace emoji icons with local SVG files for consistent rendering
- Created 10 SVG icon files in app/static/icons/ (Feather Icons style)
- Updated base.html with SVG icons in navigation and dark mode toggle
- Updated dashboard.html with icons in stats cards and quick actions
- Updated content_list_new.html (playlist management) with SVG icons
- Updated upload_media.html with upload-related icons
- Updated manage_player.html with player management icons
- Icons use currentColor for automatic theme adaptation
- Removed emoji dependency for better Raspberry Pi compatibility
- Added ICON_INTEGRATION.md documentation
2025-11-13 21:00:07 +02:00
ske087 e5a00d19a5 updated digiserver 2 2025-11-12 16:07:03 +02:00
ske087 2deb398fd8 Add development testing environment
Templates (8 basic templates):
- base.html: Main layout with navigation, flash messages, responsive design
- login.html: User login form with remember me option
- register.html: User registration with validation
- dashboard.html: Main dashboard with statistics cards and recent activity
- players_list.html: Players list placeholder
- add_player.html: Add player form
- groups_list.html: Groups list placeholder
- create_group.html: Create group form
- content_list.html: Content list placeholder
- upload_content.html: File upload form
- admin.html: Admin panel with system overview

Development Setup:
- run_dev.sh: Automated development server setup script
  - Creates virtual environment
  - Installs dependencies
  - Initializes database
  - Creates default admin user (admin/admin123)
  - Runs Flask development server on port 5000

Static Files:
- static/uploads/ directory with .gitkeep
- Ready for media file uploads

Testing Features:
 Basic navigation and routing
 Authentication flow (login/register/logout)
 Dashboard with statistics
 Flash message system
 Responsive design with clean UI
 Placeholder templates for all routes

Ready for manual testing at http://localhost:5000
2025-11-12 10:39:25 +02:00