move to go.wit.com/gui/gadgets
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
beb076375e
commit
f332c0eaf6
|
@ -21,7 +21,7 @@ import (
|
||||||
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
"go.wit.com/control-panel-dns/cloudflare"
|
"go.wit.com/gui/gadgets"
|
||||||
"go.wit.com/shell"
|
"go.wit.com/shell"
|
||||||
|
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
|
@ -40,10 +40,10 @@ type digStatus struct {
|
||||||
box *gui.Node
|
box *gui.Node
|
||||||
|
|
||||||
summary *gui.Node
|
summary *gui.Node
|
||||||
status *cloudflare.OneLiner
|
status *gadgets.OneLiner
|
||||||
statusAAAA *cloudflare.OneLiner
|
statusAAAA *gadgets.OneLiner
|
||||||
speed *cloudflare.OneLiner
|
speed *gadgets.OneLiner
|
||||||
speedActual *cloudflare.OneLiner
|
speedActual *gadgets.OneLiner
|
||||||
|
|
||||||
details *gui.Node
|
details *gui.Node
|
||||||
dsLocalhost *dnsStatus
|
dsLocalhost *dnsStatus
|
||||||
|
@ -53,8 +53,8 @@ type digStatus struct {
|
||||||
DnsDigUDP *gui.Node
|
DnsDigUDP *gui.Node
|
||||||
DnsDigTCP *gui.Node
|
DnsDigTCP *gui.Node
|
||||||
|
|
||||||
httpGoWitCom *cloudflare.OneLiner
|
httpGoWitCom *gadgets.OneLiner
|
||||||
statusHTTP *cloudflare.OneLiner
|
statusHTTP *gadgets.OneLiner
|
||||||
}
|
}
|
||||||
|
|
||||||
type dnsStatus struct {
|
type dnsStatus struct {
|
||||||
|
@ -104,11 +104,11 @@ func NewDigStatusWindow(p *gui.Node) *digStatus {
|
||||||
g := ds.summary.NewGrid("LookupStatus", 2, 2)
|
g := ds.summary.NewGrid("LookupStatus", 2, 2)
|
||||||
g.Pad()
|
g.Pad()
|
||||||
|
|
||||||
ds.status = cloudflare.NewOneLiner(g, "status").Set("unknown")
|
ds.status = gadgets.NewOneLiner(g, "status").Set("unknown")
|
||||||
ds.statusAAAA = cloudflare.NewOneLiner(g, "IPv6 status").Set("unknown")
|
ds.statusAAAA = gadgets.NewOneLiner(g, "IPv6 status").Set("unknown")
|
||||||
ds.statusHTTP = cloudflare.NewOneLiner(g, "IPv6 via HTTP").Set("unknown")
|
ds.statusHTTP = gadgets.NewOneLiner(g, "IPv6 via HTTP").Set("unknown")
|
||||||
ds.speed = cloudflare.NewOneLiner(g, "speed").Set("unknown")
|
ds.speed = gadgets.NewOneLiner(g, "speed").Set("unknown")
|
||||||
ds.speedActual = cloudflare.NewOneLiner(g, "actual").Set("unknown")
|
ds.speedActual = gadgets.NewOneLiner(g, "actual").Set("unknown")
|
||||||
|
|
||||||
// make the area to store the raw details
|
// make the area to store the raw details
|
||||||
ds.details = ds.box.NewGroup("Details")
|
ds.details = ds.box.NewGroup("Details")
|
||||||
|
@ -200,9 +200,9 @@ func (ds *digStatus) set(a any, s string) {
|
||||||
n.SetText(s)
|
n.SetText(s)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var ol *cloudflare.OneLiner
|
var ol *gadgets.OneLiner
|
||||||
if reflect.TypeOf(a) == reflect.TypeOf(ol) {
|
if reflect.TypeOf(a) == reflect.TypeOf(ol) {
|
||||||
ol = a.(*cloudflare.OneLiner)
|
ol = a.(*gadgets.OneLiner)
|
||||||
ol.Set(s)
|
ol.Set(s)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -374,7 +374,7 @@ func (ds *digStatus) makeHttpStatusGrid() {
|
||||||
group := ds.details.NewGroup("dns.google.com via HTTPS")
|
group := ds.details.NewGroup("dns.google.com via HTTPS")
|
||||||
grid := group.NewGrid("LookupStatus", 2, 2)
|
grid := group.NewGrid("LookupStatus", 2, 2)
|
||||||
|
|
||||||
ds.httpGoWitCom = cloudflare.NewOneLiner(grid, "go.wit.com")
|
ds.httpGoWitCom = gadgets.NewOneLiner(grid, "go.wit.com")
|
||||||
me.digStatus.set(ds.httpGoWitCom, "unknown")
|
me.digStatus.set(ds.httpGoWitCom, "unknown")
|
||||||
|
|
||||||
group.Pad()
|
group.Pad()
|
||||||
|
|
Loading…
Reference in New Issue