diff options
author | David Reyna <David.Reyna@windriver.com> | 2015-03-21 18:01:38 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-25 12:39:53 +0000 |
commit | 6a934f488fd636829efbcb24058f92621e5a9fc6 (patch) | |
tree | cce4aaacc49ba4c179573de7f4ff2f2017044707 /bitbake/lib/toaster/toastergui/templates | |
parent | e840b7a8fba16b857db4e74dd8331680a21e5eb1 (diff) | |
download | poky-6a934f488fd636829efbcb24058f92621e5a9fc6.tar.gz |
bitbake: toaster: build date range selections
Enable date range selections for build start and build complete in all
builds page for both managed and interactive mode. Disable the filter
counts.
[YOCTO #6040]
[YOCTO #7249]
[YOCTO #7461]
(Bitbake rev: 7c86ed5fb51c6237fa40fb454e58564ef027dd51)
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
3 files changed, 60 insertions, 10 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html index 684ec65884..f7ad2f4892 100644 --- a/bitbake/lib/toaster/toastergui/templates/build.html +++ b/bitbake/lib/toaster/toastergui/templates/build.html | |||
@@ -4,7 +4,24 @@ | |||
4 | {% load projecttags %} | 4 | {% load projecttags %} |
5 | {% load humanize %} | 5 | {% load humanize %} |
6 | 6 | ||
7 | {% block extraheadcontent %} | ||
8 | <link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'> | ||
9 | <link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'> | ||
10 | <link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'> | ||
11 | <script src="/static/js/jquery-ui.min.js"></script> | ||
12 | <script src="/static/js/filtersnippet.js"></script> | ||
13 | {% endblock %} | ||
14 | |||
7 | {% block pagecontent %} | 15 | {% block pagecontent %} |
16 | |||
17 | <script> | ||
18 | // intiialize the date range controls | ||
19 | $(document).ready(function () { | ||
20 | date_init('started_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_started_on}}','{{dateMax_started_on}}','{{daterange_selected}}'); | ||
21 | date_init('completed_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_completed_on}}','{{dateMax_completed_on}}','{{daterange_selected}}'); | ||
22 | }); | ||
23 | </script> | ||
24 | |||
8 | <div class="row-fluid"> | 25 | <div class="row-fluid"> |
9 | 26 | ||
10 | {% include "mrb_section.html" %} | 27 | {% include "mrb_section.html" %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html index fe70e7143e..f624d88bad 100644 --- a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html +++ b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html | |||
@@ -1,5 +1,6 @@ | |||
1 | {% load projecttags %} | 1 | {% load projecttags %} |
2 | <!-- '{{f.class}}' filter --> | 2 | <!-- '{{f.class}}' filter --> |
3 | {% with f.class as key %} | ||
3 | <form id="filter_{{f.class}}" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> | 4 | <form id="filter_{{f.class}}" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> |
4 | <input type="hidden" name="search" value="{{request.GET.search}}"/> | 5 | <input type="hidden" name="search" value="{{request.GET.search}}"/> |
5 | <div class="modal-header"> | 6 | <div class="modal-header"> |
@@ -13,22 +14,37 @@ | |||
13 | <div class="modal-body"> | 14 | <div class="modal-body"> |
14 | <p>{{f.label}}</p> | 15 | <p>{{f.label}}</p> |
15 | <label class="radio"> | 16 | <label class="radio"> |
16 | <input type="radio" name="filter" {%if request.GET.filter%}{{f.options|check_filter_status:request.GET.filter}} {%else%} checked {%endif%} value=""> All {%if filter_search_display%}{{filter_search_display|title}}{%else%}{{objectname|title}}{%endif%} ({{total_count}}) | 17 | <input type="radio" name="filter" {%if request.GET.filter%}{{f.options|check_filter_status:request.GET.filter}} {%else%} checked {%endif%} value="" data-key="{{key}}"> All {%if filter_search_display%}{{filter_search_display|title}}{%else%}{{objectname|title}}{%endif%} |
17 | </label> | 18 | </label> |
18 | {% for option in f.options %} | 19 | {% for option in f.options %} |
19 | {% if option.2 %} | 20 | {% if option.1 == 'daterange' %} |
20 | <label class="radio"> | 21 | <div class="form-inline"> |
21 | <input type="radio" name="filter" {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}"> {{option.0}} (<span id="{{option.1}}_count">{{option.2}}</span>) | 22 | <label class="radio"> |
23 | <input type="radio" name="filter" id="filter_value_{{key}}" {%if key == daterange_selected %}checked{%endif%} value="{{option.1}}" data-key="{{key}}"> {{option.0}} | ||
22 | {% else %} | 24 | {% else %} |
23 | <label class="radio muted"> | 25 | {% if 1 %} |
24 | <input type="radio" name="filter" disabled {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}"> {{option.0}} (<span id="{{option.1}}_count">{{option.2}}</span>) | 26 | <label class="radio"> |
27 | <input type="radio" name="filter" {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}" data-key="{{key}}"> {{option.0}} | ||
28 | {% comment "do not disable radio selections by count for now" %}{% else %} | ||
29 | <label class="radio muted"> | ||
30 | <input type="radio" name="filter" disabled {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}" data-key="{{key}}"> {{option.0}} | ||
31 | {% endcomment %}{% endif %} | ||
25 | {% endif %} | 32 | {% endif %} |
26 | {% if option.3 %}<i class="icon-question-sign get-help" data-placement="right" title="{{option.3}}"></i>{% endif %} | 33 | {% if option.3 %}<i class="icon-question-sign get-help" data-placement="right" title="{{option.3}}"></i>{% endif %} |
27 | </label> | 34 | </label> |
35 | {% if option.1 == 'daterange' %} | ||
36 | <input type="text" id="date_from_{{key}}" name="date_from_{{key}}" disabled class="input-small" /><label class="help-inline">to</label> | ||
37 | <input type="text" id="date_to_{{key}}" name="date_to_{{key}}" disabled class="input-small" /> | ||
38 | <label class="help-inline get-help" >(dd/mm/yyyy)</label> | ||
39 | </div> | ||
40 | {% endif %} | ||
28 | {% endfor %} | 41 | {% endfor %} |
42 | <!-- daterange persistence --> | ||
43 | <input type="hidden" id="last_date_from_{{key}}" name="last_date_from" value="{{last_date_from}}"/> | ||
44 | <input type="hidden" id="last_date_to_{{key}}" name="last_date_to" value="{{last_date_to}}"/> | ||
29 | </div> | 45 | </div> |
30 | <div class="modal-footer"> | 46 | <div class="modal-footer"> |
31 | <button type="submit" class="btn btn-primary">Apply</button> | 47 | <button type="submit" class="btn btn-primary" data-key="{{key}}">Apply</button> |
32 | {% if request.GET.filter %} | 48 | {% if request.GET.filter %} |
33 | {% if request.GET.filter|string_remove_regex:':.*' != f.options.0.1|string_remove_regex:':.*' %} | 49 | {% if request.GET.filter|string_remove_regex:':.*' != f.options.0.1|string_remove_regex:':.*' %} |
34 | <span class="help-inline pull-left">You can only apply one filter to the table. This filter will override the current filter.</span> | 50 | <span class="help-inline pull-left">You can only apply one filter to the table. This filter will override the current filter.</span> |
@@ -36,4 +52,4 @@ | |||
36 | {% endif %} | 52 | {% endif %} |
37 | </div> | 53 | </div> |
38 | </form> | 54 | </form> |
39 | 55 | {% endwith %} | |
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_builds.html b/bitbake/lib/toaster/toastergui/templates/managed_builds.html index e23b832bae..63ae5408f5 100644 --- a/bitbake/lib/toaster/toastergui/templates/managed_builds.html +++ b/bitbake/lib/toaster/toastergui/templates/managed_builds.html | |||
@@ -4,7 +4,24 @@ | |||
4 | {% load projecttags %} | 4 | {% load projecttags %} |
5 | {% load humanize %} | 5 | {% load humanize %} |
6 | 6 | ||
7 | {% block extraheadcontent %} | ||
8 | <link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'> | ||
9 | <link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'> | ||
10 | <link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'> | ||
11 | <script src="/static/js/jquery-ui.min.js"></script> | ||
12 | <script src="/static/js/filtersnippet.js"></script> | ||
13 | {% endblock %} | ||
14 | |||
7 | {% block pagecontent %} | 15 | {% block pagecontent %} |
16 | |||
17 | <script> | ||
18 | // initialize the date range controls | ||
19 | $(document).ready(function () { | ||
20 | date_init('created','{{last_date_from}}','{{last_date_to}}','{{dateMin_created}}','{{dateMax_created}}','{{daterange_selected}}'); | ||
21 | date_init('updated','{{last_date_from}}','{{last_date_to}}','{{dateMin_updated}}','{{dateMax_updated}}','{{daterange_selected}}'); | ||
22 | }); | ||
23 | </script> | ||
24 | |||
8 | <div class="row-fluid"> | 25 | <div class="row-fluid"> |
9 | 26 | ||
10 | {% include "managed_mrb_section.html" %} | 27 | {% include "managed_mrb_section.html" %} |
@@ -47,7 +64,7 @@ | |||
47 | {% for buildrequest in objects %}{% if buildrequest.build %} {% with build=buildrequest.build %} {# if we have a build, just display it #} | 64 | {% for buildrequest in objects %}{% if buildrequest.build %} {% with build=buildrequest.build %} {# if we have a build, just display it #} |
48 | <tr class="data"> | 65 | <tr class="data"> |
49 | <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> | 66 | <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> |
50 | {% if build.project %} | 67 | {% if build.project %} |
51 | <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}"> | 68 | <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}"> |
52 | <i class="icon-download-alt" title="" data-original-title="Download build log"></i> | 69 | <i class="icon-download-alt" title="" data-original-title="Download build log"></i> |
53 | </a> | 70 | </a> |