feat: agent UI redesign and version bump to 0.1.18
- Redesign AgentUpdatesEnhanced with tab-based workflow (pending/approved/installing/installed) - Add AgentStorage component with disk partition table - Add AgentScanners component for agent health monitoring - Fix agent removal not refreshing list (cache invalidation) - Bump agent version to 0.1.18 (enhanced disk detection) - Update server default version to 0.1.18 - Add command source tracking (system/manual) migration - Improve Linux disk detection for all physical mount points
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
-- This enables the hybrid version tracking system
|
||||
|
||||
ALTER TABLE agents
|
||||
ADD COLUMN current_version VARCHAR(50) DEFAULT '0.1.3',
|
||||
ADD COLUMN current_version VARCHAR(50) DEFAULT '0.0.0',
|
||||
ADD COLUMN update_available BOOLEAN DEFAULT FALSE,
|
||||
ADD COLUMN last_version_check TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
-- Add source field to agent_commands table to track command origin
|
||||
-- 'manual' = user-initiated via UI
|
||||
-- 'system' = automatically triggered by system operations (scans, installs, etc)
|
||||
|
||||
ALTER TABLE agent_commands
|
||||
ADD COLUMN source VARCHAR(20) DEFAULT 'manual' NOT NULL;
|
||||
|
||||
-- Add check constraint to ensure valid source values
|
||||
ALTER TABLE agent_commands
|
||||
ADD CONSTRAINT agent_commands_source_check
|
||||
CHECK (source IN ('manual', 'system'));
|
||||
|
||||
-- Add index for filtering commands by source
|
||||
CREATE INDEX idx_agent_commands_source ON agent_commands(source);
|
||||
|
||||
-- Update comment
|
||||
COMMENT ON COLUMN agent_commands.source IS 'Command origin: manual (user-initiated) or system (auto-triggered)';
|
||||
@@ -21,9 +21,9 @@ func NewCommandQueries(db *sqlx.DB) *CommandQueries {
|
||||
func (q *CommandQueries) CreateCommand(cmd *models.AgentCommand) error {
|
||||
query := `
|
||||
INSERT INTO agent_commands (
|
||||
id, agent_id, command_type, params, status, retried_from_id
|
||||
id, agent_id, command_type, params, status, source, retried_from_id
|
||||
) VALUES (
|
||||
:id, :agent_id, :command_type, :params, :status, :retried_from_id
|
||||
:id, :agent_id, :command_type, :params, :status, :source, :retried_from_id
|
||||
)
|
||||
`
|
||||
_, err := q.db.NamedExec(query, cmd)
|
||||
@@ -183,6 +183,7 @@ func (q *CommandQueries) GetActiveCommands() ([]models.ActiveCommandInfo, error)
|
||||
c.command_type,
|
||||
c.params,
|
||||
c.status,
|
||||
c.source,
|
||||
c.created_at,
|
||||
c.sent_at,
|
||||
c.result,
|
||||
@@ -244,6 +245,7 @@ func (q *CommandQueries) GetRecentCommands(limit int) ([]models.ActiveCommandInf
|
||||
c.agent_id,
|
||||
c.command_type,
|
||||
c.status,
|
||||
c.source,
|
||||
c.created_at,
|
||||
c.sent_at,
|
||||
c.completed_at,
|
||||
|
||||
Reference in New Issue
Block a user