MCPcopy Create free account
hub / github.com/Macmod/godap / attrsPanelKeyHandler

Function attrsPanelKeyHandler

tui/tree.go:602–640  ·  view source on GitHub ↗
(event *tcell.EventKey, currentNode *tview.TreeNode, cache *EntryCache, attrsPanel *tview.Table)

Source from the content-addressed store, hash-verified

600}
601
602func 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
642func insertEntriesHiddenRow(attrsTable *tview.Table, row int, entriesHidden int, cellName string) {
643 attrsTable.SetCell(row, 0, tview.NewTableCell("").SetReference(cellName))

Callers 2

initSearchPageFunction · 0.85
initExplorerPageFunction · 0.85

Calls 11

updateLogFunction · 0.85
reloadAttributesPanelFunction · 0.85
exportCacheToFileFunction · 0.85
handleAttrsKeyDeleteFunction · 0.85
handleAttrsKeyCtrlEFunction · 0.85
handleAttrsKeyCtrlNFunction · 0.85
handleAttrsKeyDownFunction · 0.85
handleAttrsKeyUpFunction · 0.85
handleAttrsKeyEnterFunction · 0.85
handleAttrsKeyLeftFunction · 0.85
DeleteMethod · 0.80

Tested by

no test coverage detected