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

Function reloadSearchNode

tui/search.go:72–93  ·  view source on GitHub ↗
(currentNode *tview.TreeNode)

Source from the content-addressed store, hash-verified

70}
71
72func reloadSearchNode(currentNode *tview.TreeNode) {
73 baseDN := currentNode.GetReference().(string)
74
75 updateLog("Reloading node "+baseDN, "yellow")
76 reloadSearchAttrsPanel(currentNode, false)
77 selectAnchoredAttribute(searchAttrsPanel)
78
79 updatedEntry := searchCache.entries[baseDN]
80 entryName := getNodeName(updatedEntry)
81
82 if Colors {
83 color, _ := GetEntryColor(updatedEntry)
84 currentNode.SetColor(color)
85 }
86
87 currentNode.SetText(entryName)
88
89 // TODO:
90 // Maybe there should be a separate option to also reload the children of the node
91
92 updateLog("Node "+baseDN+" reloaded", "green")
93}
94
95func updateSearchHistoryPanel() {
96 searchHistoryPanel.Clear()

Callers 1

initSearchPageFunction · 0.85

Calls 5

updateLogFunction · 0.85
reloadSearchAttrsPanelFunction · 0.85
selectAnchoredAttributeFunction · 0.85
getNodeNameFunction · 0.85
GetEntryColorFunction · 0.85

Tested by

no test coverage detected