summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/machines.html
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-04-21 11:59:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-08 17:42:06 +0100
commitbec5d164717c6987f81d47d75942e94538649dad (patch)
tree189574b0de84b2f7ebc83fd3c0230be35d28f997 /bitbake/lib/toaster/toastergui/templates/machines.html
parenta4cfca604b2c5ab35baf69c2070afa0087842b68 (diff)
downloadpoky-bec5d164717c6987f81d47d75942e94538649dad.tar.gz
bitbake: toaster: Refactor and expand layer add remove mechanism
We have multiple pages which have buttons to add and remove layers this patch adds functionality to libtoaster to abstract this and implements it in the pages affected. We handle loading and showing the dependencies dialog here too and generating the notification messages. Also implemented is using the selectmachine api from the projectapp to avoid having to handle this in each page that allows selecting machines. A small number of jshint issues, help text and the machine page name have also been fixed. (Bitbake rev: ae7a656ba7fc6f4356b57aa309a9b6d035e51d2e) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/machines.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/machines.html31
1 files changed, 16 insertions, 15 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/machines.html b/bitbake/lib/toaster/toastergui/templates/machines.html
index 64db0f9ca7..d116a45f3b 100644
--- a/bitbake/lib/toaster/toastergui/templates/machines.html
+++ b/bitbake/lib/toaster/toastergui/templates/machines.html
@@ -7,22 +7,23 @@
7{% endblock %} 7{% endblock %}
8 8
9{% block projectinfomain %} 9{% block projectinfomain %}
10<script src="{% static 'js/machines.js' %}"></script> 10
11<script src="{% static 'js/layerBtn.js' %}"></script>
11<script> 12<script>
12 13
13 $(document).ready(function (){ 14 $(document).ready(function (){
14 var ctx = { 15 var ctx = {
16 projectLayers : {{projectlayerset}},
15 }; 17 };
16 18
17 try { 19 try {
18 machinesPageInit(ctx); 20 layerBtnsInit(ctx);
19 } catch (e) { 21 } catch (e) {
20 document.write("Sorry, An error has occurred loading this page"); 22 document.write("Sorry, An error has occurred loading this page");
21 console.warn(e); 23 console.warn(e);
22 } 24 }
23 }); 25 });
24</script> 26</script>
25{% include "layers_dep_modal.html" %}
26<div class="page-header"> 27<div class="page-header">
27 <h1> 28 <h1>
28 {% if request.GET.search or request.GET.filter %} 29 {% if request.GET.search or request.GET.filter %}
@@ -33,14 +34,17 @@
33 {% endif %} 34 {% endif %}
34 {% else %} 35 {% else %}
35 36
36 All machines 37 All compatible machines
37 <i class="icon-question-sign get-help heading-help" title="This page lists all the machines compatible with the current project that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i> 38 <i class="icon-question-sign get-help heading-help" title="This page lists all the machines compatible with the current project that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i>
38 {% endif %} 39 {% endif %}
39 </h1> 40 </h1>
40</div> 41</div>
41<div class="alert alert-info lead" id="alert-area" style="display:none"> 42
42 <button type="button" class="close" id="dismiss-alert">&times;</button> 43<div id="zone1alerts" style="display:none">
43 <span id="alert-msg"></span> 44 <div class="alert alert-info lead">
45 <button type="button" class="close" id="hide-alert">&times;</button>
46 <span id="alert-msg"></span>
47 </div>
44</div> 48</div>
45{% if objects.paginator.count == 0 %} 49{% if objects.paginator.count == 0 %}
46 {% if request.GET.search %} 50 {% if request.GET.search %}
@@ -68,19 +72,16 @@
68 <td class="layer"><a href="{%url "layerdetails" o.layer_version.id %}">{{o.layer_version.layer.name}}</a></td> 72 <td class="layer"><a href="{%url "layerdetails" o.layer_version.id %}">{{o.layer_version.layer.name}}</a></td>
69 <td class="branch">{{o.layer_version.get_vcs_reference}}</td> 73 <td class="branch">{{o.layer_version.get_vcs_reference}}</td>
70 <td class="machinefile"><code>/machine/conf/{{o.name}}.conf</code><a href="{{o.get_vcs_machine_file_link_url}}" target="_blank"><i class="icon-share get-info"></i></a></td> 74 <td class="machinefile"><code>/machine/conf/{{o.name}}.conf</code><a href="{{o.get_vcs_machine_file_link_url}}" target="_blank"><i class="icon-share get-info"></i></a></td>
71 <td class="select-or-add"> 75 <td class="select-or-add" style="height: 32px;">
72 <a href="#" class="btn btn-block select-machine-btn" data-machine-name="{{o.name}}" data-layer-version-id="{{o.layer_version.id}}" 76 <a href="{% url 'project' project.id %}#/machineselect={{o.name}}" class="btn btn-block layer-exists-{{o.layer_version.id}}" style="margin-top: 5px; display:none">Select machine</a>
73 {%if o.layer_version.id not in project_layers %}style="display:none" {%endif%} >Select machine</a> 77 <button class="btn btn-block layerbtn layer-add-{{o.layer_version.id}}" data-layer='{ "id": {{o.layer_version.id}}, "name": "{{o.layer_version.layer.name}}", "url": "{%url 'layerdetails' o.layer_version.id %}"}' data-directive="add">
74 <a href="#" class="btn btn-block nopop add-layer" data-layer-version-id="{{o.layer_version.id}}" data-layer-name="{{o.layer_version.layer.name}}" {%if o.layer_version.id in project_layers %}style="display:none" {%endif%}
75 >
76 <i class="icon-plus"></i> 78 <i class="icon-plus"></i>
77 Add layer 79 Add layer
78 <i class="icon-question-sign get-help" title="To build this machine, you must first add the {{o.layer_version.layer.name}} layer to your project"></i> 80 <i title="" class="icon-question-sign get-help" data-original-title="To enable this machine, you must first add the {{o.layer_version.layer.name}} layer to your project"></i></i>
79 </a> 81 </button>
80 </td> 82 </td>
81 </tr> 83 </tr>
82 {% endfor %} 84 {% endfor %}
83
84 {% include "basetable_bottom.html" %} 85 {% include "basetable_bottom.html" %}
85{% endif %} 86{% endif %}
86 87