-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add database roles to tsh db ls -v
#35582
Conversation
how about an option Definitely a good idea to allow column filtering though! My first thought on seeing the PR title was how cluttered |
It would be nice to support comma-separated list in |
This is another one of the things I'd love to get in a CLI style guide (see #12811). I think we should do some form of an output format that can apply to anything. Kubectl supports a few too many options (IMO), but there's surely some inspiration we can take from them:
|
I will remove the Docker also uses Go template: $ docker image list --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.Size}}"
$ docker ps --format "table {{.Names}}\t{{.Ports}}" |
I don't think we need this level of flexibility, but some customisation would be nice. Perhaps we can add generic config to "tsh db ls":
columns: Proxy Name Protocol Description Type AllowedUsers Each call to |
tsh db ls
tsh db ls -v
52e549b
to
801e36e
Compare
* refactor and add --exclude-column * add Database Roles column * add database_roles to json,yaml * remove --exclude-column and refactor databaseTableRow * change slices import
* Add database roles to `tsh db ls -v` (#35582) * refactor and add --exclude-column * add Database Roles column * add database_roles to json,yaml * remove --exclude-column and refactor databaseTableRow * change slices import * update copyright header
Pre-req to
changelog: Added "Database Roles" column to
tsh db ls -v
Changes:
tsh db ls -v
database_roles
totsh db ls -f json/yaml
tsh db ls -R
returns missing "Expires" columnDid some minor refactoring. Might be easier to review each commit separately.
Usage example: