Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

show: A few tweaks on the table view #115

Closed
dlespiau opened this issue Apr 1, 2019 · 3 comments
Closed

show: A few tweaks on the table view #115

dlespiau opened this issue Apr 1, 2019 · 3 comments
Labels
good first issue Good for newcomers kind/enhancement New feature or request
Milestone

Comments

@dlespiau
Copy link
Contributor

dlespiau commented Apr 1, 2019

Compare:

       NAME       HOSTNAME    PORTS                 IMAGE                   CMD       STATE   

  /cluster-node1  node1     22->33031  quay.io/footloose/centos7:latest  /sbin/init  Stopped  
  /cluster-node0  node0     22->33030  quay.io/footloose/centos7:latest  /sbin/init  Stopped  

With

$ docker ps
CONTAINER ID        IMAGE                              COMMAND             CREATED             STATUS              PORTS                   NAMES
79821fa69596        quay.io/footloose/centos7:latest   "/sbin/init"        31 minutes ago      Up 31 minutes       0.0.0.0:33031->22/tcp   cluster-node1
4e5f25cb6321        quay.io/footloose/centos7:latest   "/sbin/init"        31 minutes ago      Up 31 minutes       0.0.0.0:33030->22/tcp   cluster-node0

Headers should be left aligned and no space between the first value ( /cluster-node1).

@u5surf
Copy link
Contributor

u5surf commented Apr 2, 2019

@dlespiau I’d like to fix them.
it can be easy to use tablewriter.Table.SetAlignment in pkg/cluster/formatter.go

https://godoc.org/github.com/olekukonko/tablewriter#Table.SetAlignment

@dlespiau
Copy link
Contributor Author

dlespiau commented Apr 2, 2019

It's yours!

Pinging @Skarlso so he's aware of this too. It's a nice issue for first contributors.

@Skarlso
Copy link
Contributor

Skarlso commented Apr 2, 2019

Thanks for the ping. Go for it mate. :) Good luck!

u5surf added a commit to u5surf/footloose that referenced this issue Apr 2, 2019
u5surf added a commit to u5surf/footloose that referenced this issue Apr 3, 2019
u5surf added a commit to u5surf/footloose that referenced this issue Apr 3, 2019
u5surf added a commit to u5surf/footloose that referenced this issue Apr 3, 2019
dlespiau added a commit that referenced this issue Apr 4, 2019
dlespiau added a commit that referenced this issue Apr 17, 2019
Turns out we can now the simple tabwriter facility from stdlib as we don't use
the fancy features of github.com/olekukonko/tablewriter any longer.

This removes the empty first column that wasn't so pleasing to the eye.

Fixes: #115
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants