more cleanups after removing old window
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
5dee2af784
commit
34bbd63bfb
51
gui.go
51
gui.go
|
@ -22,57 +22,9 @@ func setupControlPanelWindow() {
|
||||||
|
|
||||||
// setup the main tab
|
// setup the main tab
|
||||||
mainWindow("DNS and IPv6 Control Panel")
|
mainWindow("DNS and IPv6 Control Panel")
|
||||||
detailsTab("OS Details")
|
|
||||||
debugTab("Debug")
|
debugTab("Debug")
|
||||||
}
|
}
|
||||||
|
|
||||||
func detailsTab(title string) {
|
|
||||||
var g2 *gui.Node
|
|
||||||
|
|
||||||
me.details = gadgets.NewBasicWindow(me.myGui, title)
|
|
||||||
me.details.Draw()
|
|
||||||
me.details.Hide()
|
|
||||||
|
|
||||||
g2 = me.details.Box().NewGroup("Real Stuff")
|
|
||||||
|
|
||||||
grid := g2.NewGrid("gridnuts", 2, 2)
|
|
||||||
|
|
||||||
grid.SetNext(1,1)
|
|
||||||
|
|
||||||
grid.NewLabel("domainname =")
|
|
||||||
grid.NewLabel("DEPRECATED")
|
|
||||||
// me.domainname = grid.NewLabel("domainname")
|
|
||||||
|
|
||||||
grid.NewLabel("hostname -s =")
|
|
||||||
grid.NewLabel("DEPRECATED")
|
|
||||||
|
|
||||||
grid.NewLabel("NS records =")
|
|
||||||
grid.NewLabel("DEPRECATED")
|
|
||||||
|
|
||||||
grid.NewLabel("UID =")
|
|
||||||
grid.NewLabel("DEPRECATED")
|
|
||||||
|
|
||||||
grid.NewLabel("Current IPv4 =")
|
|
||||||
grid.NewLabel("DEPRECATED")
|
|
||||||
|
|
||||||
grid.NewLabel("Current IPv6 =")
|
|
||||||
grid.NewLabel("DEPRECATED")
|
|
||||||
|
|
||||||
grid.NewLabel("Working Real IPv6 =")
|
|
||||||
grid.NewLabel("?")
|
|
||||||
|
|
||||||
grid.NewLabel("interfaces =")
|
|
||||||
me.Interfaces = grid.NewCombobox("Interfaces")
|
|
||||||
|
|
||||||
grid.NewLabel("refresh speed")
|
|
||||||
me.LocalSpeedActual = grid.NewLabel("unknown")
|
|
||||||
|
|
||||||
grid.Margin()
|
|
||||||
grid.Pad()
|
|
||||||
|
|
||||||
me.details.Hide()
|
|
||||||
}
|
|
||||||
|
|
||||||
func debugTab(title string) {
|
func debugTab(title string) {
|
||||||
var g2 *gui.Node
|
var g2 *gui.Node
|
||||||
|
|
||||||
|
@ -218,9 +170,6 @@ func mainWindow(title string) {
|
||||||
me.status.window.Toggle()
|
me.status.window.Toggle()
|
||||||
})
|
})
|
||||||
|
|
||||||
gr.NewButton("OS details", func () {
|
|
||||||
me.details.Toggle()
|
|
||||||
})
|
|
||||||
gr.NewButton("linuxstatus.New()", func () {
|
gr.NewButton("linuxstatus.New()", func () {
|
||||||
if (me.statusOS == nil) {
|
if (me.statusOS == nil) {
|
||||||
me.statusOS = linuxstatus.New()
|
me.statusOS = linuxstatus.New()
|
||||||
|
|
|
@ -29,3 +29,8 @@ func sortLines(input string) string {
|
||||||
tmp = strings.TrimRight(tmp, "\n")
|
tmp = strings.TrimRight(tmp, "\n")
|
||||||
return tmp
|
return tmp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ls *LinuxStatus) SetSpeedActual(s string) {
|
||||||
|
if ! ls.Ready() {return}
|
||||||
|
ls.speedActual.Set(s)
|
||||||
|
}
|
||||||
|
|
2
main.go
2
main.go
|
@ -100,7 +100,7 @@ func checkNetworkChanges() {
|
||||||
if (runtime.GOOS == "linux") {
|
if (runtime.GOOS == "linux") {
|
||||||
duration := timeFunction(linuxLoop)
|
duration := timeFunction(linuxLoop)
|
||||||
s := fmt.Sprint(duration)
|
s := fmt.Sprint(duration)
|
||||||
me.LocalSpeedActual.SetText(s)
|
me.statusOS.SetSpeedActual(s)
|
||||||
} else {
|
} else {
|
||||||
// TODO: make windows and macos diagnostics
|
// TODO: make windows and macos diagnostics
|
||||||
log.Warn("Windows and MacOS don't work yet")
|
log.Warn("Windows and MacOS don't work yet")
|
||||||
|
|
|
@ -44,7 +44,6 @@ type Host struct {
|
||||||
ipv6s map[string]dns.RR
|
ipv6s map[string]dns.RR
|
||||||
|
|
||||||
window *gadgets.BasicWindow // the main window
|
window *gadgets.BasicWindow // the main window
|
||||||
details *gadgets.BasicWindow // more details of the DNS state
|
|
||||||
debug *gadgets.BasicWindow // more attempts to debug the DNS state
|
debug *gadgets.BasicWindow // more attempts to debug the DNS state
|
||||||
|
|
||||||
tab *gui.Node // the main dns tab
|
tab *gui.Node // the main dns tab
|
||||||
|
|
Loading…
Reference in New Issue