Google gadget for embedded queries

darren's Avatar

darren

23 Nov, 2008 07:48 PM

In other projects I have used wiki macros (URLGrab) to embed bugzilla queries in wiki pages for collecting various bits about a project together in one place. It is extremely useful (to me anyway). That approach is a bit of a hack as it involves screen scraping and regexes to get only the table, etc, etc.

Since Lighthouse has an API, what I would love to see is a google gadget that I can use on my iGoogle page or any of my Google Sites (which I use for my application site). This gadget would allow the user to specify a ticket query and limit the number of tickets to be displayed.

Sounds great right? Come on, you know you want to!

  1. Support Staff 1 Posted by Tiger Team on 23 Nov, 2008 08:22 PM

    Tiger Team's Avatar

    Is your lighthouse project public or open source?

  2. 2 Posted by darren on 23 Nov, 2008 09:21 PM

    darren's Avatar

    Open Source... why, is there already such a thing available?

  3. Support Staff 3 Posted by Tiger Team on 24 Nov, 2008 12:15 AM

    Tiger Team's Avatar

    Yes, sorta.

    http://hoth.entp.com/2008/10/7/add-lighthouse-tickets-to-your-github-wiki-4

    That shows you the list of tickets open. You need to set up a read-only token in project settings. Probably wouldn't be hard to have it query a ticket bin instead.

  4. 4 Posted by darren on 24 Nov, 2008 05:56 AM

    darren's Avatar

    So I just set up a github account and tried adding the above.

    http://github.com/dvhart/braindump/wikis/home

    The badge doesn't show up, but I don't see any kind of an error either. I presume my account is "deathmarch" and I setup the token as per the instructions. I don't see anything that specifies the project, unless the token/key does that (I suspect it does).

    Any tips on what I might be doing wrong?

    -- Darren

  5. Support Staff 5 Posted by Tiger Team on 24 Nov, 2008 06:05 AM

    Tiger Team's Avatar

    Yeah, you didn't set a token on the project. Make sure the token is good. The javascript requests the token and gets back a projectid in the JSON.

    In your "create token" sidebar, you'll notice a projects dropdown.

  6. Support Staff 6 Posted by Tiger Team on 24 Nov, 2008 06:06 AM

    Tiger Team's Avatar

    Set the project and make it readonly.

  7. 7 Posted by Rick on 24 Nov, 2008 06:08 AM

    Rick's Avatar

    You can test your tokens out by going to your project page and adding /tickets.json?_token=TOKEN. Your project list should look like this.

    The badge should be updated to accept a project parameter though.

  8. Support Staff 8 Posted by Tiger Team on 24 Nov, 2008 06:12 AM

    Tiger Team's Avatar

    Here's the JSON for your token: http://deathmarch.lighthouseapp.com/tokens/33905b14145f99cf2430c6bd1d2988d0c38f7330?token=33905b14145f99cf2430c6bd1d2988d0c38f7330&format=json

    {"token": {"project_id": null, "token": "33905b14145f99cf2430c6bd1d2988d0c38f7330", "read_only": true, "note": "github", "user_id": 38526, "created_at": "2008-11-23T21:42:37-08:00"}}
    

    You didn't set a project on the token.

    The token works; here's the JSON I got out of it:

    {"tickets": [{"ticket": {"permalink": "task-xml-file-corruption", "updated_at": "2008-11-23T11:14:19-08:00", "project_id": 20417, "body_html": "<div><p>Some yet-unknown circumstance will cause braindump to fail to\ncomplete the write-out of the task xml files. The application will\nfail to load with a SAX error. Manually adding:</p>\n<p>to the end of each corrupt file will allow the application to\nstart up again.</p></div>", "title": "task xml file corruption", "number": 1, "body": "Some yet-unknown circumstance will cause braindump to fail to complete the write-out of the task xml files.  The application will fail to load with a SAX error.  Manually adding:\r\n\r\n</task> \r\n\r\nto the end of each corrupt file will allow the application to start up again.", "creator_id": 38526, "tag": "defect", "priority": 1, "attachments_count": 0, "closed": false, "user_id": 38526, "assigned_user_id": 38526, "state": "open", "milestone_id": null, "created_at": "2008-11-21T19:49:27-08:00"}}]}
    
  9. 9 Posted by darren on 24 Nov, 2008 06:19 AM

    darren's Avatar

    I've created the token twice now, and each time the projects drop down only has one option: "All Projects".

    -- Darren

  10. 10 Posted by darren on 24 Nov, 2008 06:28 AM

    darren's Avatar

    So when creating new tickets, I don't actually have a Projects drop-down box.

    http://dvhart.com/darren/no-project-dropdown.png

    After creating these tokens, they don't show up in the right panel when I click on My Profile. They only appeared after I went to edit one directly from one of the other replies I got to this post. After I deleted one of them, it still shows up in the panel, and gives me an error when I click on it.

  11. 11 Posted by darren on 24 Nov, 2008 06:29 AM

    darren's Avatar

    On Sun, Nov 23, 2008 at 10:19 PM, Darren Hart [email blocked] wrote:

    I've created the token twice now, and each time the projects drop down only has one option: "All Projects".

    Apologies, I got this wrong. I meant "All Accounts", I don't even see a Projects drop down.

    -- Darren

  12. 12 Posted by darren on 24 Nov, 2008 06:37 AM

    darren's Avatar

    With the token set to the BrainDump project and marked ReadOnly and the GitHub wiki updated to this token, the wiki page is still blank.

    http://github.com/dvhart/braindump/wikis/home

    -- Darren

  13. Support Staff 13 Posted by Tiger Team on 24 Nov, 2008 06:53 AM

    Tiger Team's Avatar

    rick i bet it doesn't give you a projects option when you only have on project.

    darren, I totally see your list of projects there. Maybe me checking the token authed me.

  14. 14 Posted by Justin Palmer on 24 Nov, 2008 11:00 PM

    Justin Palmer's Avatar

    I see the tickets listed on the wiki. Can we assume this is resolved?

  15. 15 Posted by darren on 24 Nov, 2008 11:34 PM

    darren's Avatar

    You do? I just reloaded the wiki page (http://github.com/dvhart/braindump/wikis) and all I see is:


    Home

    Welcome to the braindump wiki!

    Is this possibly a browser compatibility issue? I'm running Firefox 3.0.4 on Ubuntu 8.10 (Intrepid).

  16. 16 Posted by Justin Palmer on 24 Nov, 2008 11:54 PM

    Justin Palmer's Avatar

    Here is what I see - http://img.skitch.com/20081124-qg6tmesrk77b95a6rcsau3m33q.png

    I noticed there is a stray console.log in there. What browser are you using, it could be throwing an error on that line? I'll remove the console line in any event.

  17. 17 Posted by darren on 24 Nov, 2008 11:58 PM

    darren's Avatar

    I'm running Firefox 3.0.4 on Ubuntu 8.10. What did you use?

    -- Darren

  18. 18 Posted by Nicole on 09 Dec, 2008 05:16 PM

    Nicole's Avatar

    Is this working for you now? Let us know if you have any more questions.

  19. 19 Posted by darren on 09 Dec, 2008 10:19 PM

    darren's Avatar

    It is not. I still see exactly the same thing as I described is comment #15.

  20. 20 Posted by System on 09 Dec, 2008 11:43 PM

    System's Avatar

    This discussion was assigned to Jeremy McAnally, on ticket 68.

  21. 21 Posted by Justin Palmer on 09 Dec, 2008 11:44 PM

    Justin Palmer's Avatar

    I've created a ticket for this. It's kind of a strange bug because some of us here at the office can see the tickets and others can't. We think it has something to do with API auth, but are looking into it.

  22. brandi closed this discussion on 29 Jun, 2012 10:05 PM.

Discussions are closed to public comments.
If you need help with Lighthouse please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac