Documentation
¶
Overview ¶
Package viewmodels provides view models for the web UI templates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractOSInfo ¶
ExtractOSInfo extracts OS name and version from system_info check output.
Types ¶
type CheckResult ¶
CheckResult represents the display info for a check.
type DeviceDetail ¶
type DeviceDetail struct {
*gitmdm.Device
CheckResults map[string]CheckResult
ComplianceMessage string
FormattedUptime string
SortedChecks []string
FailingChecks []string
PassingChecks []string
NAChecks []string
PassCount int
FailCount int
NACount int
}
DeviceDetail represents the detailed device view with analysis results.
func BuildDeviceDetail ¶
func BuildDeviceDetail(device *gitmdm.Device, staleThreshold time.Time) *DeviceDetail
BuildDeviceDetail creates a detailed view model for a single device. staleThreshold determines which checks to include - zero time means include all.
type DeviceListItem ¶
type DeviceListItem struct {
LastSeen time.Time
HardwareID string
Hostname string
User string
OS string
Version string
ComplianceEmoji string
ComplianceClass string
ComplianceScore float64
PassCount int
FailCount int
NACount int
}
DeviceListItem represents a device in the list view with compliance summary.
type DeviceListView ¶
type DeviceListView struct {
Search string
Status string
Devices []DeviceListItem
Page int
TotalPages int
Total int
HasPrevious bool
HasNext bool
}
DeviceListView represents the device list page view model with filters.
Click to show internal directories.
Click to hide internal directories.