Tinderbox JSON output

Thanks to justdave for getting our Tinderbox server installation up to date!

One of the new features I'd like to highlight is a quick&dirty JSON output format.

This is different from all of the existing Tinderbox modes (e.g. quickparse) in that it's a dump of the internal data structure that Tinderbox uses to build the waterfall output. This means two things:

  1. it's fairly messy
  2. it's 100% complete

#1 we can deal with by cleaning up Tinderbox itself (this came from a proposal by cls, which I initially disagreed with but now see the point of).

#2 means that anything you can see on the waterfall page, even going back in time, is accessible.

Hopefully that will make this a good choice for doing things like creating alternatives to the waterfall display and any Tinderbox data mining.

A word of warning - the JSON output will change, as Tinderbox itself changes (and is hopefully cleaned up). This is a good thing though, as this data structure is pretty funky as it stands.

Here's the cached version, which is what you'll want to use most of the time:

http://tinderbox.mozilla.org/Firefox/json.js

This should be updated every time Tinderbox receives an update from a builder. It contains an object named "tinderbox_data" with a ton of data in it. For example, here is how you can pull the latest build status:

<script src="http://tinderbox.mozilla.org/Firefox/json.js"></script><script>for each (builder in tinderbox_data.build_table[0]) {   if (builder.buildname != undefined) {     document.write('build name: ' + builder.buildname);   }</script>

We're working on enabling cross-site XMLHttpRequest (bug 394207), so I'll give a more AJAXy example next time. I think that using XMLHttpRequest is going to be the preferred way to access this data, not only because you can build slicker UIs, but you can take advantage of the "If-Modified-Since" header to only pull data as-needed, as the JSON file is rather large.

links

social