Mercurial > bitten > bitten-test
changeset 637:988f2b3e585c
0.6dev: Fixing layout of builds (config overview) when using long revision markers (as for instance used by Git). Also makes the table generally wider and the page more efficient visually.
Thanks to pacopablo for patch! Closes #430.
author | osimons |
---|---|
date | Mon, 17 Aug 2009 23:58:37 +0000 |
parents | 21902b481ee7 |
children | 74237f60f8a9 |
files | bitten/htdocs/bitten.css bitten/templates/bitten_config.html bitten/web_ui.py |
diffstat | 3 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/htdocs/bitten.css +++ b/bitten/htdocs/bitten.css @@ -57,15 +57,16 @@ #content.build p.path { color: #999; font-size: smaller; margin-top: 0; } -#content.build #charts { clear: right; float: right; width: 44%; } +#content.build #charts { clear: right; float: right; width: 25%; } #content.build #builds { clear: none; margin-top: 2em; table-layout: fixed; - width: 54%; + width: 73%; } #content.build #builds tbody th, #content.build #builds tbody td { background: #fff; } -#content.build #builds th.chgset { width: 6em; } +#content.build #builds th.longrevchgset { width: 30%; } +#content.build #builds th.shortrevchgset { width: 6em; } #content.build #builds td :link, #content.build #builds td :visited { font-weight: bold; } @@ -220,4 +221,4 @@ .step-toc ul, .step-toc ol { list-style: none; padding: 0 0 0 1.2em; margin: 0 } .step-toc li { margin: 0; padding: 0 } .step-toc .active { background: #ff9; position: relative; } -.step-toc li.failed a { color: #a00; font-weight: bold; } \ No newline at end of file +.step-toc li.failed a { color: #a00; font-weight: bold; }
--- a/bitten/templates/bitten_config.html +++ b/bitten/templates/bitten_config.html @@ -156,13 +156,13 @@ <table py:if="config.platforms and config.builds" class="listing" id="builds"> <thead><tr> - <th class="chgset"><abbr title="Changeset">Chgset</abbr></th> + <th class="${config.revsize}"><abbr title="Changeset">Chgset</abbr></th> <th py:for="platform in config.platforms">$platform.name</th> </tr></thead> <tbody py:if="config.builds"> <tr py:for="rev_num in sorted(config.builds, reverse=True)" py:with="rev = config.builds[rev_num]"> - <th class="chgset" scope="row"> + <th class="${config.revsize}" scope="row"> <a href="$rev.href" title="View Changeset">[$rev_num]</a> </th><py:for each="platform in config.platforms"><py:choose> <td py:when="platform.id in rev" py:with="build = rev[platform.id]" @@ -189,10 +189,10 @@ </h2> <table class="listing" id="builds"> <thead><tr> - <th class="chgset" abbrev="Changeset">Chgset</th><th>Build</th> + <th class="${config.revsize}" abbrev="Changeset">Chgset</th><th>Build</th> </tr></thead><tbody> <tr py:for="build in config.builds"> - <th class="chgset" scope="row"> + <th class="${config.revsize}" scope="row"> <a href="$build.rev_href" title="View Changeset">[$build.rev]</a> </th> <td class="$build.cls">
--- a/bitten/web_ui.py +++ b/bitten/web_ui.py @@ -368,7 +368,8 @@ 'active': config.active, 'description': description, 'browser_href': req.href.browser(config.path), 'builds_pending' : len(pending_builds), - 'builds_inprogress' : len(inprogress_builds) + 'builds_inprogress' : len(inprogress_builds), + 'revsize' : None, } context = Context.from_request(req, config.resource) @@ -427,6 +428,8 @@ elif idx >= (page - 1) * builds_per_page: builds.setdefault(rev, {}) builds[rev].setdefault('href', req.href.changeset(rev)) + data['config']['revsize'] = len(str(rev)) > 10 \ + and 'longrevchgset' or 'shortrevchgset' if build and build.status != Build.PENDING: build_data = _get_build_data(self.env, req, build) build_data['steps'] = []