add datatable plugin
All checks were successful
/ test (push) Successful in 19s

This commit is contained in:
Michaël Ricart 2025-02-17 13:57:20 +01:00
parent 851db200e0
commit 97daf64816
2 changed files with 12 additions and 7 deletions

View file

@ -13,7 +13,9 @@ author = 'Michaël Ricart'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = []
extensions = [
"sphinx_datatables",
]
templates_path = ['_templates']
exclude_patterns = []
@ -28,7 +30,7 @@ html_theme = "sphinx_rtd_theme"
html_static_path = ['_static']
# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
# or fully qualifieed paths (eg. https://...)
#html_style = 'css/custom.css'
html_css_files = [
'css/custom.css',

View file

@ -15,8 +15,11 @@ interface adresses
services
--------
================================================== ==================== ==============
service state description
================================================== ==================== =============={% for svc in services %}
{{ "{:<50}".format(svc["unit"][:49]) }} {{ "{:<20}".format(svc["sub"].replace("running",":green:`running`").replace("failed", ":red:`failed`")) }} {{ svc["description"] }}{% endfor %}
================================================== ==================== ==============
.. table:: services
:class: sphinx-datatable
================================================== ==================== ==============
service state description
================================================== ==================== =============={% for svc in services %}
{{ "{:<50}".format(svc["unit"][:49]) }} {{ "{:<20}".format(svc["sub"].replace("running",":green:`running`").replace("failed", ":red:`failed`")) }} {{ svc["description"] }}{% endfor %}
================================================== ==================== ==============