[bitbake-devel] [PATCH 11/14] toaster: fix padding of build notifications

Alex DAMIAN alexandru.damian at intel.com
Thu Nov 27 17:08:02 UTC 2014


From: Belen Barros Pena <belen.barros.pena at intel.com>

In managed mode, we show the name of the project in the build
notifications of the all builds page. The way we show the
project requires modifying the default padding of the .alert
class. This patch makes sure the padding modification is
only applied in managed mode, i.e., when the project name
needs to be shown.

Signed-off-by: Belen Barros Pena <belen.barros.pena at intel.com>
---
 lib/toaster/toastergui/static/css/default.css     | 4 ++++
 lib/toaster/toastergui/templates/mrb_section.html | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/toastergui/static/css/default.css b/lib/toaster/toastergui/static/css/default.css
index dcb8e34..199c753 100644
--- a/lib/toaster/toastergui/static/css/default.css
+++ b/lib/toaster/toastergui/static/css/default.css
@@ -136,6 +136,10 @@ select { width: auto; }
 .new-build .alert { margin-top: 10px; }
 .new-build .alert p { margin-top: 10px; }
 
+/* styles for showing the project name in build mode */
+.project-name { padding-top: 0; }
+.project-name .label { font-weight: normal; margin-bottom: 5px; margin-left: -15px; padding: 5px; }
+
 /* Remove bottom margin for forms inside modal dialogs */
 #dependencies_modal_form { margin-bottom: 0px; }
 
diff --git a/lib/toaster/toastergui/templates/mrb_section.html b/lib/toaster/toastergui/templates/mrb_section.html
index 33afb7b..73031e2 100644
--- a/lib/toaster/toastergui/templates/mrb_section.html
+++ b/lib/toaster/toastergui/templates/mrb_section.html
@@ -12,9 +12,9 @@
   </div>
   <div id="latest-builds">
   {% for build in mru %}
-    <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}" style="padding-top: 0;">
+    <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%} {% if MANAGED and build.project %}project-name{% endif %} ">
     {% if MANAGED and build.project %}
-       <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-danger{%else%}label-info{%endif%}" style="font-weight: normal; margin-bottom: 5px; margin-left:-15px; padding-top:5px;"> {{build.project.name}} </span>
+       <span class="label {%if build.outcome == build.SUCCEEDED%}label-success{%elif build.outcome == build.FAILED%}label-danger{%else%}label-info{%endif%}"> {{build.project.name}} </span>
     {% endif %}
 
         <div class="row-fluid">
-- 
1.9.1




More information about the bitbake-devel mailing list