frigate
frigate copied to clipboard
Support for formatted json inside the table for helm configurations
It would be nice to have the json formatted properly inside a table cell rather a single huge line of json.
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.
https://github.com/rapidsai/frigate/blob/d138d180c702165c1fd63b5a49ec90359d14282e/frigate/gen.py#L233
However this means that some will now run over multiple lines and so all the templates will need updating to support this.
https://github.com/rapidsai/frigate/blob/d138d180c702165c1fd63b5a49ec90359d14282e/frigate/templates/html.jinja2#L47 https://github.com/rapidsai/frigate/blob/d138d180c702165c1fd63b5a49ec90359d14282e/frigate/templates/markdown.jinja2#L22 https://github.com/rapidsai/frigate/blob/d138d180c702165c1fd63b5a49ec90359d14282e/frigate/templates/rst.jinja2#L30
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 ?
or probably using html code to create table like this
https://stackoverflow.com/questions/28508141/code-block-inside-table-row-in-markdown/60502719#60502719
Changed the code a bit and it looks beautiful with 4 indents, will push the code soon.
Awesome I look forward to reviewing the PR!