summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-05-11 18:51:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-14 18:04:09 +0100
commit23f5b009e0ebf59cfcc9ae90a1084468fc88e42f (patch)
tree06eb458cbd9a95dd635160adac7d90aeae6afea1 /bitbake/lib/toaster/toastergui/templates
parent7f8c44771cc6219ad7e58da7840fffbe93f11b39 (diff)
downloadpoky-23f5b009e0ebf59cfcc9ae90a1084468fc88e42f.tar.gz
bitbake: toaster: Port All recipes, layers and machines to ToasterTables
Port of the main tables to the new ToasterTable widget. (Bitbake rev: 6de539d5953b2dca2a9ed75556a59764337a194c) 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')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layer_btn.html9
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layers.html132
-rw-r--r--bitbake/lib/toaster/toastergui/templates/machine_btn.html8
-rw-r--r--bitbake/lib/toaster/toastergui/templates/machines.html88
-rw-r--r--bitbake/lib/toaster/toastergui/templates/recipe_btn.html8
-rw-r--r--bitbake/lib/toaster/toastergui/templates/targets.html142
6 files changed, 25 insertions, 362 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/layer_btn.html b/bitbake/lib/toaster/toastergui/templates/layer_btn.html
new file mode 100644
index 0000000000..6672017256
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/layer_btn.html
@@ -0,0 +1,9 @@
1<button class="btn btn-danger btn-block layer-exists-{{data.pk}} layerbtn" style="display:none;" data-layer='{ "id": {{data.pk}}, "name": "{{data.layer.name}}", "url": "{%url 'layerdetails' extra.pid data.pk%}"}' data-directive="remove" >
2 <i class="icon-trash"></i>
3 Delete layer
4</button>
5<button class="btn btn-block layer-add-{{data.pk}} layerbtn" data-layer='{ "id": {{data.pk}}, "name": "{{data.layer.name}}", "url": "{%url 'layerdetails' extra.pid data.pk%}"}' data-directive="add">
6 <i class="icon-plus"></i>
7 Add layer
8</button>
9
diff --git a/bitbake/lib/toaster/toastergui/templates/layers.html b/bitbake/lib/toaster/toastergui/templates/layers.html
deleted file mode 100644
index e6861c2708..0000000000
--- a/bitbake/lib/toaster/toastergui/templates/layers.html
+++ /dev/null
@@ -1,132 +0,0 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4{% load static %}
5
6{% block localbreadcrumb %}
7<li>All compatible layers</li>
8{% endblock %}
9
10
11{% block projectinfomain %}
12
13<script src="{% static 'js/layerBtn.js' %}"></script>
14<script>
15
16 $(document).ready(function (){
17 var ctx = {
18 projectLayers : {{projectlayerset}},
19 };
20
21 try {
22 layerBtnsInit(ctx);
23 } catch (e) {
24 document.write("Sorry, An error has occurred loading this page");
25 console.warn(e);
26 }
27 });
28</script>
29
30 <div class="page-header">
31 <h1>
32 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
33 {{objects.paginator.count}} layer{{objects.paginator.count|pluralize}} found
34 {% elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
35 No layers found
36 {%else%}
37 All compatible layers
38 {%endif%}
39 <i class="icon-question-sign get-help heading-help" title="This page lists all the layers compatible with the release selected for this project, which is {{project.release.description}}"></i>
40 </h1>
41 </div>
42
43 <div id="zone1alerts" style="display:none">
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>
48 </div>
49
50{% if objects.paginator.count == 0 %}
51 {% if request.GET.filter or request.GET.search %}
52 <div class="row-fluid">
53 <div class="alert">
54 <form class="no-results input-append" id="searchform">
55 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
56 <button class="btn" type="submit" value="Search">Search</button>
57 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all layers</button>
58 </form>
59 </div>
60 </div>
61 {% else %}
62 <div class="alert alert-info lead">
63 <p>Toaster has no layer information. To generate layer information you can:</p>
64 <ul>
65 <li><a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">Configure a layer source</a></li>
66 <li><a href="{% url 'importlayer' %}">Import a layer</a></li>
67 </ul>
68 </div>
69 {% endif %}
70
71{% else %}
72
73{% include "basetable_top_layers.html" %}
74 {% for o in objects %}
75 <tr class="data">
76 <td class="layer"><a href="{% url 'layerdetails' project.id o.id %}">{{o.layer.name}}</a></td>
77 <td class="description">{% if o.layer.summary %}{{o.layer.summary}}{%endif%}</td>
78 <td class="git-repo"><a href="{% url 'layerdetails' project.id o.pk %}"><code>{{o.layer.vcs_url}}</code></a>
79 {% if o.get_vcs_link_url %}
80 <a target="_blank" href="{{ o.get_vcs_link_url }}"><i class="icon-share get-info"></i></a>
81 {% endif %}
82 </td>
83 <td class="git-subdir" style="display: table-cell;"><a href="{% url 'layerdetails' project.id o.pk %}"><code>{{o.dirpath}}</code></a>
84 {% if o.dirpath and o.get_vcs_dirpath_link_url %}
85 <a target="_blank" href="{{ o.get_vcs_dirpath_link_url }}"><i class="icon-share get-info"></i></a>
86 {% endif %}
87 </td>
88 <td class="branch">
89 {% with vcs_ref=o.get_vcs_reference %}
90 {% if vcs_ref|is_shaid %}
91 <a class="btn" data-content="<ul class='unstyled'> <li>{{vcs_ref}}</li> </ul>">
92 {{vcs_ref|truncatechars:10}}
93 </a>
94 {% else %}
95 {{vcs_ref}}
96 {% endif %}
97 {% endwith %}
98 </td>
99 <td class="dependencies">
100 {% with ods=o.dependencies.all%}
101 {% if ods.count %}
102 <a class="btn"
103 title="<a href='{% url "layerdetails" project.id o.pk %}'>{{o.layer.name}}</a> dependencies"
104 data-content="<ul class='unstyled'>
105 {% for i in ods%}
106 <li><a href='{% url "layerdetails" project.id i.depends_on.pk %}'>{{i.depends_on.layer.name}}</a></li>
107 {% endfor %}
108 </ul>">
109 {{ods.count}}
110 </a>
111 {% endif %}
112 {% endwith %}
113 </td>
114 {% if project %}
115 <td class="add-del-layers" data-value="{{o.pk}}">
116 <button class="btn btn-danger btn-block layer-exists-{{o.pk}} layerbtn" style="display:none;" data-layer='{ "id": {{o.pk}}, "name": "{{o.layer.name}}", "url": "{%url 'layerdetails' project.id o.pk%}"}' data-directive="remove" >
117 <i class="icon-trash"></i>
118 Delete layer
119 </button>
120 <button class="btn btn-block layer-add-{{o.pk}} layerbtn" data-layer='{ "id": {{o.pk}}, "name": "{{o.layer.name}}", "url": "{%url 'layerdetails' project.id o.pk%}"}' data-directive="add">
121 <i class="icon-plus"></i>
122 Add layer
123 </button>
124 </td>
125 {% endif %}
126 </tr>
127 {% endfor %}
128{% include "basetable_bottom.html" %}
129
130{%endif%}
131
132{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/machine_btn.html b/bitbake/lib/toaster/toastergui/templates/machine_btn.html
new file mode 100644
index 0000000000..fffb536e2b
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/machine_btn.html
@@ -0,0 +1,8 @@
1<a href="{% url 'project' extra.pid %}#/machineselect={{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.id}}" style="margin-top: 5px; display:none">
2 Select machine</a>
3<button class="btn btn-block layerbtn layer-add-{{data.layer_version.id}}" data-layer='{ "id": {{data.layer_version.id}}, "name": "{{data.layer_version.layer.name}}", "url": "{%url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add">
4 <i class="icon-plus"></i>
5 Add layer
6 <i title="" class="icon-question-sign get-help" data-original-title="To enable this machine, you must first add the {{data.layer_version.layer.name}} layer to your project"></i>
7</button>
8
diff --git a/bitbake/lib/toaster/toastergui/templates/machines.html b/bitbake/lib/toaster/toastergui/templates/machines.html
deleted file mode 100644
index 9979376b07..0000000000
--- a/bitbake/lib/toaster/toastergui/templates/machines.html
+++ /dev/null
@@ -1,88 +0,0 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4{% load static %}
5{% block localbreadcrumb %}
6<li>All compatible machines</li>
7{% endblock %}
8
9{% block projectinfomain %}
10
11<script src="{% static 'js/layerBtn.js' %}"></script>
12<script>
13
14 $(document).ready(function (){
15 var ctx = {
16 projectLayers : {{projectlayerset}},
17 };
18
19 try {
20 layerBtnsInit(ctx);
21 } catch (e) {
22 document.write("Sorry, An error has occurred loading this page");
23 console.warn(e);
24 }
25 });
26</script>
27<div class="page-header">
28 <h1>
29 {% if request.GET.search or request.GET.filter %}
30 {% if objects.paginator.count != 0 %}
31 {{objects.paginator.count}} machines found
32 {% else %}
33 No machines found
34 {% endif %}
35 {% else %}
36
37 All compatible machines
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>
39 {% endif %}
40 </h1>
41</div>
42
43<div id="zone1alerts" style="display:none">
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>
48</div>
49{% if objects.paginator.count == 0 %}
50 {% if request.GET.search %}
51 <div class="alert row-fluid">
52 <form class="navbar-search input-append pull-left" id="searchform">
53 <input class="input-xxlarge" id="search" name="search" type="text" placeholder="Search machines" value="{{request.GET.search}}"><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
54 <input type="hidden" name="orderby" value="">
55 <input type="hidden" name="page" value="1">
56 <button class="btn" type="submit" value="Search">Search</button>
57 <button type="submit" class="btn btn-link" id="show-all-btn">Show all machines</button>
58 </form>
59 </div>
60 {% else %}
61 <div class="alert alert-info lead">
62 Toaster has no machine information. To generate machine information you should <a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">configure a layer source</a>
63 </div>
64 {% endif %}
65
66{% else %}
67 {% include "basetable_top.html" %}
68 {% for o in objects %}
69 <tr class="data">
70 <td class="machine">{{o.name}}</td>
71 <td class="description">{{o.description}}</td>
72 <td class="layer"><a href="{%url "layerdetails" project.id o.layer_version.id %}">{{o.layer_version.layer.name}}</a></td>
73 <td class="branch">{{o.layer_version.get_vcs_reference}}</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>
75 <td class="select-or-add" style="height: 32px;">
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>
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' project.id o.layer_version.id %}"}' data-directive="add">
78 <i class="icon-plus"></i>
79 Add layer
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>
81 </button>
82 </td>
83 </tr>
84 {% endfor %}
85 {% include "basetable_bottom.html" %}
86{% endif %}
87
88{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/recipe_btn.html b/bitbake/lib/toaster/toastergui/templates/recipe_btn.html
new file mode 100644
index 0000000000..1c7c58ca3f
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/recipe_btn.html
@@ -0,0 +1,8 @@
1<a href="{% url 'project' extra.pid %}#/targetbuild={{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.pk}}" style="display:none; margin-top: 5px;" >
2 Build recipe
3</a>
4<button class="btn btn-block layerbtn layer-add-{{data.layer_version.pk}}" data-layer='{ "id": {{data.layer_version.pk}}, "name": "{{data.layer_version.layer.name}}", "url": "{%url 'layerdetails' extra.pid data.layer_version.pk%}"}' data-directive="add">
5 <i class="icon-plus"></i>
6 Add layer
7 <i title="" class="icon-question-sign get-help" data-original-title="To build this target, you must first add the {{data.layer_version.layer.name}} layer to your project"></i>
8</button>
diff --git a/bitbake/lib/toaster/toastergui/templates/targets.html b/bitbake/lib/toaster/toastergui/templates/targets.html
deleted file mode 100644
index 224288ea35..0000000000
--- a/bitbake/lib/toaster/toastergui/templates/targets.html
+++ /dev/null
@@ -1,142 +0,0 @@
1{% extends "baseprojectpage.html" %}
2{% load projecttags %}
3{% load humanize %}
4{% load static %}
5
6{% block localbreadcrumb %}
7<li>All compatible recipes</li>
8{% endblock %}
9
10{% block projectinfomain %}
11
12<script src="{% static 'js/layerBtn.js' %}"></script>
13<script>
14
15 $(document).ready(function (){
16 var ctx = {
17 projectLayers : {{projectlayerset}},
18 };
19
20 try {
21 layerBtnsInit(ctx);
22 } catch (e) {
23 document.write("Sorry, An error has occurred loading this page");
24 console.warn(e);
25 }
26 });
27</script>
28
29
30<div class="page-header">
31 <h1>
32 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
33 {{objects.paginator.count}} recipe{{objects.paginator.count|pluralize}} found
34 {% elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
35 No recipes found
36 {%else%}
37 All compatible recipes
38 {%endif%}
39 <i class="icon-question-sign get-help heading-help" title="This page lists all the recipes compatible with the release selected for this project, which is {{project.release.description}}"></i>
40 </h1>
41</div>
42
43<div id="zone1alerts" style="display:none">
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>
48</div>
49{% if objects.paginator.count == 0 %}
50 {% if request.GET.filter or request.GET.search %}
51 <div class="row-fluid">
52 <div class="alert">
53 <form class="no-results input-append" id="searchform">
54 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
55 <button class="btn" type="submit" value="Search">Search</button>
56 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all recipes</button>
57 </form>
58 </div>
59 </div>
60 {% else %}
61 <div class="alert alert-info lead">
62 <p>Toaster has no recipe information. To generate recipe information you can:</p>
63 <ul>
64 <li><a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">Configure a layer source</a></li>
65 <li><a href="{% url 'importlayer' project.id %}">Import a layer</a>, then run a build</li>
66 </ul>
67 </div>
68 {% endif %}
69
70{% else %}
71
72{% include "basetable_top.html" %}
73 {% for o in objects %}
74 <tr class="data">
75 <td class="target">
76 {{o.name}}
77 <a target="_blank" href="{{o.get_layersource_view_url}}"><i class="icon-share get-info"></i></a>
78 </td>
79 <td class="version">{{o.version}}</td>
80 <td class="description">{% if o.description %}{{o.description}}{% else %}{{o.summary}}{%endif%}</td>
81 <td class="recipe-file">
82 <code>{{o.file_path}}</code>
83 <a href="{{o.vcs_link_url}}" target="_blank"><i class="icon-share get-info"></i></a>
84 </td>
85 <td class="target-section">{{o.section}}</td>
86 <td class="license">{{o.license}}</td>
87 <td class="layer"><a href="{% url 'layerdetails' project.id o.preffered_layerversion.id%}">{{o.preffered_layerversion.layer.name}}</a></td>
88 <td class="branch">
89 {% if o.preffered_layerversion.up_branch %}
90 {{o.preffered_layerversion.up_branch.name}}
91 {% else %}
92 <a class="btn"
93 data-content="<ul class='unstyled'>
94 <li>{{o.layer_version.commit}}</li>
95 </ul>">
96 {{o.layer_version.commit|truncatechars:13}}
97 </a>
98 {% endif %}
99 </td>
100 <td class="add-layer" data-value="{{o.pk}}">
101 <a href="{% url 'project' project.id %}#/targetbuild={{o.name}}" class="btn btn-block layer-exists-{{o.preffered_layerversion.pk}}" style="display:none; margin-top: 5px;" >
102 Build recipe
103 </a>
104 <button class="btn btn-block layerbtn layer-add-{{o.preffered_layerversion.pk}}" data-layer='{ "id": {{o.preffered_layerversion.pk}}, "name": "{{o.preffered_layerversion.layer.name}}", "url": "{%url 'layerdetails' project.id o.preffered_layerversion.pk%}"}' data-directive="add">
105 <i class="icon-plus"></i>
106 Add layer
107 <i title="" class="icon-question-sign get-help" data-original-title="To build this target, you must first add the {{o.preffered_layerversion.layer.name}} layer to your project"></i>
108 </button>
109 </td>
110 </tr>
111 {% endfor %}
112{% include "basetable_bottom.html" %}
113
114 <!-- Modals -->
115
116 <!-- 'Layer dependencies modal' -->
117 <div id="dependencies_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
118 <form id="dependencies_modal_form">
119 <div class="modal-header">
120 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
121 <h3><span class="layer-name"></span> dependencies</h3>
122 </div>
123 <div class="modal-body">
124 <p><strong class="layer-name"></strong> depends on some layers that are not added to your project. Select the ones you want to add:</p>
125 <ul class="unstyled" id="dependencies_list">
126 </ul>
127 </div>
128 <div class="modal-footer">
129 <button class="btn btn-primary" type="submit">Add layers</button>
130 <button class="btn" type="reset" data-dismiss="modal">Cancel</button>
131 </div>
132 </form>
133 </div>
134
135{% endif %}
136
137{% if project %}
138<script>
139</script>
140{%endif%}
141
142{% endblock %}