diff --git a/README.md b/README.md index aacba08c..f02c1b75 100644 --- a/README.md +++ b/README.md @@ -714,6 +714,7 @@ Export KRR reports directly to Azure Blob Storage and get notified in Microsoft --teams-webhook "https://your-teams-webhook-url" \ --azure-subscription-id "your-subscription-id" \ --azure-resource-group "your-resource-group" + --width 250 (optional but HIGHLY RECOMMENDED) ``` ### Features @@ -747,6 +748,8 @@ krr simple -f html \ --azure-resource-group "my-resource-group" ``` +Note: Consider adjusting the `--width` CLI flag for a better HTML viewing experience in browser. + ### Teams Notification Features The Teams adaptive card includes: diff --git a/robusta_krr/formatters/html.py b/robusta_krr/formatters/html.py index a028d969..f475d38e 100644 --- a/robusta_krr/formatters/html.py +++ b/robusta_krr/formatters/html.py @@ -2,11 +2,13 @@ from robusta_krr.core.abstract import formatters from robusta_krr.core.models.result import Result +from robusta_krr.core.models.config import settings from .table import table @formatters.register("html") def html(result: Result) -> str: - console = Console(record=True) + html_width = settings.width if settings.width is not None else None + console = Console(record=True, width=html_width, force_terminal=False) table_output = table(result) console.print(table_output) return console.export_html(inline_styles=True)