Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Reworded IPAM service description in weave status
Browse files Browse the repository at this point in the history
following review in #1702
  • Loading branch information
bboreham committed Nov 24, 2015
1 parent 09554ad commit c73409b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions prog/weaver/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ var rootTemplate = template.New("root").Funcs(map[string]interface{}{
}
percentageRanges := float32(ips) * 100.0 / float32(status.RangeNumIPs)

displayName := name + " (" + nickName + ")"
fmt.Fprintf(&buffer, "%30s: %8d IPs (%04.1f%% of total) %s\n",
displayName := name + " (" + nickName + "):"
fmt.Fprintf(&buffer, "%-32s %8d IPs (%04.1f%% of total) %s\n",
displayName, ips, percentageRanges, reachableStr)
}

// print the local info first
if ourStats := peerStats[router.Name]; ourStats != nil {
printOwned(router.Name, "local", true, ourStats.ips)
printOwned(router.Name, ourStats.nickname, true, ourStats.ips)
}

// and then the rest
Expand Down Expand Up @@ -152,14 +152,16 @@ var statusTemplate = defTemplate("status", `\
Service: ipam
{{if .IPAM.Entries}}\
{{if allIPAMOwnersUnreachable .IPAM}}\
Halted: all IPs owned by unreachable peers
Status: all IP ranges owned by unreachable peers - use 'rmpeer' if they are dead
{{else if len .IPAM.PendingAllocates}}\
Status: waiting for IP range grant from peers
{{else}}\
Consensus: achieved
Status: ready
{{end}}\
{{else if .IPAM.Paxos}}\
Consensus: waiting (quorum: {{.IPAM.Paxos.Quorum}}, known: {{.IPAM.Paxos.KnownNodes}})
Status: awaiting consensus (quorum: {{.IPAM.Paxos.Quorum}}, known: {{.IPAM.Paxos.KnownNodes}})
{{else}}\
Consensus: deferred
Status: idle
{{end}}\
Range: {{.IPAM.Range}}
DefaultSubnet: {{.IPAM.DefaultSubnet}}
Expand Down

0 comments on commit c73409b

Please sign in to comment.