diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-08-29 16:41:59 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-01 08:51:32 +0100 |
commit | acd4a1799d51a9f0b192d12b2c58387595b27bf7 (patch) | |
tree | 194260d1e025db5cfb94662c81fbef2488f1798e /bitbake/lib/toaster/toastergui/templates | |
parent | fd0398f2c1355597a95242e6c8400eae6ad60fa4 (diff) | |
download | ast2050-yocto-poky-acd4a1799d51a9f0b192d12b2c58387595b27bf7.zip ast2050-yocto-poky-acd4a1799d51a9f0b192d12b2c58387595b27bf7.tar.gz |
bitbake: toaster: add project pages for machines, targets, layers
We add new pages for the all-machines and all-targets
project-related views.
We update the existing template structure to create
a base project view, similar to a base build view, that includes
a breadcrumb.
Updating existing all layers view to use the new structure.
We update methods in the models to provide corrent
information display.
[YOCTO #6592]
[YOCTO #6593]
(Bitbake rev: 973f582a19441c1ec67061160e4c50ce03ed7b68)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r--[-rwxr-xr-x] | bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html | 0 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/baseprojectpage.html | 43 | ||||
-rw-r--r--[-rwxr-xr-x] | bitbake/lib/toaster/toastergui/templates/layers.html | 9 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/machines.html | 63 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/project.html | 69 | ||||
-rw-r--r--[-rwxr-xr-x] | bitbake/lib/toaster/toastergui/templates/recipes.html | 0 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/targets.html | 186 |
7 files changed, 328 insertions, 42 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html index 5149768..5149768 100755..100644 --- a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html +++ b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html new file mode 100644 index 0000000..54edaaf --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} +{% load projecttags %} +{% load humanize %} +{% block pagecontent %} + + + <div class=""> +<!-- Breadcrumbs --> + <div class="section"> + <ul class="breadcrumb" id="breadcrumb"> + <li><a href="{% url 'all-builds' %}">All builds</a></li> + {% block parentbreadcrumb %} + {% if project %} + <li> + <a href="{%url 'project' project.id %}">{{project.name}} + </a> + </li> + {% endif %} + {% endblock %} + {% block localbreadcrumb %}{% endblock %} + </ul> + <script> + $( function () { + $('#breadcrumb > li').append("<span class=\"divider\">→</span>"); + $('#breadcrumb > li:last').addClass("active"); + $('#breadcrumb > li:last > span').remove(); + }); + </script> + </div> + + <div class="row-fluid"> + + <!-- Begin right container --> + {% block projectinfomain %}{% endblock %} + <!-- End right container --> + + + </div> + </div> + + +{% endblock %} + diff --git a/bitbake/lib/toaster/toastergui/templates/layers.html b/bitbake/lib/toaster/toastergui/templates/layers.html index d7d159e..bc6e5a3 100755..100644 --- a/bitbake/lib/toaster/toastergui/templates/layers.html +++ b/bitbake/lib/toaster/toastergui/templates/layers.html @@ -1,7 +1,12 @@ -{% extends "base.html" %} +{% extends "baseprojectpage.html" %} {% load projecttags %} {% load humanize %} -{% block pagecontent %} + +{% block localbreadcrumb %} +<li>Layers</li> +{% endblock %} + +{% block projectinfomain %} <div class="page-header"> <h1> All layers diff --git a/bitbake/lib/toaster/toastergui/templates/machines.html b/bitbake/lib/toaster/toastergui/templates/machines.html new file mode 100644 index 0000000..18e7485 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/machines.html @@ -0,0 +1,63 @@ +{% extends "baseprojectpage.html" %} +{% load projecttags %} +{% load humanize %} + +{% block localbreadcrumb %} +<li>Machines</li> +{% endblock %} + +{% block projectinfomain %} + <div class="page-header"> + <h1> + All machines + <i class="icon-question-sign get-help heading-help" title="This page lists all the machines compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i> + </h1> + </div> + <!--div class="alert"> + <div class="input-append" style="margin-bottom:0px;"> + <input class="input-xxlarge" type="text" placeholder="Search targets" value="browser" /> + <a class="add-on btn"> + <i class="icon-remove"></i> + </a> + <button class="btn" type="button">Search</button> + <a class="btn btn-link" href="#">Show all targets</a> + </div> + </div--> + <div id="target-added" class="alert alert-info lead" style="display:none;"></div> + <div id="target-removed" class="alert alert-info lead" style="display:none;"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>1</strong> target deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a> + </div> + + +{% include "basetable_top.html" %} + {% for o in objects %} + <tr class="data"> + <td class="machine"> + {{o.name}} + <a machine="_blank" href="http://layers.openembedded.org/layerindex/branch/master/machines/?q=3g-router-image"><i class="icon-share get-info"></i></a> + </td> + <td class="description">{{o.description}}</td> + <td class="machine-file"> + <code>{{o.file_path}}</code> + <a href="http://github.com/embeddedgeeks/meta-embeddedgeeks/blob/master/machines-core/images/3g-router-image.bb" machine="_blank"><i class="icon-share get-info"></i></a> + </td> + <td class="layer"><a href="#">{{o.layer_version.layer.name}}</a></td> + <td class="source">{{o.layer_source.name}}</td> + <td class="branch">{{o.layer_version.commit}}</td> + <td class="build"> + <a id="build-machine" href="project-with-machines.html?machine=3g-router-image" class="btn btn-block" style="display:none;"> + Build machine + </a> + <a id="add-layer" href="#" class="btn btn-block nopop" title="1 layer added"> + <i class="icon-plus"></i> + Add layer + <i class="icon-question-sign get-help" title="To build this machine, you must first add the meta-embeddedgeeks layer to your project"></i> + </a> + </td> + </tr> + {% endfor %} + +{% include "basetable_bottom.html" %} + +{% endblock %} diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index 3c59fcf..d7bfa2b 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html @@ -224,36 +224,14 @@ $(document).ready(function () { <div id="dependency-alert" class="alert alert-info" style="display:none;"> <p><strong>meta-tizen</strong> depends on the layers below. Check the ones you want to add: </p> <ul class="unstyled"> - <li> - <label class="checkbox"> - <input checked="checked" type="checkbox"> - meta-efl - </label> - </li> - <li> - <label class="checkbox"> - <input checked="checked" type="checkbox"> - meta-intel - </label> - </li> - <li> - <label class="checkbox"> - <input checked="checked" type="checkbox"> - meta-multimedia - </label> - </li> - <li> - <label class="checkbox"> - <input checked="checked" type="checkbox"> - meta-oe - </label> - </li> + {% for f in layer_dependency %} <li> <label class="checkbox"> <input checked="checked" type="checkbox"> meta-ruby </label> </li> + {% endfor %} </ul> <button id="add-layer-dependencies" class="btn btn-info add-layer">Add layers</button> </div> @@ -315,27 +293,38 @@ $(document).ready(function () { </div> <div class="well well-transparent span4"> + <h3> - Set machine - <i data-original-title="The machine is the hardware for which you want to build. You can only set one machine per project" class="icon-question-sign get-help heading-help" title=""></i> + Project machine + <i class="icon-question-sign get-help heading-help" title="The machine is the hardware for which you want to build. You can only set one machine per project"></i> </h3> - <p class="lead"> - {{machine}} - <i title="" data-original-title="" class="icon-pencil"></i> + <p class="lead" id="selected-machine"> {{machine}} + <i id="change-machine" class="icon-pencil"></i> </p> - <h3> - Set distro - <i data-original-title="When you build an image using the Yocto Project and do not alter the distro, you are creating a Poky distribution" class="icon-question-sign get-help heading-help" title=""></i> - </h3> - <p class="lead"> - {{distro}} - <i title="" data-original-title="" class="icon-pencil"></i> + <form id="select-machine"> + <div class="alert alert-info"> + <strong>Machine changes have a big impact on build outcome.</strong> + You cannot really compare the builds for the new machine with the previous ones. + </div> + <div class="input-append"> + <input type="text" id="machine" autocomplete="off" value="qemux86" data-provide="typeahead" + data-minLength="1" + data-autocomplete="off" + data-source='[ + ]'> + <button id="apply-change-machine" class="btn" type="button">Save</button> + <a href="#" id="cancel-machine" class="btn btn-link">Cancel</a> + </div> + <p><a href="{% url 'machines' %}" class="link">View all machines</a></p> + </form> + <p class="link-action"> + <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a> + <i class="icon-question-sign get-help heading-help" title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair"></i> </p> - <p class="link-action"> - <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a> - <i class="icon-question-sign get-help heading-help" title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair"></i> - </p> + </div> + + </div> <h2>Project details</h2> diff --git a/bitbake/lib/toaster/toastergui/templates/recipes.html b/bitbake/lib/toaster/toastergui/templates/recipes.html index 791a487..791a487 100755..100644 --- a/bitbake/lib/toaster/toastergui/templates/recipes.html +++ b/bitbake/lib/toaster/toastergui/templates/recipes.html diff --git a/bitbake/lib/toaster/toastergui/templates/targets.html b/bitbake/lib/toaster/toastergui/templates/targets.html new file mode 100644 index 0000000..3afdf0a --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/targets.html @@ -0,0 +1,186 @@ +{% extends "baseprojectpage.html" %} +{% load projecttags %} +{% load humanize %} + +{% block localbreadcrumb %} +<li>Targets</li> +{% endblock %} + +{% block projectinfomain %} + <div class="page-header"> + <h1> + All targets + <i class="icon-question-sign get-help heading-help" title="This page lists all the targets compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i> + </h1> + </div> + <!--div class="alert"> + <div class="input-append" style="margin-bottom:0px;"> + <input class="input-xxlarge" type="text" placeholder="Search targets" value="browser" /> + <a class="add-on btn"> + <i class="icon-remove"></i> + </a> + <button class="btn" type="button">Search</button> + <a class="btn btn-link" href="#">Show all targets</a> + </div> + </div--> + <div id="target-added" class="alert alert-info lead" style="display:none;"></div> + <div id="target-removed" class="alert alert-info lead" style="display:none;"> + <button type="button" class="close" data-dismiss="alert">×</button> + <strong>1</strong> target deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a> + </div> + + +{% include "basetable_top.html" %} + {% for o in objects %} + <tr class="data"> + <td class="target"> + {{o.name}} ({{o.id}}, {{o.up_id}}) + <a target="_blank" href="{{o.get_layersource_view_url}}"><i class="icon-share get-info"></i></a> + </td> + <td class="version">{{o.version}}</td> + <td class="description">{{o.description}}</td> + <td class="recipe-file"> + <code>{{o.file_path}}</code> + <a href="{{o.get_vcs_link_url}}" target="_blank"><i class="icon-share get-info"></i></a> + </td> + <td class="target-section">{{o.section}}</td> + <td class="license">{{o.license}}</td> + <td class="layer"><a href="#">{{o.layer_version.layer.name}}</a></td> + <td class="source">{{o.layer_source.name}}</td> + <td class="branch">{{o.layer_version.commit}}</td> + <td class="build"> + <a id="build-target" href="project-with-targets.html?target=3g-router-image" class="btn btn-block" style="display:none;"> + Build target + </a> + <a id="add-layer" href="#" class="btn btn-block nopop" title="1 layer added"> + <i class="icon-plus"></i> + Add layer + <i class="icon-question-sign get-help" title="To build this target, you must first add the meta-embeddedgeeks layer to your project"></i> + </a> + </td> + </tr> + {% endfor %} +{% include "basetable_bottom.html" %} + + <!-- Modals --> + + <!-- 'Layer dependencies modal' --> + <div id="dependencies-message" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> + <h3>meta-acer dependencies</h3> + </div> + <div class="modal-body"> + <p><strong>meta-acer</strong> depends on some targets that are not added to your project. Select the ones you want to add:</p> + <ul class="unstyled"> + <li> + <label class="checkbox"> + <input type="checkbox" checked="checked"> + meta-android + </label> + </li> + <li> + <label class="checkbox"> + <input type="checkbox" checked="checked"> + meta-oe + </label> + </li> + </ul> + </div> + <div class="modal-footer"> + <button id="add-target-dependencies" type="submit" class="btn btn-primary" data-dismiss="modal" >Add targets</button> + <button class="btn" data-dismiss="modal">Cancel</button> + </div> + </div> + + <script src="assets/js/jquery-1.9.1.min.js" type='text/javascript'></script> + <script src="assets/js/jquery.tablesorter.min.js" type='text/javascript'></script> + <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script> + <script src="assets/js/bootstrap.min.js" type='text/javascript'></script> + <script src="assets/js/prettify.js" type='text/javascript'></script> + <script src="assets/js/jit.js" type='text/javascript'></script> + <script src="assets/js/main.js" type='text/javascript'></script> + + <script> + $(document).ready(function() { + + //show or hide selected columns on load + $("input:checkbox").each(function(){ + var selectedType = $(this).val(); + if($(this).is(":checked")){ + $("."+selectedType).show(); + } + else{ + $("."+selectedType).hide(); + } + }); + + // enable add target button + $('#add-target-with-deps').removeAttr('disabled'); + + //edit columns functionality (show / hide table columns) + $("input:checkbox").change(); + $("input:checkbox").change(function(){ + var selectedType = $(this).val(); + if($(this).is(":checked")){ + $("."+selectedType).show(); + } + else{ + $("."+selectedType).hide(); + } + }); + + //turn edit columns dropdown into a multi-select menu + $('.dropdown-menu input, .dropdown-menu label').click(function(e) { + e.stopPropagation(); + }); + + //show tooltip with applied filter + $('#filtered').tooltip({container:'table', placement:'bottom', delay:{hide:1500}, html:true}); + + $('#filtered').click(function() { + $(this).tooltip('hide'); + }); + + //show target added tooltip + $("#remove-target, #add-target, #add-target-with-deps2").tooltip({ trigger: 'manual' }); + + // add target without dependencies + $("#add-target").click(function(){ + $('#target-removed').hide(); + $('#target-added').html('<button type="button" class="close" data-dismiss="alert">×</button><strong>1</strong> target added to <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>').fadeIn(); + $('#add-target').tooltip('show'); + $("#add-target").hide(); + $(".add-targets .tooltip").delay(2000).fadeOut(function(){ + $("#remove-target").delay(300).fadeIn(); + }); + }); + + // add target with dependencies + $(document).on("click", "#add-target-dependencies", function() { + $('#target-removed').hide(); + $('#target-added').html('<button type="button" class="close" data-dismiss="alert">×</button><strong>3</strong> targets added to <a href="project-with-targets.html">your project</a>: <a href="#">meta-acer</a> and its dependencies <a href="#">meta-android</a> and <a href="#">meta-oe</a>').delay(400).fadeIn(function(){ + $('#add-target-with-deps').tooltip('show'); + $("#add-target-with-deps, #add-target-with-deps").hide(); + $(".add-targets .tooltip").delay(2000).fadeOut(function(){ + $("#remove-target-with-deps").delay(300).fadeIn(); + }); + }); + }); + + // delete target + $("#remove-target").click(function(){ + $('#target-added').hide(); + $('#target-removed').show(); + $('#remove-target').tooltip('show'); + $("#remove-target").hide(); + $(".add-targets .tooltip").delay(2000).fadeOut(function(){ + $("#add-target").delay(300).fadeIn(); + }); + }); + + }); + +</script> + +{% endblock %} |