Reworded IPAM service description in weave status
following review in #1702
This commit is contained in:
1 parent
3a9bcbcf6b
commit
cb65a80dce
1 file changed
+9
-7
+9
-7
@@ -60,14 +60,14 @@ var rootTemplate = template.New("root").Funcs(map[string]interface{}{
|
|||||||
}
|
}
|
||||||
percentageRanges := float32(ips) * 100.0 / float32(status.RangeNumIPs)
|
percentageRanges := float32(ips) * 100.0 / float32(status.RangeNumIPs)
|
||||||
|
|
||||||
displayName := name + " (" + nickName + ")"
|
displayName := name + " (" + nickName + "):"
|
||||||
fmt.Fprintf(&buffer, "%30s: %8d IPs (%04.1f%% of total) %s\n",
|
fmt.Fprintf(&buffer, "%-32s %8d IPs (%04.1f%% of total) %s\n",
|
||||||
displayName, ips, percentageRanges, reachableStr)
|
displayName, ips, percentageRanges, reachableStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// print the local info first
|
// print the local info first
|
||||||
if ourStats := peerStats[router.Name]; ourStats != nil {
|
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
|
// and then the rest
|
||||||
@@ -158,14 +158,16 @@ var statusTemplate = defTemplate("status", `\
|
|||||||
Service: ipam
|
Service: ipam
|
||||||
{{if .IPAM.Entries}}\
|
{{if .IPAM.Entries}}\
|
||||||
{{if allIPAMOwnersUnreachable .IPAM}}\
|
{{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}}\
|
{{else}}\
|
||||||
Consensus: achieved
|
Status: ready
|
||||||
{{end}}\
|
{{end}}\
|
||||||
{{else if .IPAM.Paxos}}\
|
{{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}}\
|
{{else}}\
|
||||||
Consensus: deferred
|
Status: idle
|
||||||
{{end}}\
|
{{end}}\
|
||||||
Range: {{.IPAM.Range}}
|
Range: {{.IPAM.Range}}
|
||||||
DefaultSubnet: {{.IPAM.DefaultSubnet}}
|
DefaultSubnet: {{.IPAM.DefaultSubnet}}
|
||||||
|
|||||||
Reference in new issue
Block a user