Push: Initial push
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Package model defines the data structures for the Nebara OS TUI.
|
||||
package model
|
||||
|
||||
// ApplianceInfo holds the display data for the appliance information section.
|
||||
type ApplianceInfo struct {
|
||||
ProductName string
|
||||
Version string
|
||||
Hostname string
|
||||
Address string
|
||||
Uptime string
|
||||
Status string
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package model
|
||||
|
||||
// MenuItem represents a single entry in any menu level.
|
||||
type MenuItem struct {
|
||||
Label string
|
||||
Description string
|
||||
Children []MenuItem
|
||||
}
|
||||
|
||||
// MainMenu returns the complete main menu data structure.
|
||||
func MainMenu() []MenuItem {
|
||||
return []MenuItem{
|
||||
{
|
||||
Label: "System Configuration",
|
||||
Description: "Configure appliance hostname, system identity, time and general settings.",
|
||||
Children: []MenuItem{
|
||||
{Label: "Hostname & Domain", Description: "Configure the appliance hostname and domain name."},
|
||||
{Label: "Date & Time", Description: "Set the system date and time."},
|
||||
{Label: "NTP Configuration", Description: "Configure Network Time Protocol servers."},
|
||||
{Label: "System Information", Description: "View system hardware and software information."},
|
||||
{Label: "Appliance Identity", Description: "Configure appliance identity and asset tags."},
|
||||
},
|
||||
},
|
||||
{
|
||||
Label: "Network Configuration",
|
||||
Description: "Configure management interfaces, IP addressing, DNS and network connectivity.",
|
||||
Children: []MenuItem{
|
||||
{Label: "Management Interfaces", Description: "Configure management network interfaces."},
|
||||
{Label: "IPv4 Configuration", Description: "Configure IPv4 addresses and subnet masks."},
|
||||
{Label: "DNS Configuration", Description: "Configure DNS resolver settings."},
|
||||
{Label: "Default Gateway & Routes", Description: "Configure default gateway and static routes."},
|
||||
{Label: "VLAN Configuration", Description: "Configure VLAN tagging and interfaces."},
|
||||
{Label: "Network Bonding", Description: "Configure interface bonding and aggregation."},
|
||||
{Label: "Connectivity Test", Description: "Test network connectivity to targets."},
|
||||
},
|
||||
},
|
||||
{
|
||||
Label: "Security & Access",
|
||||
Description: "Manage user accounts, authentication and remote access.",
|
||||
Children: []MenuItem{
|
||||
{Label: "Local Users", Description: "Manage local user accounts."},
|
||||
{Label: "Authentication Settings", Description: "Configure authentication methods."},
|
||||
{Label: "Password Policy", Description: "Configure password complexity and expiry policies."},
|
||||
{Label: "Remote Access", Description: "Configure SSH and remote management access."},
|
||||
{Label: "Session Management", Description: "View and manage active sessions."},
|
||||
},
|
||||
},
|
||||
{
|
||||
Label: "System Maintenance",
|
||||
Description: "Manage appliance updates, configuration backups and maintenance tasks.",
|
||||
Children: []MenuItem{
|
||||
{Label: "Appliance Updates", Description: "Check for and apply appliance software updates."},
|
||||
{Label: "Configuration Backup", Description: "Back up the current appliance configuration."},
|
||||
{Label: "Configuration Restore", Description: "Restore appliance configuration from a backup."},
|
||||
{Label: "System Restart", Description: "Safely restart the appliance."},
|
||||
{Label: "System Shutdown", Description: "Safely shut down the appliance."},
|
||||
},
|
||||
},
|
||||
{
|
||||
Label: "Diagnostics",
|
||||
Description: "View system health, diagnostics and troubleshooting information.",
|
||||
Children: []MenuItem{
|
||||
{Label: "System Health", Description: "View overall system health status."},
|
||||
{Label: "Hardware Information", Description: "View hardware component information."},
|
||||
{Label: "Network Diagnostics", Description: "Run network diagnostic tools."},
|
||||
{Label: "Service Status", Description: "View the status of system services."},
|
||||
{Label: "System Logs", Description: "Browse and filter system log entries."},
|
||||
},
|
||||
},
|
||||
{
|
||||
Label: "Support & Recovery",
|
||||
Description: "Access support tools, recovery options and troubleshooting functions.",
|
||||
Children: []MenuItem{
|
||||
{Label: "Support Information", Description: "View support contact and licensing information."},
|
||||
{Label: "Diagnostic Bundle", Description: "Generate a diagnostic bundle for support."},
|
||||
{Label: "Recovery Options", Description: "Access factory reset and recovery options."},
|
||||
{Label: "Troubleshooting Shell", Description: "Not available in this prototype."},
|
||||
{Label: "Support Access", Description: "Manage remote support access credentials."},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package model
|
||||
|
||||
// MessageSeverity classifies the severity of a system message.
|
||||
type MessageSeverity int
|
||||
|
||||
const (
|
||||
// SeverityNone means no message is active.
|
||||
SeverityNone MessageSeverity = iota
|
||||
SeverityWarning
|
||||
SeverityError
|
||||
SeverityInfo
|
||||
)
|
||||
|
||||
// SystemMessage represents an optional system-level status message.
|
||||
type SystemMessage struct {
|
||||
Severity MessageSeverity
|
||||
Text string
|
||||
}
|
||||
|
||||
// IsVisible returns true when there is an active message to display.
|
||||
func (m *SystemMessage) IsVisible() bool {
|
||||
return m != nil && m.Severity != SeverityNone && m.Text != ""
|
||||
}
|
||||
Reference in New Issue
Block a user