Skip to content

pljones/jamulus-historytool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Jamulus History Tool

This comprises two scripts:

  • A PHP script to parse the Jamulus log file and emit it as a JSON response
  • A JS script to parse the JSON response and emit an SVG DOM node

This replaces the History Graph that used to be part of the Jamulus server itself.

Dependencies

  • jQuery Timer by Matt Schmidt

  • jQuery (1.6.1) and jQueryUI (1.8.13) themselves These are pulled down from the http://ajax.googleapis.com/ajax/libs server, so "should just work".

Configuration

Apache HTTPD

I have my Apache HTTPD configured to find php files in all the right places... so I tend to leave ".php" off names when invoking them. If the call fails, either edit the js or change your Apache config.

PHP

You will need to specify the server-side location of your Jamulus log. This all works only if you are running the webserver (including the PHP) on a box that has access to the Jamulus log. Right up at the top of the script, you'll find:

  • $jamulus_log = "/opt/Jamulus/log/Jamulus.log";

Change as required.

The script is currently rather flexible (I'm trusting...) and allows the caller to specify the number of days required and the max lines (or the number of lines plus a flag that can be used to have the lines from the start). You may want to remove some of this.

Javascript

js/history_controller.js is a jQuery controller that does two main things:

  • find all the "interesting" bits of index.html
  • runs the timed updates to the graph.

So if you want to change index.html, you will need to update the jQuery, too.

One of the most likely bits is the number of days history to show. The reference to that in the html is now linked to the value in the javascript.

Layout

You should have the js and php directories as subdirectories of the directory index.html lives in:

.../index.html
.../js/...
.../php/...

index.html pulls the js files in on that basis and js/history_controller.js calls the php script on that basis. If you want to change things, you'll need to update both.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published