Loads child nodes and their attributes directly from LDAP
(node *tview.TreeNode)
| 244 | |
| 245 | // Loads child nodes and their attributes directly from LDAP |
| 246 | func loadChildren(node *tview.TreeNode) bool { |
| 247 | baseDN := node.GetReference().(string) |
| 248 | entries, err := lc.QueryWithAttrs(baseDN, SearchFilter, ldap.ScopeSingleLevel, Deleted, parseAttrsList(explorerAttrsList)) |
| 249 | if err != nil { |
| 250 | handleLDAPError(err) |
| 251 | return false |
| 252 | } |
| 253 | |
| 254 | // Sort results to guarantee stable view |
| 255 | sort.Slice(entries, func(i int, j int) bool { |
| 256 | return getName(entries[i]) < getName(entries[j]) |
| 257 | }) |
| 258 | |
| 259 | for _, entry := range entries { |
| 260 | childNode := createTreeNodeFromEntry(entry) |
| 261 | |
| 262 | if childNode != nil { |
| 263 | node.AddChild(childNode) |
| 264 | } |
| 265 | } |
| 266 | return true |
| 267 | } |
| 268 | |
| 269 | func handleAttrsKeyCtrlE(currentNode *tview.TreeNode, attrsPanel *tview.Table, cache *EntryCache) { |
| 270 | currentFocus := app.GetFocus() |
no test coverage detected