parent
5645231c49
commit
c16bb5b088
6
Makefile
6
Makefile
|
@ -1,5 +1,5 @@
|
|||
run: build
|
||||
./control-panel-dns
|
||||
./control-panel-dns >/tmp/witgui.log.stderr 2>&1
|
||||
|
||||
install:
|
||||
go install -v go.wit.com/control-panel-dns@latest
|
||||
|
@ -91,3 +91,7 @@ sudo-cp:
|
|||
|
||||
go-get:
|
||||
go install -v check.lab.wit.org/gui
|
||||
|
||||
log:
|
||||
reset
|
||||
tail -f /tmp/witgui.* /tmp/guilogfile
|
||||
|
|
1
args.go
1
args.go
|
@ -12,6 +12,7 @@ type LogOptions struct {
|
|||
VerboseDNS bool `arg:"--verbose-dns" help:"debug your dns settings"`
|
||||
LogFile string `help:"write all output to a file"`
|
||||
// User string `arg:"env:USER"`
|
||||
Display string `arg:"env:DISPLAY"`
|
||||
}
|
||||
|
||||
var args struct {
|
||||
|
|
15
gui.go
15
gui.go
|
@ -2,6 +2,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/user"
|
||||
"strconv"
|
||||
|
@ -12,8 +13,8 @@ import (
|
|||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
// This initializes the first window
|
||||
func initGUI() {
|
||||
// This setups up the dns control panel window
|
||||
func setupControlPanelWindow() {
|
||||
me.window = myGui.New2().Window("DNS and IPv6 Control Panel").Standard()
|
||||
me.window.Dump(true)
|
||||
|
||||
|
@ -36,6 +37,14 @@ func addDNSTab(title string) {
|
|||
g2.NewButton("gui.DebugWindow()", func () {
|
||||
gui.DebugWindow()
|
||||
})
|
||||
|
||||
g2.NewButton("Load 'gocui'", func () {
|
||||
// this set the xterm and mate-terminal window title. maybe works generally?
|
||||
fmt.Println("\033]0;" + title + "blah \007")
|
||||
gui.StartS("gocui")
|
||||
gui.Redraw("gocui")
|
||||
})
|
||||
|
||||
g2.NewButton("Network Interfaces", func () {
|
||||
for i, t := range me.ifmap {
|
||||
log("name =", t.iface.Name)
|
||||
|
@ -106,7 +115,7 @@ func myDefaultExit(n *gui.Node) {
|
|||
func nsupdateGroup(w *gui.Node) {
|
||||
g := w.NewGroup("dns update")
|
||||
|
||||
grid := g.NewGrid("fucknuts", 2, 2)
|
||||
grid := g.NewGrid("gridnuts", 2, 2)
|
||||
|
||||
grid.SetNext(1,1)
|
||||
grid.NewLabel("hostname =")
|
||||
|
|
Loading…
Reference in New Issue