parent
89bd18a76b
commit
87b71cb9d4
17
abra
17
abra
@ -1565,10 +1565,23 @@ List locally-defined servers."
|
|||||||
|
|
||||||
sub_server_list() {
|
sub_server_list() {
|
||||||
get_servers
|
get_servers
|
||||||
|
|
||||||
|
warning "Loading status from ${#SERVERS[@]} server(s), patience advised.."
|
||||||
printf "%s servers:\n\n" "${#SERVERS[@]}"
|
printf "%s servers:\n\n" "${#SERVERS[@]}"
|
||||||
|
|
||||||
|
local -a idx=0
|
||||||
for SERVER in "${SERVERS[@]}"; do
|
for SERVER in "${SERVERS[@]}"; do
|
||||||
echo " ${SERVER##*/}"
|
if [[ "$idx" == 0 ]]; then
|
||||||
done
|
printf " NAME\tCONNECTION\n"
|
||||||
|
printf " --\t--\t\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
name="${SERVER##*/}"
|
||||||
|
host=$(docker context inspect "$name" -f "{{.Endpoints.docker.Host}}" 2>/dev/null)
|
||||||
|
printf " %s\t%s\t%s%s\n" "$name" "${host:-UNKNOWN}"
|
||||||
|
|
||||||
|
idx+=1
|
||||||
|
done | column -s' ' -t
|
||||||
}
|
}
|
||||||
|
|
||||||
###### .. server init
|
###### .. server init
|
||||||
|
Reference in New Issue
Block a user