mirror of
https://github.com/tale/headplane.git
synced 2026-08-10 14:06:51 +00:00
feat: cleanup removal of old ssh plexer and logic
we also have added the necessary logic to auto prune ephemeral nodes because headscale doesn't seem to automatically remove them. this change made use of a database which is now stored in the persistent headplane directory.
This commit is contained in:
@@ -72,7 +72,13 @@ func ParseTsWasmNetCallbacks(obj js.Value) (*TsWasmNetCallbacks, error) {
|
||||
},
|
||||
|
||||
NotifyNetMap: func(nm *netmap.NetworkMap) {
|
||||
// TODO: This is complicated
|
||||
// We need to build a JSON representation of the NetworkMap
|
||||
// For now we just pass the NodeKey since that's what we need.
|
||||
jsObj := js.ValueOf(map[string]any{
|
||||
"NodeKey": nm.NodeKey.String(),
|
||||
})
|
||||
|
||||
obj.Get("NotifyNetMap").Invoke(jsObj)
|
||||
},
|
||||
|
||||
NotifyBrowseToURL: func(url string) {
|
||||
|
||||
@@ -37,6 +37,10 @@ func registerNotifyCallback(callbacks *TsWasmNetCallbacks, lb *ipnlocal.LocalBac
|
||||
callbacks.NotifyBrowseToURL(*n.BrowseToURL)
|
||||
}
|
||||
|
||||
if n.NetMap != nil {
|
||||
callbacks.NotifyNetMap(n.NetMap)
|
||||
}
|
||||
|
||||
log.Printf("NOTIFY: %+v", n)
|
||||
|
||||
// if nm := n.NetMap; nm != nil {
|
||||
|
||||
Reference in New Issue
Block a user