Looking to alter jquery, possible to get full sources?

21 views
Skip to first unread message

Haioken

unread,
May 13, 2012, 11:21:56 PM5/13/12
to collectd-...@googlegroups.com
Hi!

I've been asked to modify the collectd-web interface for use in-house at our business. The first modification I need to perform is the ability to hold timespan, start and end times between plugin views. I've modified the perl scripts to reflect these changes, and added a couple of functions to the base.js file in order to achieve this.
I've created a function "update_url" which performs the function of build_url (And supercedes it in our case), as well as allowing existing parameters to be overwritten.
I've created another function "update_plugin_menu" called from ts-item.click to update the plugin menu list and tack on a start time/date, end time/date and timespan.

Slight modifications in perl scripts to action_show_host and action_show_host_json to allow these items to be forwarded.

The issue that I'm having is the routines in base.js all seem related to creating a graph from server_now() backward, with no option for end and start times. The routines that I'm after appear to be in the jQuery minified file "jquery-ui-1.8.custom.min.js". I've tried expanding this out with various indent programs etc, but the variable definitions etc are all 'screwed' due to the minify process. Is the unaltered source to this file available?

I'm more than happy to submit back any changes I've made when the routines are all operating as expected.

Kind Regards,

Hayden Katz.

Kenneth Belitzky

unread,
May 14, 2012, 8:58:17 PM5/14/12
to collectd-...@googlegroups.com
Hi Hayden! I'm pretty amazed on what people are doing to this frontend, in a good way obviously!! ;)

for working with start and end dates there is no need to breakdown query-ui cuz its just query code with just less modules ... its not a good thing to touch on that hehehe. 
I use start and end dates very much. the file to look for a reference is graph-menu.js. specially the zoom_graph function. 
basic pseudocode would be:
  • get url parameters
  • if start and end parameters are present, use them as a starting point
  • modify start and end parameters as desired
  • rebuild url with this new params (remember to use print_date on build_url)
hope this helps. any question is welcome and willing to see your new code contribution soon ;) ... feel free to pull request it when its ready!!! 

Best regards,
Kenny
Reply all
Reply to author
Forward
0 new messages