From 4dc758d7e6fdafd2b0aff030b0e6492022b9c4a5 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 3 Mar 2020 16:02:51 -0500 Subject: [PATCH] refactor: drop full info from :list command This can be fetched from :info if necessary, and slows down the list quite a bit. --- common-functions | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/common-functions b/common-functions index ac6dc0d..7ffc474 100755 --- a/common-functions +++ b/common-functions @@ -494,19 +494,16 @@ service_links() { service_list() { declare desc="Lists all services and their status" local SERVICES=$(ls "$PLUGIN_DATA_ROOT" 2>/dev/null) + if [[ -z $SERVICES ]]; then dokku_log_warn "There are no $PLUGIN_SERVICE services" - else - LIST="" - if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then - LIST="NAME,VERSION,STATUS,EXPOSED PORTS,LINKS\n" - fi - - for SERVICE in $SERVICES; do - LIST+="$SERVICE,$(service_version "$SERVICE"),$(service_status "$SERVICE"),$(service_exposed_ports "$SERVICE"),$(service_linked_apps "$SERVICE")\n" - done - printf "%b" "$LIST" | column -t -s, + return fi + + dokku_log_info2_quiet "Postgres services" + for SERVICE in $SERVICES; do + echo "$SERVICE" + done } service_logs() {