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

❔ Layout question (jq | column) inside textboxes (deal with t ad \t) #117

Open
adriens opened this issue Apr 30, 2022 · 0 comments
Open

Comments

@adriens
Copy link

adriens commented Apr 30, 2022

πŸ‘‰ Context

I'm preparing of ready to use sample dashboards. At the end i'll create a dedicated & public GH repo.

❔ Question about alignement

I would like to get the following command in a nice looking way in sampler.

Everything looks fine from the terminal :

curl -s https://hub.docker.com/v2/repositories/optnc | jq -r '"Image\tStars\tPulls", "-----------------------\t-------\t------", ( .results | sort_by(.pull_count) | reverse | .[] | "\(.name)\t\(.star_count)\t\(.pull_count)")' | column -t -s $'\t'

see below :

image

... but when I put the same commad in the following conf (inspired by code sample) :

textboxes:
  - title: OPT-NC Docker image stats
    rate-ms: 15000
    sample: curl -s https://hub.docker.com/v2/repositories/optnc | jq -r '"Image\tStars\tPulls", "-----------------------\t-------\t------", ( .results | sort_by(.pull_count) | reverse | .[] | "\(.name)\t\(.star_count)\t\(.pull_count)")' | column -t -s $'\t'

I get the following render (something weird appears with t and \t) :

image

πŸ‘‰ I guess it has to deal with special characters... but in your sample I did not see any special tricks

Any idea about what I'm doing wrong ?... or am missing in formating options ?

Thank you in advance for any help or feedback.

@adriens adriens changed the title ❔ Layout question (jq | column) ❔ Layout question (jq | column) inside textboxes Apr 30, 2022
@adriens adriens changed the title ❔ Layout question (jq | column) inside textboxes ❔ Layout question (jq | column) inside textboxes (deal with t ad \t) Apr 30, 2022
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

1 participant