Documentation
¶
Overview ¶
templ: version: v0.3.977
templ: version: v0.3.977
templ: version: v0.3.977
templ: version: v0.3.977
templ: version: v0.3.977
templ: version: v0.3.977
Index ¶
- Constants
- func AnnotationChips(annotations map[string]string) templ.Component
- func BMCDropdown(baseURL string) templ.Component
- func BMCJobContentArea(jobData BMCJobPageData) templ.Component
- func BMCJobDetailContent(job BMCJobDetail, baseURL string) templ.Component
- func BMCJobDetailPage(cfg PageConfig, job BMCJobDetail) templ.Component
- func BMCJobMainContent(jobData BMCJobPageData, baseURL string) templ.Component
- func BMCJobPage(cfg PageConfig, jobData BMCJobPageData) templ.Component
- func BMCJobTableContent(jobData BMCJobPageData) templ.Component
- func BMCMachineContentArea(machineData BMCMachinePageData) templ.Component
- func BMCMachineDetailContent(machine BMCMachineDetail, baseURL string) templ.Component
- func BMCMachineDetailPage(cfg PageConfig, machine BMCMachineDetail) templ.Component
- func BMCMachineMainContent(machineData BMCMachinePageData, baseURL string) templ.Component
- func BMCMachinePage(cfg PageConfig, machineData BMCMachinePageData) templ.Component
- func BMCMachineTableContent(machineData BMCMachinePageData) templ.Component
- func BMCTaskContentArea(taskData BMCTaskPageData) templ.Component
- func BMCTaskDetailContent(task BMCTaskDetail, baseURL string) templ.Component
- func BMCTaskDetailPage(cfg PageConfig, task BMCTaskDetail) templ.Component
- func BMCTaskMainContent(taskData BMCTaskPageData, baseURL string) templ.Component
- func BMCTaskPage(cfg PageConfig, taskData BMCTaskPageData) templ.Component
- func BMCTaskTableContent(taskData BMCTaskPageData) templ.Component
- func BackLink(resourceType, backLink string) templ.Component
- func CRDCard(crdInfo CRDInfo) templ.Component
- func CRDKindIcon(kind string) templ.Component
- func CodeBlock(code string) templ.Component
- func CodeBlockWithCopy(code, id string) templ.Component
- func CodeBlockYAML(code string) templ.Component
- func CodeBlockYAMLWithCopy(code, id string) templ.Component
- func ContentArea(hardwareData HardwarePageData) templ.Component
- func CubeIcon() templ.Component
- func DarkModeToggle() templ.Component
- func DashboardMainContent(data DashboardData, baseURL string) templ.Component
- func DashboardPage(cfg PageConfig, data DashboardData) templ.Component
- func DetailMainContent(resourceType, name, namespace, backLink string, content templ.Component) templ.Component
- func Footer() templ.Component
- func HardwareDetailContent(hw HardwareDetail, baseURL string) templ.Component
- func HardwareDetailPage(cfg PageConfig, hw HardwareDetail) templ.Component
- func HardwareTableContent(hardwareData HardwarePageData) templ.Component
- func Header() templ.Component
- func Homepage(cfg PageConfig, hardwareData HardwarePageData) templ.Component
- func LabelChips(labels map[string]string) templ.Component
- func Layout(title string, baseURL string) templ.Component
- func LoginPage(baseURL string) templ.Component
- func Logo(baseURL string) templ.Component
- func MainContent(hardwareData HardwarePageData, baseURL string) templ.Component
- func MainInfoHeader(name, status string) templ.Component
- func MetadataTable(name, namespace, createdAt string, labels, annotations map[string]string) templ.Component
- func MobileMenuButton() templ.Component
- func MobileMenuOverlay() templ.Component
- func NameValueTable(rows []InfoRow) templ.Component
- func NamespaceSelector(namespaces []string) templ.Component
- func NavLink(item NavItem) templ.Component
- func Navigation(baseURL string) templ.Component
- func NotFoundPage(cfg PageConfig, ...) templ.Component
- func PaginationNav(pagination PaginationData) templ.Component
- func PermissionRow(perm Permission) templ.Component
- func PermissionRowError(resource, apiGroup string) templ.Component
- func PermissionRowLoading(resource, apiGroup, baseURL string) templ.Component
- func PermissionsPage(cfg PageConfig, resources []ResourceInfo) templ.Component
- func SchemaFieldList(fields []SchemaField, depth int) templ.Component
- func SchemaFieldView(field SchemaField, depth int) templ.Component
- func Scripts(baseURL string) templ.Component
- func SearchBar() templ.Component
- func SectionBox(title string) templ.Component
- func SectionBoxCollapsible(title string, defaultOpen bool) templ.Component
- func Sidebar(namespaces []string, baseURL string) templ.Component
- func SidebarFooter() templ.Component
- func SpecIcon() templ.Component
- func StatusBadge(status string) templ.Component
- func StatusIcon() templ.Component
- func TableCard() templ.Component
- func TableCardFooter(pagination PaginationData) templ.Component
- func TableCardHeader(count int, resourceName string) templ.Component
- func TemplateContentArea(templateData TemplatePageData) templ.Component
- func TemplateDetailContent(tpl TemplateDetail, baseURL string) templ.Component
- func TemplateDetailPage(cfg PageConfig, tpl TemplateDetail) templ.Component
- func TemplateMainContent(templateData TemplatePageData, baseURL string) templ.Component
- func TemplatePage(cfg PageConfig, templateData TemplatePageData) templ.Component
- func TemplateTableContent(templateData TemplatePageData) templ.Component
- func TypeBadge(fieldType string) templ.Component
- func UserProfileDropdown() templ.Component
- func VerbBadge(verb string) templ.Component
- func WorkflowContentArea(workflowData WorkflowPageData) templ.Component
- func WorkflowDetailContent(wf WorkflowDetail, baseURL string) templ.Component
- func WorkflowDetailPage(cfg PageConfig, wf WorkflowDetail) templ.Component
- func WorkflowMainContent(workflowData WorkflowPageData, baseURL string) templ.Component
- func WorkflowPage(cfg PageConfig, workflowData WorkflowPageData) templ.Component
- func WorkflowRuleSetContentArea(rulesetData WorkflowRuleSetPageData) templ.Component
- func WorkflowRuleSetDetailContent(rs WorkflowRuleSetDetail, baseURL string) templ.Component
- func WorkflowRuleSetDetailPage(cfg PageConfig, rs WorkflowRuleSetDetail) templ.Component
- func WorkflowRuleSetMainContent(rulesetData WorkflowRuleSetPageData, baseURL string) templ.Component
- func WorkflowRuleSetPage(cfg PageConfig, rulesetData WorkflowRuleSetPageData) templ.Component
- func WorkflowRuleSetTableContent(rulesetData WorkflowRuleSetPageData) templ.Component
- func WorkflowTableContent(workflowData WorkflowPageData) templ.Component
- func WorkflowsDropdown(baseURL string) templ.Component
- type AgentAttributes
- type AgentBIOS
- type AgentBaseboard
- type AgentBlockDevice
- type AgentCPU
- type AgentChassis
- type AgentGPUDevice
- type AgentMemory
- type AgentNetworkInterface
- type AgentPCIDevice
- type AgentProcessor
- type AgentProduct
- type BMCJob
- type BMCJobDetail
- type BMCJobPageData
- type BMCMachine
- type BMCMachineDetail
- type BMCMachinePageData
- type BMCTask
- type BMCTaskDetail
- type BMCTaskPageData
- type CRDGroup
- type CRDInfo
- type DashboardData
- type Hardware
- type HardwareDetail
- type HardwareInterface
- type HardwarePageData
- type InfoRow
- type NavItem
- type PageConfig
- type PaginationData
- type Permission
- type ResourceInfo
- type SchemaField
- type Template
- type TemplateDetail
- type TemplatePageData
- type Workflow
- type WorkflowDetail
- type WorkflowPageData
- type WorkflowRuleSet
- type WorkflowRuleSetDetail
- type WorkflowRuleSetPageData
Constants ¶
const AllNamespace = "All"
AllNamespace is the constant value representing "all namespaces" in the UI. This is the single source of truth for the "all namespaces" identifier.
Usage:
- Backend Go code: Import this package and use templates.AllNamespace
- Frontend JavaScript: The value is automatically injected as ALL_NAMESPACE constant
- Templates: Use { AllNamespace } in templ files
This constant is referenced by:
- ui/internal/http/kube.go - List methods use this to determine namespace filtering
- ui/templates/layout.templ - Namespace selector UI
- ui/templates/scripts.templ - JavaScript namespace logic
Variables ¶
This section is empty.
Functions ¶
func AnnotationChips ¶
AnnotationChips - Display annotations as inline chips
func BMCDropdown ¶
BMCDropdown renders the BMC navigation dropdown menu. baseURL is the URL prefix for all routes (e.g., "/ui").
func BMCJobContentArea ¶
func BMCJobContentArea(jobData BMCJobPageData) templ.Component
func BMCJobDetailContent ¶
func BMCJobDetailContent(job BMCJobDetail, baseURL string) templ.Component
func BMCJobDetailPage ¶
func BMCJobDetailPage(cfg PageConfig, job BMCJobDetail) templ.Component
BMCJobDetailPage shows details for a specific Job.
func BMCJobMainContent ¶
func BMCJobMainContent(jobData BMCJobPageData, baseURL string) templ.Component
func BMCJobPage ¶
func BMCJobPage(cfg PageConfig, jobData BMCJobPageData) templ.Component
BMCJobPage is the Jobs listing page.
func BMCJobTableContent ¶
func BMCJobTableContent(jobData BMCJobPageData) templ.Component
func BMCMachineContentArea ¶
func BMCMachineContentArea(machineData BMCMachinePageData) templ.Component
func BMCMachineDetailContent ¶
func BMCMachineDetailContent(machine BMCMachineDetail, baseURL string) templ.Component
func BMCMachineDetailPage ¶
func BMCMachineDetailPage(cfg PageConfig, machine BMCMachineDetail) templ.Component
BMCMachineDetailPage shows details for a specific Machine.
func BMCMachineMainContent ¶
func BMCMachineMainContent(machineData BMCMachinePageData, baseURL string) templ.Component
func BMCMachinePage ¶
func BMCMachinePage(cfg PageConfig, machineData BMCMachinePageData) templ.Component
BMCMachinePage is the Machines listing page.
func BMCMachineTableContent ¶
func BMCMachineTableContent(machineData BMCMachinePageData) templ.Component
func BMCTaskContentArea ¶
func BMCTaskContentArea(taskData BMCTaskPageData) templ.Component
func BMCTaskDetailContent ¶
func BMCTaskDetailContent(task BMCTaskDetail, baseURL string) templ.Component
func BMCTaskDetailPage ¶
func BMCTaskDetailPage(cfg PageConfig, task BMCTaskDetail) templ.Component
BMCTaskDetailPage shows details for a specific Task.
func BMCTaskMainContent ¶
func BMCTaskMainContent(taskData BMCTaskPageData, baseURL string) templ.Component
func BMCTaskPage ¶
func BMCTaskPage(cfg PageConfig, taskData BMCTaskPageData) templ.Component
BMCTaskPage is the Tasks listing page.
func BMCTaskTableContent ¶
func BMCTaskTableContent(taskData BMCTaskPageData) templ.Component
func CRDKindIcon ¶
CRDKindIcon renders an icon based on the CRD kind, matching navigation icons.
func CodeBlockWithCopy ¶
CodeBlockWithCopy - Code block with copy button
func CodeBlockYAML ¶
CodeBlockYAML - Code block with YAML syntax highlighting
func CodeBlockYAMLWithCopy ¶
CodeBlockYAMLWithCopy - Code block with YAML syntax highlighting and copy button
func ContentArea ¶
func ContentArea(hardwareData HardwarePageData) templ.Component
ContentArea Templates for each resource type
func DarkModeToggle ¶
DarkModeToggle renders the dark/light mode toggle button.
func DashboardMainContent ¶
func DashboardMainContent(data DashboardData, baseURL string) templ.Component
DashboardMainContent renders the main content area for the dashboard/landing page.
func DashboardPage ¶
func DashboardPage(cfg PageConfig, data DashboardData) templ.Component
DashboardPage is the landing page showing all CRDs.
func DetailMainContent ¶
func DetailMainContent(resourceType, name, namespace, backLink string, content templ.Component) templ.Component
Reusable detail components - UI
func HardwareDetailContent ¶
func HardwareDetailContent(hw HardwareDetail, baseURL string) templ.Component
Resource-specific detail content components
func HardwareDetailPage ¶
func HardwareDetailPage(cfg PageConfig, hw HardwareDetail) templ.Component
HardwareDetailPage shows details for a specific hardware resource.
func HardwareTableContent ¶
func HardwareTableContent(hardwareData HardwarePageData) templ.Component
Table content templates for HTMX partial updates
func Homepage ¶
func Homepage(cfg PageConfig, hardwareData HardwarePageData) templ.Component
Homepage is the main hardware listing page.
func LabelChips ¶
LabelChips - Display labels as inline chips
func Layout ¶
Layout is the base HTML layout for all pages. baseURL is the URL prefix for all routes (e.g., "/ui").
func Logo ¶
Logo renders the Tinkerbell logo. baseURL is the URL prefix for all routes (e.g., "/ui").
func MainContent ¶
func MainContent(hardwareData HardwarePageData, baseURL string) templ.Component
MainContent templates for each resource type
func MainInfoHeader ¶
MainInfoHeader - Large title with status badge
func MetadataTable ¶
func MetadataTable(name, namespace, createdAt string, labels, annotations map[string]string) templ.Component
MetadataTable - metadata display
func MobileMenuButton ¶
MobileMenuButton renders the hamburger menu button for mobile.
func MobileMenuOverlay ¶
MobileMenuOverlay renders the mobile menu background overlay.
func NameValueTable ¶
NameValueTable - key-value table
func NamespaceSelector ¶
NamespaceSelector renders the namespace dropdown selector.
func Navigation ¶
Navigation renders the main navigation menu. baseURL is the URL prefix for all routes (e.g., "/ui").
func NotFoundPage ¶
func NotFoundPage(cfg PageConfig, resourceType, resourceName, resourceNamespace, backLink, backLinkLabel, message string) templ.Component
NotFoundPage shows a styled 404 page for missing resources.
func PaginationNav ¶
func PaginationNav(pagination PaginationData) templ.Component
PaginationNav renders the pagination controls
func PermissionRow ¶
func PermissionRow(perm Permission) templ.Component
PermissionRow shows the loaded permission status for a resource.
func PermissionRowError ¶
PermissionRowError shows an error state for a permission row.
func PermissionRowLoading ¶
PermissionRowLoading shows a loading state for a permission row, which will be replaced via HTMX.
func PermissionsPage ¶
func PermissionsPage(cfg PageConfig, resources []ResourceInfo) templ.Component
PermissionsPage shows the user's Tinkerbell RBAC permissions. It loads immediately with loading indicators, then fetches each resource's permissions via HTMX.
func SchemaFieldList ¶
func SchemaFieldList(fields []SchemaField, depth int) templ.Component
SchemaFieldList renders a list of schema fields.
func SchemaFieldView ¶
func SchemaFieldView(field SchemaField, depth int) templ.Component
SchemaFieldView renders a single schema field with optional nested children.
func Scripts ¶
Scripts renders the application JavaScript from an external file. The JavaScript is served from /js/app.js (embedded in the binary). baseURL is the URL prefix for all routes (e.g., "/ui").
func SectionBox ¶
SectionBox - card container with title
func SectionBoxCollapsible ¶
SectionBoxCollapsible - Collapsible version of SectionBox
func Sidebar ¶
Sidebar renders the main navigation sidebar. baseURL is the URL prefix for all routes (e.g., "/ui").
func SidebarFooter ¶
SidebarFooter renders the footer section of the sidebar with version and links.
func StatusBadge ¶
func StatusIcon ¶
StatusIcon renders an icon for the status section.
func TableCardFooter ¶
func TableCardFooter(pagination PaginationData) templ.Component
TableCardFooter renders the pagination footer
func TableCardHeader ¶
TableCardHeader renders the card header with count and search input
func TemplateContentArea ¶
func TemplateContentArea(templateData TemplatePageData) templ.Component
func TemplateDetailContent ¶
func TemplateDetailContent(tpl TemplateDetail, baseURL string) templ.Component
func TemplateDetailPage ¶
func TemplateDetailPage(cfg PageConfig, tpl TemplateDetail) templ.Component
TemplateDetailPage shows details for a specific template.
func TemplateMainContent ¶
func TemplateMainContent(templateData TemplatePageData, baseURL string) templ.Component
func TemplatePage ¶
func TemplatePage(cfg PageConfig, templateData TemplatePageData) templ.Component
TemplatePage is the templates listing page.
func TemplateTableContent ¶
func TemplateTableContent(templateData TemplatePageData) templ.Component
func UserProfileDropdown ¶
UserProfileDropdown renders the user profile dropdown with API server info and logout.
func WorkflowContentArea ¶
func WorkflowContentArea(workflowData WorkflowPageData) templ.Component
func WorkflowDetailContent ¶
func WorkflowDetailContent(wf WorkflowDetail, baseURL string) templ.Component
func WorkflowDetailPage ¶
func WorkflowDetailPage(cfg PageConfig, wf WorkflowDetail) templ.Component
WorkflowDetailPage shows details for a specific workflow.
func WorkflowMainContent ¶
func WorkflowMainContent(workflowData WorkflowPageData, baseURL string) templ.Component
func WorkflowPage ¶
func WorkflowPage(cfg PageConfig, workflowData WorkflowPageData) templ.Component
WorkflowPage is the workflows listing page.
func WorkflowRuleSetContentArea ¶
func WorkflowRuleSetContentArea(rulesetData WorkflowRuleSetPageData) templ.Component
func WorkflowRuleSetDetailContent ¶
func WorkflowRuleSetDetailContent(rs WorkflowRuleSetDetail, baseURL string) templ.Component
func WorkflowRuleSetDetailPage ¶
func WorkflowRuleSetDetailPage(cfg PageConfig, rs WorkflowRuleSetDetail) templ.Component
WorkflowRuleSetDetailPage shows details for a specific workflowruleset.
func WorkflowRuleSetMainContent ¶
func WorkflowRuleSetMainContent(rulesetData WorkflowRuleSetPageData, baseURL string) templ.Component
func WorkflowRuleSetPage ¶
func WorkflowRuleSetPage(cfg PageConfig, rulesetData WorkflowRuleSetPageData) templ.Component
WorkflowRuleSetPage is the workflowrulesets listing page.
func WorkflowRuleSetTableContent ¶
func WorkflowRuleSetTableContent(rulesetData WorkflowRuleSetPageData) templ.Component
func WorkflowTableContent ¶
func WorkflowTableContent(workflowData WorkflowPageData) templ.Component
func WorkflowsDropdown ¶
WorkflowsDropdown renders the Workflows navigation dropdown menu. baseURL is the URL prefix for all routes (e.g., "/ui").
Types ¶
type AgentAttributes ¶
type AgentAttributes struct {
CPU AgentCPU `json:"cpu"`
Memory AgentMemory `json:"memory"`
BlockDevices []AgentBlockDevice `json:"blockDevices"`
NetworkInterfaces []AgentNetworkInterface `json:"networkInterfaces"`
PCIDevices []AgentPCIDevice `json:"pciDevices"`
GPUDevices []AgentGPUDevice `json:"gpuDevices"`
Chassis AgentChassis `json:"chassis"`
BIOS AgentBIOS `json:"bios"`
Baseboard AgentBaseboard `json:"baseboard"`
Product AgentProduct `json:"product"`
}
AgentAttributes represents the agent-attributes annotation data.
type AgentBIOS ¶
type AgentBIOS struct {
Vendor string `json:"vendor"`
Version string `json:"version"`
ReleaseDate string `json:"releaseDate"`
}
AgentBIOS represents BIOS information from agent attributes.
type AgentBaseboard ¶
type AgentBaseboard struct {
Vendor string `json:"vendor"`
Product string `json:"product"`
Version string `json:"version"`
SerialNumber string `json:"serialNumber"`
}
AgentBaseboard represents baseboard information from agent attributes.
type AgentBlockDevice ¶
type AgentBlockDevice struct {
Name string `json:"name"`
Size string `json:"size"`
ControllerType string `json:"controllerType"`
DriveType string `json:"driveType"`
PhysicalBlockSize string `json:"physicalBlockSize"`
Vendor string `json:"vendor"`
Model string `json:"model"`
WWN string `json:"wwn"`
SerialNumber string `json:"serialNumber"`
}
AgentBlockDevice represents a block device from agent attributes.
type AgentCPU ¶
type AgentCPU struct {
TotalCores int `json:"totalCores"`
TotalThreads int `json:"totalThreads"`
Processors []AgentProcessor `json:"processors"`
}
AgentCPU represents CPU information from agent attributes.
type AgentChassis ¶
AgentChassis represents chassis information from agent attributes.
type AgentGPUDevice ¶
type AgentGPUDevice struct {
Vendor string `json:"vendor"`
Product string `json:"product"`
Class string `json:"class"`
Driver string `json:"driver"`
}
AgentGPUDevice represents a GPU device from agent attributes.
type AgentMemory ¶
AgentMemory represents memory information from agent attributes.
type AgentNetworkInterface ¶
type AgentNetworkInterface struct {
Name string `json:"name"`
MAC string `json:"mac"`
Speed string `json:"speed"`
EnabledCapabilities []string `json:"enabledCapabilities"`
}
AgentNetworkInterface represents a network interface from agent attributes.
type AgentPCIDevice ¶
type AgentPCIDevice struct {
Vendor string `json:"vendor"`
Product string `json:"product"`
Class string `json:"class"`
Driver string `json:"driver"`
}
AgentPCIDevice represents a PCI device from agent attributes.
type AgentProcessor ¶
type AgentProcessor struct {
ID int `json:"id"`
Cores int `json:"cores"`
Threads int `json:"threads"`
Vendor string `json:"vendor"`
Model string `json:"model"`
Capabilities []string `json:"capabilities"`
}
AgentProcessor represents a processor from agent attributes.
type AgentProduct ¶
type AgentProduct struct {
Name string `json:"name"`
Vendor string `json:"vendor"`
SerialNumber string `json:"serialNumber"`
}
AgentProduct represents product information from agent attributes.
type BMCJob ¶
type BMCJob struct {
Name string
Namespace string
MachineRef string
Status string
CompletedAt string
CreatedAt string
}
BMCJob represents a BMC job resource in the list view.
type BMCJobDetail ¶
type BMCJobDetail struct {
Name string
Namespace string
MachineRef string
Status string
CompletedAt string
CreatedAt string
Labels map[string]string
Annotations map[string]string
SpecYAML string
StatusYAML string
YAML string
}
BMCJobDetail is the data for the BMC job detail page.
type BMCJobPageData ¶
type BMCJobPageData struct {
Jobs []BMCJob
Pagination PaginationData
}
BMCJobPageData is the data for the BMC job list page.
type BMCMachine ¶
type BMCMachine struct {
Name string
Namespace string
PowerState string
Contactable string
Endpoint string
CreatedAt string
}
BMCMachine represents a BMC machine resource in the list view.
type BMCMachineDetail ¶
type BMCMachineDetail struct {
Name string
Namespace string
PowerState string
Contactable string
Endpoint string
CreatedAt string
Labels map[string]string
Annotations map[string]string
SpecYAML string
StatusYAML string
YAML string
}
BMCMachineDetail is the data for the BMC machine detail page.
type BMCMachinePageData ¶
type BMCMachinePageData struct {
Machines []BMCMachine
Pagination PaginationData
}
BMCMachinePageData is the data for the BMC machine list page.
type BMCTask ¶
type BMCTask struct {
Name string
Namespace string
JobRef string
TaskType string
Status string
CompletedAt string
CreatedAt string
}
BMCTask represents a BMC task resource in the list view.
type BMCTaskDetail ¶
type BMCTaskDetail struct {
Name string
Namespace string
JobRef string
TaskType string
Status string
CompletedAt string
CreatedAt string
Labels map[string]string
Annotations map[string]string
SpecYAML string
StatusYAML string
YAML string
}
BMCTaskDetail is the data for the BMC task detail page.
type BMCTaskPageData ¶
type BMCTaskPageData struct {
Tasks []BMCTask
Pagination PaginationData
}
BMCTaskPageData is the data for the BMC task list page.
type CRDGroup ¶
type CRDGroup struct {
Name string // Group name (e.g., "tinkerbell.org")
CRDs []CRDInfo // CRDs in this group
}
CRDGroup represents a group of CRDs for display.
type CRDInfo ¶
type CRDInfo struct {
Kind string // Resource kind (e.g., "Hardware")
Plural string // Plural name (e.g., "hardware")
Group string // API group (e.g., "tinkerbell.org")
Version string // API version (e.g., "v1alpha1")
Description string // CRD description
Route string // Web UI route (empty if no UI exists)
SpecFields []SchemaField // Top-level spec fields
StatusFields []SchemaField // Top-level status fields
}
CRDInfo represents a Custom Resource Definition for display on the dashboard.
type DashboardData ¶
type DashboardData struct {
Groups []CRDGroup // CRDs grouped by API group
}
DashboardData is the data for the landing page/dashboard.
type Hardware ¶
type Hardware struct {
Name string
Namespace string
Description string
MAC string
IPv4Address string
Status string
CreatedAt string
}
Hardware represents a hardware resource in the list view.
type HardwareDetail ¶
type HardwareDetail struct {
Name string
Namespace string
Interfaces []HardwareInterface
Status string
CreatedAt string
Labels map[string]string
Annotations map[string]string
AgentAttributes *AgentAttributes
SpecYAML string
StatusYAML string
YAML string
}
HardwareDetail is the data for the hardware detail page.
type HardwareInterface ¶
HardwareInterface represents a single network interface.
type HardwarePageData ¶
type HardwarePageData struct {
Hardware []Hardware
Pagination PaginationData
}
HardwarePageData is the data for the hardware list page.
type InfoRow ¶
type InfoRow struct {
Name string
Value string
Link string // If set, Value is rendered as a hyperlink to this URL.
Hide bool
}
InfoRow represents a single row in a NameValueTable.
type PageConfig ¶
type PageConfig struct {
BaseURL string // URL prefix for all routes (e.g., "/ui")
Namespaces []string // Available namespaces
}
PageConfig holds common page configuration.
type PaginationData ¶
type PaginationData struct {
CurrentPage int
TotalPages int
TotalItems int
ItemsPerPage int
StartItem int
EndItem int
ResourcePath string // e.g., "/hardware", "/workflows", "/templates"
TargetID string // e.g., "#hardware-content", "#workflow-content"
}
PaginationData holds pagination state for list views.
type Permission ¶
type Permission struct {
Resource string
APIGroup string
Namespace string // Namespace scope (empty means cluster-wide)
Verbs []string // Allowed verbs for this resource
}
Permission represents a Kubernetes RBAC permission for a Tinkerbell resource.
type ResourceInfo ¶
ResourceInfo represents a Tinkerbell resource for the permissions loading page.
type SchemaField ¶
type SchemaField struct {
Name string // Field name
Type string // Field type (string, integer, boolean, object, array)
Description string // Field description from CRD
Required bool // Whether the field is required
Deprecated bool // Whether the field is deprecated
Children []SchemaField // Nested fields for objects/arrays
Pattern string // Regex pattern for validation (if any)
Enum []string // Allowed enum values (if any)
Default string // Default value (if any)
Format string // Format hint (date-time, int64, uri, etc.)
}
SchemaField represents a field in a CRD schema for display.
type TemplateDetail ¶
type TemplateDetail struct {
Name string
Namespace string
State string
Data string
CreatedAt string
Labels map[string]string
Annotations map[string]string
SpecYAML string
StatusYAML string
YAML string
}
TemplateDetail is the data for the template detail page.
type TemplatePageData ¶
type TemplatePageData struct {
Templates []Template
Pagination PaginationData
}
TemplatePageData is the data for the template list page.
type Workflow ¶
type Workflow struct {
Name string
Namespace string
TemplateRef string
State string
Task string
Action string
Agent string
CreatedAt string
}
Workflow represents a workflow resource in the list view.
type WorkflowDetail ¶
type WorkflowDetail struct {
Name string
Namespace string
TemplateRef string
HardwareRef string
State string
Task string
Action string
Agent string
TemplateRendering string
CreatedAt string
Labels map[string]string
Annotations map[string]string
SpecYAML string
StatusYAML string
YAML string
}
WorkflowDetail is the data for the workflow detail page.
type WorkflowPageData ¶
type WorkflowPageData struct {
Workflows []Workflow
Pagination PaginationData
}
WorkflowPageData is the data for the workflow list page.
type WorkflowRuleSet ¶
type WorkflowRuleSet struct {
Name string
Namespace string
Rules string
TemplateRef string
CreatedAt string
}
WorkflowRuleSet represents a workflowruleset resource in the list view.
type WorkflowRuleSetDetail ¶
type WorkflowRuleSetDetail struct {
Name string
Namespace string
YAMLData string
CreatedAt string
Labels map[string]string
Annotations map[string]string
Rules []string
TemplateRef string
WorkflowNamespace string
WorkflowDisabled bool
AddAttributes bool
AgentValue string
}
WorkflowRuleSetDetail is the data for the workflowruleset detail page.
type WorkflowRuleSetPageData ¶
type WorkflowRuleSetPageData struct {
RuleSets []WorkflowRuleSet
Pagination PaginationData
}
WorkflowRuleSetPageData is the data for the workflowruleset list page.