customing cutom.tt

28 views
Skip to first unread message

sist...@gmail.com

unread,
May 9, 2024, 7:44:57 PMMay 9
to Thruk

This is the report when you only have the default custom.tt as shown on your page:

Captura de pantalla 2024-05-09 171017.png


Now, once the aforementioned modifications have been made from the browser, I begin to perform my tests to know how my report will look:


custom.tt por default:

Captura de pantalla 2024-05-09 171825.png

In page_cover.tt delete lines 5 to 12, this in order to remove the title of the main page.

/usr/share/thruk/plugins/plugins-available/reports2/templates/reports/comp/page_cover.tt

Captura de pantalla 2024-05-09 170002.png

In the sla_report.tt on line 48 the text 'SLA Report' 

/usr/share/thruk/plugins/plugins-available/reports2/templates/reports/sla_report.tt linea 48

Captura de pantalla 2024-05-09 165800.png

In the css.tt eliminate line 57 and 59 removing the blue color

 /usr/share/thruk/plugins/plugins-available/reports2/templates/reports/style/css.tt linea 57 y 59

Captura de pantalla 2024-05-09 170343.png

modified custom.tt as what I require:
Captura de pantalla 2024-05-09 172003.png
Captura de pantalla 2024-05-09 172145.png
I know that for images you should use this code in custom.tt either using base64 oh putting the image

<script language="javascript" type="text/javascript"> /* add complete new elements by javascript, ex.: company logo on page cover */ jQuery(document).ready(function() { jQuery('<img src="http://localhost/nagios/images/logos/footer_sla_report.png">').insertBefore('DIV.footer'); 

jQuery('<img src="data:image/png;base64,...">').insertBefore('DIV.page.cover DIV.titletext');

 }); </script>


but when trying to pass the configurations directly in the custom.tt file, the following happens:

Captura de pantalla 2024-05-09 174220.png

I hope you can help me, thank you


I attach the custom.tt file with the modifications I made

custom.tt

sist...@gmail.com

unread,
May 14, 2024, 12:10:37 PMMay 14
to Thruk
I already solved it in the end, I passed everything to the CSS and I didn't use the custom

Sven Nierlein

unread,
May 14, 2024, 3:26:57 PMMay 14
to th...@googlegroups.com, sist...@gmail.com
Hi,

glad you solved it. My first guess would have been some quoting issue or something like that. Or an issue in the
library which tries to put all content in a self-contained html file. Hard to tell without creating a test setup.

Cheers,
Sven


On 14.05.24 18:10, sist...@gmail.com wrote:
> I already solved it in the end, I passed everything to the CSS and I didn't use the custom
>
> El jueves, 9 de mayo de 2024 a las 17:44:57 UTC-6, sist...@gmail.com escribió:
>
> This is the report when you only have the default custom.tt <http://custom.tt> as shown on your page:
>
> Captura de pantalla 2024-05-09 171017.png
>
>
> Now, once the aforementioned modifications have been made from the browser, I begin to perform my tests to know how my report will look:
>
>
> custom.tt <http://custom.tt> por default:
>
> Captura de pantalla 2024-05-09 171825.png
>
> In page_cover.tt <http://page_cover.tt> delete lines 5 to 12, this in order to remove the title of the main page.
>
> /usr/share/thruk/plugins/plugins-available/reports2/templates/reports/comp/page_cover.tt <http://page_cover.tt>
>
> Captura de pantalla 2024-05-09 170002.png
>
> In the sla_report.tt <http://sla_report.tt> on line 48 the text 'SLA Report'
>
> /usr/share/thruk/plugins/plugins-available/reports2/templates/reports/sla_report.tt <http://sla_report.tt> linea 48
>
> Captura de pantalla 2024-05-09 165800.png
>
> In the css.tt <http://css.tt> eliminate line 57 and 59 removing the blue color
>
>  /usr/share/thruk/plugins/plugins-available/reports2/templates/reports/style/css.tt <http://css.tt/> linea 57 y 59
>
> Captura de pantalla 2024-05-09 170343.png
>
> modified custom.tt <http://custom.tt> as what I require:
> Captura de pantalla 2024-05-09 172003.png
> Captura de pantalla 2024-05-09 172145.png
> I know that for images you should use this code in custom.tt <http://custom.tt> either using base64 oh putting the image
>
> <script language="javascript" type="text/javascript"> /* add complete new elements by javascript, ex.: company logo on page cover */ jQuery(document).ready(function() { jQuery('<img src="http://localhost/nagios/images/logos/footer_sla_report.png <http://ng.levecs.corp/nagios/images/logos/footer_sla_report.png>">').insertBefore('DIV.footer');
>
> jQuery('<img src="data:image/png;base64,...">').insertBefore('DIV.page.cover DIV.titletext');
>
>  }); </script>
>
>
> but when trying to pass the configurations directly in the custom.tt <http://custom.tt> file, the following happens:
>
> Captura de pantalla 2024-05-09 174220.png
>
> I hope you can help me, thank you
>
>
> I attach the custom.tt <http://custom.tt> file with the modifications I made
>
> --
> You received this message because you are subscribed to the Google Groups "Thruk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to thruk+un...@googlegroups.com <mailto:thruk+un...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/thruk/913ceccd-b0e7-4187-9ce6-ca8b4ed50696n%40googlegroups.com <https://groups.google.com/d/msgid/thruk/913ceccd-b0e7-4187-9ce6-ca8b4ed50696n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages