From 7c02449c71229811ff2d823eb2ef4ea2e3b793c2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 11 Jan 2024 22:30:47 -0600 Subject: [PATCH] api update Signed-off-by: Jeff Carr --- api.go | 24 ++++++++++++------------ mainWindow.go | 14 +++++++------- zonesBox.go | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/api.go b/api.go index 7185c94..d356c36 100644 --- a/api.go +++ b/api.go @@ -23,22 +23,22 @@ func DoChange() *RRT { dnsRow = new(RRT) log.Log(INFO, "DoChange() START") - if (CFdialog.proxyNode.S == "On") { + if (CFdialog.proxyNode.GetText() == "On") { dnsRow.Proxied = true } else { dnsRow.Proxied = false } - dnsRow.Auth = CFdialog.apiNode.S - dnsRow.Email = CFdialog.emailNode.S + dnsRow.Auth = CFdialog.apiNode.GetText() + dnsRow.Email = CFdialog.emailNode.GetText() - dnsRow.Domain = CFdialog.zoneNode.S - dnsRow.ZoneID = CFdialog.zoneIdNode.S - dnsRow.ID = CFdialog.rrNode.S + dnsRow.Domain = CFdialog.zoneNode.GetText() + dnsRow.ZoneID = CFdialog.zoneIdNode.GetText() + dnsRow.ID = CFdialog.rrNode.GetText() - dnsRow.Content = CFdialog.ValueNode.S - dnsRow.Name = CFdialog.NameNode.S - dnsRow.Type = CFdialog.TypeNode.S - dnsRow.url = CFdialog.urlNode.S + dnsRow.Content = CFdialog.ValueNode.GetText() + dnsRow.Name = CFdialog.NameNode.GetText() + dnsRow.Type = CFdialog.TypeNode.GetText() + dnsRow.url = CFdialog.urlNode.GetText() dnsRow.data = makeJSON(dnsRow) // show the JSON @@ -55,7 +55,7 @@ func DoChange() *RRT { func SetRow(dnsRow *RRT) { log.Log(INFO, "Look for changes in row", dnsRow.ID) if (CFdialog.proxyNode != nil) { - log.Log(INFO, "Proxy", dnsRow.Proxied, "vs", CFdialog.proxyNode.S) + log.Log(INFO, "Proxy", dnsRow.Proxied, "vs", CFdialog.proxyNode.GetText()) if (dnsRow.Proxied == true) { CFdialog.proxyNode.SetText("On") } else { @@ -73,7 +73,7 @@ func SetRow(dnsRow *RRT) { CFdialog.rrNode.SetText(dnsRow.ID) } if (CFdialog.ValueNode != nil) { - log.Log(INFO, "Content", dnsRow.Content, "vs", CFdialog.ValueNode.S) + log.Log(INFO, "Content", dnsRow.Content, "vs", CFdialog.ValueNode.GetText()) CFdialog.ValueNode.SetText(dnsRow.Content) } if (CFdialog.NameNode != nil) { diff --git a/mainWindow.go b/mainWindow.go index 675929a..f1e4c7b 100644 --- a/mainWindow.go +++ b/mainWindow.go @@ -33,7 +33,7 @@ func MakeCloudflareWindow(n *gui.Node) *gadgets.BasicWindow { CFdialog.zonedrop.AddText("stablesid.org") CFdialog.zonedrop.Custom = func () { - domain := CFdialog.zonedrop.S + domain := CFdialog.zonedrop.GetText() log.Log(ZONE, "custom dropdown() zone (domain name) =", CFdialog.zonedrop.GetText(), domain) if (Config[domain] == nil) { log.Log(ZONE, "custom dropdown() Config[domain] = nil for domain =", domain) @@ -84,7 +84,7 @@ func makeConfigWindow(vb *gui.Node) { vb.NewButton("Lookup Hostname", func () { log.Log(INFO, "Find all the Resource Records for hostname:", hostname.Get()) log.Log(INFO, "Find all the Resource Records for zone:", zone.Get()) - GetZones(aw.S, ew.S) + GetZones(aw.GetText(), ew.GetText()) for d, v := range Config { log.Log(ZONE, "Zone =", d, "v =", v) } @@ -92,7 +92,7 @@ func makeConfigWindow(vb *gui.Node) { vb.NewButton("getZones()", func () { log.Log(ZONE, "getZones()") - GetZones(aw.S, ew.S) + GetZones(aw.GetText(), ew.GetText()) for d, _ := range Config { CFdialog.zonedrop.AddText(d) } @@ -132,10 +132,10 @@ func showCloudflareCredentials(box *gui.Node) { CFdialog.loadButton = box.NewButton("Load Cloudflare DNS zonefile", func () { var domain ConfigT - domain.Domain = CFdialog.domainWidget.S - domain.ZoneID = CFdialog.zoneWidget.S - domain.Auth = CFdialog.authWidget.S - domain.Email = CFdialog.emailWidget.S + domain.Domain = CFdialog.domainWidget.GetText() + domain.ZoneID = CFdialog.zoneWidget.GetText() + domain.Auth = CFdialog.authWidget.GetText() + domain.Email = CFdialog.emailWidget.GetText() LoadZoneWindow(CFdialog.mainWindow.Box(), &domain) }) } diff --git a/zonesBox.go b/zonesBox.go index 4b2f987..6613d84 100644 --- a/zonesBox.go +++ b/zonesBox.go @@ -18,7 +18,7 @@ func drawZoneBox(box *gui.Node) { CFdialog.zonedrop.AddText("stablesid.org") CFdialog.zonedrop.Custom = func () { - domain := CFdialog.zonedrop.S + domain := CFdialog.zonedrop.GetText() log.Log(INFO, "custom dropdown() zone (domain name) =", CFdialog.zonedrop.GetText(), domain) if (Config[domain] == nil) { log.Log(INFO, "custom dropdown() Config[domain] = nil for domain =", domain)