setupTableHeaders sets up the table headers.
()
| 56 | |
| 57 | // setupTableHeaders sets up the table headers. |
| 58 | func (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. |
| 80 | func (bt *BackupTable) DisplayBackups(backups []api.Backup) { |
no test coverage detected