diff --git a/dashboard/static/css/style.css b/dashboard/static/css/style.css index 9b31da065..9715dcf2b 100644 --- a/dashboard/static/css/style.css +++ b/dashboard/static/css/style.css @@ -86,7 +86,7 @@ div.drops label { .drop { height: 30px; float: left; - margin-right: 25px; + margin-right: 20px; } .drop label { @@ -211,140 +211,3 @@ a[href^="https://launchpad"]:after { .review_mark { font-weight: bold; } - -/* MIRANTIS CSS*/ - -#miraheader { - margin: 0 auto; - width: 960px; -} - -#top-menu { - height: 30px; -} - -#ttopmenu { - float: right; - height: 20px; - overflow: hidden; - margin-top: 10px; -} - -#ttopmenu a { - font-size: 13px; - font-style: italic; - color: #A7B6C3; -} - -#ttopmenu a:hover { - color: #6e8598; -} - -#main-menu { - height: 47px; - margin-top: 30px; - text-align: right; - position: relative; -} - -a.glink { - color: black; - font-family: 'PT Sans Narrow', 'Arial Narrow', arial, sans-serif; - font-size: 19px; - padding: 5px 5px 5px 12px; - white-space: nowrap; - text-decoration: none; -} - -a.glink:hover { - color: #d3301a; -} - -.subglobalNav { - color: black; - position: absolute; - font-family: 'PT Sans Narrow', 'Arial Narrow', arial, sans-serif; - font-size: 14px; - white-space: nowrap; - text-decoration: none; - right: 0px; - padding-top: 10px; -} - -.subglobalNav a { - color: black; - text-decoration: none; - padding: 2px 7px 2px 7px; - margin-left: 12px; -} - -.subglobalNav a:hover { - color: #fff; - background: #CB2E19; - -moz-border-radius: 2px; - border-radius: 2px; - margin-left: 12px; - text-shadow: -1px -1px 0px #7F2114; -} - -a.act { - color: #d3301a !important; -} - -a.act:hover { - color: #fff !important; - background: #CB2E19; -} - -a.active { - color: #d3301a; -} - -#dummy { - height: 115px; - margin-top: 20px; - width: 100%; -} - -#footer { - height: 115px; - margin-top: -120px; - background: url(../images/footer_tile.jpg) repeat-x; - font-family: 'PT Sans Narrow', 'Arial Narrow', arial, sans-serif; - font-size: 17px; - line-height: 21px; - text-shadow: 1px 1px 0px white; - -} - -#foottable td { - padding-top: 20px; -} - -#footer_content { - width: 960px; - margin: 4px auto auto auto; - height: 110px; -} - -.fgeneral { - color: black; -} - -.fgeneralblue { - color: #43678a; -} - -.fslogan { - font-family: 'PT Sans', arial, sans-serif; - font-style: italic; - color: #43678a; - font-size: 13px; -} - -#fbox { - padding-left: 10px; - border-left: 1px solid #d5dbe1; -} - -/* MIRANTIS CSS*/ \ No newline at end of file diff --git a/dashboard/templates/layout.html b/dashboard/templates/layout.html index b74e0ac97..f676b836e 100644 --- a/dashboard/templates/layout.html +++ b/dashboard/templates/layout.html @@ -388,7 +388,7 @@
- {% for release in release_options %} @@ -399,7 +399,7 @@
- {% for option_type, option_groups in project_type_options.iteritems() %} @@ -416,22 +416,22 @@
- +
- +
- +
- {% for metric in metric_options %} {% endfor %} @@ -448,12 +448,12 @@ diff --git a/dashboard/templates/overview.html b/dashboard/templates/overview.html index 5b01db0ef..75f248a20 100644 --- a/dashboard/templates/overview.html +++ b/dashboard/templates/overview.html @@ -6,6 +6,8 @@ {% set show_user_activity = (user_id) %} {% set show_module_activity = (module) %} {% set show_activity = (show_user_activity) or (show_module_activity) %} +{% set show_user_contribution = show_user_activity %} +{% set show_module_contribution = show_module_activity %} {% set show_contribution = show_activity %} {% set show_user_profile = (user_id) %} @@ -102,7 +104,7 @@
${subject}
{%html message %}
+${lines_added} - - ${lines_deleted}
+ - ${lines_deleted} {% endraw %} @@ -238,6 +240,10 @@ {% endif %} + {% if show_module_contribution %} +
+ {% endif %} + {% endblock %} {% block right_frame %} @@ -263,16 +269,19 @@ {% endif %} - {% if show_user_activity %} + {% if show_user_contribution %}
{% endif %} {% if show_module_activity %} +

Activity log

- {% endif %} - {% if show_module_activity %} -
+
+
+ More... +
+
{% endif %} {% endblock %} diff --git a/dashboard/web.py b/dashboard/web.py index 5493b0117..9e32a3e66 100644 --- a/dashboard/web.py +++ b/dashboard/web.py @@ -817,6 +817,20 @@ def make_link(title, uri=None, options=None): return '%(title)s' % {'uri': uri, 'title': title} +def unwrap_text(text): + res = '' + for line in text.splitlines(): + s = line.rstrip() + if not s: + continue + res += line + if (not s[0].isalpha()) or (s[-1] in ['.', '!', '?', '>', ':', ';']): + res += '\n' + else: + res += ' ' + return res.rstrip() + + @app.template_filter('commit_message') def make_commit_message(record): s = record['message'] @@ -833,6 +847,8 @@ def make_commit_message(record): r'\1\2', s) s = re.sub(r'\s+(I[0-9a-f]{40})', r' \1', s) + + s = unwrap_text(s) return s diff --git a/tests/unit/test_web_utils.py b/tests/unit/test_web_utils.py index 0280ba52e..75c7976c1 100644 --- a/tests/unit/test_web_utils.py +++ b/tests/unit/test_web_utils.py @@ -39,9 +39,9 @@ Change-Id: Ie49ccd2138905e178843b375a9b16c3fe572d1db''' 'module': module, } - expected = ''' -During finish_migration the manager calls initialize_connection but doesn't -update the block_device_mapping with the potentially new connection_info + expected = '''\ +During finish_migration the manager calls initialize_connection but doesn't \ +update the block_device_mapping with the potentially new connection_info \ returned. Fixes bug 1076801 ''' + ('Change-Id:
-
+
{% block left_frame %}{% endblock %}
-
+
{% block right_frame %}{% endblock %}