diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/basebuildpage.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/basebuildpage.html | 207 |
1 files changed, 133 insertions, 74 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html index ff9433eee7..4a8e2a7abd 100644 --- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html +++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html | |||
@@ -1,90 +1,149 @@ | |||
1 | {% extends "base.html" %} | 1 | {% extends "base.html" %} |
2 | {% load projecttags %} | 2 | {% load projecttags %} |
3 | {% load project_url_tag %} | 3 | {% load project_url_tag %} |
4 | {% load queryset_to_list_filter %} | ||
4 | {% load humanize %} | 5 | {% load humanize %} |
5 | {% block pagecontent %} | 6 | {% block pagecontent %} |
7 | <!-- breadcrumbs --> | ||
8 | <div class="section"> | ||
9 | <ul class="breadcrumb" id="breadcrumb"> | ||
10 | <li><a href="{% project_url build.project %}">{{build.project.name}}</a></li> | ||
11 | {% if not build.project.is_default %} | ||
12 | <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li> | ||
13 | {% endif %} | ||
14 | <li> | ||
15 | {% block parentbreadcrumb %} | ||
16 | <a href="{%url 'builddashboard' build.pk%}"> | ||
17 | {{build.get_sorted_target_list.0.target}} {% if build.target_set.all.count > 1 %}(+{{build.target_set.all.count|add:"-1"}}){% endif %} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}}) | ||
18 | </a> | ||
19 | {% endblock %} | ||
20 | </li> | ||
21 | {% block localbreadcrumb %}{% endblock %} | ||
22 | </ul> | ||
23 | <script> | ||
24 | $( function () { | ||
25 | $('#breadcrumb > li').append('<span class="divider">→</span>'); | ||
26 | $('#breadcrumb > li:last').addClass("active"); | ||
27 | $('#breadcrumb > li:last > span').remove(); | ||
28 | }); | ||
29 | </script> | ||
30 | </div> | ||
31 | |||
32 | <div class="row-fluid"> | ||
33 | <!-- begin left sidebar container --> | ||
34 | <div id="nav" class="span2"> | ||
35 | <ul class="nav nav-list well"> | ||
36 | <li | ||
37 | {% if request.resolver_match.url_name == 'builddashboard' %} | ||
38 | class="active" | ||
39 | {% endif %} > | ||
40 | <a class="nav-parent" href="{% url 'builddashboard' build.pk %}">Build summary</a> | ||
41 | </li> | ||
42 | {% if build.target_set.all.0.is_image and build.outcome == 0 %} | ||
43 | <li class="nav-header">Images</li> | ||
44 | {% block nav-target %} | ||
45 | {% for t in build.get_sorted_target_list %} | ||
46 | <li><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li> | ||
47 | {% endfor %} | ||
48 | {% endblock %} | ||
49 | {% endif %} | ||
50 | <li class="nav-header">Build</li> | ||
51 | {% block nav-configuration %} | ||
52 | <li><a href="{% url 'configuration' build.pk %}">Configuration</a></li> | ||
53 | {% endblock %} | ||
54 | {% block nav-tasks %} | ||
55 | <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li> | ||
56 | {% endblock %} | ||
57 | {% block nav-recipes %} | ||
58 | <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li> | ||
59 | {% endblock %} | ||
60 | {% block nav-packages %} | ||
61 | <li><a href="{% url 'packages' build.pk %}">Packages</a></li> | ||
62 | {% endblock %} | ||
63 | <li class="nav-header">Performance</li> | ||
64 | {% block nav-buildtime %} | ||
65 | <li><a href="{% url 'buildtime' build.pk %}">Time</a></li> | ||
66 | {% endblock %} | ||
67 | {% block nav-cputime %} | ||
68 | <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li> | ||
69 | {% endblock %} | ||
70 | {% block nav-diskio %} | ||
71 | <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li> | ||
72 | {% endblock %} | ||
6 | 73 | ||
74 | <li class="divider"></li> | ||
7 | 75 | ||
8 | <div class=""> | 76 | <li> |
9 | <!-- Breadcrumbs --> | 77 | <p class="navbar-btn"> |
10 | <div class="section"> | 78 | <a class="btn btn-block" href="{% url 'build_artifact' build.id 'cookerlog' build.id %}"> |
11 | <ul class="breadcrumb" id="breadcrumb"> | 79 | Download build log |
12 | <li><a href="{% project_url build.project %}">{{build.project.name}}</a></li> | ||
13 | {% if not build.project.is_default %} | ||
14 | <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li> | ||
15 | {% endif %} | ||
16 | <li> | ||
17 | {% block parentbreadcrumb %} | ||
18 | <a href="{%url 'builddashboard' build.pk%}"> | ||
19 | {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}}) | ||
20 | </a> | 80 | </a> |
21 | {% endblock %} | 81 | </p> |
22 | </li> | 82 | </li> |
23 | {% block localbreadcrumb %}{% endblock %} | ||
24 | </ul> | ||
25 | <script> | ||
26 | $( function () { | ||
27 | $('#breadcrumb > li').append('<span class="divider">→</span>'); | ||
28 | $('#breadcrumb > li:last').addClass("active"); | ||
29 | $('#breadcrumb > li:last > span').remove(); | ||
30 | }); | ||
31 | </script> | ||
32 | </div> | ||
33 | 83 | ||
34 | <div class="row-fluid"> | 84 | <li> |
85 | <!-- edit custom image built during this build --> | ||
86 | <p class="navbar-btn" data-role="edit-custom-image-trigger"> | ||
87 | <button class="btn btn-block">Edit custom image</button> | ||
88 | </p> | ||
89 | {% include 'editcustomimage_modal.html' %} | ||
90 | <script> | ||
91 | $(document).ready(function () { | ||
92 | var editableCustomImageRecipes = {{ build.get_custom_image_recipes | queryset_to_list:"id,name" | json }}; | ||
35 | 93 | ||
36 | <!-- begin left sidebar container --> | 94 | // edit custom image which was built during this build |
37 | <div id="nav" class="span2"> | 95 | var editCustomImageModal = $('#edit-custom-image-modal'); |
38 | <ul class="nav nav-list well"> | 96 | var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]'); |
39 | <li | ||
40 | {% if request.resolver_match.url_name == 'builddashboard' %} | ||
41 | class="active" | ||
42 | {% endif %} > | ||
43 | <a class="nav-parent" href="{% url 'builddashboard' build.pk %}">Build summary</a> | ||
44 | </li> | ||
45 | {% if build.target_set.all.0.is_image and build.outcome == 0 %} | ||
46 | <li class="nav-header">Images</li> | ||
47 | {% block nav-target %} | ||
48 | {% for t in build.get_sorted_target_list %} | ||
49 | <li><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li> | ||
50 | {% endfor %} | ||
51 | {% endblock %} | ||
52 | {% endif %} | ||
53 | <li class="nav-header">Build</li> | ||
54 | {% block nav-configuration %} | ||
55 | <li><a href="{% url 'configuration' build.pk %}">Configuration</a></li> | ||
56 | {% endblock %} | ||
57 | {% block nav-tasks %} | ||
58 | <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li> | ||
59 | {% endblock %} | ||
60 | {% block nav-recipes %} | ||
61 | <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li> | ||
62 | {% endblock %} | ||
63 | {% block nav-packages %} | ||
64 | <li><a href="{% url 'packages' build.pk %}">Packages</a></li> | ||
65 | {% endblock %} | ||
66 | <li class="nav-header">Performance</li> | ||
67 | {% block nav-buildtime %} | ||
68 | <li><a href="{% url 'buildtime' build.pk %}">Time</a></li> | ||
69 | {% endblock %} | ||
70 | {% block nav-cputime %} | ||
71 | <li><a href="{% url 'cputime' build.pk %}">CPU time</a></li> | ||
72 | {% endblock %} | ||
73 | {% block nav-diskio %} | ||
74 | <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li> | ||
75 | {% endblock %} | ||
76 | </ul> | ||
77 | </div> | ||
78 | <!-- end left sidebar container --> | ||
79 | 97 | ||
80 | <!-- Begin right container --> | 98 | editCustomImageTrigger.click(function () { |
81 | {% block buildinfomain %}{% endblock %} | 99 | // if there is a single editable custom image, go direct to the edit |
82 | <!-- End right container --> | 100 | // page for it; if there are multiple editable custom images, show |
101 | // dialog to select one of them for editing | ||
83 | 102 | ||
103 | // single editable custom image | ||
84 | 104 | ||
85 | </div> | 105 | // multiple editable custom images |
86 | </div> | 106 | editCustomImageModal.modal('show'); |
107 | }); | ||
108 | }); | ||
109 | </script> | ||
110 | </li> | ||
87 | 111 | ||
112 | <li> | ||
113 | <!-- new custom image from image recipe in this build --> | ||
114 | <p class="navbar-btn" data-role="new-custom-image-trigger"> | ||
115 | <button class="btn btn-block">New custom image</button> | ||
116 | </p> | ||
117 | {% include 'newcustomimage_modal.html' %} | ||
118 | <script> | ||
119 | // imageRecipes includes both custom image recipes and built-in | ||
120 | // image recipes, any of which can be used as the basis for a | ||
121 | // new custom image | ||
122 | var imageRecipes = {{ build.get_image_recipes | queryset_to_list:"id,name" | json }}; | ||
88 | 123 | ||
89 | {% endblock %} | 124 | $(document).ready(function () { |
125 | var newCustomImageModal = $('#new-custom-image-modal'); | ||
126 | var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]'); | ||
90 | 127 | ||
128 | // show create new custom image modal to select an image built | ||
129 | // during this build as the basis for the custom recipe | ||
130 | newCustomImageTrigger.click(function () { | ||
131 | if (!imageRecipes.length) { | ||
132 | return; | ||
133 | } | ||
134 | newCustomImageModalSetRecipes(imageRecipes); | ||
135 | newCustomImageModal.modal('show'); | ||
136 | }); | ||
137 | }); | ||
138 | </script> | ||
139 | </li> | ||
140 | </ul> | ||
141 | |||
142 | </div> | ||
143 | <!-- end left sidebar container --> | ||
144 | |||
145 | <!-- begin right container --> | ||
146 | {% block buildinfomain %}{% endblock %} | ||
147 | <!-- end right container --> | ||
148 | </div> | ||
149 | {% endblock %} | ||