Files
tyto/backend/internal/models/processes.go
vikingowl b0c500e07b feat: add process details, notifications, export, multi-host support
- Add per-process details modal with kill/pause/resume functionality
  - GET /api/v1/processes/:pid for detailed process info
  - POST /api/v1/processes/:pid/signal for sending signals
  - ProcessDetailModal component with state, resources, command line

- Add desktop notifications for alerts
  - Browser Notification API integration
  - Toggle in AlertsCard with permission handling
  - Auto-close for warnings, persistent for critical

- Add CSV/JSON export functionality
  - GET /api/v1/export/metrics?format=csv|json
  - Export buttons in SettingsPanel
  - Includes host name in filename

- Add multi-host monitoring support
  - HostSelector component for switching between backends
  - Hosts store with localStorage persistence
  - All API calls updated for remote host URLs

- Add disk I/O rate charts to HistoryCard
  - Read/write bytes/sec sparklines
  - Complements existing network rate charts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:08:43 +01:00

36 lines
1.1 KiB
Go

package models
type ProcessStats struct {
TopByCPU []ProcessInfo `json:"topByCpu"`
TopByMemory []ProcessInfo `json:"topByMemory"`
Total int `json:"total"`
}
type ProcessInfo struct {
PID int `json:"pid"`
Name string `json:"name"`
CPUPercent float64 `json:"cpuPercent"`
MemoryMB float64 `json:"memoryMb"`
State string `json:"state"`
}
type ProcessDetail struct {
PID int `json:"pid"`
Name string `json:"name"`
Cmdline string `json:"cmdline"`
State string `json:"state"`
StateDesc string `json:"stateDesc"`
User string `json:"user"`
PPID int `json:"ppid"`
Threads int `json:"threads"`
Nice int `json:"nice"`
CPUPercent float64 `json:"cpuPercent"`
MemoryMB float64 `json:"memoryMb"`
MemoryRSS uint64 `json:"memoryRss"`
MemoryVMS uint64 `json:"memoryVms"`
StartTime string `json:"startTime"`
CPUTime string `json:"cpuTime"`
OpenFiles int `json:"openFiles"`
Environ []string `json:"environ,omitempty"`
}