Commit Graph

98 Commits

Author SHA1 Message Date
00062e4d4a Merge pull request 'fix: allocate PTY for agent install to work with sudo requiretty' (#38) from feat/push-monitoring-agent into master
Reviewed-on: #38
2026-06-11 18:53:19 -04:00
63bf125420 fix: allocate PTY for agent install to work with sudo requiretty
The remote server has 'Defaults requiretty' in sudoers, which prevents
sudo from running without a TTY. Modified SSHService::exec() to accept
an optional  parameter that allocates a pseudo-terminal, and
extracts the exit status from output when PTY is used (since phpseclib
doesn't return exit status in PTY mode).
2026-06-11 18:52:40 -04:00
5f6788970f Merge pull request 'feat: push-based monitoring with remote agent' (#37) from feat/push-monitoring-agent into master
Reviewed-on: #37
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-11 18:50:21 -04:00
f4c534c020 fix: always use sudo for agent install (remove fallback check)
The sudo -n check was incorrectly detecting that sudo required a
password, causing fallback to plain bash without root permissions.
Now we always run the installer via sudo bash, consistent with how
all other SSH commands work (systemctl, reboot, etc.).
2026-06-11 18:48:23 -04:00
28d2dfecce Merge pull request 'fix: add sudo fallback to agent installer + improve error output' (#36) from feat/push-monitoring-agent into master
Reviewed-on: #36
2026-06-11 18:46:13 -04:00
85bb70fe0f fix: add sudo fallback to agent installer + improve error output
- AgentService: try sudo -n first, fall back to bash without sudo
- AgentService: add sudo to uninstall command
- AgentService: trim error output to last 20 lines for readability
- View: show SSH output inline in error toast
- Fix undefined $path variable in success path
2026-06-11 18:45:14 -04:00
16044445d4 Merge pull request 'feat: push-based monitoring with remote agent' (#35) from feat/push-monitoring-agent into master
Reviewed-on: #35
2026-06-11 18:31:47 -04:00
bfa102cf97 feat: push-based monitoring with remote agent
- Add database migration 006 for agent_key, agent_installed, agent_install_path, agent_last_seen_at columns
- Add Server model methods: findByAgentKey, generateAgentKey, regenerateAgentKey, updateAgentLastSeen, setAgentInstalled
- Auto-generate agent_key on server creation
- Create AgentService for SSH-based install/uninstall of remote agent
- Create bin/agent.sh - bash agent script for remote servers
- Create install/agent-install.sh and install/agent-uninstall.sh
- Create install/servermanager-agent.service systemd unit
- Add POST /api/metrics/push endpoint (auth via agent_key)
- Add web routes for agent install/uninstall/regenerate-key
- Add agent status section to server detail view with install/uninstall modals
- Make MonitoringService::saveMetrics() public for reuse
2026-06-11 18:28:22 -04:00
fcd8565890 Merge pull request 'fix: filtrar servidores por usuario/equipo segun rol' (#34) from fix/server-access-filtering into master
Reviewed-on: #34
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-11 17:27:23 -04:00
6e4bf2ad1d build: compile APK v1.7.0 (versionCode 9) 2026-06-11 17:26:54 -04:00
1bc8236d4d fix: filtrar servidores por usuario/equipo según rol
- Server::getAccessibleServerIds(): super_admin ve todos los servidores;
  admin y operator solo ven propios, asignados directos o por equipo
- DashboardController: unifica lógica usando getAccessibleServerIds()
- ServerController::metrics(): agrega control de acceso requireServerAccess()
- ApiController::status(): filtra estadísticas por servidores accesibles
- Android: bump versionCode 9, versionName 1.7.0
2026-06-11 13:09:53 -04:00
830161ad87 Merge pull request 'docs: update AGENTS.md — verified against current codebase' (#33) from feat/android-v1.6.0 into master
Reviewed-on: #33
2026-06-09 19:49:58 -04:00
dec6aa3527 docs: update AGENTS.md — verified against current codebase 2026-06-09 19:49:15 -04:00
d52cb9ae8b Merge pull request 'fix: show stopped services in list + loading bar on action' (#32) from feat/android-v1.6.0 into master
Reviewed-on: #32
2026-06-09 19:32:00 -04:00
4d00f0d8b1 bump to 1.6.1 2026-06-09 19:31:42 -04:00
92bc12355c fix: show stopped services in list + loading bar on action
- API: --all flag in systemctl list-units to show inactive services
- API: removed head -50 limit
- Android: LinearProgressIndicator while service action is running
2026-06-09 19:29:36 -04:00
90b4d62486 Merge pull request 'fix: allow dots in service names for systemd (nginx.service, ssh.service)' (#31) from feat/android-v1.6.0 into master
Reviewed-on: #31
2026-06-09 19:25:57 -04:00
96a73384c4 fix: allow dots in service names for systemd (nginx.service, ssh.service) 2026-06-09 19:25:14 -04:00
9c63ed8e53 Merge pull request 'v1.6.0 — fix service 500, search bar, modal redesign' (#30) from feat/android-v1.6.0 into master
Reviewed-on: #30
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 19:22:37 -04:00
3e13ac60f1 feat: v1.6.0 — fix service 500, search bar, modal redesign
- Fix 500 error: cast to string before preg_replace
- Search bar to filter services by name/description
- Redesigned service action modal with status badge + colored buttons
- Version 1.6.0
2026-06-09 19:20:18 -04:00
2a29585aa2 Merge pull request 'v1.5.0 — service actions + cleanup' (#29) from feat/android-v1.5.0 into master
Reviewed-on: #29
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 19:05:07 -04:00
c4277c937f feat: v1.5.0 + service actions + remove duplicate apk
- Services tab: start/stop/restart/reload via dialog
- Backend: POST /api/servers/:id/service-action
- Removed duplicate APK download from dashboard view
- Version bump to 1.5.0
2026-06-09 19:02:41 -04:00
5558aa7834 Merge pull request 'Android redesign: v1.4.0' (#28) from feat/android-app-redesign into master
Reviewed-on: #28
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 18:37:10 -04:00
d4ab8c7b40 bump to 1.4.0 2026-06-09 18:31:46 -04:00
eaf3045d13 feat: header gradiente, scrollable tabs, logout en perfil
- Dashboard: header con gradiente, avatar circular con inicial
- ServerDetail: ScrollableTabRow, header gradiente
- Notifications: header gradiente
- Profile: boton Sign Out que redirige a Login
- Bottom nav simplificado (3 items)
- Version 1.3.0
2026-06-09 18:30:23 -04:00
806c593c1c Merge pull request 'bump to 1.3.0 + teams filter client-side sin recarga' (#27) from feat/android-app-redesign into master
Reviewed-on: #27
2026-06-09 18:20:56 -04:00
e6717d0578 bump to 1.3.0 + teams filter client-side sin recarga 2026-06-09 18:19:27 -04:00
c5f0af971e Merge pull request 'feat/android-app-redesign' (#26) from feat/android-app-redesign into master
Reviewed-on: #26
2026-06-09 18:16:15 -04:00
af3315e6ab feat: dashboard version local, bottom nav simplificado, services+actions tabs
- Dashboard muestra version del gradle (no API)
- Header sin iconos duplicados (notifications solo en bottom nav)
- Bottom nav: Dashboard, Servers, Alerts (sin Profile ni Logout)
- ServerDetail: tab Services con lista de systemd services
- ServerDetail: tab Actions con Test/Reboot/Shutdown
- Backend: API endpoints para services, reboot, shutdown, test
2026-06-09 18:15:04 -04:00
13f14416a4 feat: teams redesign — cards, filter, user autocomplete
- Teams index: cards with animation, search filter
- Team detail: user autocomplete via AJAX (search on type)
- CSS: card grid styles, autocomplete dropdown
- Backend: searchUsers endpoint, filter support
2026-06-09 18:11:20 -04:00
5d68728b44 Merge pull request 'Notificaciones instantáneas + pantalla de notificaciones + fixes' (#25) from feat/android-app-redesign into master
Reviewed-on: #25
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 17:55:24 -04:00
b1fc0e2cfe bump version to 1.2.0 2026-06-09 17:54:47 -04:00
a43e0ae3a4 feat: instant notifications + Notifications screen
- NotificationPoller polls every 30s while app is in foreground
- Poller auto-starts on resume, stops on pause
- New NotificationsScreen with mark-as-read, mark-all-read, infinite scroll
- Bottom nav: Alerts tab with unread badge
- Dashboard: bell icon with unread badge
- Backend: GET /api/notifications/unread-count endpoint
- App version 1.1.0
2026-06-09 17:51:55 -04:00
61a058275c Merge pull request 'fix: AuditService::log() requires 3 args (action, entityType, entityId)' (#24) from feat/android-app-redesign into master
Reviewed-on: #24
2026-06-09 17:42:02 -04:00
d1c36d4642 fix: AuditService::log() requires 3 args (action, entityType, entityId) 2026-06-09 17:40:22 -04:00
ece32a41e1 Merge pull request 'Notificaciones push, auto-update, admin panel v1.1.0' (#23) from feat/android-app-redesign into master
Reviewed-on: #23
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 17:33:46 -04:00
ddec27ca5c fix: notification worker reliability + version bump to 1.1.0
- Bump android versionCode=2 versionName=1.1.0
- NotificationWorker: use UPDATE policy to reschedule after login
- Immediate notification check on login via LaunchedEffect
- Added logging for debugging notification delivery
- DB already has test notification inserted
- Fixed admin app version form (POST redirect)
2026-06-09 17:31:26 -04:00
c2652acf70 Merge pull request 'Auto-update + Notifications + Admin panel' (#22) from feat/android-app-redesign into master
Reviewed-on: #22
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 17:22:55 -04:00
1f67fc1fcd feat: push notifications via WorkManager background polling
- NotificationWorker checks for new notifications every 15 min (WorkManager)
- Shows Android system notifications with Mark Read action
- Notification channels for general + alerts
- Permission request on Android 13+
- Boot persistence via WorkManager
- On-app-open immediate notification check
2026-06-09 17:22:01 -04:00
8beb792ed3 Merge pull request 'Admin: version management + notifications + auto-update' (#21) from feat/android-app-redesign into master
Reviewed-on: #21
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 17:17:24 -04:00
086bbda6e8 fix: app version form now uses POST redirect with flash message instead of AJAX 2026-06-09 17:15:47 -04:00
cc39239e78 Merge pull request 'Admin: version management + notifications + auto-update' (#20) from feat/android-app-redesign into master
Reviewed-on: #20
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 17:08:04 -04:00
53e9b92a8d feat: admin app version mgmt + notification system
- New tables: app_config, notifications
- Admin views: App Version editor, Notification sender
- API: GET /api/notifications, POST /api/notifications/:id/read, POST /api/notifications/read-all
- App version now stored in DB, editable by super admin
- Notifications: send to all users or specific user
- Android notification models + API client
- Sidebar: App Version + Notifications links for super_admin
2026-06-09 17:06:22 -04:00
9203cda981 Merge pull request 'Rediseño completo app Android + auto-update' (#19) from feat/android-app-redesign into master
Reviewed-on: #19
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 17:00:22 -04:00
3a4e8eb52c feat: add auto-update mechanism with in-app APK download 2026-06-09 16:59:08 -04:00
e86e670b61 Merge pull request 'Rediseño completo app Android + registro/perfil API' (#18) from feat/android-app-redesign into master
Reviewed-on: #18
Reviewed-by: rafaga21 <rafaelminaya20@hotmail.com>
2026-06-09 16:46:37 -04:00
a424120770 fix: remove leftover conflict marker in ApiController 2026-06-09 16:46:03 -04:00
530c394944 fix: properly ignore vendor directory in .gitignore 2026-06-09 16:43:25 -04:00
1241d50a4a Merge branch 'master' into feat/android-app-redesign 2026-06-09 16:41:23 -04:00
b613e43ab3 feat: redesign Android app with animations, charts, profile, and registration
- Register screen with validation (username, email, password, confirm)
- Profile screen with email editing and password change
- User greeting on dashboard showing logged-in username
- 401 auto-logout via SessionManager + AuthInterceptor
- MetricsChart with Canvas line graphs (CPU, RAM, Disk)
- Animated StatCard with counters and icons
- ServerCard with progress bars, pulsating status dot, dynamic elevation
- Shimmer loading placeholders
- Dark mode support with Material3
- Navigation transitions (slide + fade)
- New server rack launcher icon
- Splash screen
- Backend API: register, profile (GET/PUT) endpoints
2026-06-09 16:38:04 -04:00