Return-Path: X-Original-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3B072DBB9 for ; Tue, 19 Jun 2012 10:33:16 +0000 (UTC) Received: (qmail 2133 invoked by uid 500); 19 Jun 2012 10:33:16 -0000 Delivered-To: apmail-incubator-bloodhound-commits-archive@incubator.apache.org Received: (qmail 2100 invoked by uid 500); 19 Jun 2012 10:33:15 -0000 Mailing-List: contact bloodhound-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-commits@incubator.apache.org Received: (qmail 2073 invoked by uid 99); 19 Jun 2012 10:33:14 -0000 Received: from bloodhound-vm.apache.org (HELO bloodhound-vm) (140.211.11.32) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 10:33:14 +0000 Received: from bloodhound-vm.apache.org (localhost [127.0.0.1]) by bloodhound-vm (Postfix) with ESMTP id 30DB280902; Tue, 19 Jun 2012 10:33:13 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit From: "Apache Bloodhound" X-Trac-Version: 0.13dev-r10952 Cc: bloodhound-commits@incubator.apache.org Auto-Submitted: auto-generated X-Mailer: Trac 0.13dev-r10952, by Edgewall Software X-Trac-Project: Apache Bloodhound Date: Tue, 19 Jun 2012 10:33:12 -0000 Reply-To: bloodhound-dev@incubator.apache.org X-URL: https://issues.apache.org/bloodhound/ Subject: Re: [Apache Bloodhound] #93: Converting dashboard views to new template X-Trac-Ticket-URL: https://issues.apache.org/bloodhound/ticket/93#comment:24 Message-ID: <067.3463dce1a22f2cf4a7c6110f2e51ea54@incubator.apache.org> References: <052.1fe69447634810388b6a932d53ee60d3@incubator.apache.org> X-Trac-Ticket-ID: 93 In-Reply-To: <052.1fe69447634810388b6a932d53ee60d3@incubator.apache.org> #93: Converting dashboard views to new template --------------------------+---------------------- Reporter: gjm | Owner: olemis Type: enhancement | Status: accepted Priority: major | Milestone: Component: dashboard | Version: Resolution: | Keywords: --------------------------+---------------------- Comment (by gjm): Replying to [comment:23 olemis]: > Replying to [comment:21 gjm]: > > As a quick hack, I have just been trying the following to modify the links provided by the {{{TicketFieldValuesWidget}}} for lists of milestones so that they go direct to the relevant page instead of the query. > > > > Though I think it will be better this way ... > [snip] > You know , something like that . The idea is avoid calling `item_link` inside `dash_item_link` . The `if` statement and associated check should also be redundant . Hence that way it should be more efficient . Further enhancements still possible ''';)''' Possibly, although one of the {{{item_link}}} calls was for the empty {{{item[0]}}} and so I was providing the query link for that. Of course, that might be a surprise to be using a different view. The redirect to the roadmap in the case of {{{path/to/env/milestone/}}} is not particularly helpful here. It feels like we should have some kind of milestone display for tickets that are not in any milestone though. Perhaps we can provide such views on {{{path/to/env/dashboard/milestone/}}} somehow. Also, it might be worth providing a dictionary with the dashboard links so that we do not need to guarantee that the links are always of the form {{{path/to/env/fieldnm/item[0]}}} as the above suggests. We could use something like: {{{ #!python DASH_ITEM_HREF_MAP = {'milestone': ('dashboard','milestone',)} }}} which could be translated to a path with: {{{ #!python def dash_item_link(item): args = self.DASH_ITEM_HREF_MAP[fieldnm] + (item[0],) return req.href(*args) }}} By the way, is there a particular reason for the numeric keys in the {{{DASHBOARD_SCHEMA['widgets']}}} dictionary? I'm tempted to change those to descriptive names so that I can specify the set of widgets as {{{ #!python ['my tickets', 'active tickets', 'milestones', 'components'] }}} -- Ticket URL: Apache Bloodhound The Apache Bloodhound (incubating) issue tracker