Restore leading whitespace to weave status
This commit is contained in:
1 parent
4e41d4d451
commit
e0cb9cf24d
2 files changed
+27
-27
No files matched your search
+23
-23
@@ -138,48 +138,48 @@ func defTemplate(name string, text string) *template.Template {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var statusTemplate = defTemplate("status", `\
|
var statusTemplate = defTemplate("status", `\
|
||||||
Version: {{.Version}}
|
Version: {{.Version}}
|
||||||
|
|
||||||
Service: router
|
Service: router
|
||||||
Protocol: {{.Router.Protocol}} \
|
Protocol: {{.Router.Protocol}} \
|
||||||
{{if eq .Router.ProtocolMinVersion .Router.ProtocolMaxVersion}}\
|
{{if eq .Router.ProtocolMinVersion .Router.ProtocolMaxVersion}}\
|
||||||
{{.Router.ProtocolMaxVersion}}\
|
{{.Router.ProtocolMaxVersion}}\
|
||||||
{{else}}\
|
{{else}}\
|
||||||
{{.Router.ProtocolMinVersion}}..{{.Router.ProtocolMaxVersion}}\
|
{{.Router.ProtocolMinVersion}}..{{.Router.ProtocolMaxVersion}}\
|
||||||
{{end}}
|
{{end}}
|
||||||
Name: {{.Router.Name}}({{.Router.NickName}})
|
Name: {{.Router.Name}}({{.Router.NickName}})
|
||||||
Encryption: {{printState .Router.Encryption}}
|
Encryption: {{printState .Router.Encryption}}
|
||||||
PeerDiscovery: {{printState .Router.PeerDiscovery}}
|
PeerDiscovery: {{printState .Router.PeerDiscovery}}
|
||||||
Targets: {{len .Router.Targets}}
|
Targets: {{len .Router.Targets}}
|
||||||
Connections: {{len .Router.Connections}}{{with printConnectionCounts .Router.Connections}} ({{.}}){{end}}
|
Connections: {{len .Router.Connections}}{{with printConnectionCounts .Router.Connections}} ({{.}}){{end}}
|
||||||
Peers: {{len .Router.Peers}}{{with printPeerConnectionCounts .Router.Peers}} (with {{.}} connections){{end}}
|
Peers: {{len .Router.Peers}}{{with printPeerConnectionCounts .Router.Peers}} (with {{.}} connections){{end}}
|
||||||
TrustedSubnets: {{printList .Router.TrustedSubnets}}
|
TrustedSubnets: {{printList .Router.TrustedSubnets}}
|
||||||
{{if .IPAM}}\
|
{{if .IPAM}}\
|
||||||
|
|
||||||
Service: ipam
|
Service: ipam
|
||||||
{{if .IPAM.Entries}}\
|
{{if .IPAM.Entries}}\
|
||||||
{{if allIPAMOwnersUnreachable .IPAM}}\
|
{{if allIPAMOwnersUnreachable .IPAM}}\
|
||||||
Status: all IP ranges owned by unreachable peers - use 'rmpeer' if they are dead
|
Status: all IP ranges owned by unreachable peers - use 'rmpeer' if they are dead
|
||||||
{{else if len .IPAM.PendingAllocates}}\
|
{{else if len .IPAM.PendingAllocates}}\
|
||||||
Status: waiting for IP range grant from peers
|
Status: waiting for IP range grant from peers
|
||||||
{{else}}\
|
{{else}}\
|
||||||
Status: ready
|
Status: ready
|
||||||
{{end}}\
|
{{end}}\
|
||||||
{{else if .IPAM.Paxos}}\
|
{{else if .IPAM.Paxos}}\
|
||||||
Status: awaiting consensus (quorum: {{.IPAM.Paxos.Quorum}}, known: {{.IPAM.Paxos.KnownNodes}})
|
Status: awaiting consensus (quorum: {{.IPAM.Paxos.Quorum}}, known: {{.IPAM.Paxos.KnownNodes}})
|
||||||
{{else}}\
|
{{else}}\
|
||||||
Status: idle
|
Status: idle
|
||||||
{{end}}\
|
{{end}}\
|
||||||
Range: {{.IPAM.Range}}
|
Range: {{.IPAM.Range}}
|
||||||
DefaultSubnet: {{.IPAM.DefaultSubnet}}
|
DefaultSubnet: {{.IPAM.DefaultSubnet}}
|
||||||
{{end}}\
|
{{end}}\
|
||||||
{{if .DNS}}\
|
{{if .DNS}}\
|
||||||
|
|
||||||
Service: dns
|
Service: dns
|
||||||
Domain: {{.DNS.Domain}}
|
Domain: {{.DNS.Domain}}
|
||||||
Upstream: {{printList .DNS.Upstream}}
|
Upstream: {{printList .DNS.Upstream}}
|
||||||
TTL: {{.DNS.TTL}}
|
TTL: {{.DNS.TTL}}
|
||||||
Entries: {{countDNSEntries .DNS.Entries}}
|
Entries: {{countDNSEntries .DNS.Entries}}
|
||||||
{{end}}\
|
{{end}}\
|
||||||
`)
|
`)
|
||||||
|
|
||||||
|
|||||||
@@ -1892,13 +1892,13 @@ EOF
|
|||||||
fi
|
fi
|
||||||
if [ -z "$SUB_STATUS" ] && check_running $PROXY_CONTAINER_NAME 2>/dev/null && PROXY_ADDRS=$(proxy_addrs) ; then
|
if [ -z "$SUB_STATUS" ] && check_running $PROXY_CONTAINER_NAME 2>/dev/null && PROXY_ADDRS=$(proxy_addrs) ; then
|
||||||
echo
|
echo
|
||||||
echo " Service: proxy"
|
echo " Service: proxy"
|
||||||
echo " Address: $PROXY_ADDRS"
|
echo " Address: $PROXY_ADDRS"
|
||||||
fi
|
fi
|
||||||
if [ -z "$SUB_STATUS" ] && check_running $PLUGIN_CONTAINER_NAME 2>/dev/null ; then
|
if [ -z "$SUB_STATUS" ] && check_running $PLUGIN_CONTAINER_NAME 2>/dev/null ; then
|
||||||
echo
|
echo
|
||||||
echo " Service: plugin"
|
echo " Service: plugin"
|
||||||
echo " DriverName: weave"
|
echo " DriverName: weave"
|
||||||
fi
|
fi
|
||||||
[ -n "$SUB_STATUS" ] || echo
|
[ -n "$SUB_STATUS" ] || echo
|
||||||
[ $res -eq 0 ]
|
[ $res -eq 0 ]
|
||||||
|
|||||||
Reference in new issue
Block a user