Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update & Redesign ddev describe output (and ddev list and ddev version) #2195

Closed
andy-blum opened this issue Apr 17, 2020 · 15 comments
Closed

Comments

@andy-blum
Copy link
Contributor

The ddev describe output is a bit cluttered and has some pieces missing now. Setting this issue up as meta/discussion to encourage community input.

Below is the current output for a drupal8 project 'example.com'

NAME         TYPE     LOCATION             URL                            STATUS
example.com  drupal8  ~/Sites/example.com  https://example.com.ddev.site  running

Project Information
-------------------
PHP version:      	7.3
NFS mount enabled:	true
Database type:    	mariadb
MariaDB version:  	10.2

URLs
----
https://example.com.ddev.site
https://127.0.0.1:32791
http://example.com.ddev.site
http://127.0.0.1:32792

MySQL/MariaDB Credentials
-------------------------
Username: "db", Password: "db", Default database: "db"

or use root credentials when needed: Username: "root", Password: "root"

Database hostname and port INSIDE container: db:3306
To connect to db server inside container or in project settings files:
mysql --host=db --user=db --password=db --database=db
Database hostname and port from HOST: 127.0.0.1:32790
To connect to mysql from your host machine,
mysql --host=127.0.0.1 --port=32790 --user=db --password=db --database=db

Other Services
--------------
MailHog (https):	https://example.com.ddev.site:8026
MailHog:        	http://example.com.ddev.site:8025

DDEV ROUTER STATUS: healthy
ssh-auth status: healthy
@andy-blum
Copy link
Contributor Author

My initial complaint is regarding the output of the database credentials. I suggest:

MySQL/MariaDB Credentials
-------------------------

Username (root):  root
Password (root):  root
Username:         db
Password:         db

host:port (internal):  db:3306
host:port (external): 127.0.0.1:XXXXX

@andy-blum
Copy link
Contributor Author

I think another immediate improvement would be to transfer the first two lines into the same table format

example.com
-------------------------------------------------
Type:               drupal8
Location:           ~/Sites/example.com
URL:                https://example.com.ddev.site
Status:             Running
-------------------------------------------------

@andy-blum
Copy link
Contributor Author

andy-blum commented Apr 17, 2020

I think it might also be worth splitting the container/server info to sit along side other relevant information, giving us 5 main sections:

  • Basic Info
  • Webserver Info
  • Database Info
  • Services/Settings/Tools/Misc
  • Global DDEV status info (I don't ever use this info and wouldn't be sad to see it gone)
example.com
-------------------------------------------------
Type:               drupal8
Location:           ~/Sites/example.com
URL:                https://example.com.ddev.site
Status:             Running
-------------------------------------------------


Webserver
-------------------------------------------------
Type:               nginx-fpm
PHP version:        7.3
Docroot:            /var/html/www/web/

Aliases:            https://sample-alias.ddev.site
                    https://127.0.0.1:32791
                    http://127.0.0.1:32792
-------------------------------------------------


Database
-------------------------------------------------
Type:               mariadb v10.2

Username (root):    root
Password (root):    root
Username:           db
Password:           db

host:port (int):    db:3306
host:port (ext):    127.0.0.1:XXXXX
-------------------------------------------------


Services, Settings & Tools
-------------------------------------------------
MailHog (https):    https://example.com.ddev.site:8026
MailHog:            http://example.com.ddev.site:8025
PHPMyAdmin:         [info here if enabled]
redis:              [info here if enabled]
NFS mount:          enabled
xDebug:             enabled
-------------------------------------------------


DDEV Statuses
-------------------------------------------------
router:    healthy
ssh-auth:  healthy
-------------------------------------------------

@rfay rfay added this to the v1.17 milestone Nov 8, 2020
@rfay rfay modified the milestones: v1.17, v1.18 Feb 12, 2021
@shaal
Copy link
Collaborator

shaal commented Apr 19, 2021

I really like the clean design in the comment above (#2195 (comment))
When columns are aligned, and each section has a similar structure with title above it, it makes it very clear and easy to read.

@brianyoungblood
Copy link

Maybe this is found in another discussion but I always want to type ddev status on a project. I’m fighting the urge to do a alias for describe.

@rfay
Copy link
Member

rfay commented Apr 20, 2021

It would be easy to add an alias, but I'm not sure that would be helpful to everybody. You @brianyoungblood however can easily add a custom global host command that just does ddev describe. You'll like it.

@brianyoungblood
Copy link

brianyoungblood commented Apr 20, 2021

@rfay yup exactly my urge and I’ve done other custom commands on the host as well. I was also compelled to share in hopes of this feedback. I’d rather not do a custom on this one so quickly and just change my behavior in this case unless I had others with the urge. New format of describe looks good to me as well.

@shaal
Copy link
Collaborator

shaal commented Apr 20, 2021

+1 for ddev status as an alias to ddev describe.
I would use ddev status because to me it's more intuitive.

@rpkoller
Copy link
Collaborator

haha also a +1 from me for ddev status. yesterday when i read this thread the first time and wanted to compare the suggested with the current state, since i use ddev describe rather rarely, i first typed in ddev status by accident ;)

@rfay
Copy link
Member

rfay commented Apr 20, 2021

OK, you status lovers, #2955

@andrewbelcher
Copy link
Contributor

I'm not much of a designer, so not sure I can give much input on that front, but one thing I would suggest considering is splitting out some of the information into a verbose mode / being able to get information about specific services. E.g.

ddev describe: Short, concise summary of all services
ddev describe -v: Full information about all services
ddev describe db: Full information about the database container
ddev describe web: Full information about the web container

I've just run ddev describe on my current project in the terminal of PHPStorm, which is at 60% of the height of my full HD monitor, and I have more than the terminal height of information, resulting in what is arguably the most important bits of information (URL and status) needing scrolling to see.

The MySQL/MariaDB Credentials in particular are quite verbose by default. And whilst I like the readability improvements of the above suggestions, they may actually make the problem worse by making the output even taller.

@andrewbelcher
Copy link
Contributor

A few resources I've seen that might be helpful for others like me who are visual design challenged:

Another thing that might be helpful is being able to add information in config.yaml that's project specific. Not sure if this is best at the top, bottom or both?

@andy-blum
Copy link
Contributor Author

I like the recommendation for an expanded set of describe modes, though I'm not sure what I'd consider priority 1 for the 'short' version. Any suggestions there @andrewbelcher ?

@andrewbelcher
Copy link
Contributor

I guess I would say the key bits of information for each service would be:

  • name
  • state (with colour coding preferably)
  • primary or key urls (or equiv where relevant)
  • maybe a short descriptive thing if relevant, version p

Fitting with the grep parseable, perhaps something along the lines of

Name:               example
Type:               drupal8
Location:           ~/Sites/example
URL:                https://example.ddev.site
Status:             Running
DDev router:        healthy     
ssh-auth:           healthy


| Service  | Name  | State   | URL/Port                       | Version             |
| -------- | ----- | ------- | ------------------------------ | ------------------- |
| Web      | web   | running | https://example.ddev.site      | Apache 2.4, PHP 7.3 |
| Database | db    | running | db:3306 127.0.0.1:31000        | MariaDB 10.2        |
| Solr     | solr  | error   | https://example.ddev.site:8983 | 7.5                 |
| MailHog  | -     | running | https://example.ddev.site:2026 |                     |
| Redis    | redis | running | redis:6379                     |                     |


Some configurable (but optional) descriptive text that comes from config.yaml to allow teams to set up 
helpful information for on-boarding or other common activities.

@andrewbelcher
Copy link
Contributor

#2965 is a (REALLY) rough start at some of this... Fun first foray into go and contributing to DDev - I expect tests will fail as I've not even looked at that and I have some issues that I'm not familiar enough with Go / DDev's set up to sort myself, but here's the output so far:

image

image

image

image

image

rfay pushed a commit to andrewbelcher/ddev that referenced this issue Jun 4, 2021
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Jun 9, 2021
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Aug 3, 2021
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Aug 9, 2021
Fix wonky rebase

Update gosuri/uitable to v0.0.4 for color fixes.

gofmt describe.go

go version in go.mod should be 1.16

Add webserver_type, fixes ddev#3054

First round of updates to table

Use lowercase in ddev list

Minor update to test

Pacify linter

Bump golang-build-container to 1.16.6

Fix test crash due to updating docker/docker

Try to use upstream's go.mod
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Aug 19, 2021
Fix wonky rebase

Update gosuri/uitable to v0.0.4 for color fixes.

gofmt describe.go

go version in go.mod should be 1.16

Add webserver_type, fixes ddev#3054

First round of updates to table

Use lowercase in ddev list

Minor update to test

Pacify linter

Bump golang-build-container to 1.16.6

Fix test crash due to updating docker/docker

Try to use upstream's go.mod
@rfay rfay changed the title Update & Redesign ddev describe output Update & Redesign ddev describe output (and ddev list and ddev version) Aug 19, 2021
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Aug 20, 2021
Fix wonky rebase

Update gosuri/uitable to v0.0.4 for color fixes.

gofmt describe.go

go version in go.mod should be 1.16

Add webserver_type, fixes ddev#3054

First round of updates to table

Use lowercase in ddev list

Minor update to test

Pacify linter

Bump golang-build-container to 1.16.6

Fix test crash due to updating docker/docker

Try to use upstream's go.mod
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Aug 20, 2021
Fix wonky rebase

Update gosuri/uitable to v0.0.4 for color fixes.

gofmt describe.go

go version in go.mod should be 1.16

Add webserver_type, fixes ddev#3054

First round of updates to table

Use lowercase in ddev list

Minor update to test

Pacify linter

Bump golang-build-container to 1.16.6

Fix test crash due to updating docker/docker

Try to use upstream's go.mod
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Aug 27, 2021
Fix wonky rebase

Update gosuri/uitable to v0.0.4 for color fixes.

gofmt describe.go

go version in go.mod should be 1.16

Add webserver_type, fixes ddev#3054

First round of updates to table

Use lowercase in ddev list

Minor update to test

Pacify linter

Bump golang-build-container to 1.16.6

Fix test crash due to updating docker/docker

Try to use upstream's go.mod
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Aug 31, 2021
Fix wonky rebase

Update gosuri/uitable to v0.0.4 for color fixes.

gofmt describe.go

go version in go.mod should be 1.16

Add webserver_type, fixes ddev#3054

First round of updates to table

Use lowercase in ddev list

Minor update to test

Pacify linter

Bump golang-build-container to 1.16.6

Fix test crash due to updating docker/docker

Try to use upstream's go.mod
rfay pushed a commit to andrewbelcher/ddev that referenced this issue Aug 31, 2021
Fix wonky rebase

Update gosuri/uitable to v0.0.4 for color fixes.

gofmt describe.go

go version in go.mod should be 1.16

Add webserver_type, fixes ddev#3054

First round of updates to table

Use lowercase in ddev list

Minor update to test

Pacify linter

Bump golang-build-container to 1.16.6

Fix test crash due to updating docker/docker

Try to use upstream's go.mod
@rfay rfay closed this as completed in bc2bf2b Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants