feat: bump to v0.1.23 with security metrics and UI improvements
- Bump agent and server versions to 0.1.23 - Implement security metrics collection (bound agents, command processing, version compliance) - Add dismiss button for timed out commands in agent status - Add config sync endpoint for server->agent configuration updates - Add ignored updates workflow in AgentUpdatesEnhanced (approve/reject workflow) - Swap AgentScanners layout (subsystems top, security bottom) - Replace placeholder security data with database metrics - Add backpressure detection based on pending command ratios
This commit is contained in:
@@ -226,6 +226,30 @@ func (q *AgentQueries) GetActiveAgentCount() (int, error) {
|
||||
return count, err
|
||||
}
|
||||
|
||||
// GetTotalAgentCount returns the total count of registered agents
|
||||
func (q *AgentQueries) GetTotalAgentCount() (int, error) {
|
||||
var count int
|
||||
query := `SELECT COUNT(*) FROM agents`
|
||||
err := q.db.Get(&count, query)
|
||||
return count, err
|
||||
}
|
||||
|
||||
// GetAgentCountByVersion returns the count of agents by version (for version compliance)
|
||||
func (q *AgentQueries) GetAgentCountByVersion(minVersion string) (int, error) {
|
||||
var count int
|
||||
query := `SELECT COUNT(*) FROM agents WHERE current_version >= $1`
|
||||
err := q.db.Get(&count, query, minVersion)
|
||||
return count, err
|
||||
}
|
||||
|
||||
// GetAgentsWithMachineBinding returns count of agents that have machine IDs set
|
||||
func (q *AgentQueries) GetAgentsWithMachineBinding() (int, error) {
|
||||
var count int
|
||||
query := `SELECT COUNT(*) FROM agents WHERE machine_id IS NOT NULL AND machine_id != ''`
|
||||
err := q.db.Get(&count, query)
|
||||
return count, err
|
||||
}
|
||||
|
||||
// UpdateAgentRebootStatus updates the reboot status for an agent
|
||||
func (q *AgentQueries) UpdateAgentRebootStatus(id uuid.UUID, required bool, reason string) error {
|
||||
query := `
|
||||
|
||||
Reference in New Issue
Block a user