all engines are starting without the rocket exploding

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-05 00:42:15 -06:00
parent ee6c4e2a72
commit 0592636049
3 changed files with 10 additions and 77 deletions

View File

@ -93,7 +93,6 @@ func NewDigStatusWindow(p *gui.Node) *digStatus {
ds.hidden = true
ds.window = gadgets.NewBasicWindow(p, "DNS Resolver Status")
ds.window.Hide()
// summary of the current state of things

69
gui.go
View File

@ -202,74 +202,11 @@ func mainWindow(title string) {
grid.NewLabel("DNS A =")
me.DnsA = grid.NewLabel("?")
me.fix = me.mainStatus.NewButton("Fix", func () {
if (goodHostname(me.hostname)) {
log.Info("hostname is good:", me.hostname)
} else {
log.Warn("FIX: you need to fix your hostname here", me.hostname)
return
}
// check to see if the cloudflare window exists
/*
if (me.cloudflareW != nil) {
newRR.NameNode.SetText(me.hostname)
newRR.TypeNode.SetText("AAAA")
for s, t := range me.ipmap {
if (t.IsReal()) {
if (t.ipv6) {
newRR.ValueNode.SetText(s)
cloudflare.CreateCurlRR()
return
}
}
}
cloudflare.CreateCurlRR()
return
} else {
// nsupdate()
// me.fixProc.Disable()
}
*/
})
me.fix.Disable()
me.digStatus = NewDigStatusWindow(me.myGui)
me.hostnameStatus = NewHostnameStatusWindow(me.myGui)
/*
me.digStatusButton = me.mainStatus.NewButton("Resolver Status", func () {
if (me.digStatus == nil) {
log.Info("drawing the digStatus window START")
me.digStatus = NewDigStatusWindow(me.myGui)
log.Info("drawing the digStatus window END")
me.digStatusButton.SetText("Hide DNS Lookup Status")
me.digStatus.Update()
return
}
if me.digStatus.hidden {
me.digStatusButton.SetText("Hide Resolver Status")
me.digStatus.Show()
me.digStatus.Update()
} else {
me.digStatusButton.SetText("Resolver Status")
me.digStatus.Hide()
}
})
*/
me.hostnameStatusButton = me.mainStatus.NewButton("Show hostname DNS Status", func () {
if (me.hostnameStatus == nil) {
me.hostnameStatus = NewHostnameStatusWindow(me.myGui)
me.hostnameStatusButton.SetText("Hide " + me.hostname + " DNS Status")
me.hostnameStatus.Update()
return
}
if me.hostnameStatus.hidden {
me.hostnameStatusButton.SetText("Hide " + me.hostname + " DNS Status")
me.hostnameStatus.Show()
me.hostnameStatus.Update()
} else {
me.hostnameStatusButton.SetText("Show " + me.hostname + " DNS Status")
me.hostnameStatus.Hide()
}
me.hostnameStatusButton = me.mainStatus.NewButton("Fix hostname DNS", func () {
me.hostnameStatus.window.Toggle()
})
grid.Margin()

View File

@ -25,7 +25,7 @@ type hostnameStatus struct {
hostname string // my hostname. Example: "test.wit.com"
window *gui.Node
window *gadgets.BasicWindow
// Primary Directives
status *gadgets.OneLiner
@ -62,13 +62,10 @@ func NewHostnameStatusWindow(p *gui.Node) *hostnameStatus {
hs.hidden = true
hs.hostname = me.hostname
hs.window = p.NewWindow( hs.hostname + " Status")
hs.window.Custom = func () {
hs.hidden = true
hs.window.Hide()
}
box := hs.window.NewBox("hBox", true)
group := box.NewGroup("Summary")
hs.window = gadgets.NewBasicWindow(p, hs.hostname + " Status")
hs.window.Hide()
group := hs.window.Box().NewGroup("Summary")
grid := group.NewGrid("LookupStatus", 2, 2)
hs.status = gadgets.NewOneLiner(grid, "status").Set("unknown")
@ -78,7 +75,7 @@ func NewHostnameStatusWindow(p *gui.Node) *hostnameStatus {
group.Pad()
grid.Pad()
group = box.NewGroup("Details")
group = hs.window.Box().NewGroup("Details")
grid = group.NewGrid("LookupDetails", 2, 2)
hs.hostShort = gadgets.NewOneLiner(grid, "hostname -s")
@ -96,7 +93,7 @@ func NewHostnameStatusWindow(p *gui.Node) *hostnameStatus {
group.Pad()
grid.Pad()
group = box.NewGroup("Actions")
group = hs.window.Box().NewGroup("Actions")
grid = group.NewGrid("LookupDetails", 2, 2)
hs.dnsValue = grid.NewLabel("3.4.5.6")