Add VM works again
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
881859d079
commit
9bdd73cff4
|
@ -104,74 +104,6 @@ func makeCloudInfoBox(gw *GuiWindow) *GuiBox {
|
|||
return gb
|
||||
}
|
||||
|
||||
//
|
||||
// THIS IS THE STANDARD VM DISPLAY TABLE
|
||||
// This maps the 'human' indexed cells in the table
|
||||
// to the machine's andlabs/libui values. That way
|
||||
// if you want to work against column 4, then you
|
||||
// can just reference 4 instead of the internal number
|
||||
// which could be anything since TEXTCOLOR, TEXT, BG, etc
|
||||
// fields use between 1 and 3 values internally
|
||||
//
|
||||
func AddVmsTab(gw *GuiWindow, name string, count int, a *pb.Account) *TableData {
|
||||
var parts []TableColumnData
|
||||
|
||||
human := 0
|
||||
|
||||
tmp := TableColumnData{}
|
||||
tmp.CellType = "BG"
|
||||
tmp.Heading = "background"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "name"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "hostname"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "IPv6"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "cpus"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "memory"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "BUTTON"
|
||||
tmp.Heading = "Details"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
mh := AddTableTab(gw, name, count, parts, a)
|
||||
// mh :=
|
||||
return mh
|
||||
}
|
||||
|
||||
func ShowAccountQuestionTab(gw *GuiWindow) {
|
||||
log.Println("ShowAccountQuestionTab() gw =", gw)
|
||||
if (gw.UiTab == nil) {
|
||||
|
|
68
vmBox.go
68
vmBox.go
|
@ -124,3 +124,71 @@ func createAddVmBox(gw *GuiWindow, b *GuiButton) {
|
|||
|
||||
AddBoxToTab(name, gw.UiTab, vbox)
|
||||
}
|
||||
|
||||
//
|
||||
// THIS IS THE STANDARD VM DISPLAY TABLE
|
||||
// This maps the 'human' indexed cells in the table
|
||||
// to the machine's andlabs/libui values. That way
|
||||
// if you want to work against column 4, then you
|
||||
// can just reference 4 instead of the internal number
|
||||
// which could be anything since TEXTCOLOR, TEXT, BG, etc
|
||||
// fields use between 1 and 3 values internally
|
||||
//
|
||||
func AddVmsTab(gw *GuiWindow, name string, count int, a *pb.Account) *TableData {
|
||||
var parts []TableColumnData
|
||||
|
||||
human := 0
|
||||
|
||||
tmp := TableColumnData{}
|
||||
tmp.CellType = "BG"
|
||||
tmp.Heading = "background"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "name"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "hostname"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "IPv6"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "cpus"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "TEXTCOLOR"
|
||||
tmp.Heading = "memory"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
tmp = TableColumnData{}
|
||||
tmp.CellType = "BUTTON"
|
||||
tmp.Heading = "Details"
|
||||
tmp.Index = human
|
||||
parts = append(parts, tmp)
|
||||
human += 1
|
||||
|
||||
mh := AddTableTab(gw, name, count, parts, a)
|
||||
// mh :=
|
||||
return mh
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue