Recursive tree version
This commit is contained in:
parent
42c5d43610
commit
97058d036d
8 changed files with 599 additions and 134 deletions
29
dns.go
29
dns.go
|
|
@ -9,12 +9,13 @@ import (
|
|||
)
|
||||
|
||||
type DNSRecord struct {
|
||||
ID string `json:".id"`
|
||||
Disabled string
|
||||
Dynamic string
|
||||
Name string
|
||||
TTL string
|
||||
Type string
|
||||
ID string `json:".id"`
|
||||
Disabled string
|
||||
Dynamic string
|
||||
Name string
|
||||
TTL string
|
||||
Type string
|
||||
ParsedValue string // not from RouterOS, here to not having to have the value logics in frontend too.
|
||||
|
||||
Address string
|
||||
CNAME string
|
||||
|
|
@ -159,13 +160,13 @@ func (dp *DomainPart) ToHTMLElements(parts []string) []HTMLElement {
|
|||
<div class="type"></div>
|
||||
<div class="value"></div>
|
||||
`,
|
||||
topmost, // .top-most
|
||||
restPart, // data-top
|
||||
fqdn, // data-self
|
||||
topmost, // .top-most
|
||||
restPart, // data-top
|
||||
fqdn, // data-self
|
||||
(len(newParts)-1)*32, // margin-left
|
||||
VERSION, // images/
|
||||
VERSION, // images/
|
||||
mostSpecificPart, // innerText
|
||||
VERSION, // images/
|
||||
VERSION, // images/
|
||||
mostSpecificPart, // innerText
|
||||
restPart,
|
||||
)
|
||||
lines = append(lines, HTMLElement{Header: true, HTML: html})
|
||||
|
|
@ -195,8 +196,8 @@ func (dp *DomainPart) ToHTMLElements(parts []string) []HTMLElement {
|
|||
for _, rec := range subpart.Record {
|
||||
html := fmt.Sprintf(
|
||||
`
|
||||
<div class="record" style="padding-left: %dpx" data-top="%s"><span>%s</span><span>%s</span></div>
|
||||
<div class="type">%s</div>
|
||||
<div class="record" style="padding-left: %dpx" data-top="%s"><div><span>%s</span><span>%s</span></div></div>
|
||||
<div class="type"><div>%s</div></div>
|
||||
<div class="value">%s</div>
|
||||
`,
|
||||
(len(newParts)-1)*32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue