Copilot-cli: fix `app show` human output format

Created on 2 Jan 2020  路  2Comments  路  Source: aws/copilot-cli

Experience

The interactive experience

$ ecs-preview app show
? Which application would you like to show?
> my-app

General

    AppName   "my-app"
    Type      "lb-application"
    Project   "my-project"

Deploys

    EnvName     "test"
    AccountID   "123456789"
    Region      "us-west-2"
    Prod        false
    Port        "8080"
    Tasks       3
    CPU         "256"
    Memory      "512"
    Path        "*"
    URL         "flask-Ec2Se-KCH5OLWN57WM-992971783.us-west-2.elb.amazonaws.com"

We can always add more colors to make it fancier.

typrefactor

Most helpful comment

@efekarakus - I like your version. In the About section, I'd probably put project first, followed by name, then type (and remove the quotes).

One other interesting we could do is provide an --infrastructure flag (optional). When this flag is provided, we add another category called Infrastructure:

$ ecs-preview app show --infrastructure
? Which application would you like to show?
> my-app
About
    Project   my-project
    Name      my-app
    Type      lb-application

Configurations
    Environment      CPU (vCPU)      Memory (MiB)     Port
    test             0.25            512              8080
    prod             0.5             1024             8080


Routes
    Environment      URL                                                           Path 
    test             flask-Ec2Se-KCH5OLWN57WM.us-west-2.elb.amazonaws.com          *
    prod             flask-Ec2Se-KCH5OLWN57WM.us-west-2.elb.amazonaws.com          *       

 Infrastructure
    test
        Type         ID
        Service      kudos-test-Cluster-10L7BP5EXEYB/ecsarnplz
        Target Group kudos-Targe-L2ZO0DGY38BP/95c46b6b469cd61e

These values will come from querying Resource Groups (this can be a follow up action, of course).

All 2 comments

Brainstorming random stuff:

  1. Removed data that's about environments (account, region) to make this application specific.
  2. Displaying information with human friendly units (vCPU, MiB)
  3. Instead of displaying displaying every stat under an environment, categorizing them?
$ ecs-preview app show
? Which application would you like to show?
> my-app
About
    Name      "my-app"
    Type      "lb-application"
    Project   "my-project"

Configurations
    Environment      CPU (vCPU)      Memory (MiB)     Port
    test             0.25            512              8080
    prod             0.5             1024             8080


Routes
    Environment      URL                                                           Path 
    test             flask-Ec2Se-KCH5OLWN57WM.us-west-2.elb.amazonaws.com          *
    prod             flask-Ec2Se-KCH5OLWN57WM.us-west-2.elb.amazonaws.com          *       

let me know what you think

@efekarakus - I like your version. In the About section, I'd probably put project first, followed by name, then type (and remove the quotes).

One other interesting we could do is provide an --infrastructure flag (optional). When this flag is provided, we add another category called Infrastructure:

$ ecs-preview app show --infrastructure
? Which application would you like to show?
> my-app
About
    Project   my-project
    Name      my-app
    Type      lb-application

Configurations
    Environment      CPU (vCPU)      Memory (MiB)     Port
    test             0.25            512              8080
    prod             0.5             1024             8080


Routes
    Environment      URL                                                           Path 
    test             flask-Ec2Se-KCH5OLWN57WM.us-west-2.elb.amazonaws.com          *
    prod             flask-Ec2Se-KCH5OLWN57WM.us-west-2.elb.amazonaws.com          *       

 Infrastructure
    test
        Type         ID
        Service      kudos-test-Cluster-10L7BP5EXEYB/ecsarnplz
        Target Group kudos-Targe-L2ZO0DGY38BP/95c46b6b469cd61e

These values will come from querying Resource Groups (this can be a follow up action, of course).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikelhamer picture mikelhamer  路  3Comments

jaybauson picture jaybauson  路  3Comments

efe-selcuk picture efe-selcuk  路  3Comments

efekarakus picture efekarakus  路  3Comments

tachyonics picture tachyonics  路  3Comments