Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1162ccd22e | ||
|
|
3887df6547 |
2
bible
2
bible
Submodule bible updated: d2600f1279...52444350c1
@@ -180,10 +180,3 @@ When changing collection logic:
|
||||
Status: mock scaffold only.
|
||||
|
||||
It remains registered for protocol completeness, but it is not a real collection path.
|
||||
The project is Redfish-first for live collection:
|
||||
- Redfish already covers the current product goals for inventory, sensors, and hardware event logs
|
||||
- the live architecture depends on replayable `raw_payloads.redfish_tree`
|
||||
- a generic IPMI collector would require a separate raw snapshot and replay contract
|
||||
|
||||
IPMI should be reconsidered only as a narrow fallback for real field cases where Redfish is
|
||||
missing or unreliable for a specific capability such as SEL, FRU, or sensors.
|
||||
|
||||
@@ -1154,47 +1154,3 @@ continue to inherit the exact git tag string from `git describe --tags`.
|
||||
- Future project releases have a two-component version string such as `v1.12`.
|
||||
- Release artifacts and `--version` output stay aligned with the tag shape without extra mapping.
|
||||
- Existing historical `vN.M.P` tags remain as-is unless explicitly rewritten.
|
||||
|
||||
---
|
||||
|
||||
## ADL-045 — Generic live IPMI collector is deferred; Redfish remains the only production live path
|
||||
|
||||
**Date:** 2026-04-22
|
||||
**Context:** Sprint issue `#12` proposed a generic IPMI collector for SEL/FRU/sensors. By this
|
||||
point LOGPile already has a production Redfish pipeline with replayable raw snapshots, profile-
|
||||
driven acquisition, and normalized event/sensor/inventory extraction. Redfish also already covers
|
||||
the current product goals better than IPMI for live collection: richer inventory, structured
|
||||
resource relationships, and vendor log access via `LogServices`, including SEL-style logs on many
|
||||
implementations.
|
||||
|
||||
**Decision:** Do not build a generic live IPMI collector now. Keep `ipmi_mock.go` only as a
|
||||
protocol placeholder in the registry and UI/API contract. Treat Redfish as the only production
|
||||
live collection path. Revisit IPMI only if real field evidence shows that a specific target class
|
||||
cannot provide required data over Redfish. If revisited, prefer a narrow fallback scope such as
|
||||
`IPMI SEL fallback`, `IPMI FRU fallback`, or `IPMI sensor fallback` rather than a second full
|
||||
collector architecture.
|
||||
|
||||
**Consequences:**
|
||||
- Issue `#12` is closed as deferred/not planned, not as implemented.
|
||||
- Live collection architecture stays centered on replayable `raw_payloads.redfish_tree`.
|
||||
- The codebase avoids introducing a second generic live-ingest/replay contract for IPMI data.
|
||||
- Future IPMI work must be justified by concrete Redfish gaps on real hardware, not by protocol
|
||||
symmetry alone.
|
||||
|
||||
---
|
||||
|
||||
## ADL-046 — The web shell delegates report rendering to `internal/chart`
|
||||
|
||||
**Date:** 2026-04-22
|
||||
**Context:** The frontend had two competing report paths: the embedded `internal/chart` viewer and
|
||||
an older client-side renderer in `web/static/js/app.js` for config, firmware, sensors, serials,
|
||||
events, and parse errors. That duplication left dead controls in the shell and made the report
|
||||
source of truth ambiguous.
|
||||
**Decision:** The `web/` frontend shell is responsible only for data intake, job control, and
|
||||
top-level actions. The report itself must be rendered exclusively through `internal/chart`.
|
||||
Do not keep parallel report sections, filters, or table renderers in shell JavaScript.
|
||||
**Consequences:**
|
||||
- The browser UI has a single report rendering path: `/chart/current` inside the embedded viewer.
|
||||
- Report-level filtering or extra report sections must be implemented in `internal/chart`, not in
|
||||
`web/static/js/app.js`.
|
||||
- Removing legacy DOM renderers from the shell is a correctness fix, not a behavior regression.
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.mchus.pro/mchus/logpile/internal/parser"
|
||||
@@ -39,11 +38,10 @@ func main() {
|
||||
server.WebFS = web.FS
|
||||
|
||||
cfg := server.Config{
|
||||
Port: *port,
|
||||
PreloadFile: *file,
|
||||
AppVersion: version,
|
||||
AppCommit: commit,
|
||||
ChartVersion: detectChartVersion(),
|
||||
Port: *port,
|
||||
PreloadFile: *file,
|
||||
AppVersion: version,
|
||||
AppCommit: commit,
|
||||
}
|
||||
|
||||
srv := server.New(cfg)
|
||||
@@ -94,15 +92,6 @@ func openBrowser(url string) {
|
||||
}
|
||||
}
|
||||
|
||||
func detectChartVersion() string {
|
||||
cmd := exec.Command("git", "-C", "internal/chart", "describe", "--tags", "--always", "--dirty", "--abbrev=7")
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return strings.TrimSpace(string(out))
|
||||
}
|
||||
|
||||
func maybeWaitForCrashInput(enabled bool) {
|
||||
if !enabled || !isInteractiveConsole() {
|
||||
return
|
||||
|
||||
Submodule internal/chart updated: 2a15bc87f1...2fb01d30a6
@@ -159,16 +159,6 @@ func buildDevicesFromLegacy(hw *models.HardwareConfig) []models.HardwareDevice {
|
||||
}
|
||||
for _, stor := range hw.Storage {
|
||||
present := stor.Present
|
||||
storDetails := mergeDetailMaps(nil, stor.Details)
|
||||
if stor.LogicalBlockSizeBytes != 0 {
|
||||
storDetails = mergeDetailMaps(storDetails, map[string]any{"logical_block_size_bytes": stor.LogicalBlockSizeBytes})
|
||||
}
|
||||
if stor.PhysicalBlockSizeBytes != 0 {
|
||||
storDetails = mergeDetailMaps(storDetails, map[string]any{"physical_block_size_bytes": stor.PhysicalBlockSizeBytes})
|
||||
}
|
||||
if stor.MetadataBytesPerBlock != 0 {
|
||||
storDetails = mergeDetailMaps(storDetails, map[string]any{"metadata_bytes_per_block": stor.MetadataBytesPerBlock})
|
||||
}
|
||||
appendDevice(models.HardwareDevice{
|
||||
Kind: models.DeviceKindStorage,
|
||||
Slot: stor.Slot,
|
||||
@@ -187,41 +177,27 @@ func buildDevicesFromLegacy(hw *models.HardwareConfig) []models.HardwareDevice {
|
||||
StatusAtCollect: stor.StatusAtCollect,
|
||||
StatusHistory: stor.StatusHistory,
|
||||
ErrorDescription: stor.ErrorDescription,
|
||||
Details: storDetails,
|
||||
Details: mergeDetailMaps(nil, stor.Details),
|
||||
})
|
||||
}
|
||||
for _, pcie := range hw.PCIeDevices {
|
||||
// Priority: PartNumber (vendor P/N) > Model (product name) > Description (chip label).
|
||||
pcieModel := firstNonEmptyString(pcie.PartNumber, pcie.Model, pcie.Description)
|
||||
// Use PartNumber as model when available; fall back to chip description.
|
||||
// Description contains the chip/product name (e.g. "BCM57414 NetXtreme-E …")
|
||||
// while PartNumber is a part/product code. Prefer PartNumber when set.
|
||||
pcieModel := pcie.PartNumber
|
||||
if pcieModel == "" {
|
||||
pcieModel = pcie.Description
|
||||
}
|
||||
details := mergeDetailMaps(nil, pcie.Details)
|
||||
// Firmware: prefer direct field, fall back to details, then NVSwitch lookup.
|
||||
pcieFirmware := firstNonEmptyString(pcie.Firmware, stringFromDetailMap(details, "firmware"))
|
||||
pcieFirmware := stringFromDetailMap(details, "firmware")
|
||||
if pcieFirmware == "" && isNVSwitchPCIeDevice(pcie) {
|
||||
pcieFirmware = nvswitchFirmwareBySlot[normalizeNVSwitchSlotForLookup(pcie.Slot)]
|
||||
if pcieFirmware != "" {
|
||||
details = mergeDetailMaps(details, map[string]any{
|
||||
"firmware": pcieFirmware,
|
||||
})
|
||||
}
|
||||
}
|
||||
if pcieFirmware != "" {
|
||||
details = mergeDetailMaps(details, map[string]any{"firmware": pcieFirmware})
|
||||
}
|
||||
// Telemetry fields: put into details so convertPCIeFromDevices can pick them up.
|
||||
if pcie.TemperatureC != nil {
|
||||
details = mergeDetailMaps(details, map[string]any{"temperature_c": *pcie.TemperatureC})
|
||||
}
|
||||
if pcie.PowerW != nil {
|
||||
details = mergeDetailMaps(details, map[string]any{"power_w": *pcie.PowerW})
|
||||
}
|
||||
if pcie.ECCCorrectedTotal != nil {
|
||||
details = mergeDetailMaps(details, map[string]any{"ecc_corrected_total": *pcie.ECCCorrectedTotal})
|
||||
}
|
||||
if pcie.ECCUncorrectedTotal != nil {
|
||||
details = mergeDetailMaps(details, map[string]any{"ecc_uncorrected_total": *pcie.ECCUncorrectedTotal})
|
||||
}
|
||||
if pcie.HWSlowdown != nil {
|
||||
details = mergeDetailMaps(details, map[string]any{"hw_slowdown": *pcie.HWSlowdown})
|
||||
}
|
||||
if pcie.IOMMUGroup != nil {
|
||||
details = mergeDetailMaps(details, map[string]any{"iommu_group": *pcie.IOMMUGroup})
|
||||
}
|
||||
present := pcie.Present
|
||||
appendDevice(models.HardwareDevice{
|
||||
Kind: models.DeviceKindPCIe,
|
||||
Slot: pcie.Slot,
|
||||
@@ -233,13 +209,11 @@ func buildDevicesFromLegacy(hw *models.HardwareConfig) []models.HardwareDevice {
|
||||
PartNumber: pcie.PartNumber,
|
||||
Manufacturer: pcie.Manufacturer,
|
||||
SerialNumber: pcie.SerialNumber,
|
||||
MACAddresses: append([]string(nil), pcie.MACAddresses...),
|
||||
LinkWidth: pcie.LinkWidth,
|
||||
LinkSpeed: pcie.LinkSpeed,
|
||||
MaxLinkWidth: pcie.MaxLinkWidth,
|
||||
MaxLinkSpeed: pcie.MaxLinkSpeed,
|
||||
NUMANode: pcie.NUMANode,
|
||||
Present: present,
|
||||
Status: pcie.Status,
|
||||
StatusCheckedAt: pcie.StatusCheckedAt,
|
||||
StatusChangedAt: pcie.StatusChangedAt,
|
||||
@@ -764,39 +738,36 @@ func convertStorageFromDevices(devices []models.HardwareDevice, collectedAt stri
|
||||
meta := buildStatusMeta(status, d.StatusCheckedAt, d.StatusChangedAt, d.StatusHistory, d.ErrorDescription, collectedAt)
|
||||
presentValue := present
|
||||
result = append(result, ReanimatorStorage{
|
||||
Slot: d.Slot,
|
||||
Type: d.Type,
|
||||
Model: d.Model,
|
||||
SizeGB: d.SizeGB,
|
||||
SerialNumber: d.SerialNumber,
|
||||
Manufacturer: d.Manufacturer,
|
||||
Firmware: d.Firmware,
|
||||
Interface: d.Interface,
|
||||
Present: &presentValue,
|
||||
LogicalBlockSizeBytes: int64FromDetailMap(d.Details, "logical_block_size_bytes"),
|
||||
PhysicalBlockSizeBytes: int64FromDetailMap(d.Details, "physical_block_size_bytes"),
|
||||
MetadataBytesPerBlock: int64FromDetailMap(d.Details, "metadata_bytes_per_block"),
|
||||
TemperatureC: floatFromDetailMap(d.Details, "temperature_c"),
|
||||
PowerOnHours: int64FromDetailMap(d.Details, "power_on_hours"),
|
||||
PowerCycles: int64FromDetailMap(d.Details, "power_cycles"),
|
||||
UnsafeShutdowns: int64FromDetailMap(d.Details, "unsafe_shutdowns"),
|
||||
MediaErrors: int64FromDetailMap(d.Details, "media_errors"),
|
||||
ErrorLogEntries: int64FromDetailMap(d.Details, "error_log_entries"),
|
||||
WrittenBytes: int64FromDetailMap(d.Details, "written_bytes"),
|
||||
ReadBytes: int64FromDetailMap(d.Details, "read_bytes"),
|
||||
LifeUsedPct: floatFromDetailMap(d.Details, "life_used_pct"),
|
||||
RemainingEndurancePct: d.RemainingEndurancePct,
|
||||
LifeRemainingPct: floatFromDetailMap(d.Details, "life_remaining_pct"),
|
||||
AvailableSparePct: floatFromDetailMap(d.Details, "available_spare_pct"),
|
||||
ReallocatedSectors: int64FromDetailMap(d.Details, "reallocated_sectors"),
|
||||
CurrentPendingSectors: int64FromDetailMap(d.Details, "current_pending_sectors"),
|
||||
OfflineUncorrectable: int64FromDetailMap(d.Details, "offline_uncorrectable"),
|
||||
Status: status,
|
||||
StatusCheckedAt: meta.StatusCheckedAt,
|
||||
StatusChangedAt: meta.StatusChangedAt,
|
||||
ManufacturedYearWeek: manufacturedYearWeekFromDetails(d.Details),
|
||||
StatusHistory: meta.StatusHistory,
|
||||
ErrorDescription: meta.ErrorDescription,
|
||||
Slot: d.Slot,
|
||||
Type: d.Type,
|
||||
Model: d.Model,
|
||||
SizeGB: d.SizeGB,
|
||||
SerialNumber: d.SerialNumber,
|
||||
Manufacturer: d.Manufacturer,
|
||||
Firmware: d.Firmware,
|
||||
Interface: d.Interface,
|
||||
Present: &presentValue,
|
||||
TemperatureC: floatFromDetailMap(d.Details, "temperature_c"),
|
||||
PowerOnHours: int64FromDetailMap(d.Details, "power_on_hours"),
|
||||
PowerCycles: int64FromDetailMap(d.Details, "power_cycles"),
|
||||
UnsafeShutdowns: int64FromDetailMap(d.Details, "unsafe_shutdowns"),
|
||||
MediaErrors: int64FromDetailMap(d.Details, "media_errors"),
|
||||
ErrorLogEntries: int64FromDetailMap(d.Details, "error_log_entries"),
|
||||
WrittenBytes: int64FromDetailMap(d.Details, "written_bytes"),
|
||||
ReadBytes: int64FromDetailMap(d.Details, "read_bytes"),
|
||||
LifeUsedPct: floatFromDetailMap(d.Details, "life_used_pct"),
|
||||
RemainingEndurancePct: d.RemainingEndurancePct,
|
||||
LifeRemainingPct: floatFromDetailMap(d.Details, "life_remaining_pct"),
|
||||
AvailableSparePct: floatFromDetailMap(d.Details, "available_spare_pct"),
|
||||
ReallocatedSectors: int64FromDetailMap(d.Details, "reallocated_sectors"),
|
||||
CurrentPendingSectors: int64FromDetailMap(d.Details, "current_pending_sectors"),
|
||||
OfflineUncorrectable: int64FromDetailMap(d.Details, "offline_uncorrectable"),
|
||||
Status: status,
|
||||
StatusCheckedAt: meta.StatusCheckedAt,
|
||||
StatusChangedAt: meta.StatusChangedAt,
|
||||
ManufacturedYearWeek: manufacturedYearWeekFromDetails(d.Details),
|
||||
StatusHistory: meta.StatusHistory,
|
||||
ErrorDescription: meta.ErrorDescription,
|
||||
})
|
||||
}
|
||||
return result
|
||||
@@ -847,7 +818,6 @@ func convertPCIeFromDevices(devices []models.HardwareDevice, collectedAt string)
|
||||
VendorID: d.VendorID,
|
||||
DeviceID: d.DeviceID,
|
||||
NUMANode: d.NUMANode,
|
||||
IOMMUGroup: intPtrFromDetailMap(d.Details, "iommu_group"),
|
||||
TemperatureC: temperatureC,
|
||||
PowerW: powerW,
|
||||
LifeRemainingPct: floatFromDetailMap(d.Details, "life_remaining_pct"),
|
||||
@@ -2123,17 +2093,6 @@ func parseSocketFromSlot(slot string) int {
|
||||
return v
|
||||
}
|
||||
|
||||
func intPtrFromDetailMap(details map[string]any, key string) *int {
|
||||
if details == nil {
|
||||
return nil
|
||||
}
|
||||
if _, ok := details[key]; !ok {
|
||||
return nil
|
||||
}
|
||||
v := intFromDetailMap(details, key)
|
||||
return &v
|
||||
}
|
||||
|
||||
func intFromDetailMap(details map[string]any, key string) int {
|
||||
if details == nil {
|
||||
return 0
|
||||
|
||||
@@ -12,16 +12,15 @@ type ReanimatorExport struct {
|
||||
|
||||
// ReanimatorHardware contains all hardware components
|
||||
type ReanimatorHardware struct {
|
||||
Board ReanimatorBoard `json:"board"`
|
||||
Firmware []ReanimatorFirmware `json:"firmware,omitempty"`
|
||||
CPUs []ReanimatorCPU `json:"cpus,omitempty"`
|
||||
Memory []ReanimatorMemory `json:"memory,omitempty"`
|
||||
Storage []ReanimatorStorage `json:"storage,omitempty"`
|
||||
PCIeDevices []ReanimatorPCIe `json:"pcie_devices,omitempty"`
|
||||
PowerSupplies []ReanimatorPSU `json:"power_supplies,omitempty"`
|
||||
Sensors *ReanimatorSensors `json:"sensors,omitempty"`
|
||||
EventLogs []ReanimatorEventLog `json:"event_logs,omitempty"`
|
||||
PlatformConfig map[string]any `json:"platform_config,omitempty"`
|
||||
Board ReanimatorBoard `json:"board"`
|
||||
Firmware []ReanimatorFirmware `json:"firmware,omitempty"`
|
||||
CPUs []ReanimatorCPU `json:"cpus,omitempty"`
|
||||
Memory []ReanimatorMemory `json:"memory,omitempty"`
|
||||
Storage []ReanimatorStorage `json:"storage,omitempty"`
|
||||
PCIeDevices []ReanimatorPCIe `json:"pcie_devices,omitempty"`
|
||||
PowerSupplies []ReanimatorPSU `json:"power_supplies,omitempty"`
|
||||
Sensors *ReanimatorSensors `json:"sensors,omitempty"`
|
||||
EventLogs []ReanimatorEventLog `json:"event_logs,omitempty"`
|
||||
}
|
||||
|
||||
// ReanimatorBoard represents motherboard/server information
|
||||
@@ -102,20 +101,17 @@ type ReanimatorMemory struct {
|
||||
|
||||
// ReanimatorStorage represents a storage device
|
||||
type ReanimatorStorage struct {
|
||||
Slot string `json:"slot"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Model string `json:"model"`
|
||||
SizeGB int `json:"size_gb,omitempty"`
|
||||
SerialNumber string `json:"serial_number"`
|
||||
Manufacturer string `json:"manufacturer,omitempty"`
|
||||
Firmware string `json:"firmware,omitempty"`
|
||||
Interface string `json:"interface,omitempty"`
|
||||
Present *bool `json:"present,omitempty"`
|
||||
LogicalBlockSizeBytes int64 `json:"logical_block_size_bytes,omitempty"`
|
||||
PhysicalBlockSizeBytes int64 `json:"physical_block_size_bytes,omitempty"`
|
||||
MetadataBytesPerBlock int64 `json:"metadata_bytes_per_block,omitempty"`
|
||||
TemperatureC float64 `json:"temperature_c,omitempty"`
|
||||
PowerOnHours int64 `json:"power_on_hours,omitempty"`
|
||||
Slot string `json:"slot"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Model string `json:"model"`
|
||||
SizeGB int `json:"size_gb,omitempty"`
|
||||
SerialNumber string `json:"serial_number"`
|
||||
Manufacturer string `json:"manufacturer,omitempty"`
|
||||
Firmware string `json:"firmware,omitempty"`
|
||||
Interface string `json:"interface,omitempty"`
|
||||
Present *bool `json:"present,omitempty"`
|
||||
TemperatureC float64 `json:"temperature_c,omitempty"`
|
||||
PowerOnHours int64 `json:"power_on_hours,omitempty"`
|
||||
PowerCycles int64 `json:"power_cycles,omitempty"`
|
||||
UnsafeShutdowns int64 `json:"unsafe_shutdowns,omitempty"`
|
||||
MediaErrors int64 `json:"media_errors,omitempty"`
|
||||
@@ -143,7 +139,6 @@ type ReanimatorPCIe struct {
|
||||
VendorID int `json:"vendor_id,omitempty"`
|
||||
DeviceID int `json:"device_id,omitempty"`
|
||||
NUMANode int `json:"numa_node,omitempty"`
|
||||
IOMMUGroup *int `json:"iommu_group,omitempty"`
|
||||
TemperatureC float64 `json:"temperature_c,omitempty"`
|
||||
PowerW float64 `json:"power_w,omitempty"`
|
||||
LifeRemainingPct float64 `json:"life_remaining_pct,omitempty"`
|
||||
|
||||
@@ -245,9 +245,6 @@ type Storage struct {
|
||||
Location string `json:"location,omitempty"` // Front/Rear
|
||||
BackplaneID int `json:"backplane_id,omitempty"`
|
||||
RemainingEndurancePct *int `json:"remaining_endurance_pct,omitempty"` // 0-100 %; nil = not reported
|
||||
LogicalBlockSizeBytes int64 `json:"logical_block_size_bytes,omitempty"`
|
||||
PhysicalBlockSizeBytes int64 `json:"physical_block_size_bytes,omitempty"`
|
||||
MetadataBytesPerBlock int64 `json:"metadata_bytes_per_block,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Details map[string]any `json:"details,omitempty"`
|
||||
|
||||
@@ -260,16 +257,15 @@ type Storage struct {
|
||||
|
||||
// StorageVolume represents a logical storage volume (RAID/VROC/etc.).
|
||||
type StorageVolume struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Controller string `json:"controller,omitempty"`
|
||||
RAIDLevel string `json:"raid_level,omitempty"`
|
||||
SizeGB int `json:"size_gb,omitempty"`
|
||||
CapacityBytes int64 `json:"capacity_bytes,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Bootable bool `json:"bootable,omitempty"`
|
||||
Encrypted bool `json:"encrypted,omitempty"`
|
||||
Drives []string `json:"drives,omitempty"` // member drive names/labels
|
||||
ID string `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Controller string `json:"controller,omitempty"`
|
||||
RAIDLevel string `json:"raid_level,omitempty"`
|
||||
SizeGB int `json:"size_gb,omitempty"`
|
||||
CapacityBytes int64 `json:"capacity_bytes,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Bootable bool `json:"bootable,omitempty"`
|
||||
Encrypted bool `json:"encrypted,omitempty"`
|
||||
}
|
||||
|
||||
// PCIeDevice represents a PCIe device
|
||||
@@ -281,8 +277,6 @@ type PCIeDevice struct {
|
||||
BDF string `json:"bdf"`
|
||||
DeviceClass string `json:"device_class"`
|
||||
Manufacturer string `json:"manufacturer,omitempty"`
|
||||
Model string `json:"model,omitempty"`
|
||||
Firmware string `json:"firmware,omitempty"`
|
||||
LinkWidth int `json:"link_width"`
|
||||
LinkSpeed string `json:"link_speed"`
|
||||
MaxLinkWidth int `json:"max_link_width"`
|
||||
@@ -291,17 +285,8 @@ type PCIeDevice struct {
|
||||
SerialNumber string `json:"serial_number,omitempty"`
|
||||
MACAddresses []string `json:"mac_addresses,omitempty"`
|
||||
NUMANode int `json:"numa_node,omitempty"` // 0 = not reported/N/A
|
||||
Present *bool `json:"present,omitempty"`
|
||||
IOMMUGroup *int `json:"iommu_group,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
|
||||
// GPU telemetry fields (populated by bee audit for GPU devices)
|
||||
TemperatureC *float64 `json:"temperature_c,omitempty"`
|
||||
PowerW *float64 `json:"power_w,omitempty"`
|
||||
ECCCorrectedTotal *int64 `json:"ecc_corrected_total,omitempty"`
|
||||
ECCUncorrectedTotal *int64 `json:"ecc_uncorrected_total,omitempty"`
|
||||
HWSlowdown *bool `json:"hw_slowdown,omitempty"`
|
||||
|
||||
StatusCheckedAt *time.Time `json:"status_checked_at,omitempty"`
|
||||
StatusChangedAt *time.Time `json:"status_changed_at,omitempty"`
|
||||
StatusAtCollect *StatusAtCollection `json:"status_at_collection,omitempty"`
|
||||
|
||||
148
internal/parser/vendors/lenovo_xcc/parser.go
vendored
148
internal/parser/vendors/lenovo_xcc/parser.go
vendored
@@ -89,9 +89,6 @@ func (p *Parser) Parse(files []parser.ExtractedFile) (*models.AnalysisResult, er
|
||||
if f := findByPath(files, "tmp/inventory_disk.log"); f != nil {
|
||||
result.Hardware.Storage = parseDisks(f.Content)
|
||||
}
|
||||
if f := findByPath(files, "tmp/inventory_volume.log"); f != nil {
|
||||
result.Hardware.Volumes = parseVolumes(f.Content)
|
||||
}
|
||||
if f := findByPath(files, "tmp/inventory_card.log"); f != nil {
|
||||
result.Hardware.PCIeDevices = parseCards(f.Content)
|
||||
}
|
||||
@@ -109,7 +106,6 @@ func (p *Parser) Parse(files []parser.ExtractedFile) (*models.AnalysisResult, er
|
||||
for _, f := range findEventFiles(files) {
|
||||
result.Events = append(result.Events, parseEvents(f.Content)...)
|
||||
}
|
||||
applyDIMMWarningsFromEvents(result)
|
||||
|
||||
result.Protocol = "ipmi"
|
||||
result.SourceType = models.SourceTypeArchive
|
||||
@@ -304,25 +300,6 @@ type xccEventDoc struct {
|
||||
Items []xccEvent `json:"items"`
|
||||
}
|
||||
|
||||
type xccVolumeDoc struct {
|
||||
Items []xccVolumeItem `json:"items"`
|
||||
}
|
||||
|
||||
type xccVolumeItem struct {
|
||||
Volumes []xccVolume `json:"volumes"`
|
||||
TotalCapacityStr string `json:"totalCapacityStr"`
|
||||
}
|
||||
|
||||
type xccVolume struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Drives string `json:"drives"` // e.g. "M.2 Drive 0, M.2 Drive 1"
|
||||
RDLvlStr string `json:"rdlvlstr"` // e.g. "RAID 1"
|
||||
CapacityStr string `json:"capacityStr"` // e.g. "893.750 GiB"
|
||||
Status int `json:"status"`
|
||||
StatusStr string `json:"statusStr"` // e.g. "Optimal"
|
||||
}
|
||||
|
||||
type xccEvent struct {
|
||||
Severity string `json:"severity"` // "I", "W", "E", "C"
|
||||
Source string `json:"source"`
|
||||
@@ -496,37 +473,6 @@ func parseDisks(content []byte) []models.Storage {
|
||||
return out
|
||||
}
|
||||
|
||||
func parseVolumes(content []byte) []models.StorageVolume {
|
||||
var doc xccVolumeDoc
|
||||
if err := json.Unmarshal(content, &doc); err != nil || len(doc.Items) == 0 {
|
||||
return nil
|
||||
}
|
||||
var out []models.StorageVolume
|
||||
for _, item := range doc.Items {
|
||||
for _, v := range item.Volumes {
|
||||
vol := models.StorageVolume{
|
||||
ID: fmt.Sprintf("%d", v.ID),
|
||||
Name: strings.TrimSpace(v.Name),
|
||||
RAIDLevel: strings.TrimSpace(v.RDLvlStr),
|
||||
SizeGB: parseCapacityToGB(v.CapacityStr),
|
||||
Status: strings.TrimSpace(v.StatusStr),
|
||||
}
|
||||
drives := strings.TrimSpace(v.Drives)
|
||||
if drives != "" {
|
||||
for _, d := range strings.Split(drives, ",") {
|
||||
vol.Drives = append(vol.Drives, strings.TrimSpace(d))
|
||||
}
|
||||
// M.2 NVMe volumes are managed by Intel VROC (VMD)
|
||||
if strings.Contains(strings.ToLower(drives), "m.2") {
|
||||
vol.Controller = "Intel VROC"
|
||||
}
|
||||
}
|
||||
out = append(out, vol)
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func parseCards(content []byte) []models.PCIeDevice {
|
||||
var doc xccCardDoc
|
||||
if err := json.Unmarshal(content, &doc); err != nil {
|
||||
@@ -830,96 +776,6 @@ func isUnqualifiedDIMM(value string) bool {
|
||||
return strings.Contains(strings.ToLower(strings.TrimSpace(value)), "unqualified dimm")
|
||||
}
|
||||
|
||||
var (
|
||||
unqualifiedDIMMSlotRE = regexp.MustCompile(`(?i)\bunqualified dimm\s+(\d+)\b`)
|
||||
unqualifiedDIMMSerialRE = regexp.MustCompile(`(?i)\bserial number is\s+([A-Z0-9-]+)`)
|
||||
)
|
||||
|
||||
func applyDIMMWarningsFromEvents(result *models.AnalysisResult) {
|
||||
if result == nil || result.Hardware == nil || len(result.Hardware.Memory) == 0 || len(result.Events) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
for _, ev := range result.Events {
|
||||
if !isUnqualifiedDIMM(ev.Description) {
|
||||
continue
|
||||
}
|
||||
idx := findDIMMIndexForUnqualifiedEvent(result.Hardware.Memory, ev.Description)
|
||||
if idx < 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
dimm := &result.Hardware.Memory[idx]
|
||||
dimm.Status = "Warning"
|
||||
dimm.ErrorDescription = ev.Description
|
||||
if !ev.Timestamp.IsZero() {
|
||||
ts := ev.Timestamp.UTC()
|
||||
dimm.StatusChangedAt = &ts
|
||||
dimm.StatusCheckedAt = &ts
|
||||
}
|
||||
appendDIMMStatusHistory(dimm, ev)
|
||||
}
|
||||
}
|
||||
|
||||
func findDIMMIndexForUnqualifiedEvent(memory []models.MemoryDIMM, description string) int {
|
||||
slot := extractUnqualifiedDIMMSlot(description)
|
||||
serial := normalizeUnqualifiedDIMMSerial(extractUnqualifiedDIMMSerial(description))
|
||||
|
||||
for i := range memory {
|
||||
if slot != "" && strings.EqualFold(strings.TrimSpace(memory[i].Slot), slot) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
for i := range memory {
|
||||
if serial != "" && normalizeUnqualifiedDIMMSerial(memory[i].SerialNumber) == serial {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
func extractUnqualifiedDIMMSlot(description string) string {
|
||||
m := unqualifiedDIMMSlotRE.FindStringSubmatch(description)
|
||||
if len(m) < 2 {
|
||||
return ""
|
||||
}
|
||||
return "DIMM " + strings.TrimSpace(m[1])
|
||||
}
|
||||
|
||||
func extractUnqualifiedDIMMSerial(description string) string {
|
||||
m := unqualifiedDIMMSerialRE.FindStringSubmatch(description)
|
||||
if len(m) < 2 {
|
||||
return ""
|
||||
}
|
||||
return strings.TrimSpace(m[1])
|
||||
}
|
||||
|
||||
func normalizeUnqualifiedDIMMSerial(serial string) string {
|
||||
serial = strings.ToUpper(strings.TrimSpace(serial))
|
||||
if idx := strings.Index(serial, "-"); idx >= 0 {
|
||||
serial = serial[:idx]
|
||||
}
|
||||
return serial
|
||||
}
|
||||
|
||||
func appendDIMMStatusHistory(dimm *models.MemoryDIMM, ev models.Event) {
|
||||
if dimm == nil || ev.Timestamp.IsZero() {
|
||||
return
|
||||
}
|
||||
for _, item := range dimm.StatusHistory {
|
||||
if strings.EqualFold(strings.TrimSpace(item.Status), "Warning") &&
|
||||
item.ChangedAt.Equal(ev.Timestamp.UTC()) &&
|
||||
strings.TrimSpace(item.Details) == strings.TrimSpace(ev.Description) {
|
||||
return
|
||||
}
|
||||
}
|
||||
dimm.StatusHistory = append(dimm.StatusHistory, models.StatusHistoryEntry{
|
||||
Status: "Warning",
|
||||
ChangedAt: ev.Timestamp.UTC(),
|
||||
Details: ev.Description,
|
||||
})
|
||||
}
|
||||
|
||||
func parseXCCTime(s string) (time.Time, error) {
|
||||
s = strings.TrimSpace(s)
|
||||
formats := []string{
|
||||
@@ -981,12 +837,8 @@ func parseCapacityToGB(s string) int {
|
||||
switch strings.ToUpper(parts[1]) {
|
||||
case "TB":
|
||||
return int(v * 1000)
|
||||
case "TIB":
|
||||
return int(v * 1099.511627776) // 1 TiB = 1099.511... GB
|
||||
case "GB":
|
||||
return int(v)
|
||||
case "GIB":
|
||||
return int(v * 1.073741824) // 1 GiB = 1.073741824 GB
|
||||
case "MB":
|
||||
return int(v / 1024)
|
||||
}
|
||||
|
||||
108
internal/parser/vendors/lenovo_xcc/parser_test.go
vendored
108
internal/parser/vendors/lenovo_xcc/parser_test.go
vendored
@@ -2,7 +2,6 @@ package lenovo_xcc
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.mchus.pro/mchus/logpile/internal/models"
|
||||
"git.mchus.pro/mchus/logpile/internal/parser"
|
||||
@@ -225,75 +224,6 @@ func TestParse_LenovoXCCMiniLog_Firmware(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestParse_LenovoXCCMiniLog_VROCVolumes(t *testing.T) {
|
||||
files, err := parser.ExtractArchive(exampleArchive)
|
||||
if err != nil {
|
||||
t.Skipf("example archive not available: %v", err)
|
||||
}
|
||||
|
||||
p := &Parser{}
|
||||
result, _ := p.Parse(files)
|
||||
if result == nil || result.Hardware == nil {
|
||||
t.Fatal("Parse returned nil")
|
||||
}
|
||||
|
||||
if len(result.Hardware.Volumes) == 0 {
|
||||
t.Error("expected at least one VROC volume, got none")
|
||||
}
|
||||
for i, v := range result.Hardware.Volumes {
|
||||
t.Logf("Volume[%d]: id=%s controller=%q raid=%s size=%dGB status=%s drives=%v",
|
||||
i, v.ID, v.Controller, v.RAIDLevel, v.SizeGB, v.Status, v.Drives)
|
||||
if v.RAIDLevel == "" {
|
||||
t.Errorf("Volume[%d]: RAIDLevel is empty", i)
|
||||
}
|
||||
if v.Status == "" {
|
||||
t.Errorf("Volume[%d]: Status is empty", i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseVolumes_IntelVROC(t *testing.T) {
|
||||
content := []byte(`{
|
||||
"identifier": "storage.id",
|
||||
"items": [{
|
||||
"volumes": [{
|
||||
"id": 1,
|
||||
"name": "",
|
||||
"drives": "M.2 Drive 0, M.2 Drive 1",
|
||||
"rdlvlstr": "RAID 1",
|
||||
"capacityStr": "893.750 GiB",
|
||||
"status": 3,
|
||||
"statusStr": "Optimal"
|
||||
}],
|
||||
"totalCapacityStr": "893.750 GiB"
|
||||
}]
|
||||
}`)
|
||||
|
||||
vols := parseVolumes(content)
|
||||
if len(vols) != 1 {
|
||||
t.Fatalf("expected 1 volume, got %d", len(vols))
|
||||
}
|
||||
v := vols[0]
|
||||
if v.ID != "1" {
|
||||
t.Errorf("expected ID=1, got %q", v.ID)
|
||||
}
|
||||
if v.RAIDLevel != "RAID 1" {
|
||||
t.Errorf("expected RAIDLevel=RAID 1, got %q", v.RAIDLevel)
|
||||
}
|
||||
if v.Status != "Optimal" {
|
||||
t.Errorf("expected Status=Optimal, got %q", v.Status)
|
||||
}
|
||||
if v.Controller != "Intel VROC" {
|
||||
t.Errorf("expected Controller=Intel VROC, got %q", v.Controller)
|
||||
}
|
||||
if len(v.Drives) != 2 {
|
||||
t.Errorf("expected 2 drives, got %d: %v", len(v.Drives), v.Drives)
|
||||
}
|
||||
if v.SizeGB < 900 || v.SizeGB > 1000 {
|
||||
t.Errorf("expected SizeGB ~960, got %d", v.SizeGB)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseDIMMs_UnqualifiedDIMMAddsWarningEvent(t *testing.T) {
|
||||
content := []byte(`{
|
||||
"items": [{
|
||||
@@ -327,44 +257,6 @@ func TestSeverity_UnqualifiedDIMMMessageBecomesWarning(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestApplyDIMMWarningsFromEvents_UpdatesDIMMStatusForExport(t *testing.T) {
|
||||
result := &models.AnalysisResult{
|
||||
Events: []models.Event{
|
||||
{
|
||||
Timestamp: time.Date(2026, 4, 13, 11, 37, 38, 0, time.UTC),
|
||||
Severity: models.SeverityWarning,
|
||||
Description: "Unqualified DIMM 3 has been detected, the DIMM serial number is 80CE042328460C5D88-V20.",
|
||||
},
|
||||
},
|
||||
Hardware: &models.HardwareConfig{
|
||||
Memory: []models.MemoryDIMM{
|
||||
{
|
||||
Slot: "DIMM 3",
|
||||
Present: true,
|
||||
SerialNumber: "80CE042328460C5D88",
|
||||
Status: "Normal",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
applyDIMMWarningsFromEvents(result)
|
||||
|
||||
dimm := result.Hardware.Memory[0]
|
||||
if dimm.Status != "Warning" {
|
||||
t.Fatalf("expected DIMM status Warning, got %q", dimm.Status)
|
||||
}
|
||||
if dimm.ErrorDescription == "" || dimm.ErrorDescription != result.Events[0].Description {
|
||||
t.Fatalf("expected DIMM error description to be populated, got %q", dimm.ErrorDescription)
|
||||
}
|
||||
if dimm.StatusChangedAt == nil || !dimm.StatusChangedAt.Equal(result.Events[0].Timestamp) {
|
||||
t.Fatalf("expected status_changed_at from event timestamp, got %#v", dimm.StatusChangedAt)
|
||||
}
|
||||
if len(dimm.StatusHistory) != 1 || dimm.StatusHistory[0].Status != "Warning" {
|
||||
t.Fatalf("expected warning status history entry, got %#v", dimm.StatusHistory)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseBasicSysInfo_CleansPlaceholderValuesAndSetsTargetHost(t *testing.T) {
|
||||
result := &models.AnalysisResult{Hardware: &models.HardwareConfig{}}
|
||||
content := []byte(`{
|
||||
|
||||
@@ -50,20 +50,11 @@ func (s *Server) handleIndex(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
tmpl.Execute(w, map[string]string{
|
||||
"AppVersion": normalizeDisplayVersion(s.config.AppVersion),
|
||||
"AppCommit": s.config.AppCommit,
|
||||
"ChartVersion": normalizeDisplayVersion(s.config.ChartVersion),
|
||||
"AppVersion": s.config.AppVersion,
|
||||
"AppCommit": s.config.AppCommit,
|
||||
})
|
||||
}
|
||||
|
||||
func normalizeDisplayVersion(v string) string {
|
||||
v = strings.TrimSpace(v)
|
||||
if v == "" {
|
||||
return ""
|
||||
}
|
||||
return strings.TrimPrefix(v, "v")
|
||||
}
|
||||
|
||||
func (s *Server) handleChartCurrent(w http.ResponseWriter, r *http.Request) {
|
||||
result := s.GetResult()
|
||||
title := chartTitle(result)
|
||||
@@ -2054,14 +2045,14 @@ func applyCollectSourceMetadata(result *models.AnalysisResult, req CollectReques
|
||||
|
||||
func toCollectorRequest(req CollectRequest) collector.Request {
|
||||
return collector.Request{
|
||||
Host: req.Host,
|
||||
Protocol: req.Protocol,
|
||||
Port: req.Port,
|
||||
Username: req.Username,
|
||||
AuthType: req.AuthType,
|
||||
Password: req.Password,
|
||||
Token: req.Token,
|
||||
TLSMode: req.TLSMode,
|
||||
Host: req.Host,
|
||||
Protocol: req.Protocol,
|
||||
Port: req.Port,
|
||||
Username: req.Username,
|
||||
AuthType: req.AuthType,
|
||||
Password: req.Password,
|
||||
Token: req.Token,
|
||||
TLSMode: req.TLSMode,
|
||||
DebugPayloads: req.DebugPayloads,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,10 @@ import (
|
||||
var WebFS embed.FS
|
||||
|
||||
type Config struct {
|
||||
Port int
|
||||
PreloadFile string
|
||||
AppVersion string
|
||||
AppCommit string
|
||||
ChartVersion string
|
||||
Port int
|
||||
PreloadFile string
|
||||
AppVersion string
|
||||
AppCommit string
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1108
web/static/js/app.js
1108
web/static/js/app.js
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -7,63 +7,57 @@
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="page-header">
|
||||
<div class="page-header-brand">
|
||||
<p class="page-eyebrow">Diagnostic Workbench</p>
|
||||
<h1>LOGPile</h1>
|
||||
<p class="page-subtitle">BMC diagnostic data analyzer</p>
|
||||
</div>
|
||||
<div id="header-log-meta" class="header-log-meta hidden">
|
||||
<div class="header-actions">
|
||||
<button id="clear-btn" class="header-action hidden" onclick="clearData()">Clear Data</button>
|
||||
<button id="header-raw-btn" class="header-action hidden" onclick="exportData('json')">Raw Data</button>
|
||||
<button id="header-reanimator-btn" class="header-action hidden" onclick="exportData('reanimator')">Reanimator</button>
|
||||
<button id="restart-btn" class="header-action" onclick="restartApp()">Restart</button>
|
||||
<button id="exit-btn" class="header-action" onclick="exitApp()">Exit</button>
|
||||
<header>
|
||||
<div class="app-header-row">
|
||||
<div class="app-header-brand">
|
||||
<h1>LOGPile <span class="header-domain">mchus.pro</span></h1>
|
||||
<p>Анализатор диагностических данных BMC/IPMI</p>
|
||||
</div>
|
||||
<div id="header-log-meta" class="header-log-meta hidden">
|
||||
<div class="header-actions">
|
||||
<button id="clear-btn" class="hidden" onclick="clearData()">Очистить данные</button>
|
||||
<button id="header-raw-btn" class="hidden" onclick="exportData('json')">Export Raw Data</button>
|
||||
<button id="header-reanimator-btn" class="hidden" onclick="exportData('reanimator')">Экспорт Reanimator</button>
|
||||
<button id="restart-btn" onclick="restartApp()">Перезапуск</button>
|
||||
<button id="exit-btn" onclick="exitApp()">Выход</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="page-main">
|
||||
<section id="upload-section" class="control-deck">
|
||||
<div class="source-switch" role="tablist" aria-label="Data source">
|
||||
<button type="button" class="source-switch-btn active" data-source-type="archive">Archive</button>
|
||||
<main>
|
||||
<section id="upload-section">
|
||||
<div class="source-switch" role="tablist" aria-label="Источник данных">
|
||||
<button type="button" class="source-switch-btn active" data-source-type="archive">Архив</button>
|
||||
<button type="button" class="source-switch-btn" data-source-type="api">API</button>
|
||||
<button type="button" class="source-switch-btn" data-source-type="convert">Convert</button>
|
||||
</div>
|
||||
|
||||
<div id="archive-source-content" class="surface-panel upload-panel">
|
||||
<h2>Open Archive</h2>
|
||||
<p>Upload a support archive, plain log, or raw JSON snapshot to open the hardware report.</p>
|
||||
<div class="upload-area upload-dropzone" id="drop-zone">
|
||||
<div id="archive-source-content">
|
||||
<div class="upload-area" id="drop-zone">
|
||||
<p>Перетащите архив, TXT/LOG или JSON snapshot сюда</p>
|
||||
<input type="file" id="file-input" accept="application/gzip,application/x-gzip,application/x-tar,application/zip,application/json,text/plain,.ahs,.json,.tar,.tar.gz,.tgz,.sds,.zip,.txt,.log" hidden>
|
||||
<span class="upload-kicker">Archive Import</span>
|
||||
<strong>Drop a file here</strong>
|
||||
<span class="upload-copy">LOGPile will parse it and open the report immediately.</span>
|
||||
<div class="upload-actions">
|
||||
<button type="button" onclick="document.getElementById('file-input').click()">Select File</button>
|
||||
</div>
|
||||
<p class="hint">Supported formats: `.ahs`, `.tar.gz`, `.tar`, `.tgz`, `.sds`, `.zip`, `.json`, `.txt`, `.log`</p>
|
||||
<button type="button" onclick="document.getElementById('file-input').click()">Выберите файл</button>
|
||||
<p class="hint">Поддерживаемые форматы: ahs, tar.gz, tar, tgz, sds, zip, json, txt, log</p>
|
||||
</div>
|
||||
<div id="upload-status"></div>
|
||||
<div id="parsers-info" class="parsers-info"></div>
|
||||
</div>
|
||||
|
||||
<div id="api-source-content" class="surface-panel upload-panel hidden">
|
||||
<h2>BMC API</h2>
|
||||
<p>Validate access and start live collection through the production Redfish pipeline.</p>
|
||||
<div id="api-source-content" class="api-placeholder hidden">
|
||||
<form id="api-connect-form" novalidate>
|
||||
<h3>Подключение к BMC API</h3>
|
||||
<div id="api-form-errors" class="form-errors hidden"></div>
|
||||
|
||||
<div class="api-form-grid">
|
||||
<label class="api-form-field" for="api-host">
|
||||
<span>Host</span>
|
||||
<input id="api-host" name="host" type="text" placeholder="10.0.0.10 or bmc.example.local">
|
||||
<input id="api-host" name="host" type="text" placeholder="10.0.0.10 или bmc.example.local">
|
||||
<span class="field-error" data-error-for="host"></span>
|
||||
</label>
|
||||
|
||||
<label class="api-form-field" for="api-port">
|
||||
<span>Port</span>
|
||||
<span>Порт</span>
|
||||
<input id="api-port" name="port" type="number" min="1" max="65535" value="443" placeholder="443">
|
||||
<span class="field-error" data-error-for="port"></span>
|
||||
</label>
|
||||
@@ -75,52 +69,52 @@
|
||||
</label>
|
||||
|
||||
<label class="api-form-field" id="api-password-field" for="api-password">
|
||||
<span>Password</span>
|
||||
<span>Пароль</span>
|
||||
<input id="api-password" name="password" type="password" autocomplete="current-password">
|
||||
<span class="field-error" data-error-for="password"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="api-form-actions">
|
||||
<button id="api-connect-btn" type="button">Connect</button>
|
||||
<button id="api-connect-btn" type="button">Подключиться</button>
|
||||
</div>
|
||||
<div id="api-connect-status" class="api-connect-status"></div>
|
||||
<div id="api-probe-options" class="api-probe-options hidden">
|
||||
<div id="api-host-off-warning" class="api-host-off-warning hidden">
|
||||
⚠ Host is powered off. Inventory data may be incomplete.
|
||||
⚠ Host выключен — данные инвентаря могут быть неполными
|
||||
</div>
|
||||
<label class="api-form-checkbox" for="api-debug-payloads">
|
||||
<input id="api-debug-payloads" name="debug_payloads" type="checkbox">
|
||||
<span>Collect extended diagnostics</span>
|
||||
<span>Сбор расширенных данных для диагностики</span>
|
||||
</label>
|
||||
<div class="api-form-actions">
|
||||
<button id="api-collect-btn" type="submit">Collect</button>
|
||||
<button id="api-collect-btn" type="submit">Собрать</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<section id="api-job-status" class="job-status hidden" aria-live="polite">
|
||||
<div class="job-status-header">
|
||||
<h4>Collection Job Status</h4>
|
||||
<h4>Статус задачи сбора</h4>
|
||||
<div class="job-status-actions">
|
||||
<button id="skip-hung-btn" type="button" class="hidden" title="Abort hung requests and continue with analysis of collected data">Skip Hung Requests</button>
|
||||
<button id="cancel-job-btn" type="button">Cancel</button>
|
||||
<button id="skip-hung-btn" type="button" class="hidden" title="Прервать зависшие запросы и перейти к анализу собранных данных">Пропустить зависшие</button>
|
||||
<button id="cancel-job-btn" type="button">Отменить</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="job-status-meta">
|
||||
<div><span class="meta-label">jobId:</span> <code id="job-id-value">-</code></div>
|
||||
<div>
|
||||
<span class="meta-label">Status:</span>
|
||||
<span class="meta-label">Статус:</span>
|
||||
<span id="job-status-value" class="job-status-badge">Queued</span>
|
||||
</div>
|
||||
<div><span class="meta-label">Stage:</span> <span id="job-progress-value">Collecting data...</span></div>
|
||||
<div><span class="meta-label">Этап:</span> <span id="job-progress-value">Сбор данных...</span></div>
|
||||
<div><span class="meta-label">ETA:</span> <span id="job-eta-value">-</span></div>
|
||||
</div>
|
||||
<div class="job-progress" aria-label="Job progress">
|
||||
<div class="job-progress" aria-label="Прогресс задачи">
|
||||
<div id="job-progress-bar" class="job-progress-bar" style="width: 0%">0%</div>
|
||||
</div>
|
||||
<div id="job-active-modules" class="job-active-modules hidden">
|
||||
<p class="meta-label">Active modules:</p>
|
||||
<p class="meta-label">Активные модули:</p>
|
||||
<div id="job-active-modules-list" class="job-module-chips"></div>
|
||||
</div>
|
||||
<div id="job-debug-info" class="job-debug-info hidden">
|
||||
@@ -129,23 +123,23 @@
|
||||
<div id="job-phase-telemetry" class="job-phase-telemetry"></div>
|
||||
</div>
|
||||
<div class="job-status-logs">
|
||||
<p class="meta-label">Step log:</p>
|
||||
<p class="meta-label">Журнал шагов:</p>
|
||||
<ul id="job-logs-list"></ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div id="convert-source-content" class="surface-panel upload-panel hidden">
|
||||
<h2>Batch Convert</h2>
|
||||
<p>Select a folder with supported files. A separate Reanimator export will be produced for each file.</p>
|
||||
<div id="convert-source-content" class="api-placeholder hidden">
|
||||
<h3>Пакетная выгрузка Reanimator</h3>
|
||||
<p>Выберите папку с файлами поддерживаемого типа. Для каждого файла будет создан отдельный экспорт Reanimator.</p>
|
||||
<div class="api-form-actions">
|
||||
<input type="file" id="convert-folder-input" webkitdirectory directory multiple hidden>
|
||||
<button id="convert-folder-btn" type="button" onclick="document.getElementById('convert-folder-input').click()">Choose Folder</button>
|
||||
<button id="convert-run-btn" type="button">Convert to Reanimator</button>
|
||||
<button id="convert-folder-btn" type="button" onclick="document.getElementById('convert-folder-input').click()">Выбрать папку</button>
|
||||
<button id="convert-run-btn" type="button">Конвертировать в Reanimator</button>
|
||||
</div>
|
||||
<div id="convert-progress" class="convert-progress hidden" aria-live="polite">
|
||||
<div class="convert-progress-meta">
|
||||
<span id="convert-progress-label">Preparing...</span>
|
||||
<span id="convert-progress-label">Подготовка...</span>
|
||||
<span id="convert-progress-value">0%</span>
|
||||
</div>
|
||||
<div class="convert-progress-track">
|
||||
@@ -158,12 +152,12 @@
|
||||
</section>
|
||||
|
||||
<section id="data-section" class="hidden">
|
||||
<section class="viewer-panel">
|
||||
<section class="result-panel">
|
||||
<div class="audit-viewer-shell">
|
||||
<iframe
|
||||
id="audit-viewer-frame"
|
||||
class="audit-viewer-frame"
|
||||
title="Hardware report"
|
||||
title="Reanimator chart viewer"
|
||||
loading="eager"
|
||||
scrolling="no"
|
||||
referrerpolicy="same-origin">
|
||||
@@ -173,9 +167,11 @@
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer class="page-footer">
|
||||
<footer>
|
||||
<div class="footer-buttons">
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
<p>{{if .AppVersion}}LOGPile {{.AppVersion}}{{end}}{{if and .AppVersion .ChartVersion}} · {{end}}{{if .ChartVersion}}Chart {{.ChartVersion}}{{end}}</p>
|
||||
<p>Автор: <a href="https://mchus.pro" target="_blank">mchus.pro</a> | <a href="https://git.mchus.pro/mchus/logpile" target="_blank">Git Repository</a>{{if .AppVersion}} | v{{.AppVersion}}{{end}}</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user