2024-01-15 19:24:48 -06:00
|
|
|
// This creates a simple hello world window
|
|
|
|
package linuxstatus
|
|
|
|
|
2024-01-21 02:23:47 -06:00
|
|
|
import (
|
2024-01-15 19:24:48 -06:00
|
|
|
"go.wit.com/log"
|
|
|
|
|
2024-01-21 02:23:47 -06:00
|
|
|
"go.wit.com/lib/gadgets"
|
2024-01-15 19:24:48 -06:00
|
|
|
)
|
|
|
|
|
2024-02-25 18:39:27 -06:00
|
|
|
func InitLinuxStatus() *LinuxStatus {
|
2024-01-15 19:24:48 -06:00
|
|
|
if me != nil {
|
|
|
|
log.Log(WARN, "You have done New() twice. You can only do this once")
|
|
|
|
return me
|
|
|
|
}
|
2024-01-21 02:23:47 -06:00
|
|
|
me = &LinuxStatus{
|
2024-01-15 19:24:48 -06:00
|
|
|
hidden: true,
|
2024-01-21 02:23:47 -06:00
|
|
|
ready: false,
|
2024-01-15 19:24:48 -06:00
|
|
|
}
|
|
|
|
me.ifmap = make(map[int]*IFtype)
|
|
|
|
me.ipmap = make(map[string]*IPtype)
|
2024-01-21 02:23:47 -06:00
|
|
|
|
2024-01-15 19:24:48 -06:00
|
|
|
log.Log(WARN, "Creating the Window")
|
2024-02-25 18:39:27 -06:00
|
|
|
me.window = gadgets.RawBasicWindow("OS Hostname Details")
|
2024-01-31 13:34:13 -06:00
|
|
|
me.window.Make()
|
|
|
|
draw(me)
|
|
|
|
|
|
|
|
me.ready = true
|
|
|
|
return me
|
2024-01-15 19:24:48 -06:00
|
|
|
}
|