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

Support for formatted json inside the table for helm configurations #17

Open
raul1991 opened this issue Sep 2, 2020 · 5 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@raul1991
Copy link
Contributor

raul1991 commented Sep 2, 2020

It would be nice to have the json formatted properly inside a table cell rather a single huge line of json.

@jacobtomlinson jacobtomlinson added enhancement New feature or request help wanted Extra attention is needed labels Sep 9, 2020
@jacobtomlinson
Copy link
Member

I agree this would be great. It is straight forward to update json.dumps to specify add indentation and sorting. Here's an example from Stack Overflow. I would suggest an indentation of two would be appropriate here.

yield [param, comment, json.dumps(default)]

However this means that some will now run over multiple lines and so all the templates will need updating to support this.

<td><code>{{ default }}</code></td>

| `{{ param }}` | {{ comment }} | `{{ default }}` |

{% set default = '``%s``' | format(default) -%}

@raul1991
Copy link
Contributor Author

raul1991 commented Nov 7, 2020

Just for my understanding ...

The {{default}} will be a multi line json so each block of it lying on separate line needs to back-ticked so as to form a correctly formatted json ?

Like this ?

image

@raul1991
Copy link
Contributor Author

raul1991 commented Nov 7, 2020

or probably using html code to create table like this

https://stackoverflow.com/questions/28508141/code-block-inside-table-row-in-markdown/60502719#60502719

@raul1991
Copy link
Contributor Author

raul1991 commented Nov 7, 2020

Changed the code a bit and it looks beautiful with 4 indents, will push the code soon.

image

raul1991 added a commit to raul1991/frigate that referenced this issue Nov 7, 2020
- Since MD syntax does not really support it so I've created
table using html table syntax and it seems to render perfectly.

Pending items
--------------

- rst and html templates.

Fixes rapidsai#17
@jacobtomlinson
Copy link
Member

Awesome I look forward to reviewing the PR!

raul1991 added a commit to raul1991/frigate that referenced this issue Nov 10, 2020
- Since MD syntax does not really support it so I've created
table using html table syntax and it seems to render perfectly.

Pending items
--------------

- rst and html templates.

Fixes rapidsai#17 rapidsai#24
raul1991 added a commit to raul1991/frigate that referenced this issue Nov 10, 2020
- Since MD syntax does not really support it so I've created
table using html table syntax and it seems to render perfectly.

Pending items
--------------

- rst and html templates.

Fixes rapidsai#17 rapidsai#24
raul1991 added a commit to raul1991/frigate that referenced this issue Nov 10, 2020
- Since MD syntax does not really support it so I've created
table using html table syntax and it seems to render perfectly.

Pending items
--------------

- rst and html templates.

Fixes rapidsai#17 rapidsai#24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants