summaryrefslogtreecommitdiff
path: root/gui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-06 05:32:52 -0600
committerJeff Carr <[email protected]>2024-01-06 05:32:52 -0600
commit8b59a3141a6bd70eb8b434edbe347c3a22bfb3d6 (patch)
tree8e80b90b15f267748aea060161752376312ec2c7 /gui.go
parent3457aefa86ccc9bc6c4eda059e48ebcb8830b410 (diff)
move UID code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
-rw-r--r--gui.go24
1 files changed, 15 insertions, 9 deletions
diff --git a/gui.go b/gui.go
index 4b4b3c8..53e9343 100644
--- a/gui.go
+++ b/gui.go
@@ -4,8 +4,6 @@ package main
import (
"time"
"os"
- "os/user"
- "strconv"
"strings"
"go.wit.com/log"
@@ -14,6 +12,7 @@ import (
"go.wit.com/gui/gadgets"
"go.wit.com/gui/cloudflare"
"go.wit.com/gui/debugger"
+ "go.wit.com/control-panels/dns/linuxstatus"
)
// This setups up the dns control panel window
@@ -51,7 +50,7 @@ func detailsTab(title string) {
me.NSrr = grid.NewLabel("NS RR's")
grid.NewLabel("UID =")
- me.uid = grid.NewLabel("my uid")
+ grid.NewLabel("DEPRECATED")
grid.NewLabel("Current IPv4 =")
me.IPv4 = grid.NewLabel("?")
@@ -227,9 +226,21 @@ func mainWindow(title string) {
gr.NewButton("OS details", func () {
me.details.Toggle()
})
- gr.NewButton("Linux details", func () {
+ gr.NewButton("linuxstatus.New()", func () {
+ me.statusOS = linuxstatus.New()
+ })
+ gr.NewButton("statusOS.Ready()", func () {
+ me.statusOS.Ready()
+ })
+ gr.NewButton("statusOS.Draw()", func () {
+ me.statusOS.Ready()
+ })
+ gr.NewButton("statusOS.Update()", func () {
me.statusOS.Update()
})
+ gr.NewButton("Linux details", func () {
+ me.statusOS.Toggle()
+ })
gr.NewButton("resolver status", func () {
if ! me.digStatus.Ready() {return}
me.digStatus.window.Toggle()
@@ -347,11 +358,6 @@ func updateDNS() {
// me.fix.Enable()
- user, _ := user.Current()
- log.Println("os.Getuid =", user.Username, os.Getuid())
- if (me.uid != nil) {
- me.uid.SetText(user.Username + " (" + strconv.Itoa(os.Getuid()) + ")")
- }
// lookup the NS records for your domain
// if your host is test.wit.com, find the NS resource records for wit.com