summaryrefslogtreecommitdiff
path: root/gui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-03-09 14:21:34 -0600
committerJeff Carr <[email protected]>2023-03-09 14:21:34 -0600
commit0b26e5f1ca6807a1bc3fc6c365d449c5f6a4a866 (patch)
tree008f9f3c5a54f21874c0ff4dc5dfd0daab7b7c64 /gui.go
parent3ce3a39226bd6c0e738cdf76a55b05be1bad3cc3 (diff)
hostname actually set
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
-rw-r--r--gui.go25
1 files changed, 7 insertions, 18 deletions
diff --git a/gui.go b/gui.go
index 7dffc95..5e9c075 100644
--- a/gui.go
+++ b/gui.go
@@ -13,7 +13,7 @@ import (
// This initializes the first window
func initGUI() {
gui.Config.Title = "DNS and IPv6 Control Panel"
- gui.Config.Width = 640
+ gui.Config.Width = 1024
gui.Config.Height = 480
gui.Config.Exit = myDefaultExit
@@ -33,19 +33,6 @@ func addDNSTab(title string) {
// log("addDemoTab() newNode.Dump")
// newNode.Dump()
- me.notes = me.tab.NewGroup("junk")
- dd := me.notes.NewDropdown("demoCombo2")
- dd.AddDropdownName("more 1")
- dd.AddDropdownName("more 2")
- dd.AddDropdownName("more 3")
- dd.Custom = func() {
- s := dd.GetText()
- output("dd.Custom( dd.GetText() ) =" + s + "\n", true)
- }
- me.notes.NewButton("hello", func () {
- log("world")
- })
-
g2 = me.tab.NewGroup("Real Stuff")
g2.NewButton("Network Interfaces", func () {
@@ -57,7 +44,6 @@ func addDNSTab(title string) {
})
g2.NewButton("Hostname", func () {
getHostname()
- output("FQDN = " + me.fqdn + "\n", true)
})
g2.NewButton("Actual AAAA", func () {
var aaaa []string
@@ -120,11 +106,14 @@ func myDefaultExit(n *gui.Node) {
func nsupdateGroup(w *gui.Node) {
g := w.NewGroup("dns update")
- g.NewLabel("UID = " + me.user)
+ me.uid = g.NewLabel("UID = " + me.user)
+ me.fqdn = g.NewLabel("fqdn:")
+ me.IPv4 = g.NewLabel("192.168.2.2")
+ me.IPv6 = g.NewLabel("fe::02")
g.NewButton("DNS AAAA", func () {
var aaaa []string
var out string
- h := me.fqdn
+ h := me.fqdn.GetText()
// h := "fire.lab.wit.org"
aaaa = dnsAAAA(h)
log(SPEW, me)
@@ -136,7 +125,7 @@ func nsupdateGroup(w *gui.Node) {
}
})
g.NewButton("dig +trace", func () {
- o := shell.Run("dig +trace +noadditional DS " + me.fqdn + " @8.8.8.8")
+ o := shell.Run("dig +trace +noadditional DS " + me.fqdn.GetText() + " @8.8.8.8")
output(o, false)
// log(o)
})