Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[PATCH] INFOURL and OVERLIBGRAPH enhancements

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
llow
Cacti User


Joined: 05 Oct 2007
Posts: 88

PostPosted: Sat Dec 01, 2007 1:15 am    Post subject: [PATCH] INFOURL and OVERLIBGRAPH enhancements Reply with quote

Patch adds the following features:

INFOURL for LINKs can be specified as "INFOURL url url" where the first url will be used for the input arrow and the second url for the output. "INFOURL url" will use the same url for both.

OVERLIBGRAPH for LINKs can be specified as "OVERLIBGRAPH url url" where the first image url will be used for the input overlib and the second url for the output. "OVERLIBGRAPH url" will use the same url for both.

OVERLIBGRAPH for NODEs can be specified as "OVERLIBGRAPH url ..." specifying as many image urls as you want. The images will be placed below one another.

I am thinking of implementing the following other enhancements:
OVERLIBGRAPHSIZE x y so that the images are scaled appropriately.
INOVERLIBGRAPH url ... so you can have more than one overlib image (replace changes made by my patch)
OUTOVERLIBGRAPH url ...
INNOTES notes text
OUTNOTES notes text
INOVERLIBCAPTION text
OUTOVERLIBCAPTION text



weathermap-infourloverlib-inout.patch
 Description:

Download
 Filename:  weathermap-infourloverlib-inout.patch
 Filesize:  6.46 KB
 Downloaded:  75 Time(s)

Back to top
llow
Cacti User


Joined: 05 Oct 2007
Posts: 88

PostPosted: Sat Dec 01, 2007 1:17 am    Post subject: Reply with quote

I am also looking at making the NODE background change in color depending on a TARGET.
Back to top
llow
Cacti User


Joined: 05 Oct 2007
Posts: 88

PostPosted: Sat Dec 01, 2007 2:10 am    Post subject: Reply with quote

Updated patch, if you have INFOURL or OVERLIBGRAPH in DEFAULT they will not be appended to the array if set specifically.


weathermap-infourloverlib-inout.patch
 Description:

Download
 Filename:  weathermap-infourloverlib-inout.patch
 Filesize:  6.65 KB
 Downloaded:  69 Time(s)

Back to top
llow
Cacti User


Joined: 05 Oct 2007
Posts: 88

PostPosted: Sat Dec 01, 2007 3:16 am    Post subject: Reply with quote

llow wrote:
I am also looking at making the NODE background change in color depending on a TARGET.

Nevermind I guess that is implemented ;P

I am also looking to modify VIA to be able to be relatively assigned as well.
Back to top
llow
Cacti User


Joined: 05 Oct 2007
Posts: 88

PostPosted: Sat Dec 01, 2007 3:59 am    Post subject: Reply with quote

Patch adds "VIA node x y" with remaining support of "VIA x y". This allows for relative VIA points based on a node position.

This is done during the Draw and not during ReadConfig as I saw no need to iterate through the links and their vias before the Draw.

The line numbers may be off as I have other patch work I am doing.



weathermap-relativevia.patch
 Description:

Download
 Filename:  weathermap-relativevia.patch
 Filesize:  1.38 KB
 Downloaded:  67 Time(s)

Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Sat Dec 01, 2007 6:29 am    Post subject: Reply with quote

llow wrote:
I am also looking at making the NODE background change in color depending on a TARGET.


Err, it does. Since 0.9 (or maybe 0.8?)
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Sat Dec 01, 2007 6:42 am    Post subject: Reply with quote

Thanks!

You didn't say which version the patches are against, but I've also made a few small changes since 0.94 came out... 0.941 will be out this weekend and then I'll incorporate most of these changes (IN/OUT specific stuff, relative VIAs) in after that. I don't mind writing the code - incorporating patches always seems a bit fiddly - I always end up just cutting & pasting anyway An appropriate WriteConfig section for each new syntax/keyword is needed too, so that the editor doesn't break it all.

Not sure about the image scaling one though - is that being done just by changing the width/height in the img tag? Weathermap doesn't know the aspect ratio of the image, so I guess it must be.

Relative VIA points is interesting, but I think it might conflict with the stuff already in the editor that rescales/rotates VIA points relative to the two nodes, when a node is moved... Once a VIA is positioned, when the node is moved, the editor will try and preserve the shape of the curved link. I suppose a relative-positioned VIA should take precedence. This will be useful once the straight-angled VIA code is finished.

You're right about the iteration. It's only relevant for NODEs relative to NODEs, because there can be a loop of ALL relatively-positioned nodes, then.
Back to top
llow
Cacti User


Joined: 05 Oct 2007
Posts: 88

PostPosted: Sat Dec 01, 2007 12:06 pm    Post subject: Reply with quote

The patches where against 0.9.4.

As far as the image scaling, it is not in either patch but I was looking at doing it in the img tag. The main use for it would be to scale down the image of other maps when linking between them. What does the OVERLIBHEIGHT and OVERLIBWIDTH really do? I can't get my head around it.
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Sat Dec 01, 2007 12:32 pm    Post subject: Reply with quote

llow wrote:
The patches where against 0.9.4.

As far as the image scaling, it is not in either patch but I was looking at doing it in the img tag. The main use for it would be to scale down the image of other maps when linking between them. What does the OVERLIBHEIGHT and OVERLIBWIDTH really do? I can't get my head around it.


They are used to figure out if the overlibgraph has to be to the left or to the right of the mouse pointer (so that the image doesn't go off the right side of the browser window so much).

OK - I usually just use the thumbnail images from the output directory for the scaling thing, but I can see the use of it
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group