August 2007
Monthly Archive
Monthly Archive
Posted by rhelmer on 31 Aug 2007 | Tagged as: mozilla
Just a quick follow-up on my earlier post about Tinderbox’s new JSON output mode – I’ve hacked up a quick working example of the waterfall page in Javascript. You can view the source to see how you could extract any of this info from Tinderbox.
Here’s a screenshot in case it stops working
You can click that image to get to the live version. I used a bunch of code, images and ideas from Ted Mielczarek’s better-written example. In particular, the idea to parse out the OS and purpose of each column, and display it more directly, and I took some bits of code that looked better than the way I was doing things.
We’re already discussing changes that will break these pages, so don’t get too cozy with them. I am pretty excited to have something to show for this so quickly though, especially having spent very little time so far.
I am anxious to start trying to improve the experience for tinderbox users (in particular by taking use cases into account), which for me is the whole point of this exercise. If you have ideas for better UI for displaying the kind of information that developers, testers and other Tinderbox users need, this is a great way to mock up a real-life example, so have at it!
Posted by rhelmer on 29 Aug 2007 | Tagged as: mozilla
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.