fix: system_data als RawJSON durchreichen — Windows-Daten nicht mehr weggeworfen
This commit is contained in:
@@ -339,10 +339,15 @@ func (h *Handler) getAgent(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// system_data als Roh-JSON ausgeben (plattformunabhaengig)
|
||||
var rawSD interface{} = sysData
|
||||
if sysData != nil && len(sysData.RawJSON) > 0 {
|
||||
rawSD = json.RawMessage(sysData.RawJSON)
|
||||
}
|
||||
result := map[string]interface{}{
|
||||
"agent": agent,
|
||||
"status": models.CalculateAgentStatus(agent.LastHeartbeat),
|
||||
"system_data": sysData,
|
||||
"system_data": rawSD,
|
||||
}
|
||||
writeJSON(w, http.StatusOK, result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user