diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/basebuildpage.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/basebuildpage.html | 176 |
1 files changed, 89 insertions, 87 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html index 44749bf49a..50658e0c51 100644 --- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html +++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html | |||
@@ -52,104 +52,106 @@ | |||
52 | </div> | 52 | </div> |
53 | </div> | 53 | </div> |
54 | 54 | ||
55 | <div class="row"> | 55 | <!-- begin left sidebar container for builds which started properly --> |
56 | <!-- begin left sidebar container --> | 56 | {% if build.started %} |
57 | <div id="nav" class="col-md-2"> | 57 | <div class="row"> |
58 | <ul class="nav nav-pills nav-stacked" id="build-menu"> | 58 | <div id="nav" class="col-md-2"> |
59 | <li | 59 | <ul class="nav nav-pills nav-stacked" id="build-menu"> |
60 | {% if request.resolver_match.url_name == 'builddashboard' %} | 60 | <li |
61 | class="active" | 61 | {% if request.resolver_match.url_name == 'builddashboard' %} |
62 | {% endif %} > | 62 | class="active" |
63 | <a href="{% url 'builddashboard' build.pk %}">Build summary</a> | 63 | {% endif %} > |
64 | </li> | 64 | <a href="{% url 'builddashboard' build.pk %}">Build summary</a> |
65 | {% if build.has_images and build.outcome == build.SUCCEEDED %} | 65 | </li> |
66 | <li class="nav-header" data-menu-heading="images">Images</li> | 66 | {% if build.has_images and build.outcome == build.SUCCEEDED %} |
67 | {% block nav-target %} | 67 | <li class="nav-header" data-menu-heading="images">Images</li> |
68 | {% for t in build.get_sorted_target_list %} | 68 | {% block nav-target %} |
69 | {% if t.has_images %} | 69 | {% for t in build.get_sorted_target_list %} |
70 | <li id="menu-{{t.target}}"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li> | 70 | {% if t.has_images %} |
71 | {% endif %} | 71 | <li id="menu-{{t.target}}"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li> |
72 | {% endfor %} | 72 | {% endif %} |
73 | {% endblock %} | 73 | {% endfor %} |
74 | {% endif %} | 74 | {% endblock %} |
75 | <li class="nav-header">Build</li> | 75 | {% endif %} |
76 | <li id="menu-configuration"><a href="{% url 'configuration' build.pk %}">Configuration</a></li> | 76 | <li class="nav-header">Build</li> |
77 | <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li> | 77 | <li id="menu-configuration"><a href="{% url 'configuration' build.pk %}">Configuration</a></li> |
78 | <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li> | 78 | <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li> |
79 | <li><a href="{% url 'packages' build.pk %}">Packages</a></li> | 79 | <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li> |
80 | <li class="nav-header">Performance</li> | 80 | <li><a href="{% url 'packages' build.pk %}">Packages</a></li> |
81 | <li><a href="{% url 'buildtime' build.pk %}">Time</a></li> | 81 | <li class="nav-header">Performance</li> |
82 | <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li> | 82 | <li><a href="{% url 'buildtime' build.pk %}">Time</a></li> |
83 | <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li> | 83 | <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li> |
84 | <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li> | ||
84 | 85 | ||
85 | <li class="nav-header">Actions</li> | 86 | <li class="nav-header">Actions</li> |
86 | <a class="btn btn-default btn-block navbar-btn" href="{% url 'build_artifact' build.id 'cookerlog' build.id %}">Download build log</a> | 87 | <a class="btn btn-default btn-block navbar-btn" href="{% url 'build_artifact' build.id 'cookerlog' build.id %}">Download build log</a> |
87 | 88 | ||
88 | {% with build.get_custom_image_recipes as custom_image_recipes %} | 89 | {% with build.get_custom_image_recipes as custom_image_recipes %} |
89 | {% if custom_image_recipes.count > 0 %} | 90 | {% if custom_image_recipes.count > 0 %} |
90 | <!-- edit custom image built during this build --> | 91 | <!-- edit custom image built during this build --> |
91 | <button class="btn btn-default btn-block navbar-btn" data-role="edit-custom-image-trigger">Edit custom image</button> | 92 | <button class="btn btn-default btn-block navbar-btn" data-role="edit-custom-image-trigger">Edit custom image</button> |
92 | {% include 'editcustomimage_modal.html' %} | 93 | {% include 'editcustomimage_modal.html' %} |
93 | <script> | 94 | <script> |
94 | var editableCustomImageRecipes = {{ custom_image_recipes | objects_to_dictionaries:"id,name" | json }}; | 95 | var editableCustomImageRecipes = {{ custom_image_recipes | objects_to_dictionaries:"id,name" | json }}; |
95 | 96 | ||
96 | $(document).ready(function () { | 97 | $(document).ready(function () { |
97 | var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]'); | 98 | var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]'); |
98 | var editCustomImageModal = $('#edit-custom-image-modal'); | 99 | var editCustomImageModal = $('#edit-custom-image-modal'); |
99 | 100 | ||
100 | // edit custom image which was built during this build | 101 | // edit custom image which was built during this build |
101 | editCustomImageTrigger.click(function () { | 102 | editCustomImageTrigger.click(function () { |
102 | // single editable custom image: redirect to the edit page | 103 | // single editable custom image: redirect to the edit page |
103 | // for that image | 104 | // for that image |
104 | if (editableCustomImageRecipes.length === 1) { | 105 | if (editableCustomImageRecipes.length === 1) { |
105 | var url = '{% url "customrecipe" build.project.id custom_image_recipes.first.id %}'; | 106 | var url = '{% url "customrecipe" build.project.id custom_image_recipes.first.id %}'; |
106 | document.location.href = url; | 107 | document.location.href = url; |
107 | } | 108 | } |
108 | // multiple editable custom images: show modal to select | 109 | // multiple editable custom images: show modal to select |
109 | // one of them for editing | 110 | // one of them for editing |
110 | else { | 111 | else { |
111 | editCustomImageModal.modal('show'); | 112 | editCustomImageModal.modal('show'); |
112 | } | 113 | } |
114 | }); | ||
113 | }); | 115 | }); |
114 | }); | 116 | </script> |
115 | </script> | 117 | {% endif %} |
116 | {% endif %} | 118 | {% endwith %} |
117 | {% endwith %} | ||
118 | 119 | ||
119 | <!-- new custom image from image recipe in this build --> | 120 | <!-- new custom image from image recipe in this build --> |
120 | {% if build.has_image_recipes %} | 121 | {% if build.has_image_recipes %} |
121 | <button class="btn btn-default btn-block navbar-btn" data-role="new-custom-image-trigger">New custom image</button> | 122 | <button class="btn btn-default btn-block navbar-btn" data-role="new-custom-image-trigger">New custom image</button> |
122 | {% include 'newcustomimage_modal.html' %} | 123 | {% include 'newcustomimage_modal.html' %} |
123 | <script> | 124 | <script> |
124 | // imageRecipes includes both custom image recipes and built-in | 125 | // imageRecipes includes both custom image recipes and built-in |
125 | // image recipes, any of which can be used as the basis for a | 126 | // image recipes, any of which can be used as the basis for a |
126 | // new custom image | 127 | // new custom image |
127 | var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }}; | 128 | var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }}; |
128 | 129 | ||
129 | $(document).ready(function () { | 130 | $(document).ready(function () { |
130 | var newCustomImageModal = $('#new-custom-image-modal'); | 131 | var newCustomImageModal = $('#new-custom-image-modal'); |
131 | var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]'); | 132 | var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]'); |
132 | 133 | ||
133 | // show create new custom image modal to select an image built | 134 | // show create new custom image modal to select an image built |
134 | // during this build as the basis for the custom recipe | 135 | // during this build as the basis for the custom recipe |
135 | newCustomImageTrigger.click(function () { | 136 | newCustomImageTrigger.click(function () { |
136 | if (!imageRecipes.length) { | 137 | if (!imageRecipes.length) { |
137 | return; | 138 | return; |
138 | } | 139 | } |
139 | 140 | ||
140 | newCustomImageModalSetRecipes(imageRecipes); | 141 | newCustomImageModalSetRecipes(imageRecipes); |
141 | newCustomImageModal.modal('show'); | 142 | newCustomImageModal.modal('show'); |
143 | }); | ||
142 | }); | 144 | }); |
143 | }); | 145 | </script> |
144 | </script> | 146 | {% endif %} |
145 | {% endif %} | 147 | </ul> |
146 | </ul> | 148 | </div> |
149 | <!-- end left sidebar container --> | ||
150 | {% endif %} | ||
147 | 151 | ||
152 | <!-- right container; need class="row" for builds without left-hand menu --> | ||
153 | <div{% if not build.started %} class="row"{% endif %}> | ||
154 | {% block buildinfomain %}{% endblock %} | ||
148 | </div> | 155 | </div> |
149 | <!-- end left sidebar container --> | ||
150 | |||
151 | <!-- begin right container --> | ||
152 | {% block buildinfomain %}{% endblock %} | ||
153 | <!-- end right container --> | ||
154 | </div> | 156 | </div> |
155 | {% endblock %} | 157 | {% endblock %} |