krr icon indicating copy to clipboard operation
krr copied to clipboard

html rendering

Open floodgd opened this issue 7 months ago • 10 comments

Describe the bug When generating html, incorrect rendering occurs

To Reproduce Steps to reproduce the behavior: - name: krr image: robustadev/krr:v1.23.0 command: - "/bin/bash" - "-c" - "while true; do /usr/local/bin/python krr.py simple --prometheus-url http://prometheus:9090 --allow-hpa --formatter html --fileoutput /shared/report.html -q; done"

Expected behavior Correct table generation.

Screenshots

Image Image

Are you interested in contributing a fix for this? No

Desktop (please complete the following information):

  • OS: image krr
  • Browser chrome
  • Version 136.0.7103.114

Additional context Add any other context about the problem here.

floodgd avatar May 30 '25 08:05 floodgd

in the video at 20:38 the same problem, tell me why it doesn't work the first time? https://www.youtube.com/watch?v=DKiso9i5ctk&t=713s

floodgd avatar May 30 '25 18:05 floodgd

the html formatted was created with [1.17.0] with docker.io/robustadev/krr:v1.23.0 the table width is not correct and the --width parameter seems to be ignored

jorgelon avatar Jun 03 '25 13:06 jorgelon

ok . I solved it with the COLUMNS variable in the container

jorgelon avatar Jun 03 '25 14:06 jorgelon

Hi @jorgelon, thank you! If I understand correctly, you're saying that --widthdoes not work, but COLUMNS does? I wonder if there is some difference between running locally in a proper terminal vs in a headless container.

aantn avatar Jun 04 '25 07:06 aantn

Hi @jorgelon, thank you! If I understand correctly, you're saying that --widthdoes not work, but COLUMNS does? I wonder if there is some difference between running locally in a proper terminal vs in a headless container.

Yep. At least with the html format, COLUMNS did the trick. Try to get the $COLUMNS variable from both places...

jorgelon avatar Jun 04 '25 07:06 jorgelon

Got it, thanks.

aantn avatar Jun 04 '25 07:06 aantn

ok . I solved it with the COLUMNS variable in the container

Hi, could you please show how to use COLUMNS variables, I face this problem and cannot find COLUMNS variable 🥲

vanphuoc3012 avatar Jul 09 '25 04:07 vanphuoc3012

ok . I solved it with the COLUMNS variable in the container

Hi, could you please show how to use COLUMNS variables, I face this problem and cannot find COLUMNS variable 🥲

I am using krr in a container. I simply added the COLUMNS variabled under "env" in the definition of the krr container with the desired value

jorgelon avatar Jul 09 '25 07:07 jorgelon

ok . I solved it with the COLUMNS variable in the container

Hi, could you please show how to use COLUMNS variables, I face this problem and cannot find COLUMNS variable 🥲

I am using krr in a container. I simply added the COLUMNS variabled under "env" in the definition of the krr container with the desired value

ah, thank you, this environment from rich library

https://rich.readthedocs.io/en/latest/console.html#environment-variables

vanphuoc3012 avatar Jul 16 '25 06:07 vanphuoc3012

If anyone looking for envvar example:
COLUMNS: 250
(max 250 columns rendered in console)

PS. This PR seems to fix the issue soon https://github.com/robusta-dev/krr/pull/463

villisco avatar Aug 26 '25 16:08 villisco