=== modified file 'css/status.css' --- css/status.css 2011-05-18 20:51:50 +0000 +++ css/status.css 2011-12-16 15:21:33 +0000 @@ -46,6 +46,43 @@ font-size: 1.2em; } + +.roadmap_wrap { + position: relative; + border: 0px solid black; + margin-top: 2px; + margin-bottom: 2px; + margin-left: auto; + margin-right: auto; + background-color: #ffffff; +} + +.roadmap_wrap, .roadmap_value { + width: 155px; + height: 1em; + border-radius: 0px; +} + +.roadmap_value { + float: left +} + +.roadmap_value .Completed { + background-color: green; +} + +.roadmap_value .Blocked { + background-color: red; +} + +.roadmap_value .InProgress { + background-color: gray; +} + +.roadmap_value .Planned { + background-color: orange; +} + .progress_wrap { position: relative; border: 1px solid black; === modified file 'html-report' --- html-report 2011-12-13 17:14:37 +0000 +++ html-report 2011-12-16 15:21:33 +0000 @@ -13,6 +13,9 @@ from roadmap_health import ( card_health_checks, ) +from lpworkitems.models import ( + ROADMAP_STATUSES_MAP, +) class WorkitemTarget(object): @@ -487,10 +490,21 @@ cards_with_bps = [] for card in cards: report_tools.check_card_health(store, card_health_checks, card) - blueprints = report_tools.card_blueprints_by_status(store, card.roadmap_id) - cards_with_bps.append({'card': card, 'blueprints': blueprints}) + blueprint_status_counts = report_tools.card_bp_status_counts( + store, card.roadmap_id) + total = sum(blueprint_status_counts.values()) + bp_percentages = {} + for key in ROADMAP_STATUSES_MAP: + bp_percentages[key] = 0 + if total > 0: + bp_percentages[key] = ( + 100.0 * blueprint_status_counts[key] / total) + + cards_with_bps.append({'card': card, + 'bp_statuses': blueprint_status_counts, + 'bp_percentages': bp_percentages}) statuses.append(dict(name=status, cards=cards_with_bps)) - + data.update(dict(statuses=statuses)) data.update(dict(page_type="roadmap_lane")) data.update(dict(lane_title=title)) === modified file 'report_tools.py' --- report_tools.py 2011-12-15 18:36:35 +0000 +++ report_tools.py 2011-12-16 15:21:33 +0000 @@ -1027,6 +1027,14 @@ return bp_by_status +def card_bp_status_counts(store, roadmap_id): + blueprints = card_blueprints(store, roadmap_id) + total_by_status = dict([(key, 0) for key in ROADMAP_STATUSES_MAP]) + for bp in blueprints: + total_by_status[bp.roadmap_status] += 1 + return total_by_status + + def check_card_health(store, card_health_checks, card): performed_checks = [] card.is_healthy = True === modified file 'templates/roadmap_lane.html' --- templates/roadmap_lane.html 2011-12-15 19:55:57 +0000 +++ templates/roadmap_lane.html 2011-12-16 15:21:33 +0000 @@ -32,9 +32,17 @@