Skip to content

Commit

Permalink
feat(chore): add method to sync agent to manager
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmandMeppa committed Jan 7, 2025
1 parent 79d0a8b commit 53fa51a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wazuh-agent-status-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
var embeddedFiles embed.FS

var (
statusItem, connectionItem, updateItem *systray.MenuItem
statusItem, connectionItem, updateItem, syncItem *systray.MenuItem
statusIconConnected, statusIconDisconnected []byte
connectionIconConnected, connectionIconDisconnected []byte
)
Expand Down Expand Up @@ -49,6 +49,7 @@ func onReady() {
connectionItem = systray.AddMenuItem("Connection: Unknown", "Wazuh Agent Connection")
systray.AddSeparator()
updateItem = systray.AddMenuItem("Update", "Update the Wazuh Agent")
syncItem = systray.AddMenuItem("Sync", "Sync the Wazuh Agent")

// Start background status update
go monitorStatus()
Expand Down Expand Up @@ -91,6 +92,9 @@ func handleMenuActions() {
case <-updateItem.ClickedCh:
log.Println("Update clicked")
sendCommand("update")
case <-syncItem.ClickedCh:
log.Println("Sync clicked")
sendCommand("sync")
}
}
}
Expand Down

0 comments on commit 53fa51a

Please sign in to comment.