HPE DL380 Gen11 BEE-SP v14.23 blackbox bundle (ADL-077): - topology: accept "PROC n" DIMM locators, show the storage controller filtered from the export by ADL-062 when disks resolve to it, resolve storcli EID:Slt drives via VD -> OS drive -> controller BDF, hide BMC VGA, label numeric PSU slots "PSU n" - easy_bee: parse SEL / dmesg -T event times, keep message_id and component_ref, pass platform_config through - exporter: map ipmi-sel -> bmc and dmesg/kernel -> host in event_logs - privacy: treat journald/syslog kernel lines as noise (linux.it false positive) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.3 KiB
Go
44 lines
1.3 KiB
Go
package server
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
|
|
"git.mchus.pro/mchus/logpile/internal/exporter"
|
|
"git.mchus.pro/mchus/logpile/internal/models"
|
|
"git.mchus.pro/mchus/logpile/internal/topology"
|
|
)
|
|
|
|
func currentTopologyDocument(result *models.AnalysisResult) (*models.TopologyDocument, error) {
|
|
if result == nil || result.Hardware == nil {
|
|
return &models.TopologyDocument{Version: topology.ContractVersion}, nil
|
|
}
|
|
snapshot, err := exporter.ConvertToReanimator(result)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return topology.Build(snapshot, result.TopologyEvidence, exporter.OnboardControllersForTopology(result)...), nil
|
|
}
|
|
|
|
func (s *Server) handleTopologyCurrent(w http.ResponseWriter, r *http.Request) {
|
|
doc, err := currentTopologyDocument(s.GetResult())
|
|
if err != nil {
|
|
s.htmlError(w, "failed to build topology", http.StatusInternalServerError)
|
|
return
|
|
}
|
|
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
|
_, _ = w.Write(topology.RenderHTML(doc))
|
|
}
|
|
|
|
func (s *Server) handleGetTopology(w http.ResponseWriter, r *http.Request) {
|
|
doc, err := currentTopologyDocument(s.GetResult())
|
|
if err != nil {
|
|
jsonError(w, "Failed to build topology", http.StatusInternalServerError)
|
|
return
|
|
}
|
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
|
enc := json.NewEncoder(w)
|
|
enc.SetIndent("", " ")
|
|
_ = enc.Encode(doc)
|
|
}
|