Recursive tree version
This commit is contained in:
parent
42c5d43610
commit
97058d036d
8 changed files with 599 additions and 134 deletions
|
|
@ -6,12 +6,12 @@ import (
|
|||
|
||||
// Standard
|
||||
"embed"
|
||||
"encoding/json"
|
||||
_ "encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"slices"
|
||||
"html/template"
|
||||
_ "html/template"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -66,8 +66,10 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
|
|||
slices.SortFunc(entries, SortDNSRecord)
|
||||
data["DNSRecords"] = entries
|
||||
|
||||
/*
|
||||
tree := BuildRecordsTree(entries)
|
||||
htmlElements := tree.ToHTMLElements([]string{})
|
||||
data["TreeData"] = tree
|
||||
|
||||
var html string
|
||||
for _, el := range htmlElements {
|
||||
|
|
@ -78,6 +80,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
j, _ := json.Marshal(tree)
|
||||
os.WriteFile("/tmp/tree.json", j, 0644)
|
||||
*/
|
||||
|
||||
data["VERSION"] = VERSION
|
||||
page.Data = data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue