summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-06 21:17:06 -0600
committerJeff Carr <[email protected]>2024-01-06 21:17:06 -0600
commite5319cd50ed56a2b4039c8ca503344cc8b0eea0f (patch)
tree282480148bf0089259fd99ee7c4671989a3132df
parent5e9f1591cab5602ac9d9f6e6a24f83ba5dc86126 (diff)
status changes to working if it's working
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--fix.go2
-rw-r--r--gui.go14
-rw-r--r--structs.go1
3 files changed, 14 insertions, 3 deletions
diff --git a/fix.go b/fix.go
index 954e0f1..2fe22ec 100644
--- a/fix.go
+++ b/fix.go
@@ -35,11 +35,11 @@ func fix() bool {
log.Log(CHANGE, "OK You do not have real IPv4 addresses. Nothing to fix here")
}
if ! me.statusDNS.IPv6() {
- log.Log(CHANGE, "IPv6 DNS is broken. Check what is broken here")
if fixIPv6dns() {
log.Log(CHANGE, "IPv6 DNS Repair is underway")
return false
}
+ log.Log(CHANGE, "GOOD IPv6 DNS is working!")
}
log.Log(CHANGE, "GOOD YOU SHOULD BE IN IPv6 BLISS")
return true
diff --git a/gui.go b/gui.go
index 1a4dab9..78539c4 100644
--- a/gui.go
+++ b/gui.go
@@ -151,8 +151,18 @@ func mainWindow(title string) {
me.DnsA = grid.NewLabel("?")
// This is where you figure out what to do next to fix the problems
- gr.NewButton("fix", func () {
- fix()
+ me.fixButton = gr.NewButton("fix", func () {
+ if ! fix() {
+ log.Log(CHANGE, "boo. IPv6 isn't working yet")
+ return
+ }
+ log.Log(CHANGE, "IPv6 WORKED")
+ // update everything here visually for the user
+ hostname := me.statusOS.GetHostname()
+ me.hostname.Set(hostname)
+ me.hostnameStatus.Set("WORKING")
+ me.DnsStatus.Set("WORKING")
+ me.fixButton.Disable()
})
grid.Margin()
diff --git a/structs.go b/structs.go
index 855c832..e060cb7 100644
--- a/structs.go
+++ b/structs.go
@@ -59,6 +59,7 @@ type Host struct {
statusIPv6 *gadgets.OneLiner
digStatusButton *gui.Node
witcom *gadgets.BasicWindow
+ fixButton *gui.Node
}
type IPtype struct {