(event *tcell.EventKey, currentNode *tview.TreeNode, cache *EntryCache, attrsPanel *tview.Table)
| 600 | } |
| 601 | |
| 602 | func attrsPanelKeyHandler(event *tcell.EventKey, currentNode *tview.TreeNode, cache *EntryCache, attrsPanel *tview.Table) *tcell.EventKey { |
| 603 | switch event.Rune() { |
| 604 | case 'r', 'R': |
| 605 | baseDN := currentNode.GetReference().(string) |
| 606 | |
| 607 | updateLog("Reloading node "+baseDN, "yellow") |
| 608 | |
| 609 | cache.Delete(baseDN) |
| 610 | reloadAttributesPanel(currentNode, attrsPanel, false, cache) |
| 611 | |
| 612 | updateLog("Node "+baseDN+" reloaded", "green") |
| 613 | |
| 614 | go func() { |
| 615 | app.Draw() |
| 616 | }() |
| 617 | return event |
| 618 | } |
| 619 | |
| 620 | switch event.Key() { |
| 621 | case tcell.KeyCtrlS: |
| 622 | exportCacheToFile(currentNode, cache, "objects") |
| 623 | case tcell.KeyDelete: |
| 624 | handleAttrsKeyDelete(currentNode, attrsPanel, cache) |
| 625 | case tcell.KeyCtrlE: |
| 626 | handleAttrsKeyCtrlE(currentNode, attrsPanel, cache) |
| 627 | case tcell.KeyCtrlN: |
| 628 | handleAttrsKeyCtrlN(currentNode, attrsPanel, cache) |
| 629 | case tcell.KeyDown: |
| 630 | handleAttrsKeyDown(attrsPanel) |
| 631 | case tcell.KeyUp: |
| 632 | handleAttrsKeyUp(attrsPanel) |
| 633 | case tcell.KeyEnter: |
| 634 | handleAttrsKeyEnter(currentNode, attrsPanel, cache) |
| 635 | case tcell.KeyLeft: |
| 636 | handleAttrsKeyLeft(attrsPanel) |
| 637 | } |
| 638 | |
| 639 | return event |
| 640 | } |
| 641 | |
| 642 | func insertEntriesHiddenRow(attrsTable *tview.Table, row int, entriesHidden int, cellName string) { |
| 643 | attrsTable.SetCell(row, 0, tview.NewTableCell("").SetReference(cellName)) |
no test coverage detected