Closed Bug 540464 Opened 14 years ago Closed 14 years ago

Show the current sheriff on tinderboxpushlog

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jrmuizel, Assigned: dbaron)

References

Details

Attachments

(2 files, 1 obsolete file)

The main reason I use tinderbox right now is to see who is sheriff. It would be great if we displayed the current sheriff on tinderboxpushlog. I put together a simple page that gets the current sheriff from the calendar. (http://people.mozilla.com/~jmuizelaar/sheriff/) It shouldn't be too hard to integrate this into tbpl.
This page no longer works and I have no idea why...
We should maybe just use the http api instead of using the jsapi.

i.e.
http://www.google.com/calendar/feeds/j6tkvqkuf9elual8l2tbuk2umk@group.calendar.google.com/public/full?orderby=starttime&sortorder=ascending&futureevents=true&singleevents=true&max-results=1

it looks like we can also use &alt=json-in-script or &alt=json
http://hg.mozilla.org/mozilla-central/rev/0af6ca3135ca referred to this bug instead of Bug 530550 as it should have

checkin message: "Jeff Muizelaar — Bug 540464. pixman: update to 7862f9b96e8e8456cc60852790c7f244a5e3425e This is a substantial cleanup of pixman and could break things."
(In reply to comment #0)
> I put together a
> simple page that gets the current sheriff from the calendar.
> (http://people.mozilla.com/~jmuizelaar/sheriff/)

Thanks!!

(In reply to comment #2)
> We should maybe just use the http api instead of using the jsapi.

What would be the advantage? The jsapi seems simpler to me.
(In reply to comment #4)
> (In reply to comment #0)
> > I put together a
> > simple page that gets the current sheriff from the calendar.
> > (http://people.mozilla.com/~jmuizelaar/sheriff/)
> 
> Thanks!!
> 
> (In reply to comment #2)
> > We should maybe just use the http api instead of using the jsapi.
> 
> What would be the advantage? The jsapi seems simpler to me.

The jsapi approach pulls in a bunch of extra js that we don't need and it seems more fragile. (It stopped working for me a little while ago).
Depends on: tbpl-server
I looked at how tinderbox did it and based this on that approach.

This creates a "Tree Info" popup next to the "Legend" popup.  It could eventually contain more information (like tree rules), but right now it just has Sheriff and Buildduty lines.  I also pulled the Timezone switcher up next to that, so the top looks like:

Legend   Tree Info   Timezone: local | MVT
Tree: Firefox | Firefox 3.6 | Firefox 3.5 | more...

I set it so it will update every hour as well, in case people leave TBPL open for days.
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Attachment #476847 - Flags: review?(mstange)
Oops, I forgot to remove these unneeded lines:
+      var treeInfo = $('#treeInfo');
+
Comment on attachment 476847 [details] [diff] [review]
show sheriff and buildduty in "Tree Info" popup next to Legend

Just some drive-by comments.

>+      var items = [
>+        {
>+          elem: document.getElementById("current-sheriff"),
>+          calendar: "http://www.google.com/calendar/feeds/j6tkvqkuf9elual8l2tbuk2umk%40group.calendar.google.com/public/full",
>+          fallback: "#developers",
>+        },
>+        {
>+          elem: document.getElementById("current-releng"),
>+          calendar: "http://www.google.com/calendar/feeds/aelh98g866kuc80d5nbfqo6u54%40group.calendar.google.com/public/full",
>+          fallback: "#build",
>+        },
>+      ];

Please drop the trailing commas.

>+        var date = new Date();
>+        var mst = new Date(Date.now() + date.getTimezoneOffset()*60000 +
>+                           Config.mvtTimezoneOffset*60*60*1000);

No need to declare a var for the single use. Also, add spaces around the operators. Factorizing the 60 * 1000 out would also make it clearer.

>+      var html = "";
>+      for (var i in items) {

Unused var html.

Also I’m not sure what markus will say, we don’t really have any real coding style regarding jQuery vs. standard dom methods.
Blocks: 595582
Another thing I noticed today: With the bar on top being only 2 lines of height, you can make it a little smaller.
Attachment #476863 - Flags: review?(mstange) → review+
Attachment #478272 - Flags: review?(arpad.borsos)
Attachment #478272 - Flags: review?(arpad.borsos) → review+
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: