summaryrefslogtreecommitdiff
path: root/dump.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-31 06:41:30 -0500
committerJeff Carr <[email protected]>2024-10-31 06:41:30 -0500
commite6ea90f8defd8f26702ed808bcf801f53ce3a327 (patch)
tree290626b309372941c6aa92c9536d048ffa6ec326 /dump.go
parent22111183a5a6f9c87062d503c8a71a6a6955bed5 (diff)
compiles after lots of protobuf changes
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'dump.go')
-rw-r--r--dump.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/dump.go b/dump.go
index 6d46c30..51d4cf3 100644
--- a/dump.go
+++ b/dump.go
@@ -38,14 +38,14 @@ func dumpDroplets(w http.ResponseWriter, full bool) {
}
// this line in golang could replace 80 lines of COBOL
- header := fmt.Sprintf("%-3s %20s %-8s", d.CurrentState, strings.Join(macs, " "), d.CurrentHypervisor)
+ header := fmt.Sprintf("%-3s %20s %-8s", d.Current.State, strings.Join(macs, " "), d.Current.Hypervisor)
var filenames string
for _, disk := range d.Disks {
filenames += disk.Filename
}
- if d.CurrentState == pb.DropletState_ON {
+ if d.Current.State == pb.DropletState_ON {
fmt.Fprintln(w, header, d.Hostname)
continue
}
@@ -72,12 +72,12 @@ func dumpHypervisors(w http.ResponseWriter) {
dur := time.Since(t)
tmp := shell.FormatDuration(dur)
totalDroplets += 1
- d := findDroplet(name)
+ d := me.cluster.FindDropletByName(name)
if d == nil {
totalUnknownDroplets += 1
fmt.Fprintln(w, "\t", h.pb.Hostname, "name =", name, "lastpoll:", tmp)
} else {
- fmt.Fprintln(w, "\t", h.pb.Hostname, "name =", name, "lastpoll:", tmp, d.CurrentState)
+ fmt.Fprintln(w, "\t", h.pb.Hostname, "name =", name, "lastpoll:", tmp, d.Current.State)
}
}
}