diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-07-12 16:38:06 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-11 00:09:26 +0100 |
commit | 9ed45f79745207f96dbd3cb6d9ef40ea8fcde42a (patch) | |
tree | 5c17cdc1dcf115fbd47a34d45bf5b28e7a046cb3 /bitbake | |
parent | 82d998d6c6378e4eb70b5712b339b6095ed7540a (diff) | |
download | poky-9ed45f79745207f96dbd3cb6d9ef40ea8fcde42a.tar.gz |
bitbake: toaster: tweak styling and typos in recent builds area
Help icons need to have the Bootstrap tooltip() method called on
them so that the popups are correctly styled.
Ensure that the colour of the help/error/warning icons is correct,
depending on the build state.
Fix pluralisation of errors and warnings shown.
Add a div around the build state area so it's easy to pick up
where the state is going to display (e.g. in tests).
[YOCTO #9631]
(Bitbake rev: 98a923ff14188832ac44e0dbafc73bcba10e25da)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/mrbsection.js | 8 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/mrb_section.html | 47 |
2 files changed, 32 insertions, 23 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/mrbsection.js b/bitbake/lib/toaster/toastergui/static/js/mrbsection.js index e7fbf01731..73d0935fa5 100644 --- a/bitbake/lib/toaster/toastergui/static/js/mrbsection.js +++ b/bitbake/lib/toaster/toastergui/static/js/mrbsection.js | |||
@@ -84,14 +84,20 @@ function mrbSectionInit(ctx){ | |||
84 | } | 84 | } |
85 | else if (stateChanged(build)) { | 85 | else if (stateChanged(build)) { |
86 | // update the whole template | 86 | // update the whole template |
87 | build.warnings_pluralise = (build.warnings !== 1 ? 's' : ''); | ||
88 | build.errors_pluralise = (build.errors !== 1 ? 's' : ''); | ||
89 | |||
87 | tmpl = $.templates("#build-template"); | 90 | tmpl = $.templates("#build-template"); |
88 | 91 | ||
89 | html = tmpl.render(build); | 92 | html = $(tmpl.render(build)); |
90 | 93 | ||
91 | selector = '[data-latest-build-result="' + build.id + '"] ' + | 94 | selector = '[data-latest-build-result="' + build.id + '"] ' + |
92 | '[data-role="build-status-container"]'; | 95 | '[data-role="build-status-container"]'; |
93 | container = $(selector); | 96 | container = $(selector); |
94 | 97 | ||
98 | // initialize bootstrap tooltips in the new HTML | ||
99 | html.find('span.glyphicon-question-sign').tooltip(); | ||
100 | |||
95 | container.html(html); | 101 | container.html(html); |
96 | } | 102 | } |
97 | else if (tasksProgressChanged(build)) { | 103 | else if (tasksProgressChanged(build)) { |
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index b74f723932..38a72f9afb 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html | |||
@@ -59,25 +59,27 @@ | |||
59 | <%:targets_abbreviated%> | 59 | <%:targets_abbreviated%> |
60 | </span> | 60 | </span> |
61 | <%else%> | 61 | <%else%> |
62 | ...targets not yet available... | 62 | Fetching recipe names... |
63 | <%/if%> | 63 | <%/if%> |
64 | </div> | 64 | </div> |
65 | 65 | ||
66 | <%if state == 'Parsing'%> | 66 | <div data-build-state="<%:state%>"> |
67 | <%include tmpl='#parsing-recipes-build-template'/%> | 67 | <%if state == 'Parsing'%> |
68 | <%else state == 'Queued'%> | 68 | <%include tmpl='#parsing-recipes-build-template'/%> |
69 | <%include tmpl='#queued-build-template'/%> | 69 | <%else state == 'Queued'%> |
70 | <%else state == 'Succeeded' || state == 'Failed'%> | 70 | <%include tmpl='#queued-build-template'/%> |
71 | <%include tmpl='#succeeded-or-failed-build-template'/%> | 71 | <%else state == 'Succeeded' || state == 'Failed'%> |
72 | <%else state == 'Cancelling'%> | 72 | <%include tmpl='#succeeded-or-failed-build-template'/%> |
73 | <%include tmpl='#cancelling-build-template'/%> | 73 | <%else state == 'Cancelling'%> |
74 | <%else state == 'Starting'%> | 74 | <%include tmpl='#cancelling-build-template'/%> |
75 | <%include tmpl='#starting-template'/%> | 75 | <%else state == 'Starting'%> |
76 | <%else state == 'In Progress'%> | 76 | <%include tmpl='#starting-template'/%> |
77 | <%include tmpl='#in-progress-build-template'/%> | 77 | <%else state == 'In Progress'%> |
78 | <%else state == 'Cancelled'%> | 78 | <%include tmpl='#in-progress-build-template'/%> |
79 | <%include tmpl='#cancelled-build-template'/%> | 79 | <%else state == 'Cancelled'%> |
80 | <%/if%> | 80 | <%include tmpl='#cancelled-build-template'/%> |
81 | <%/if%> | ||
82 | </div> | ||
81 | </script> | 83 | </script> |
82 | 84 | ||
83 | <!-- queued build --> | 85 | <!-- queued build --> |
@@ -111,7 +113,8 @@ | |||
111 | 113 | ||
112 | <div class="col-md-4 progress-info"> | 114 | <div class="col-md-4 progress-info"> |
113 | <!-- parse completion percentage --> | 115 | <!-- parse completion percentage --> |
114 | <span class="glyphicon glyphicon-question-sign get-help get-help-blue" title="BitBake is parsing the layers required for your build"> | 116 | <span class="glyphicon glyphicon-question-sign get-help get-help-blue" |
117 | title="BitBake is parsing the layers required for your build"> | ||
115 | </span> | 118 | </span> |
116 | 119 | ||
117 | Parsing <span id="recipes-parsed-percentage-<%:id%>"><%:recipes_parsed_percentage%></span>% complete | 120 | Parsing <span id="recipes-parsed-percentage-<%:id%>"><%:recipes_parsed_percentage%></span>% complete |
@@ -178,7 +181,7 @@ | |||
178 | <%if errors%> | 181 | <%if errors%> |
179 | <span class="glyphicon glyphicon-minus-sign"></span> | 182 | <span class="glyphicon glyphicon-minus-sign"></span> |
180 | <a href="<%:dashboard_errors_url%>" class="alert-link"> | 183 | <a href="<%:dashboard_errors_url%>" class="alert-link"> |
181 | <%:errors%> error<%:errors_pluralize%> | 184 | <%:errors%> error<%:errors_pluralise%> |
182 | </a> | 185 | </a> |
183 | <%/if%> | 186 | <%/if%> |
184 | </div> | 187 | </div> |
@@ -186,9 +189,9 @@ | |||
186 | <!-- warnings --> | 189 | <!-- warnings --> |
187 | <div class="col-md-2"> | 190 | <div class="col-md-2"> |
188 | <%if warnings%> | 191 | <%if warnings%> |
189 | <span class="glyphicon glyphicon-minus-sign"></span> | 192 | <span class="glyphicon glyphicon-warning-sign build-warnings"></span> |
190 | <a href="<%:dashboard_warnings_url%>" class="alert-link"> | 193 | <a href="<%:dashboard_warnings_url%>" class="alert-link build-warnings"> |
191 | <%:warnings%> warning<%:warnings_pluralize%> | 194 | <%:warnings%> warning<%:warnings_pluralise%> |
192 | </a> | 195 | </a> |
193 | <%/if%> | 196 | <%/if%> |
194 | </div> | 197 | </div> |
@@ -219,7 +222,7 @@ | |||
219 | <script id="rebuild-template" type="text/x-jsrender"> | 222 | <script id="rebuild-template" type="text/x-jsrender"> |
220 | <%if is_default_project_build%> | 223 | <%if is_default_project_build%> |
221 | <!-- no rebuild info icon --> | 224 | <!-- no rebuild info icon --> |
222 | <span class="pull-right glyphicon glyphicon-question-sign get-help <%if state == 'Success'%>get-help-green<%else state == 'Failed'%>get-help-red<%else%>get-help-blue<%/if%>" | 225 | <span class="pull-right glyphicon glyphicon-question-sign get-help <%if state == 'Succeeded'%>get-help-green<%else state == 'Failed'%>get-help-red<%else%>get-help-blue<%/if%>" |
223 | title="Builds in this project cannot be started from Toaster: they are started from the command line"> | 226 | title="Builds in this project cannot be started from Toaster: they are started from the command line"> |
224 | </span> | 227 | </span> |
225 | <%else%> | 228 | <%else%> |