diff options
author | David Reyna <David.Reyna@windriver.com> | 2017-06-27 13:44:30 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-28 16:02:15 +0100 |
commit | 4f2baebf362d71351db044c0646f9bc6e8a39c49 (patch) | |
tree | bcbb07afbe24816f35d0c9d616ac5ea1fcca7f17 /bitbake/lib/toaster/toastergui/templates | |
parent | 43aaa802c35ecc9d972f3b9adcd060033de1d9de (diff) | |
download | poky-4f2baebf362d71351db044c0646f9bc6e8a39c49.tar.gz |
bitbake: toaster: Add distro selection support
Add the ability to select a distro in the project page,
based on values from the Layer Index. Add a distro selection
page with the add layer feature, based on the add machine
page.
[YOCTO #10632]
(Bitbake rev: a156a4eff67cdc3943494f5be72b96e3db656250)
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')
4 files changed, 38 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 11c6f91260..0fbe17b5d8 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html | |||
@@ -49,6 +49,7 @@ | |||
49 | recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}}, | 49 | recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}}, |
50 | layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}}, | 50 | layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}}, |
51 | machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}}, | 51 | machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}}, |
52 | distrosTypeAheadUrl: {% url 'xhr_distrostypeahead' project.id as paturl%}{{paturl|json}}, | ||
52 | projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}}, | 53 | projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}}, |
53 | xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}", | 54 | xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}", |
54 | projectId : {{project.id}}, | 55 | projectId : {{project.id}}, |
diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html index 8427d25210..f2bb2ebf63 100644 --- a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html +++ b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html | |||
@@ -32,6 +32,7 @@ $(document).ready(function(){ | |||
32 | <li><a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a></li> | 32 | <li><a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a></li> |
33 | <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li> | 33 | <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li> |
34 | <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li> | 34 | <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li> |
35 | <li><a href="{% url 'projectdistros' project.id %}">Distros</a></li> | ||
35 | <li class="nav-header">Extra configuration</li> | 36 | <li class="nav-header">Extra configuration</li> |
36 | <li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li> | 37 | <li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li> |
37 | 38 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/distro_btn.html b/bitbake/lib/toaster/toastergui/templates/distro_btn.html new file mode 100644 index 0000000000..fac79472cc --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/distro_btn.html | |||
@@ -0,0 +1,20 @@ | |||
1 | <a href="{% url 'project' extra.pid %}?setDistro={{data.name}}" class="btn btn-default btn-block layer-exists-{{data.layer_version.id}}" | ||
2 | {% if data.layer_version.pk not in extra.current_layers %} | ||
3 | style="display:none;" | ||
4 | {% endif %}> | ||
5 | Set distro</a> | ||
6 | <a class="btn btn-default btn-block layerbtn layer-add-{{data.layer_version.id}}" data-layer='{ | ||
7 | "id": {{data.layer_version.id}}, | ||
8 | "name": "{{data.layer_version.layer.name}}", | ||
9 | "xhrLayerUrl": "{% url "xhr_layer" extra.pid data.pk %}", | ||
10 | "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}" | ||
11 | }' data-directive="add" | ||
12 | {% if data.layer_version.pk in extra.current_layers %} | ||
13 | style="display:none;" | ||
14 | {% endif %} | ||
15 | > | ||
16 | <span class="glyphicon glyphicon-plus"></span> | ||
17 | Add layer | ||
18 | <span class="glyphicon glyphicon-question-sign get-help" title="To select this distro, you must first add the {{data.layer_version.layer.name}} layer to your project"></i> | ||
19 | </a> | ||
20 | |||
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index ab7e665b64..11603d1e12 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html | |||
@@ -77,6 +77,22 @@ | |||
77 | </form> | 77 | </form> |
78 | </div> | 78 | </div> |
79 | 79 | ||
80 | <div class="well well-transparent" id="distro-section"> | ||
81 | <h3>Distro</h3> | ||
82 | |||
83 | <p class="lead"><span id="project-distro-name"></span> <span class="glyphicon glyphicon-edit" id="change-distro-toggle"></span></p> | ||
84 | |||
85 | <form id="select-distro-form" style="display:none;" class="form-inline"> | ||
86 | <span class="help-block">Distro suggestions come from the Layer Index</a></span> | ||
87 | <div class="form-group"> | ||
88 | <input class="form-control" id="distro-change-input" autocomplete="off" value="" data-provide="typeahead" data-minlength="1" data-autocomplete="off" type="text"> | ||
89 | </div> | ||
90 | <button id="distro-change-btn" class="btn btn-default" type="button">Save</button> | ||
91 | <a href="#" id="cancel-distro-change" class="btn btn-link">Cancel</a> | ||
92 | <p class="form-link"><a href="{% url 'projectdistros' project.id %}">View compatible distros</a></p> | ||
93 | </form> | ||
94 | </div> | ||
95 | |||
80 | <div class="well well-transparent"> | 96 | <div class="well well-transparent"> |
81 | <h3>Most built recipes</h3> | 97 | <h3>Most built recipes</h3> |
82 | 98 | ||