Filter Option for Graph/Data Templates list and more

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

save me some trouble and post the full files. ;)

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Here are the full files for the previous extension
Reinhard
Attachments
graphs_items.php.gz
graphs_items.php
(3.11 KiB) Downloaded 348 times
inc_graph_items_filter_table.php.gz
inc_graph_items_table.php
(881 Bytes) Downloaded 307 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please find attached the updated files for graph_templates.php and data_templates.php. Now they will support highlighting. The are based on todays svn BRANCH revision 3410.
Reinhard
Attachments
data_templates.php.gz
(6.98 KiB) Downloaded 344 times
graph_templates.php.gz
(5.26 KiB) Downloaded 348 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness wrote:Yes, if you have the time, I have the beer.
As to the beer: I'm sitting here in front of mine. So "cheers" to you on the second Sunday in Advent.
There is also a request to add the functionality to the "Tree's" so that you could Delete, Move, etc. in one fell swoop. That's a little more involved.
Should it look like e.g. Device/Graph Template/Data Template? With checkboxes and Action Dropdown? Of course a filter option on top (and WITH highlighting)...
We also need to be able to Add Host's to a Tree just like we can Add Graphs today.
You have it already implemented in the current BRANCH; or do you talk about sth different?
Reinhard
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If you want to take a stab at Tree's. I would say, "Delete", and "Move/Reorder". Yes, the Devices bit is done. I'm going to crack mine in a few minutes.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Larry,
I did some tweaking around with the tree code. Main goal was to preserve the table structure (I did not want to fiddle around with the Graph Tree Display code).
Myself, I'm struggeling with those looooong editing displays. So I changed the UI to display only a single branch of the whole tree. So to dig into the tree, you will have to select the branches step by step (this is near to the behaviour on the graph pages, you'll have to click each "+" Sign to go deeper into the tree structure). As a hint, the number of items of each branch is displayed. By this approach, the displayed tables keep small, so you won't need a filter (filters as used in other lists won't help here).
The actual code is not cleaned up (some print statements are commented, only very few functions defined), because I'd love to have feedback first. Based on the actual code, I had to tweak a lot with parent tree id's and the like.
First, I have attached some screenshots of the new UI. Code follows with the next post.
Reinhard
Attachments
alphabetic ordering
<br />please notice the number of items displayed
alphabetic ordering
please notice the number of items displayed
alphabetic.png (24.46 KiB) Viewed 5339 times
manual ordering
<br />reordering keeps current page
<br />cancels goes one step upwards
manual ordering
reordering keeps current page
cancels goes one step upwards
manual.png (28.14 KiB) Viewed 5339 times
Main Entry, with filtering options
<br />Multiple delete is possible (as usual)
<br />Multiple duplicate is not (yet) implemented
Main Entry, with filtering options
Multiple delete is possible (as usual)
Multiple duplicate is not (yet) implemented
Graph-Tree.png (18.52 KiB) Viewed 5339 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Here are the next screenshots, now with "real" graphs on them
tree.php is also attached
Reinhard
Attachments
A Graph Tree with some Graphs on them
A Graph Tree with some Graphs on them
ping.png (27.53 KiB) Viewed 5338 times
A Graph Tree with some Traffic Graphs on them (copies, as usual, from Graph Management)
A Graph Tree with some Traffic Graphs on them (copies, as usual, from Graph Management)
traffic.png (37.64 KiB) Viewed 5338 times
tree.php.gz
tree.php
main code
(6.34 KiB) Downloaded 359 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The last bits of code:
lib/functions.php: only a single new line for the entry panel
lib/html_tree.php: a new function "grow_edit_graph_tree_tier", copied from "grow_edit_graph_tree" and modified (rest is unchanged, at least as I remember)
include/html/inc_tree_filter_table.php: needed for the filter of the entry panel (as usual)
Reinhard

PS
Another approach to keep display lists small would perhaps be to display header only in the tree structure, but in contrast to my actual approach the header display of the whole tree.
This would require an additional "Edit List" tag per tree header, that would allow editing of the items list of that very tree header (so graphs/hosts are only displayed when explicitely requested). I hope this is clear enough to understand; my lack of english hurts me at this point...
Attachments
inc_tree_filter_table.php.gz
filter code
(353 Bytes) Downloaded 332 times
html_tree.php.gz
html_tree code with a single new function
(7.6 KiB) Downloaded 339 times
functions.php.gz
functions.php with a single line added
(14.58 KiB) Downloaded 314 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

A last screenshot to show a deeper tree structure
Reinhard
Attachments
tree-structure.png
tree-structure.png (35.16 KiB) Viewed 5335 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests