nmidDynTree
Moderators: Developers, Moderators
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
nmidDynTree
This is the first release of the nmidDynTree plugin. This plugin replaces the default cacti tree with a ajax based JQuery based plugin.
Features of this release:
- Save selected Item in cookie
- Load sub-items on demand (ajax)
- Different icons can be added ( currently, only "header" and "host" are different )
- Supports multiple trees
- Supports default Cacti access
Compatibility: Cacti 0.8.7g with PIA 2.9.
This plugin comes with two files, the plugin itself and a replacement for the lib/html_tree.php file.
To install, download the zip and unpack it into the plugins dir. Enabling it as usual.
Then replace your html_tree.php file with the one on the same download page
You can download the plugin here: http://redmine.nmid-plugins.de/projects ... tree/files
Look at the screenshot of the replacement tree:
Features of this release:
- Save selected Item in cookie
- Load sub-items on demand (ajax)
- Different icons can be added ( currently, only "header" and "host" are different )
- Supports multiple trees
- Supports default Cacti access
Compatibility: Cacti 0.8.7g with PIA 2.9.
This plugin comes with two files, the plugin itself and a replacement for the lib/html_tree.php file.
To install, download the zip and unpack it into the plugins dir. Enabling it as usual.
Then replace your html_tree.php file with the one on the same download page
You can download the plugin here: http://redmine.nmid-plugins.de/projects ... tree/files
Look at the screenshot of the replacement tree:
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: nmidDynTree
I get those two errors:
The first one may be related to the commented line 502. If I uncomment it I get this error instead :
I've no idea why the error on line 617 as the include tree.php should provide the function.
Code: Select all
Undefined variable: dhtml_tree in /srv/http/cacti/lib/html_tree.php on line 504
Call to undefined function tree_tier() in /srv/http/cacti/lib/html_tree.php on line 617
Code: Select all
Undefined offset: 9 in /srv/http/cacti/lib/html_tree.php on line 726
Cedric Girard
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: nmidDynTree
Odd,
Going to invest this.
Replacing the html_tree.php with the original file will give you the old Cacti style back.
Going to invest this.
Replacing the html_tree.php with the original file will give you the old Cacti style back.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: nmidDynTree
Actually there is no include in that function. With those two additional lines at the beginning of create_dhtml_tree function, it works:X-dark wrote:I've no idea why the error on line 617 as the include tree.php should provide the function.
Code: Select all
global $colors, $config;
include_once($config["library_path"] . "/tree.php");
Code: Select all
Undefined variable: dhtml_tree in /srv/http/cacti/lib/html_tree.php on line 504
Undefined offset: 9 in /srv/http/cacti/lib/html_tree.php on line 728
Cedric Girard
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: nmidDynTree
Please use the attached files, that should fix these issues.
Edit: File removed, updates will be provided with a new version from the project page mentioned above.
Edit: File removed, updates will be provided with a new version from the project page mentioned above.
Last edited by phalek on Tue Aug 16, 2011 5:24 am, edited 1 time in total.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: nmidDynTree
OK. With this new version and this patch:
The only error left is:
Code: Select all
--- /tmp/html_tree.php 2011-08-16 12:04:16.000000000 +0200
+++ html_tree.php 2011-08-16 12:11:18.000000000 +0200
@@ -559,6 +559,10 @@
}
function create_dhtml_tree() {
+ global $colors, $config;
+
+ include_once($config["library_path"] . "/tree.php");
+
/* Record Start Time */
list($micro,$seconds) = split(" ", microtime());
$start = $seconds + $micro;
Code: Select all
Undefined offset: 9 in /srv/http/cacti/lib/html_tree.php on line 727
Cedric Girard
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: nmidDynTree
Ok, here's another file then, including your patch.
- Attachments
-
- html_tree.zip
- (12.61 KiB) Downloaded 300 times
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: nmidDynTree
Quite OK:
Code: Select all
--- /tmp/html_tree.php 2011-08-16 12:22:04.000000000 +0200
+++ /srv/http/cacti/lib/html_tree.php 2011-08-16 13:28:47.000000000 +0200
@@ -724,7 +724,7 @@
}
if ( $tier > 0 ) {
for ( $tierCount = $oldTier; $tierCount >= 0; $tierCount-- ) {
- if ( array_key_exists($i, $dhtml_tree) {
+ if ( array_key_exists($i, $dhtml_tree)) {
$dhtml_tree[$i] = $dhtml_tree[$i] . "</ul></li>\n";
}
}
Cedric Girard
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: nmidDynTree
Silly me
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: nmidDynTree
Sure, but only if you're having a mobile virtual cacti system on your android system ... ehm
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: nmidDynTree
Indeed, this may complicate the testing part.phalek wrote:Sure, but only if you're having a mobile virtual cacti system on your android system ... ehm
Cedric Girard
Re: nmidDynTree
Phalek:
I installed nmidDynTree, and it went well..just a small problem....the menu never loads; I just get the circuling timer that's all...anyideas ?
Thanks
LA
I installed nmidDynTree, and it went well..just a small problem....the menu never loads; I just get the circuling timer that's all...anyideas ?
Thanks
LA
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: nmidDynTree
It's an ajax call to the server, so it's actually calling the following URL to get the tree:
http://<server>/cacti/plugins/nmidDynTree/getTree.php
or
http://<server>/plugins/nmidDynTree/getTree.php
try these and check if you do get any data back.
http://<server>/cacti/plugins/nmidDynTree/getTree.php
or
http://<server>/plugins/nmidDynTree/getTree.php
try these and check if you do get any data back.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: nmidDynTree
Any update on this bug?phalek wrote:Just realized that it's not loading the tree partially but instead always loads the whole tree. I'm going to debug it and change that.
Cedric Girard
Who is online
Users browsing this forum: No registered users and 0 guests