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

cmd/unused: add -add-column flag to display disk metadata value in output #13

Merged
merged 3 commits into from
May 5, 2022

Conversation

inkel
Copy link
Collaborator

@inkel inkel commented May 4, 2022

This PR adds a new -add-column flag that can be indicated more than once that allows to add disk metadata in the output.

For the default table view the output is the following (in brackets are those displayed only in verbose mode):

PROVIDER  DISK  AGE  [PROVIDER_META DISK_META]

If you were to call unused -v -add-column=foobar the output now is:

PROVIDER  DISK  AGE  META:foobar  [PROVIDER_META DISK_META]

Additional -add-column flags will add a new META:$value column to the output.

In the case of the interactive UI, the main disk list currently only shows the disk name. By passing this column it will add the metadata key and value to the list.

inkel added 3 commits May 4, 2022 11:30
This commit only changes the interface and main func entry point, it
currently doesn't do anything else.

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
@inkel inkel added the enhancement New feature or request label May 4, 2022
@inkel inkel self-assigned this May 4, 2022
@inkel
Copy link
Collaborator Author

inkel commented May 4, 2022

This PR sheds some light on the interactive UI and its ugly UI design and code, so there will be an upcoming refactor of that in a different PR.

@inkel inkel merged commit 05952ff into main May 5, 2022
@inkel inkel deleted the feature/flag/add-column branch May 5, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant