MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / setupTableHeaders

Method setupTableHeaders

internal/ui/components/backup_table.go:58–77  ·  view source on GitHub ↗

setupTableHeaders sets up the table headers.

()

Source from the content-addressed store, hash-verified

56
57// setupTableHeaders sets up the table headers.
58func (bt *BackupTable) setupTableHeaders() {
59 headers := []string{"Date", "VolID / Name", "Size", "Storage", "Format", "Notes"}
60 colors := []tcell.Color{
61 theme.Colors.HeaderText,
62 theme.Colors.HeaderText,
63 theme.Colors.HeaderText,
64 theme.Colors.HeaderText,
65 theme.Colors.HeaderText,
66 theme.Colors.HeaderText,
67 }
68
69 for i, header := range headers {
70 cell := tview.NewTableCell(header).
71 SetTextColor(colors[i]).
72 SetAlign(tview.AlignLeft).
73 SetSelectable(false).
74 SetExpansion(1)
75 bt.SetCell(0, i, cell)
76 }
77}
78
79// DisplayBackups displays the backups in the table.
80func (bt *BackupTable) DisplayBackups(backups []api.Backup) {

Callers 1

NewBackupTableFunction · 0.95

Calls 1

SetTextColorMethod · 0.80

Tested by

no test coverage detected