Nectar Plugin & HTML issue

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Nectar Plugin & HTML issue

Post by smlick »

I tried Nectar, easy to setup and very useful plugin, but I have a problem....................when I do a preview from "Nectar --> Report Edit" I see the page correctly (HTML) but when I send report by E-mail arrives without HTML (plain text).

I tried to view them with Outlook, and also Thunderbird (the HTML view is enabled).....same issue.

Any idea???

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Re: Nectar Plugin & HTML issue

Post by smlick »

To understand better the issue see the attached image with preview and relative email.

Regards
Alessio
Attachments
email.JPG
email.JPG (161.35 KiB) Viewed 5087 times
preview.JPG
preview.JPG (134.52 KiB) Viewed 5087 times
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Nectar Plugin & HTML issue

Post by gandalf »

Please show report details for that. Are you using a custom format? If yes, please attach
R.
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Re: Nectar Plugin & HTML issue

Post by smlick »

The one you see in the image is one of the custom template embedded with Nectar plugin.
I tried also with other custom template made by me and in preview mode is always perfect but when I send report by email the HTML disappear (except for graph that are displaied correctly).
I see an old post closed about nectar I see mcutting with a similar issue http://forums.cacti.net/viewtopic.php?p=181664 but no solution in topic.

I use last Nectar version V.035a.

Regards
Alessio
Attachments
cacti_group.zip
(692 Bytes) Downloaded 197 times
Last edited by smlick on Mon May 28, 2012 4:20 am, edited 1 time in total.
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Re: Nectar Plugin & HTML issue

Post by smlick »

No idea?
If you need other infos please ask me!

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
trungmv
Cacti User
Posts: 87
Joined: Wed Feb 15, 2012 10:32 pm

Re: Nectar Plugin & HTML issue

Post by trungmv »

Hi all,

I have same issue

Any one can help?

Regards,
Tryb3
Posts: 8
Joined: Fri Aug 23, 2013 5:26 am
Location: Paris, France

Re: Nectar Plugin & HTML issue

Post by Tryb3 »

Same issue . Could we have an hint to resolve this ?

EDIT : 18/09/2013 17:30

Just figured out the pb :

In the mail the css are written like this :

Code: Select all

		report_table {
			background-color:#F9F9F9;
			border:0;
			width:100%;
			border:3px outset #CCCCCC;
			padding:4px;
		}
		title_row {
			background-color:#EAEAEA;
			border:2px double #CCCCCC;
			padding:3px;
		}
		title {
			background-color:#EAEAEA;
			font-size:16pt;
			text-align:left;
			border:2px double #CCCCCC;
			padding:3px;
		}
It's missing a "." (dot) before each class name (it's ".title" and not "title"), or it's not parsed as a class style, but a standard html tag.
The conversion preview >> mail is done via a javascript. i'm currently working on fixing the issue.
I will post a fix for the style-handling in few days.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Nectar Plugin & HTML issue

Post by gandalf »

I will happily accept any patches along with a short description how to reproduce
R.
trevorv
Posts: 2
Joined: Fri Sep 20, 2013 1:10 pm

Re: Nectar Plugin & HTML issue

Post by trevorv »

I'm on version 0.8.8b with Nectar version 0.35a. I'm able to use css fine as is given in the format files, however if I want to send the email to a gmail/google apps account (viewing from a web browser) I have to use inline css to get it to work. Not sure if this solution will help you as well, but it's worth a shot.
jcOveron
Posts: 1
Joined: Wed Jun 11, 2014 5:11 am

Re: Nectar Plugin & HTML issue

Post by jcOveron »

Hi
I am using Cacti with the following host information.

Cacti Version: 0.8.8b
Plugin Architecture: 3.1
Server Info: Linux 2.6.32-431.el6.x86_64
Web Server: Apache/2.2.15 (CentOS)
PHP Version: 5.3.3
Nectar Plugin Version: 0.35a

My Cacti is configure to send mail using SMTP. Nectar's preview works fine, but the report sent by mail is still missing the "." (dot) in the css body. If I change Cacti to send mail using PHP mail function, the report is send correctly by mail.

Am I missing a patch or something?

Many thanks in advance.
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Re: Nectar Plugin & HTML issue

Post by smlick »

No news about this issue?

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
thuck
Posts: 21
Joined: Mon Mar 09, 2009 6:13 pm

Re: Nectar Plugin & HTML issue

Post by thuck »

As a workaround, you can include a . before the . in the templates, like:

..report_table {
background-color:#F9F9F9;
align: center;
border:0;
width:100%;
}
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Re: Nectar Plugin & HTML issue

Post by smlick »

Tnx for your reply.
With this trick I'm able to fix only a part of the entire problem.
The image logo doesn't appear when the email arrive but I view it in the preview mode.
Also the entire format is not the same from preview to email.
Any other trick to apply?

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Re: Nectar Plugin & HTML issue

Post by smlick »

with an additional . before every . (.image_table, .report_table, .title_row, ecc.) I'm able to fix plus or minus every graphic problem.....now only the logo doesn't appear into the email.

Any idea

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
User avatar
smlick
Cacti User
Posts: 267
Joined: Tue May 20, 2008 4:09 am
Location: Italy, Rome

Re: Nectar Plugin & HTML issue

Post by smlick »

Some trick/workaround to get also visible the logo in the email?

Regards
Alessio
Cacti Version 0.8.8c production / 0.8.8c test W2008 -- Plugin:Weathermap - Monitor - CAMM 1.6.7 :) - Nectar - GPS Map
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests