duh. already had a structure for that
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
d74712c835
commit
b75d6abdfb
68
infoTabUI.go
68
infoTabUI.go
|
@ -196,52 +196,40 @@ type aheader struct {
|
|||
func addVmsTab() {
|
||||
var parts []gui.InputData
|
||||
|
||||
var headers []aheader
|
||||
tmp := gui.InputData{}
|
||||
tmp.CellType = "BG"
|
||||
tmp.Heading = "background"
|
||||
parts = append(parts, tmp)
|
||||
|
||||
tmp := aheader{}
|
||||
tmp.headtype = "BG"
|
||||
tmp.name = "background"
|
||||
headers = append(headers, tmp)
|
||||
tmp = gui.InputData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "name"
|
||||
parts = append(parts, tmp)
|
||||
|
||||
tmp = aheader{}
|
||||
tmp.headtype = "TEXTCOLOR"
|
||||
tmp.name = "cpus"
|
||||
headers = append(headers, tmp)
|
||||
tmp = gui.InputData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "hostname"
|
||||
parts = append(parts, tmp)
|
||||
|
||||
tmp = aheader{}
|
||||
tmp.headtype = "TEXTCOLOR"
|
||||
tmp.name = "name"
|
||||
headers = append(headers, tmp)
|
||||
tmp = gui.InputData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "IPv6"
|
||||
parts = append(parts, tmp)
|
||||
|
||||
tmp = aheader{}
|
||||
tmp.headtype = "TEXTCOLOR"
|
||||
tmp.name = "hostname"
|
||||
headers = append(headers, tmp)
|
||||
tmp = gui.InputData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "cpus"
|
||||
parts = append(parts, tmp)
|
||||
|
||||
tmp = aheader{}
|
||||
tmp.headtype = "TEXTCOLOR"
|
||||
tmp.name = "IPv6"
|
||||
headers = append(headers, tmp)
|
||||
tmp = gui.InputData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "memory"
|
||||
parts = append(parts, tmp)
|
||||
|
||||
tmp = aheader{}
|
||||
tmp.headtype = "TEXTCOLOR"
|
||||
tmp.name = "memory"
|
||||
headers = append(headers, tmp)
|
||||
|
||||
tmp = aheader{}
|
||||
tmp.headtype = "BUTTON"
|
||||
tmp.name = "Details"
|
||||
headers = append(headers, tmp)
|
||||
|
||||
for i, key := range headers {
|
||||
log.Println("header = ", i, key)
|
||||
log.Println("headtype, name = ", key.headtype, key.name)
|
||||
|
||||
var b gui.InputData
|
||||
b.CellType = key.headtype
|
||||
b.Heading = key.name
|
||||
parts = append(parts, b)
|
||||
}
|
||||
tmp = gui.InputData{}
|
||||
tmp.CellType = "BUTTON"
|
||||
tmp.Heading = "Details"
|
||||
parts = append(parts, tmp)
|
||||
|
||||
gui.AddTableTab(cloudtab, 1, "Virtual Machines", 7, parts)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue