Asynchronous JavaScript + XML (AJAX) support

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
sharpone
Posts: 12
Joined: Fri May 06, 2005 6:15 pm

Asynchronous JavaScript + XML (AJAX) support

Post by sharpone »

Has anyone thought about porting cacti to implement ajax? Losing all the refreshes whenever adding, changing, the installation would be wonderful.

Information on ajax:
http://www.adaptivepath.com/publication ... 000385.php
mobbylin
Posts: 5
Joined: Wed Jul 27, 2005 2:57 am

Post by mobbylin »

I hope someone can put this into "feature".

MC Lin
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

For the purpose of????

Ian and I are working on some interesting interface issues in 0.9.0, but we have yet to find a true use for AJAX. Although, if we do find a use for it, we will probably use it. :) It's pretty easy to use and implement.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Possible uses (within current form of Cacti):

- Search boxes on Device, Data Sources, Graph Management pages
- Additional search box on Graphs - List View
- Possibly as a search within graph creation page

Other uses (would require rework of Cacti):

- Eliminating full page refreshes when selecting from tree view
- Eliminating page refreshes when refreshing interfaces of devices
- Eliminating page refreshes when adding graphs - Tree Item Type select would only refresh specific area.
- Dynamic select field when adding hosts to specific tree

This is by far the easiest script I've found for incorporating a simple search: http://blog.bitflux.ch/wiki/LiveSearch
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
sharpone
Posts: 12
Joined: Fri May 06, 2005 6:15 pm

Post by sharpone »

I like those feature ideas Linegod, I hadn't thought of the search features. One thing that I would like to see (and I suppose this isn't so much an Ajax thing as it is a plain javascript thing) is the ability to reorder items in the graph tree without refreshing the screen every time you click the up arrow. It is fine for a few graphs but when you have a tree that grows well beyond the size of the screen, it is irritating to scroll the screen every time to move a graph up or down one position.

I don't know if anyone has used Netsuite (a webbased CRM app) but they have a similar feature to what I am suggesting. Each item in a list has a little bar on it which you can grab with the mouse pointer and simply drag the item to its new location. No screen redraws, no manually clicking an item up through the list. Pretty slick.

My development skills are lacking, but I would be happy to try and help out where I can.
User avatar
psyber
Cacti User
Posts: 84
Joined: Tue Aug 02, 2005 7:18 pm

Post by psyber »

I just finished an app using scriptaculous http://script.aculo.us/ which uses the prototype.js libraries and I have to say it cut down my development time immensly. The librarys are very easy to use and somewhat well documented. scriptaculous is geared mainly for rails but I had no problems using their examples to produce nifty effects in perl. Its fairly mature, supports multiple browsers and has a very useable base of components; autocomplete, in place editing, drag and drop, sortables, and a ton of visual effects. If your not already using it or prototype you should have a look. I think there is already a php class for easy access to the prototype functions. Best thing of all I only had to write a couple of javascript functions and I don't have to support the main libraries.

~p
User avatar
psyber
Cacti User
Posts: 84
Joined: Tue Aug 02, 2005 7:18 pm

Post by psyber »

This took about 20 min to work up as simple html. To actually do it in cacti it will probably take more because you'll have to dig around to find all the table bits, but its certainly do-able.
This is the sidebar with hideable elements (all divs). To test unzip and serve up in the root forlder of your webserver. You could do something similar with the tabs. The javascript libraries have all the nifty web2.0 stuff packed in them so you could use them to do inline editing or text completion or drag and drop or whatever. If there is interest in this I'd be happy to help out with the tweaks. (my guess is your already working on it :wink: )
Attachments
hide test.zip
(38.36 KiB) Downloaded 287 times
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests