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    


graph tree

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Development
Author Message
johnrembo
Cacti User


Joined: 24 Apr 2006
Posts: 198

PostPosted: Tue Feb 12, 2008 9:00 am    Post subject: graph tree Reply with quote

hello,

author of cacti's graph tree architecture must be a genius or an idiot(don't take it personaly), but not in between

what is the easiest way of getting whole graph tree list into simple php array with local_graph_id's at the deepest level?

thank you
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Tue Feb 12, 2008 8:50 pm    Post subject: Reply with quote

I'ts a piece of work, and created before my time. Look into, hmm, let me check, lib/html_tree.php for the function "create_dhtml_tree". That will contain the nugget. However, output is structured for the tree product. I will be 100% ripping it out in the next release of Cacti.

If you would like to collaborate on that development, it will likely start the last two weeks of March.

TheWitness
Back to top
Howie
Cacti Guru User


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

PostPosted: Wed Feb 13, 2008 3:35 am    Post subject: Reply with quote

TheWitness wrote:
I'ts a piece of work, and created before my time. Look into, hmm, let me check, lib/html_tree.php for the function "create_dhtml_tree". That will contain the nugget. However, output is structured for the tree product. I will be 100% ripping it out in the next release of Cacti.

If you would like to collaborate on that development, it will likely start the last two weeks of March.

TheWitness


Please add in some support for external tree item rendering too (plugin types)... I've started writing this twice now, only to have Cacti development overtake me. The basics were really simple (stop using implicit type_ids, start using the already-existing tree types in a new db field), but getting into all the corners slowed me down enough that I lost the race.

johnrembo, if you just want local_graph_ids and you don't care about their position then the query is a pretty simple join between graph_tree and graph_tree_item... anything with a non-zero local_graph_id in graph_tree_item is a graph. Just pull em out.
Back to top
johnrembo
Cacti User


Joined: 24 Apr 2006
Posts: 198

PostPosted: Wed Feb 13, 2008 3:47 am    Post subject: Reply with quote

Howie wrote:
TheWitness wrote:
I'ts a piece of work, and created before my time. Look into, hmm, let me check, lib/html_tree.php for the function "create_dhtml_tree". That will contain the nugget. However, output is structured for the tree product. I will be 100% ripping it out in the next release of Cacti.

If you would like to collaborate on that development, it will likely start the last two weeks of March.

TheWitness


Please add in some support for external tree item rendering too (plugin types)... I've started writing this twice now, only to have Cacti development overtake me. The basics were really simple (stop using implicit type_ids, start using the already-existing tree types in a new db field), but getting into all the corners slowed me down enough that I lost the race.

johnrembo, if you just want local_graph_ids and you don't care about their position then the query is a pretty simple join between graph_tree and graph_tree_item... anything with a non-zero local_graph_id in graph_tree_item is a graph. Just pull em out.


it took me a while to understand that logics ^^^
the biggest fun is playing with their position on the tree.

TheWitness, I just was in the hope that you have allready rewrote this part of code. Anyway, it's not a big problem. If i'll succed - i'll share my work.

ps: don't invent a bicycle: http://www.extjs.com
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9671
Location: MI, USA

PostPosted: Wed Feb 13, 2008 4:50 am    Post subject: Reply with quote

johnrembo wrote:
ps: don't invent a bicycle: http://www.extjs.com


Yea, but it's so much fun. Bit of a challenge. I do like his approach. Very good API.

Larry
Back to top
Howie
Cacti Guru User


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

PostPosted: Wed Feb 13, 2008 6:04 am    Post subject: Reply with quote

The new weathermap editor will likely be done with extjs, if I ever find the time.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Development All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group