summaryrefslogtreecommitdiffstats
path: root/yocto-poky/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/bitbake/lib/toaster/toastergui/templates')
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html144
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html11
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html213
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html3
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html4
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html25
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html48
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/builds.html119
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html14
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html193
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/editcustomimage_modal.html71
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html2
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html4
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html10
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html2
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html8
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html12
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html108
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html44
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html48
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html50
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html21
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html56
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html11
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html186
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html36
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/projects.html92
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html34
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html28
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/recipedetails.html177
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html14
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html14
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html23
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html22
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html4
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html13
-rw-r--r--yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html13
37 files changed, 1181 insertions, 696 deletions
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html
index 11ac2a035..210cf3360 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html
@@ -3,15 +3,15 @@
{% load projecttags %}
{% load project_url_tag %}
<html lang="en">
- <head>
- <title>
- {% block title %} Toaster {% endblock %}
- </title>
-<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
-<link rel="stylesheet" href="{% static 'css/bootstrap-responsive.min.css' %}" type='text/css'/>
-<link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'/>
-<link rel="stylesheet" href="{% static 'css/prettify.css' %}" type='text/css'/>
-<link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'/>
+ <head>
+ <title>
+ {% block title %} Toaster {% endblock %}
+ </title>
+ <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
+ <link rel="stylesheet" href="{% static 'css/bootstrap-responsive.min.css' %}" type='text/css'/>
+ <link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'/>
+ <link rel="stylesheet" href="{% static 'css/prettify.css' %}" type='text/css'/>
+ <link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
@@ -40,48 +40,35 @@
projectId : {{project.id}},
projectPageUrl : {% url 'project' project.id as purl %}{{purl|json}},
projectName : {{project.name|json}},
- projectIsDefault: {% if project.is_default %}true{% else %}false{% endif %},
recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}},
layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}},
machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}},
-
projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}},
+ xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}",
projectId : {{project.id}},
+ xhrBuildRequestUrl: "{% url 'xhr_buildrequest' project.id %}",
{% else %}
projectId : undefined,
projectPageUrl : undefined,
projectName : undefined,
- projectIsDefault: false,
{% endif %}
};
</script>
- <script src="{% static 'js/base.js' %}"></script>
- <script>
- $(document).ready(function () {
- /* Vars needed for base.js */
- var ctx = {};
- ctx.numProjects = {{projects|length}};
- ctx.currentUrl = "{{request.path|escapejs}}";
-
- basePageInit(ctx);
- });
- </script>
+ {% block extraheadcontent %}
+ {% endblock %}
+ </head>
-{% block extraheadcontent %}
-{% endblock %}
- </head>
+ <body style="height: 100%">
-<body style="height: 100%">
-
- {% csrf_token %}
- <div id="loading-notification" class="alert lead text-center" style="display:none">
- Loading <i class="fa-pulse icon-spinner"></i>
- </div>
+ {% csrf_token %}
+ <div id="loading-notification" class="alert lead text-center" style="display:none">
+ Loading <i class="fa-pulse icon-spinner"></i>
+ </div>
- <div id="change-notification" class="alert lead alert-info" style="display:none">
- <button type="button" class="close" id="hide-alert">&times;</button>
- <span id="change-notification-msg"></span>
- </div>
+ <div id="change-notification" class="alert lead alert-info" style="display:none">
+ <button type="button" class="close" id="hide-alert">&times;</button>
+ <span id="change-notification-msg"></span>
+ </div>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
@@ -90,10 +77,10 @@
<span class="brand">
<a href="/">Toaster</a>
{% if DEBUG %}
- <i class="icon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
+ <i class="icon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Git branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Git revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
{% endif %}
</span>
- {% if BUILD_MODE and request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
+ {% if request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
<ul class="nav">
<li {% if request.resolver_match.url_name == 'all-builds' %}
class="active"
@@ -122,75 +109,18 @@
</li>
</ul>
<span class="pull-right divider-vertical"></span>
-
- <!-- new project button; only show in build mode -->
- {% if BUILD_MODE %}
- <div class="btn-group pull-right">
- <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
- </div>
- {% endif %}
-
- <!--
- New build popover; only shown if there is at least one user-created project
- and we're in build mode
- -->
- {% if BUILD_MODE and non_cli_projects.count > 0 %}
- <div class="btn-group pull-right" id="new-build-button" style="display:none">
- <button class="btn dropdown-toggle" data-toggle="dropdown">
- New build
- <i class="icon-caret-down"></i>
- </button>
- <ul class="dropdown-menu new-build multi-select">
- <li>
- <h3>New build</h3>
- <h6>
- Project:
- <span id="project">
- {% if project.id and not project.is_default %}
- <a class="lead" href="{% project_url project %}">{{project.name}}</a>
- {% else %}
- <a class="lead" href="#"></a>
- {% endif %}
- <i class="icon-pencil"></i>
- </span>
- </h6>
- <form id="change-project-form" style="display:none;">
- <div class="input-append">
- <input type="text" class="input-medium" id="project-name-input" placeholder="Type a project name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead"/>
- <button id="save-project-button" class="btn" type="button">Save</button>
- <a href="#" id="cancel-change-project" class="btn btn-link" style="display: none">Cancel</a>
- </div>
- <p><a id="view-all-projects" href="{% url 'all-projects' %}">View all projects</a></p>
- </form>
- </li>
- <li>
- <div class="alert" style="display:none;">
- <p>This project configuration is incomplete, so you cannot run builds.</p>
- <p><a href="{% if project.id %}{% url 'project' project.id %}{% endif %}">View project configuration</a></p>
- </div>
- </li>
- <li id="targets-form">
- <h6>Recipe(s):</h6>
- <form>
- <input type="text" class="input-xlarge build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/>
- <div class="row-fluid">
- <button class="btn btn-primary build-button" disabled>Build</button>
- </div>
- </form>
- </li>
- </ul>
- </div>
- {% endif %}
+ <div class="btn-group pull-right">
+ <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
+ </div>
+ </div>
+ </div>
</div>
- </div>
-</div>
-<div class="container-fluid top-padded">
-<div class="row-fluid">
-{% block pagecontent %}
-{% endblock %}
-</div>
-</div>
-</body>
+ <div class="container-fluid top-padded">
+ <div class="row-fluid">
+ {% block pagecontent %}
+ {% endblock %}
+ </div>
+ </div>
+ </body>
</html>
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
index 22ca50c0c..a62e0b1cb 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+{% load project_url_tag %}
{% load humanize %}
{% block pagecontent %}
@@ -6,16 +7,18 @@
<!-- Breadcrumbs -->
<div class="section">
<ul class="breadcrumb" id="breadcrumb">
- <li class="muted">{{build.project.name}}:</li>
- <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
- <li><a href="{%url 'builddashboard' build.pk%}">{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
+ <li><a href="{% project_url build.project %}">{{build.project.name}}</a></li>
+ {% if not build.project.is_default %}
+ <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
+ {% endif %}
+ <li><a href="{%url 'builddashboard' build.pk%}">{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
{% block localbreadcrumb %}{% endblock %}
</ul>
<script>
$( function () {
$('#breadcrumb > li').append('<span class="divider">&rarr;</span>');
$('#breadcrumb > li:last').addClass("active");
- $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
+ $('#breadcrumb > li:last > span').remove();
});
</script>
</div> <!--section-->
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
index d441df84e..0d8c8820d 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
@@ -1,88 +1,157 @@
{% extends "base.html" %}
{% load projecttags %}
+{% load project_url_tag %}
+{% load objects_to_dictionaries_filter %}
{% load humanize %}
{% block pagecontent %}
+ <!-- breadcrumbs -->
+ <div class="section">
+ <ul class="breadcrumb" id="breadcrumb">
+ <li><a href="{% project_url build.project %}">{{build.project.name}}</a></li>
+ {% if not build.project.is_default %}
+ <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
+ {% endif %}
+ <li>
+ {% block parentbreadcrumb %}
+ <a href="{%url 'builddashboard' build.pk%}">
+ {{build.get_sorted_target_list.0.target}} {% if build.target_set.all.count > 1 %}(+{{build.target_set.all.count|add:"-1"}}){% endif %} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
+ </a>
+ {% endblock %}
+ </li>
+ {% block localbreadcrumb %}{% endblock %}
+ </ul>
+ <script>
+ $( function () {
+ $('#breadcrumb > li').append('<span class="divider">&rarr;</span>');
+ $('#breadcrumb > li:last').addClass("active");
+ $('#breadcrumb > li:last > span').remove();
+ });
+ </script>
+ </div>
+ <div class="row-fluid">
+ <!-- begin left sidebar container -->
+ <div id="nav" class="span2">
+ <ul class="nav nav-list well">
+ <li
+ {% if request.resolver_match.url_name == 'builddashboard' %}
+ class="active"
+ {% endif %} >
+ <a class="nav-parent" href="{% url 'builddashboard' build.pk %}">Build summary</a>
+ </li>
+ {% if build.target_set.all.0.is_image and build.outcome == 0 %}
+ <li class="nav-header">Images</li>
+ {% block nav-target %}
+ {% for t in build.get_sorted_target_list %}
+ <li><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li>
+ {% endfor %}
+ {% endblock %}
+ {% endif %}
+ <li class="nav-header">Build</li>
+ {% block nav-configuration %}
+ <li><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
+ {% endblock %}
+ {% block nav-tasks %}
+ <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
+ {% endblock %}
+ {% block nav-recipes %}
+ <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
+ {% endblock %}
+ {% block nav-packages %}
+ <li><a href="{% url 'packages' build.pk %}">Packages</a></li>
+ {% endblock %}
+ <li class="nav-header">Performance</li>
+ {% block nav-buildtime %}
+ <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
+ {% endblock %}
+ {% block nav-cputime %}
+ <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li>
+ {% endblock %}
+ {% block nav-diskio %}
+ <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
+ {% endblock %}
- <div class="">
-<!-- Breadcrumbs -->
- <div class="section">
- <ul class="breadcrumb" id="breadcrumb">
- <li class="muted">{{build.project.name}}:</li>
- <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
- <li>
- {% block parentbreadcrumb %}
- <a href="{%url 'builddashboard' build.pk%}">
- {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})
+ <li class="divider"></li>
+
+ <li>
+ <p class="navbar-btn">
+ <a class="btn btn-block" href="{% url 'build_artifact' build.id 'cookerlog' build.id %}">
+ Download build log
</a>
- {% endblock %}
+ </p>
+ </li>
+
+ {% with build.get_custom_image_recipes as custom_image_recipes %}
+ {% if custom_image_recipes.count > 0 %}
+ <!-- edit custom image built during this build -->
+ <li>
+ <p class="navbar-btn" data-role="edit-custom-image-trigger">
+ <button class="btn btn-block">Edit custom image</button>
+ {% include 'editcustomimage_modal.html' %}
+ <script>
+ var editableCustomImageRecipes = {{ custom_image_recipes | objects_to_dictionaries:"id,name" | json }};
+
+ $(document).ready(function () {
+ var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]');
+ var editCustomImageModal = $('#edit-custom-image-modal');
+
+ // edit custom image which was built during this build
+ editCustomImageTrigger.click(function () {
+ // single editable custom image: redirect to the edit page
+ // for that image
+ if (editableCustomImageRecipes.length === 1) {
+ var url = '{% url "customrecipe" build.project.id custom_image_recipes.first.id %}';
+ document.location.href = url;
+ }
+ // multiple editable custom images: show modal to select
+ // one of them for editing
+ else {
+ editCustomImageModal.modal('show');
+ }
+ });
+ });
+ </script>
+ </p>
</li>
- {% block localbreadcrumb %}{% endblock %}
- </ul>
- <script>
- $( function () {
- $('#breadcrumb > li').append('<span class="divider">&rarr;</span>');
- $('#breadcrumb > li:last').addClass("active");
- $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
- console.log("done");
- });
- </script>
- </div>
+ {% endif %}
+ {% endwith %}
- <div class="row-fluid">
+ <li>
+ <!-- new custom image from image recipe in this build -->
+ <p class="navbar-btn" data-role="new-custom-image-trigger">
+ <button class="btn btn-block">New custom image</button>
+ </p>
+ {% include 'newcustomimage_modal.html' %}
+ <script>
+ // imageRecipes includes both custom image recipes and built-in
+ // image recipes, any of which can be used as the basis for a
+ // new custom image
+ var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }};
- <!-- begin left sidebar container -->
- <div id="nav" class="span2">
- <ul class="nav nav-list well">
- <li
- {% if request.resolver_match.url_name == 'builddashboard' %}
- class="active"
- {% endif %} >
- <a class="nav-parent" href="{% url 'builddashboard' build.pk %}">Build summary</a>
- </li>
- {% if build.target_set.all.0.is_image and build.outcome == 0 %}
- <li class="nav-header">Images</li>
- {% block nav-target %}
- {% for t in build.get_sorted_target_list %}
- <li><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li>
- {% endfor %}
- {% endblock %}
- {% endif %}
- <li class="nav-header">Build</li>
- {% block nav-configuration %}
- <li><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
- {% endblock %}
- {% block nav-tasks %}
- <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
- {% endblock %}
- {% block nav-recipes %}
- <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
- {% endblock %}
- {% block nav-packages %}
- <li><a href="{% url 'packages' build.pk %}">Packages</a></li>
- {% endblock %}
- <li class="nav-header">Performance</li>
- {% block nav-buildtime %}
- <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
- {% endblock %}
- {% block nav-cpuusage %}
- <li><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
- {% endblock %}
- {% block nav-diskio %}
- <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
- {% endblock %}
- </ul>
- </div>
- <!-- end left sidebar container -->
+ $(document).ready(function () {
+ var newCustomImageModal = $('#new-custom-image-modal');
+ var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]');
- <!-- Begin right container -->
- {% block buildinfomain %}{% endblock %}
- <!-- End right container -->
+ // show create new custom image modal to select an image built
+ // during this build as the basis for the custom recipe
+ newCustomImageTrigger.click(function () {
+ if (!imageRecipes.length) {
+ return;
+ }
+ newCustomImageModalSetRecipes(imageRecipes);
+ newCustomImageModal.modal('show');
+ });
+ });
+ </script>
+ </li>
+ </ul>
</div>
- </div>
-
+ <!-- end left sidebar container -->
+ <!-- begin right container -->
+ {% block buildinfomain %}{% endblock %}
+ <!-- end right container -->
+ </div>
{% endblock %}
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
index 1f45be462..8778305f3 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+
{% load projecttags %}
{% load humanize %}
@@ -26,9 +27,7 @@
<ul class="nav nav-list well">
<li><a class="nav-parent" href="{% url 'project' project.id %}">Configuration</a></li>
<li class="nav-header">Compatible metadata</li>
- {% if CUSTOM_IMAGE %}
<li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a></li>
- {% endif %}
<li><a href="{% url 'projectimagerecipes' project.id %}">Image recipes</a></li>
<li><a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a></li>
<li><a href="{% url 'projectmachines' project.id %}">Machines</a></li>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html
index 33ede6687..0ddd74904 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html
@@ -161,8 +161,8 @@
<!-- control header -->
<div class="navbar">
<div class="navbar-inner">
- <form class="navbar-search input-append pull-left" id="searchform">
- <input class="input-xxlarge" id="search" name="search" type="text" placeholder="Search {%if object_search_display %}{{object_search_display}}{%else%}{{objectname}}{%endif%}" value="{%if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{%endif%}
+ <form class="navbar-search input-append pull-left span6" id="searchform">
+ <input id="search" name="search" type="text" placeholder="Search {%if object_search_display %}{{object_search_display}}{%else%}{{objectname}}{%endif%}" value="{%if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{%endif%}
<input type="hidden" name="orderby" value="{{request.GET.orderby}}">
<input type="hidden" name="page" value="1">
<button class="btn" id="search-button" type="submit" value="Search">Search</button>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html
index 323bbbb6e..a0da71ea4 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html
@@ -6,10 +6,9 @@
{% block parentbreadcrumb %}
{% if build.get_sorted_target_list.count > 0 %}
{{build.get_sorted_target_list.0.target}}
- &nbsp;
{% endif %}
-{%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
+{%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
{% endblock %}
{% block buildinfomain %}
@@ -111,7 +110,7 @@
</p>
</div>
</div>
- {% else %}
+ {% else %}
<dt>
<i class="icon-question-sign get-help" title="The location in disk of the license manifest, a document listing all packages installed in your image and their licenses"></i>
@@ -126,18 +125,18 @@
</dt>
<dd>
<ul>
- {% for i in target.imageFiles %}
- {% if build.project %}
- <li><a href="{% url 'build_artifact' build.pk 'imagefile' i.id %}">{{i.path}}</a>
- {% else %}
- <li>{{i.path}}
- {% endif %}
- ({{i.size|filtered_filesizeformat}})</li>
- {% endfor %}
+ {% for i in target.imageFiles %}
+ <li>
+ <a href="{% url 'build_artifact' build.pk 'imagefile' i.id %}">
+ {{i.suffix}}
+ </a>
+ &nbsp;({{i.size|filtered_filesizeformat}})
+ </li>
+ {% endfor %}
</ul>
</dd>
</dl>
- {% endif %}
+ {% endif %}
</div>
{% endif %}
{% endfor %}
@@ -161,7 +160,7 @@
<dd><div>
{% for ba in build.buildartifact_set.all|dictsort:"file_name" %}
<a href="{%url 'build_artifact' build.id 'buildartifact' ba.id %}">
- {{ba.get_local_file_name}}
+ {{ba.get_basename}}
</a>
({{ba.file_size|filtered_filesizeformat}}) <br/>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html
new file mode 100644
index 000000000..bf13a66bd
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html
@@ -0,0 +1,48 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block extraheadcontent %}
+ <link rel="stylesheet" href="{% static 'css/jquery-ui.min.css' %}" type='text/css'>
+ <link rel="stylesheet" href="{% static 'css/jquery-ui.structure.min.css' %}" type='text/css'>
+ <link rel="stylesheet" href="{% static 'css/jquery-ui.theme.min.css' %}" type='text/css'>
+ <script src="{% static 'js/jquery-ui.min.js' %}">
+ </script>
+{% endblock %}
+
+{% block title %} All builds - Toaster {% endblock %}
+
+{% block pagecontent %}
+
+ <div class="row-fluid">
+ {% with mru=mru mrb_type=mrb_type %}
+ {% include 'mrb_section.html' %}
+ {% endwith %}
+
+ <h1 class="page-header top-air" data-role="page-title"></h1>
+
+ {% url 'builds' as xhr_table_url %}
+ {% include 'toastertable.html' %}
+ </div>
+
+ <script>
+ $(document).ready(function () {
+ var tableElt = $("#{{table_name}}");
+ var titleElt = $("[data-role='page-title']");
+
+ tableElt.on("table-done", function (e, total, tableParams) {
+ var title = "All builds";
+
+ if (tableParams.search || tableParams.filter) {
+ if (total === 0) {
+ title = "No builds found";
+ }
+ else if (total > 0) {
+ title = total + " build" + (total > 1 ? 's' : '') + " found";
+ }
+ }
+
+ titleElt.text(title);
+ });
+ });
+ </script>
+{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds.html
deleted file mode 100644
index a27a12191..000000000
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds.html
+++ /dev/null
@@ -1,119 +0,0 @@
-{% extends "base.html" %}
-
-{% load static %}
-{% load projecttags %}
-{% load project_url_tag %}
-{% load humanize %}
-
-{% block title %} All builds - Toaster {% endblock %}
-{% block extraheadcontent %}
-<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
-<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
-<link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'>
-<script src="/static/js/jquery-ui.min.js"></script>
-<script src="/static/js/filtersnippet.js"></script>
-{% endblock %}
-
-{% block pagecontent %}
-
-{% if last_date_from and last_date_to %}
-<script>
- // initialize the date range controls
- $(document).ready(function () {
- date_init('started_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_started_on}}','{{dateMax_started_on}}','{{daterange_selected}}');
- date_init('completed_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_completed_on}}','{{dateMax_completed_on}}','{{daterange_selected}}');
- });
-</script>
-{%endif%} {# last_date_from and last_date_to #}
-
-<div class="row-fluid">
-
- {% include "mrb_section.html" %}
-
- <div class="page-header top-air">
- <h1>
- {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
- {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
- {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
- No builds found
- {%else%}
- All builds
- {%endif%}
- </h1>
- </div>
-
- {% if objects.paginator.count == 0 %}
- <div class="row-fluid">
- <div class="alert">
- <form class="no-results input-append" id="searchform">
- <input id="search" name="search" class="input-xxlarge" type="text" value="
- {% if request.GET.search %}
- {{request.GET.search}}
- {% endif %}"/>
- {% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
- <button class="btn" type="submit" value="Search">Search</button>
- <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
- </form>
- </div>
- </div>
- {% else %}
- {% include "basetable_top.html" %}
- <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
- {% for build in objects %}
- <tr class="data" data-table-build-result="{{ build.id }}">
- <td class="outcome">
- <a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> &nbsp;
- </td>
- <td class="target">
- {% for t in build.target_set.all %}
- <a href="{% url "builddashboard" build.id %}">
- {% if t.task %}
- {{t.target}}:{{t.task}}
- {% else %}
- {{t.target}}
- {% endif %}
- </a> <br />
- {% endfor %}
- </td>
- <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
- <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
- <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
- <td class="failed_tasks error">
- {% query build.task_build outcome=4 order__gt=0 as exectask%}
- {% if exectask.count == 1 %}
- <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
- <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
- <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
- </a>
- {% elif exectask.count > 1%}
- <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
- {%endif%}
- </td>
- <td class="errors.count errors_no">
- {% if build.errors.count %}
- <a class="errors.count error" href="{% url "builddashboard" build.id %}#errors">{{build.errors.count}} error{{build.errors.count|pluralize}}</a>
- {%endif%}
- </td>
- <td class="warnings.count warnings_no">{% if build.warnings.count %}<a class="warnings.count warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings.count}} warning{{build.warnings.count|pluralize}}</a>{%endif%}</td>
- <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent_seconds|sectohms}}</a></td>
- <td class="output">
- {% if build.outcome == build.SUCCEEDED %}
- <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
- {% endif %}
- </td>
- <td class="project-name">
- <a href="{% project_url build.project %}">{{build.project.name}}</a>
- {% if build.project.is_default %}
- <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project shows information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
- {% endif %}
- </td>
- </tr>
-
- {% endfor %}
-
-
- {% include "basetable_bottom.html" %}
- {% endif %} {# objects.paginator.count #}
-</div><!-- end row-fluid-->
-
-{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html
index 54d05f9ea..2e54a9d90 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html
@@ -1,9 +1,15 @@
-<button class="btn btn-block layer-exists-{{data.layer_version.id}} customise-btn" style="display:none;" data-recipe="{{data.id}}">
+<button class="btn btn-block layer-exists-{{data.layer_version.pk}} customise-btn" data-recipe="{{data.pk}}"
+ {% if data.layer_version.pk not in extra.current_layers %}
+ style="display:none;"
+ {% endif %}
+ >
Customise
</button>
-
-<button class="btn btn-block layer-add-{{data.layer_version.id}} layerbtn" data-layer='{ "id": {{data.layer_version.id}}, "name": "{{data.layer_version.layer.name}}", "layerdetailurl": "{% url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add">
+<button class="btn btn-block layer-add-{{data.layer_version.pk}} layerbtn" data-layer='{ "id": {{data.layer_version.pk}}, "name": "{{data.layer_version.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.pk%}"}' data-directive="add"
+ {% if data.layer_version.pk in extra.current_layers %}
+ style="display:none;"
+ {% endif %}
+ >
<i class="icon-plus"></i>
Add layer
</button>
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html
index 823bbd8a1..ea3c9c732 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html
@@ -4,13 +4,32 @@
{% load static %}
{% block pagecontent %}
-{% include "projecttopbar.html" %}
+<div class="section">
+ <ul class="breadcrumb">
+ <li>
+ <a href="{% url 'project' project.id %}">{{project.name}}</a>
+ <span class="divider">&rarr;</span>
+ </li>
+ <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a>
+ <span class="divider">&rarr;</span>
+ </li>
+ <li class="active">
+ {{recipe.name}} ({{recipe.layer_version.layer.name}})
+ </li>
+ </ul>
+</div>
<script src="{% static 'js/customrecipe.js' %}"></script>
<script>
$(document).ready(function (){
var ctx = {
- tableApiUrl: "{% url 'recipeselectpackages' project.id recipe.pk %}?format=json"
+ recipe : {
+ id: {{recipe.pk}},
+ name: "{{recipe.name}}",
+ includedPackagesCount: {{recipe.includes_set.count}},
+ baseRecipeId: {{recipe.base_recipe.pk}},
+ xhrPackageListUrl: "{% url 'xhr_customrecipe_packages' recipe.pk %}",
+ }
};
try {
@@ -21,6 +40,45 @@
}
});
</script>
+<!-- package dependencies modal -->
+<div style="display:none" id="package-deps-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+ <h3><span class="package-to-add-name"></span> dependencies</h3>
+ </div>
+ <div class="modal-body">
+ <p>Based on information from a previous build it is likely that adding <strong class="package-to-add-name"></strong> will also add the following packages to your custom image:</p>
+ <ul id="package-add-dep-list">
+ </ul>
+ </div>
+ <div class="modal-footer">
+ <p class="help-block text-left">Total package size: <strong id="package-deps-total-size"></strong></p>
+ <button id="add-package-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Add package</button>
+ <button class="btn" data-dismiss="modal">Cancel</button>
+ </div>
+</div>
+<!-- end package dependencies modal -->
+
+<!-- package reverse dependencies modal -->
+<div style="display:none" id="package-reverse-deps-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+ <h3><span class="package-to-rm-name"></span> reverse dependencies</h3>
+ </div>
+ <div class="modal-body">
+ <p> <strong class="reverse-deps-count"></strong> <span class="reverse-deps-package"></span> in your image <span class="reverse-deps-depends"></span> on <strong class="package-to-rm-name"></strong>:</p>
+ <ul id="package-reverse-dep-list">
+ </ul>
+ <p>In order to remove <strong class="package-to-rm-name"></strong>, you must remove <span class="reverse-deps-this"></span> <strong class="reverse-deps-count"></strong> <span class="reverse-deps-package"></span> as well.</p>
+ </div>
+ <div class="modal-footer">
+ <p class="help-block text-left">Total package size: <strong id="package-reverse-deps-total-size"></strong></p>
+ <button id="rm-package-reverse-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Remove all <span class="reverse-deps-count-plus1"></button>
+ <button class="btn" data-dismiss="modal">Cancel</button>
+ </div>
+</div>
+<!-- end package dependencies modal -->
+
<div class="row-fluid span11">
<div class="alert alert-success lead" id="image-created-notification" style="margin-top: 15px; display: none">
@@ -30,7 +88,7 @@
<div class="page-header air">
<h1>
{{recipe.name}}
- <small>({{recipe.base_recipe.name}})</small>
+ <small>({{recipe.layer_version.layer.name}})</small>
</h1>
</div>
</div>
@@ -38,44 +96,49 @@
<div class="row-fluid span11">
<div class="span8">
<div class="button-place btn-group" style="width: 100%">
- <a class="btn btn-large span6" href="#" id="build-custom-image" style="width: 50%">
+ <a class="btn btn-large span6 build-custom-image" href="#" style="width: 50%">
Build {{recipe.name}}
</a>
- <button class="btn btn-large span6" data-toggle="modal" data-target="#download-file" id="download" style="width: 50%">
- Download recipe file
- </button>
- </div>
- <div id="no-package-results" class="air" style="display:none;">
- <div class="alert">
- <h3>No packages found</h3>
- <p>You might consider <a href="all-software-recipes.html">searching the list of recipes</a> instead. If you find a recipe that matches the name of the package you want:</p>
- <ol>
- <li>Add the layer providing the recipe to your project</li>
- <li>Build the recipe</li>
- <li>Once the build completes, come back to this page and search for the package</li>
- </ol>
- <form class="input-append no-results">
- <input type="text" class="input-xlarge" value="search query">
- <a href="#" class="add-on btn">
+ <a href="{% url 'customrecipedownload' project.id recipe.id %}" class="btn btn-large span6" style="width: 50%">
+ Download recipe file
+ </a>
+ </div>
+ <div id="no-results-special-{{table_name}}" class="air" style="display:none;">
+ <div class="alert">
+ <h3>No packages found</h3>
+ <p>You might consider <a href={% url 'projectsoftwarerecipes' project.id %}>searching the list of recipes</a> instead. If you find a recipe that matches the name of the package you want:</p>
+ <ol>
+ <li>Add the layer providing the recipe to your project</li>
+ <li>Build the recipe</li>
+ <li>Once the build completes, come back to this page and search for the package</li>
+ </ol>
+ <form class="input-append no-results">
+ <input type="text" class="input-xlarge no-results-search-input" id="no-results-search-input-{{table_name}}" name="search" placeholder="Search {{title|lower}}" />
+ <a href="#" class="add-on btn" id="no-results-remove-search-btn" tabindex="-1">
<i class="icon-remove"></i>
</a>
- <button class="btn">Search</button>
- <button class="btn btn-link" id="show-all">Show all packages</button>
+ <button class="btn search-submit-{{table_name}}">Search</button>
+ <button class="btn btn-link" id="no-results-show-all-packages">Show all packages</button>
</form>
</div>
+ </div>
+ <div id="results-found-{{table_name}}">
+ <div id="packages-table">
+ {% if recipe.get_all_packages.count == 0 and last_build == None %}
+ <h2> Add | Remove packages </h2>
+ <div class="alert alert-info air">
+ <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p>
+ <button class="btn btn-info btn-large build-custom-image" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button>
+ </div>
+ {% else %}
+ {# ToasterTable for Adding remove packages #}
+ {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %}
+ <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2>
+ {% include "toastertable.html" %}
+ {% endif %}
+ </div>
+ </div>
</div>
- <div id="packages-table">
- {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %}
- {% with 'recipeselection' as table_name %}
- {% with 'Add | Remove packages' as title %}
-
- <h2>{{title}} (<span class="table-count-{{table_name}}"></span>) </h2>
-
- {% include "toastertable.html" %}
- {% endwith %}
- {% endwith %}
- </div>
- </div>
<div class="span4 well">
<h2 style="margin-bottom:20px;">About {{recipe.name}}</h2>
@@ -84,59 +147,77 @@
Approx. packages included
<i class="icon-question-sign get-help" title="" data-original-title="The number of packages included is based on information from previous builds and from parsing layers, so we can never be sure it is 100% accurate"></i>
</dt>
- <dd class="no-packages">{{recipe.packages.count}}</dd>
- <!-- <dt>
+ <dd id="total-num-packages">{{recipe.get_all_packages.count}}</dd>
+ <dt>
Approx. package size
<i class="icon-question-sign get-help" title="" data-original-title="Package size is based on information from previous builds, so we can never be sure it is 100% accurate"></i>
</dt>
- <dd>244.3 MB</dd>
+ <dd id="total-size-packages">{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd>
+ {% if last_build %}
<dt>Last build</dt>
<dd>
<i class="icon-ok-sign success"></i>
- <a href="build-dashboard.html">11/06/15 15:22</a>
+ <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
</dd>
+ {% endif %}
+ <dt>Layer</dt>
+ <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
+ <dt>Based on</dt>
+ <dd><a href="{% url 'recipedetails' project.id recipe.base_recipe.pk %}">{{recipe.base_recipe.name}}</a></dd>
+ {% if recipe.get_last_successful_built_target %}
+ {% with recipe.get_last_successful_built_target as last_build_target %}
+ <dt>Last build</dt>
+ <dd>
+ <i class="icon-ok-sign success"></i>
+ <a href="{% url 'builddashboard' last_build_target.build.pk %}">
+ {{last_build_target.build.completed_on|date:"d/m/y H:i"}}</a>
+ </dd>
+ {% endwith %}
+ {% endif %}
<dt>Recipe file</dt>
<dd>
- <code>custom-image-name.bb</code>
- <a href="#download-file" data-toggle="modal"><i class="icon-download-alt" title="" data-original-title="Download recipe file"></i></a>
- </dd> -->
+ <code>{{recipe.name}}_{{recipe.version}}.bb</code>
+ <a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a>
+ </dd>
<dt>Layer</dt>
- <!-- TODO recipe details page -->
- <dd><a href="{% url 'layerdetails' project.id recipe.base_recipe.layer_version.pk %}">{{recipe.base_recipe.layer_version.layer.name}}</a></dd>
- <!--<dt>
+ <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
+ {% if recipe.summary %}
+ <dt>
Summary
</dt>
<dd>
- <span class="muted">Not set</span>
- <i class="icon-pencil" data-original-title="" title=""></i>
+ {{recipe.summary}}
</dd>
+ {% endif %}
+ {% if recipe.description %}
<dt>
Description
</dt>
<dd>
- <span class="muted">Not set</span>
- <i class="icon-pencil" data-original-title="" title=""></i>
+ {{recipe.description}}
</dd>
+ {% endif %}
<dt>Version</dt>
<dd>
- 1.0
- <i class="icon-pencil" data-original-title="" title=""></i>
+ {{recipe.version}}
</dd>
+ {% if recipe.section %}
<dt>Section</dt>
<dd>
- base
- <i class="icon-pencil" data-original-title="" title=""></i>
- <i class="icon-trash" data-original-title="" title=""></i>
+ {{recipe.section}}
</dd>
+ {% endif %}
<dt>License</dt>
<dd>
- MIT
+ {{recipe.license}}
<i class="icon-question-sign get-help" title="" data-original-title="All custom images have their license set to MIT. This is because the license applies only to the recipe (.bb) file, and not to the image itself. To see which licenses apply to the image you must check the license manifest generated with each build"></i>
- </dd> -->
+ </dd>
</dl>
+ <!--
<i class="icon-trash no-tooltip"></i>
<a href="#" class="error" id="delete">Delete custom image</a>
+ -->
</div>
-</div>
+ </div>
{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/editcustomimage_modal.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/editcustomimage_modal.html
new file mode 100644
index 000000000..8046c08fb
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/editcustomimage_modal.html
@@ -0,0 +1,71 @@
+<!--
+modal dialog shown on the build dashboard, for editing an existing custom image;
+only shown if more than one custom image was built, so the user needs to
+choose which one to edit
+
+required context:
+ build - a Build object
+-->
+<div class="modal hide fade in" aria-hidden="false" id="edit-custom-image-modal">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h3>Which image do you want to edit?</h3>
+ </div>
+
+ <div class="modal-body">
+ <div class="row-fluid">
+ {% for recipe in build.get_custom_image_recipes %}
+ <label class="radio">
+ {{recipe.name}}
+ <input type="radio" class="form-control" name="select-custom-image"
+ data-url="{% url 'customrecipe' build.project.id recipe.id %}">
+ </label>
+ {% endfor %}
+ </div>
+ <span class="help-block error" id="invalid-custom-image-help" style="display:none">
+ Please select a custom image to edit.
+ </span>
+ </div>
+
+ <div class="modal-footer">
+ <button class="btn btn-primary btn-large" data-url="#"
+ data-action="edit-custom-image" disabled>
+ Edit custom image
+ </button>
+ </div>
+</div>
+
+<script>
+$(document).ready(function () {
+ var editCustomImageButton = $('[data-action="edit-custom-image"]');
+ var error = $('#invalid-custom-image-help');
+ var radios = $('[name="select-custom-image"]');
+
+ // return custom image radio buttons which are selected
+ var getSelectedRadios = function () {
+ return $('[name="select-custom-image"]:checked');
+ };
+
+ radios.change(function () {
+ if (getSelectedRadios().length === 1) {
+ editCustomImageButton.removeAttr('disabled');
+ error.hide();
+ }
+ else {
+ editCustomImageButton.attr('disabled', 'disabled');
+ error.show();
+ }
+ });
+
+ editCustomImageButton.click(function () {
+ var selectedRadios = getSelectedRadios();
+
+ if (selectedRadios.length === 1) {
+ document.location.href = selectedRadios.first().attr('data-url');
+ }
+ else {
+ error.show();
+ }
+ });
+});
+</script>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html
index 033f0aede..1848f410e 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html
@@ -89,7 +89,7 @@
<input type="text" id="layer-subdir">
<div class="control-group" id="layer-revision-ctrl">
- <label class="control-label project-form" for="layer-git-ref">Revision
+ <label class="control-label project-form" for="layer-git-ref">Git revision
<span class="icon-question-sign get-help" title="You can provide a Git branch, a tag or a commit SHA as the revision"></span>
</label>
<div class="controls">
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
index 8d65f33cb..94ad4f8e9 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
@@ -4,9 +4,9 @@
{% load static %}
{% block pagecontent %}
-<link rel="stylesheet" href="//code.jquery.com/qunit/qunit-1.18.0.css" />
+<link rel="stylesheet" href="{% static 'css/qunit-1.18.0.css' %}" />
-<script src="//code.jquery.com/qunit/qunit-1.18.0.js"></script>
+<script src="{% static 'js/qunit-1.18.0.js' %}"></script>
<script src="{% static 'js/layerDepsModal.js' %}"></script>
<script src="{% static 'js/projectpage.js' %}"></script>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html
index cafaa1afa..a1b5cdce7 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html
@@ -6,9 +6,6 @@
{% block title %} Welcome to Toaster {% endblock %}
{% block pagecontent %}
-
- {% if BUILD_MODE %}
- <!-- build mode -->
<div class="container-fluid">
<div class="row-fluid">
<div class="hero-unit span12 well-transparent">
@@ -62,11 +59,4 @@
</div>
</div>
</div>
- {% else %}
- <!-- analysis mode -->
- <div class="alert alert-info lead top-air">
- Toaster has not recorded any builds yet. Run a build from the command line to see it here.
- </div>
- {% endif %}
-
{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html
index 314eec7cf..10de37d4b 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html
@@ -4,7 +4,7 @@
{% endif %}
>
<i class="icon-trash"></i>
- Delete layer
+ Remove layer
</button>
<button class="btn btn-block layer-add-{{data.pk}} layerbtn" data-layer='{ "id": {{data.pk}}, "name": "{{data.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.pk%}"}' data-directive="add"
{% if data.pk in extra.current_layers %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html
index 7fe365da3..82be3703b 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -8,9 +8,8 @@
<div class="section">
<ul class="breadcrumb">
- <li class="muted">{{project.name}}:</li>
<li>
- <a href="{% url 'project' project.id %}">Configuration</a>
+ <a href="{% url 'project' project.id %}">{{project.name}}</a>
<span class="divider">&rarr;</span>
</li>
<li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a>
@@ -46,7 +45,6 @@
$(document).ready(function (){
var ctx = {
- projectBuildsUrl : "{% url 'projectbuilds' project.id %}",
xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}",
layerVersion : {
name : "{{layerversion.layer.name}}",
@@ -108,7 +106,7 @@
{% else %}
<button id="add-remove-layer-btn" data-directive="remove" class="btn btn-block btn-large btn-danger">
<span class="icon-trash"></span>
- Delete the {{layerversion.layer.name}} layer from your project
+ Remove the {{layerversion.layer.name}} layer from your project
</button>
{% endif %}
</span>
@@ -156,7 +154,7 @@
</dd>
<dt>
<i class="icon-question-sign get-help" title="The Git branch, tag or commit"></i>
- Revision
+ Git revision
</dt>
<dd>
<span class="current-value">{{layerversion.get_vcs_reference}}</span>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html
index d2cb55bab..7b08f6a9a 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html
@@ -1,6 +1,14 @@
-<a href="{% url 'project' extra.pid %}?setMachine={{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.id}}" style="margin-top: 5px; display:none">
+<a href="{% url 'project' extra.pid %}?setMachine={{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.id}}"
+ {% if data.layer_version.pk not in extra.current_layers %}
+ style="display:none;"
+ {% endif %}
+>
Select machine</a>
-<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}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add">
+<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}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add"
+ {% if data.layer_version.pk in extra.current_layers %}
+ style="display:none;"
+ {% endif %}
+>
<i class="icon-plus"></i>
Add layer
<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>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index bd8f99178..b5e798d7c 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -2,11 +2,26 @@
{% load projecttags %}
{% load project_url_tag %}
{% load humanize %}
+<script src="{% static 'js/mrbsection.js' %}"></script>
+<script>
+ $(document).ready(function () {
+ var ctx = {
+ mrbType : "{{mrb_type}}",
+ }
+
+ try {
+ mrbSectionInit(ctx);
+ } catch (e) {
+ document.write("Sorry, An error has occurred loading this page");
+ console.warn(e);
+ }
+ });
+</script>
{%if mru and mru.count > 0%}
{%if mrb_type == 'project' %}
- <h2>
+ <h2 class="page-header">
Latest project builds
{% if project.is_default %}
@@ -14,7 +29,7 @@
{% endif %}
</h2>
{% else %}
- <div class="page-header">
+ <div class="page-header top-air">
<h1>
Latest builds
</h1>
@@ -38,8 +53,9 @@
{% if build.target_set.all.count > 0 %}
<span data-toggle="tooltip"
{% if build.target_set.all.count > 1 %}
- title="Targets:
- {% for target in build.target_set.all %}
+ {{build.get_sorted_target_list.0.target}}
+ title="Recipes:
+ {% for target in build.get_sorted_target_list %}
{% if target.task %}
{{target.target}}:{{target.task}}
{% else %}
@@ -49,12 +65,12 @@
{% endif %}
>
{% if build.target_set.all.0.task %}
- {{build.target_set.all.0.target}}:{{build.target_set.all.0.task}}
+ {{build.get_sorted_target_list.0.target}}:{{build.target_set.all.0.task}}
{% else %}
- {{build.target_set.all.0.target}}
+ {{build.get_sorted_target_list.0.target}}
{% endif %}
{% if build.target_set.all.count > 1 %}
- (+ {{build.target_set.all.count|add:"-1"}})
+ (+{{build.target_set.all.count|add:"-1"}})
{% endif %}
</span>
{% endif %}
@@ -98,7 +114,7 @@
" title="Builds in this project cannot be started from Toaster: they are started from the command line">
</i>
{% else %}
- <button class="btn
+ <button class="run-again-btn btn
{% if build.outcome == build.SUCCEEDED %}
btn-success
{% elif build.outcome == build.FAILED %}
@@ -107,54 +123,56 @@
btn-info
{%endif%}
pull-right"
- onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}},
- {{build.project.name|json}},
- {% url 'project' build.project.id as purl %}{{purl|json}},
- {{build.target_set.all|get_tasks|json}})'>
+ data-request-url="{% url 'xhr_buildrequest' build.project.pk %}"
+ data-target='{{build.target_set.all|get_tasks|json}}'>
+
- Run again
+ Rebuild
</button>
{% endif %}
</div>
{%endif%}
{%if build.outcome == build.IN_PROGRESS %}
- <div class="span4 offset1">
- <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
- <div style="width: {{build.completeper}}%;" class="bar"></div>
- </div>
- </div>
- <div class="lead pull-right">{{build.completeper}}% of tasks complete</div>
- {%endif%}
- </div>
+ <div class="span4" style="display:none" id="cancelling-msg-{{build.buildrequest.pk}}">
+ <p class="lead">Cancelling the build ...</p>
</div>
+ <div class="span4 offset1 progress-info">
+ <div class="progress" id="build-pc-done-title-{{build.pk}}" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
+ <div id="build-pc-done-bar-{{build.pk}}" style="width: {{build.completeper}}%;" class="bar"></div>
+ </div>
+ </div>
+ <div class="lead span3 progress-info"><span id="build-pc-done-{{build.pk}}">{{build.completeper}}</span>% of tasks complete</div>
+ {# No build cancel for command line builds project #}
+ {% if build.project.is_default %}
+ <i class="icon-question-sign get-help get-help-blue pull-right" title="" data-original-title="Builds in this project cannot be cancelled from Toaster: they can only be cancalled from the command line"></i>
+ {% else %}
+ <div class="lead pull-right progress-info">
+ <button class="cancel-build-btn btn btn-info pull-right"
+ data-buildrequest-id={{build.buildrequest.pk}}
+ data-request-url="{% url 'xhr_buildrequest' build.project.pk %}" >
+ Cancel
+ </button>
+ </div>
+ {% endif %}
- {% endfor %}
- </div>
-
-<script>
-
-function scheduleBuild(url, projectName, projectUrl, buildlist) {
- console.log("scheduleBuild");
- libtoaster.startABuild(url, null, buildlist.join(" "), function(){
- console.log("reloading page");
- window.location.reload();
- }, null);
-}
-
-$(document).ready(function(){
+ {%endif%} {# end if in progress #}
- $(".cancel-build-btn").click(function (){
- var url = $(this).data('request-url');
- var buildIds = $(this).data('build-id');
- var btn = $(this);
+ {% if build.outcome == build.CANCELLED %}
+ <div class="span4">
+ <p class="lead">Build cancelled</p>
+ </div>
+ <button class="btn btn-info pull-right run-again-btn"
+ data-request-url="{% url 'xhr_buildrequest' build.project.pk %}"
+ data-target='{{build.target_set.all|get_tasks|json}}'>
+ Rebuild
- libtoaster.cancelABuild(url, buildIds, function(){
- btn.parents(".alert").fadeOut();
- }, null);
- });
-});
+ </button>
+ {% endif %}
+ </div>
+</div>
-</script>
+ {% endfor %}
+ </div>
{%endif%}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
index 4487b3ea0..46aed901f 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
@@ -4,51 +4,11 @@
{% load static %}
{% block pagecontent %}
-<script src="{% static 'js/newcustomimage.js' %}"></script>
-<script>
- $(document).ready(function (){
- var ctx = {
- xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}",
- };
-
- try {
- newCustomImagePageInit(ctx);
- } catch (e) {
- document.write("Sorry, An error has occurred loading this page");
- console.warn(e);
- }
- });
-</script>
-
-</script>
-<div class="modal hide fade in" id="new-custom-image-modal" aria-hidden="false">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h3>Name your custom image</h3>
- </div>
- <div class="modal-body">
- <div class="row-fluid">
- <span class="help-block span8">Image names must be unique. They should not contain spaces or capital letters, and the only allowed special character is dash (-).<p></p>
- </span></div>
- <div class="control-group controls">
- <input type="text" class="huge span5" placeholder="Type the name, something like 'core-image-myimage'">
- <span class="help-block" style="display:none">Image names cannot contain spaces or capital letters. The only allowed special character is dash (-)</span>
- <span class="help-block" style="display: none">An image with this name already exists. Image names must be unique: try a different one.</span>
- </div>
- </div>
- <div class="modal-footer">
- <a href="#" id="create-new-custom-image-btn" class="btn btn-primary btn-large" data-original-title="" title="">Create custom image</a>
- </div>
-</div>
-
+{% include "newcustomimage_modal.html" %}
{% include "projecttopbar.html" %}
-
{% url table_name project.id as xhr_table_url %}
+<h2>{{title}} (<span class="table-count-{{table_name}}">0</span>)</h2>
{% include "toastertable.html" %}
-
-
{% endblock %}
-
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html
new file mode 100644
index 000000000..caeb30235
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html
@@ -0,0 +1,48 @@
+{% load static %}
+
+<script src="{% static 'js/newcustomimage_modal.js' %}"></script>
+<script>
+ $(document).ready(function (){
+ try {
+ newCustomImageModalInit();
+ } catch (e) {
+ document.write("Sorry, An error has occurred loading this page");
+ console.warn(e);
+ }
+ });
+</script>
+
+<div class="modal hide fade in" id="new-custom-image-modal" aria-hidden="false">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h3>New custom image</h3>
+ </div>
+
+ <div class="modal-body">
+ <!--
+ this container is visible if there are multiple image recipes which could
+ be used as a basis for the new custom image; radio buttons are added to it
+ via newCustomImageModalSetRecipes() as required
+ -->
+ <div data-role="image-selector" style="display:none;">
+ <h4>Which image do you want to customise?</h4>
+ <div data-role="image-selector-radios"></div>
+ <span class="help-block error" id="invalid-recipe-help" style="display:none"></span>
+ <div class="air"></div>
+ </div>
+
+ <h4>Name your custom image</h4>
+
+ <div class="row-fluid">
+ <span class="help-block span8">Image names must be unique. They should not contain spaces or capital letters, and the only allowed special character is dash (-).<p></p>
+ </span></div>
+ <div class="control-group controls">
+ <input type="text" class="huge" placeholder="Type the custom image name" required>
+ <span class="help-block error" id="invalid-name-help" style="display:none"></span>
+ </div>
+ </div>
+
+ <div class="modal-footer">
+ <button id="create-new-custom-image-btn" class="btn btn-primary btn-large" data-original-title="" title="" disabled>Create custom image</button>
+ </div>
+</div>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
index b766aeac9..0aefc5625 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
@@ -1,16 +1,34 @@
-<button class="btn btn-block btn-danger add-rm-package-btn" id="package-rm-btn-{{data.pk}}" data-directive="remove" data-package="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" style="
- {% if data.pk not in extra.current_packages %}
- display:none
- {% endif %}
- ">
- <i class="icon-trash no-tooltip"></i>
- Remove package
-</a>
-<button class="btn btn-block add-rm-package-btn" data-directive="add" id="package-add-btn-{{data.pk}}" data-package="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" style="
- {% if data.pk in extra.current_packages %}
- display:none
- {% endif %}
- ">
-<i class="icon-plus"></i>
- Add package
-</button>
+{# TODO move to snippets dir #}
+{% if data.is_locale_package %}
+<p class="text-center">
+ <span class="muted">Locale package</span>
+ <i class="icon-question-sign get-help hover-help" title=""
+ data-original-title="This package is included in your image
+ based on the locale specified in the IMAGE_LINGUAS variable"
+ style="visibility: hidden;">
+ </i>
+</p>
+
+{% else %}
+
+<div id="package-btn-cell-{{data.pk}}">
+ <div style="display: none; font-size: 11px; line-height: 1.3;" class="tooltip-inner inline-notification"></div>
+ <button class="btn btn-block btn-danger add-rm-package-btn" data-directive="remove" data-id="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" data-name="{{data.name}}" style="
+ {% if data.pk not in extra.current_packages %}
+ display:none
+ {% endif %}
+ ">
+ <i class="icon-trash no-tooltip"></i>
+ Remove package
+ </button>
+ <button class="btn btn-block add-rm-package-btn" data-directive="add" data-id="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" data-name="{{data.name}}" style="
+ {% if data.pk in extra.current_packages %}
+ display:none
+ {% endif %}
+ ">
+ <i class="icon-plus"></i>
+ Add package
+ </button>
+</div>
+
+{% endif %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html
index 4e83981f8..125676881 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html
@@ -24,7 +24,9 @@
});
</script>
-<div id="change-release-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="change-release-modal" aria-hidden="false">
+<!-- Comment out the ability to change the project release, until we decide what to do this functionality -->
+
+<!--div id="change-release-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="change-release-modal" aria-hidden="false">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3>Changing Yocto Project release to <span class="proposed-release-change-name"></span></h3>
@@ -39,7 +41,7 @@
<button id="change-release-and-rm-layers" data-dismiss="modal" type="submit" class="btn btn-primary">Change release and delete layers</button>
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
-</div>
+</div-->
<div class="row-fluid" id="project-page" style="display:none">
@@ -68,7 +70,7 @@
<div class="alert alert-info" style="display:none" id="no-most-built">
<span class="lead">You haven't built any recipes yet</span>
- <p style="margin-top: 10px;"><a href="{% url 'projectsoftwarerecipes' project.id %}">Choose a recipe to build</a></p>
+ <p style="margin-top: 10px;"><a href="{% url 'projectimagerecipes' project.id %}">Choose a recipe to build</a></p>
</div>
<ul class="unstyled configuration-list" id="freq-build-list">
@@ -79,12 +81,19 @@
<div class="well well-transparent">
<h3>Project release</h3>
- <p class="lead"><span id="project-release-title"></span> <i title="" data-original-title="" id="release-change-toggle" class="icon-pencil"></i></p>
+ <p class="lead"><span id="project-release-title"></span>
+
+ <!-- Comment out the ability to change the project release, until we decide what to do with this functionality -->
- <form class="form-inline" id="change-release-form" style="display:none;">
+ <!--i title="" data-original-title="" id="release-change-toggle" class="icon-pencil"></i-->
+ </p>
+
+ <!-- Comment out the ability to change the project release, until we decide what to do with this functionality -->
+
+ <!--form class="form-inline" id="change-release-form" style="display:none;">
<select></select>
<button class="btn" style="margin-left:5px;" id="change-release-btn">Change</button> <a href="#" id="cancel-release-change" class="btn btn-link">Cancel</a>
- </form>
+ </form-->
</div>
</div>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html
new file mode 100644
index 000000000..6d7e10bac
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html
@@ -0,0 +1,56 @@
+{% extends 'base.html' %}
+
+{% load static %}
+
+{% block extraheadcontent %}
+ <link rel="stylesheet" href="{% static 'css/jquery-ui.min.css' %}" type='text/css'>
+ <link rel="stylesheet" href="{% static 'css/jquery-ui.structure.min.css' %}" type='text/css'>
+ <link rel="stylesheet" href="{% static 'css/jquery-ui.theme.min.css' %}" type='text/css'>
+ <script src="{% static 'js/jquery-ui.min.js' %}">
+ </script>
+{% endblock %}
+
+{% block title %} {{title}} - {{project.name}} - Toaster {% endblock %}
+
+{% block pagecontent %}
+
+ {% include "projecttopbar.html" %}
+
+ <div class="row-fluid">
+ {% with mru=mru mrb_type=mrb_type %}
+ {% include 'mrb_section.html' %}
+ {% endwith %}
+
+ <h2 class="page-header top-air" data-role="page-title"></h2>
+
+ {% url 'projectbuilds' project.id as xhr_table_url %}
+ {% include 'toastertable.html' %}
+ </div>
+
+ <script>
+ $(document).ready(function () {
+ // title
+ var tableElt = $("#{{table_name}}");
+ var titleElt = $("[data-role='page-title']");
+
+ tableElt.on("table-done", function (e, total, tableParams) {
+ var title = "All project builds";
+
+ if (tableParams.search || tableParams.filter) {
+ if (total === 0) {
+ title = "No project builds found";
+ }
+ else if (total > 0) {
+ title = total + " project build" + (total > 1 ? 's' : '') + " found";
+ }
+ }
+
+ titleElt.text(title);
+ });
+
+ // highlight builds tab
+ $("#topbar-builds-tab").addClass("active")
+ });
+ </script>
+
+{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
index bb38284aa..3402fc4fe 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
@@ -63,11 +63,12 @@
{% for build in objects %} {# if we have a build, just display it #}
<tr class="data">
<td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a>
- {% if build.project %}
- &nbsp; <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
- <i class="icon-download-alt" title="" data-original-title="Download build log"></i>
- </a>
- {% endif %}
+ {% if build.cooker_log_path %}
+ &nbsp;
+ <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
+ <i class="icon-download-alt" title="Download build log"></i>
+ </a>
+ {% endif %}
</td>
<td class="target">
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
index 30fd03e32..27a898b65 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -31,6 +31,28 @@
</dd>
{% endif %}
+ {% if dl_dir_defined %}
+ <dt>
+ <span class="js-config-var-name js-config-var-managed-name">DL_DIR</span>
+ <i class="icon-question-sign get-help" title="Absolute path to the directory used to store downloads required for your builds. By default, Toaster projects share the same downloads directory.<br /><a href='http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-DL_DIR' target='_blank'>Read more in the manual</a>"></i>
+ </dt>
+ <dd class="lead">
+ <span id="dl_dir"{% if dl_dir %}{%else%} class="muted"{%endif%}>{% if dl_dir %}{{dl_dir}}{%else%}Not set{%endif%}</span>
+ <i class="icon-pencil" id="change-dl_dir-icon"></i>
+ <form id="change-dl_dir-form" style="display:none;">
+ <div class="row-fluid">
+ <span class="help-block span4">To set DL_DIR type the absolute path of the download folder.</span>
+ </div>
+ <div class="input-append" id="validate-dl_dir">
+ <input type="text" class="input-xlarge" id="new-dl_dir" placeholder="Type absolute path of the DL_DIR folder">
+ <button id="apply-change-dl_dir" class="btn" type="button">Save</button>
+ <button id="cancel-change-dl_dir" type="button" class="btn btn-link">Cancel</button>
+ </br><span class="help-block error" id="hintError-dl_dir">A valid directory cannot include spaces or any of these characters: . \ ? % * : | " " < ></span>
+ </div>
+ </form>
+ </dd>
+ {% endif %}
+
{% if fstypes_defined %}
<dt>
<span class="js-config-var-name js-config-var-managed-name">IMAGE_FSTYPES</span>
@@ -108,31 +130,28 @@
</dd>
{% endif %}
- {% if sdk_machine_defined %}
+ {% if sstate_dir_defined %}
<dt>
- <span class="js-config-var-name js-config-var-managed-name">SDKMACHINE</span>
- <i class="icon-question-sign get-help" title="Specifies the architecture (i.e. i686 or x86_64) for which to build SDK and ADT items <br /><a href='http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SDKMACHINE' target='_blank'>Read more in the manual</a>"></i>
+ <span class="js-config-var-name js-config-var-managed-name">SSTATE_DIR</span>
+ <i class="icon-question-sign get-help" title="Absolute path to the directory used to store shared state cache files. These files are reused across the builds, which makes the builds faster. By default, Toaster projects share the same cache directory.<br /><a href='http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-SSTATE_DIR' target='_blank'>Read more in the manual</a>"></i>
</dt>
<dd class="lead">
- <span id="sdkmachine">{{sdk_machine}}</span>
- <i id="change-sdkmachine-icon" class="icon-pencil"></i>
- <form id="change-sdkmachine-form" style="display:none;">
- <label class="radio">
- <input type="radio" name="sdkmachine" value="i686">
- i686
- </label>
- <label class="radio">
- <input type="radio" name="sdkmachine" value="x86_64">
- x86_64
- </label>
- <div style="padding-top:10px;">
- <button id="apply-change-sdkmachine" type="button" class="btn">Save</button>
- <button id="cancel-change-sdkmachine" type="button" class="btn btn-link">Cancel</button>
+ <span id="sstate_dir"{% if sstate_dir %}{%else%} class="muted"{%endif%}>{% if sstate_dir %}{{sstate_dir}}{%else%}Not set{%endif%}</span>
+ <i class="icon-pencil" id="change-sstate_dir-icon"></i>
+ <form id="change-sstate_dir-form" style="display:none;">
+ <div class="row-fluid">
+ <span class="help-block span4">To set SSTATE_DIR type the absolute path of the download folder.</span>
+ </div>
+ <div class="input-append" id="validate-sstate_dir">
+ <input type="text" class="input-xlarge" id="new-sstate_dir" placeholder="Type absolute path of the SSTATE_DIR folder">
+ <span class="error">A valid directory name required</span>
+ <button id="apply-change-sstate_dir" class="btn" type="button">Save</button>
+ <button id="cancel-change-sstate_dir" type="button" class="btn btn-link">Cancel</button>
+ </br><p class="help-block error" id="hintError-sstate_dir">A valid directory cannot include spaces or any of these characters: . \ ? % * : | " " < ></span>
</div>
</form>
</dd>
{% endif %}
-
</dl>
<!-- <ul class="unstyled configuration-list" id="configvar-list"> -->
@@ -182,9 +201,7 @@
<code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-BB_NUMBER_THREADS" target="_blank">BB_NUMBER_THREADS</a></code>
<code>CVS_PROXY_HOST</code>
<code>CVS_PROXY_PORT</code>
- <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-DL_DIR" target="_blank">DL_DIR</a></code>
<code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-PARALLEL_MAKE" target="_blank">PARALLEL_MAKE</a></code>
- <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SSTATE_DIR" target="_blank">SSTATE_DIR</a></code>
<code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SSTATE_MIRRORS" target="_blank">SSTATE_MIRRORS</a></code>
<code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-TMPDIR" target="_blank">TMPDIR</a></code></p>
<p>Plus the following standard shell environment variables:</p>
@@ -527,6 +544,61 @@
});
{% endif %}
+ {% if dl_dir_defined %}
+
+ // change DL_DIR variable
+ $('#change-dl_dir-icon').click(function() {
+ $('#hintError-dl_dir').hide();
+ // preset the edit value
+ var current_val = $("span#dl_dir").text().trim();
+ if (current_val == "Not set") {
+ current_val="";
+ $("#apply-change-dl_dir").attr("disabled","disabled");
+ }
+ $("input#new-dl_dir").val(current_val);
+
+ $('#change-dl_dir-icon, #dl_dir').hide();
+ $("#change-dl_dir-form").slideDown();
+ });
+
+ $('#cancel-change-dl_dir').click(function(){
+ $("#change-dl_dir-form").slideUp(function() {
+ $('#dl_dir, #change-dl_dir-icon').show();
+ });
+ });
+
+ $("#new-dl_dir").on('input', function(){
+ if ($(this).val().trim().length == 0) {
+ $("#apply-change-dl_dir").attr("disabled","disabled");
+ }
+ else {
+ var input = $(this);
+ var re = /^\/([^ <>\\|":\.%\?\*]+)$/;
+ var invalidDir = re.test(input.val());
+ console.log(invalidDir);
+ if ( invalidDir ) {
+ $('#validate-dl_dir').removeClass('control-group error');
+ $("#apply-change-dl_dir").removeAttr("disabled");
+ $('#hintError-dl_dir').hide();
+ } else {
+ $('#validate-dl_dir').addClass('control-group error');
+ $("#apply-change-dl_dir").attr("disabled","disabled");
+ $('#hintError-dl_dir').show();
+ }
+ }
+ });
+
+ $('#apply-change-dl_dir').click(function(){
+ var value = $('#new-dl_dir').val().trim();
+ postEditAjaxRequest({"configvarChange" : 'DL_DIR:'+value});
+ $('#dl_dir').text(value);
+ $('#dl_dir').removeClass('muted');
+ $("#change-dl_dir-form").slideUp(function () {
+ $('#dl_dir, #change-dl_dir-icon').show();
+ });
+ });
+
+ {% endif %}
{% if fstypes_defined %}
// change IMAGE_FSTYPES variable
@@ -774,47 +846,61 @@
});
{% endif %}
+ {% if sstate_dir_defined %}
- {% if sdk_machine_defined %}
- // change SDKMACHINE variable
- $('#change-sdkmachine-icon').click(function() {
- var current_value = document.getElementById("sdkmachine").innerHTML;
- var radios = document.getElementsByName('sdkmachine');
- for (var i = 0, length = radios.length; i < length; i++) {
- radios[i].checked = false;
- if (radios[i].value == current_value) {
- radios[i].checked = true;
- }
+ // change SSTATE_DIR variable
+ $('#change-sstate_dir-icon').click(function() {
+ $('#hintError-sstate_dir').hide();
+ // preset the edit value
+ var current_val = $("span#sstate_dir").text().trim();
+ if (current_val == "Not set") {
+ current_val="";
+ $("#apply-change-sstate_dir").attr("disabled","disabled");
}
- $('#change-sdkmachine-icon, #sdkmachine').hide();
- $("#change-sdkmachine-form").slideDown();
+ $("input#new-sstate_dir").val(current_val);
+
+ $('#change-sstate_dir-icon, #sstate_dir').hide();
+ $("#change-sstate_dir-form").slideDown();
});
- $('#cancel-change-sdkmachine').click(function(){
- $("#change-sdkmachine-form").slideUp(function() {
- $('#sdkmachine, #change-sdkmachine-icon').show();
+ $('#cancel-change-sstate_dir').click(function(){
+ $("#change-sstate_dir-form").slideUp(function() {
+ $('#sstate_dir, #change-sstate_dir-icon').show();
});
});
- $('#apply-change-sdkmachine').click(function(){
- var value="";
- var radios = document.getElementsByName('sdkmachine');
- for (var i = 0, length = radios.length; i < length; i++) {
- if (radios[i].checked) {
- // do whatever you want with the checked radio
- value=radios[i].value;
- break;
+ $("#new-sstate_dir").on('input', function(){
+ if ($(this).val().trim().length == 0) {
+ $("#apply-change-sstate_dir").attr("disabled","disabled");
+ }
+ else {
+ var input = $(this);
+ var re = /^\/([^ <>\\|":\.%\?\*]+)$/;
+ var invalidDir = re.test(input.val());
+ console.log(invalidDir);
+ if ( invalidDir ) {
+ $('#validate-sstate_dir').removeClass('control-group error');
+ $("#apply-change-sstate_dir").removeAttr("disabled");
+ $('#hintError-sstate_dir').hide();
+ } else {
+ $('#validate-sstate_dir').addClass('control-group error');
+ $("#apply-change-sstate_dir").attr("disabled","disabled");
+ $('#hintError-sstate_dir').show();
}
}
- postEditAjaxRequest({"configvarChange" : 'SDKMACHINE:'+value});
- $('#sdkmachine').text(value);
- $("#change-sdkmachine-form").slideUp(function() {
- $('#sdkmachine, #change-sdkmachine-icon').show();
- });
+ });
+ $('#apply-change-sstate_dir').click(function(){
+ var value = $('#new-sstate_dir').val().trim();
+ postEditAjaxRequest({"configvarChange" : 'SSTATE_DIR:'+value});
+ $('#sstate_dir').text(value);
+ $('#sstate_dir').removeClass('muted');
+ $("#change-sstate_dir-form").slideUp(function () {
+ $('#sstate_dir, #change-sstate_dir-icon').show();
+ });
});
- {% endif %}
+ {% endif %}
// add new variable
$("button#add-configvar-button").click( function (evt) {
@@ -830,7 +916,7 @@
$(".save").attr("disabled","disabled");
// Reload page if admin-removed core managed value is manually added back in
- if (0 <= " DISTRO IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SDKMACHINE ".indexOf( " "+variable+" " )) {
+ if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) {
// delayed reload to avoid race condition with postEditAjaxRequest
do_reload=true;
}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html
new file mode 100644
index 000000000..5814f32d0
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html
@@ -0,0 +1,36 @@
+{% extends 'base.html' %}
+
+{% block title %} All projects - Toaster {% endblock %}
+
+{% block pagecontent %}
+
+ <div class="page-header top-air">
+ <h1 data-role="page-title"></h1>
+ </div>
+
+ {% url 'projects' as xhr_table_url %}
+ {% include 'toastertable.html' %}
+
+ <script>
+ $(document).ready(function () {
+ var tableElt = $("#{{table_name}}");
+ var titleElt = $("[data-role='page-title']");
+
+ tableElt.on("table-done", function (e, total, tableParams) {
+ var title = "All projects";
+
+ if (tableParams.search || tableParams.filter) {
+ if (total === 0) {
+ title = "No projects found";
+ }
+ else if (total > 0) {
+ title = total + " project" + (total > 1 ? 's' : '') + " found";
+ }
+ }
+
+ titleElt.text(title);
+ });
+ });
+ </script>
+
+{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects.html
deleted file mode 100644
index 678a7963b..000000000
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects.html
+++ /dev/null
@@ -1,92 +0,0 @@
-{% extends "base.html" %}
-
-{% load static %}
-{% load projecttags %}
-{% load project_url_tag %}
-{% load humanize %}
-
-{% block title %} All projects - Toaster {% endblock %}
-
-{% block pagecontent %}
-
-
- <div class="page-header top-air">
- <h1>
- {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
- {{objects.paginator.count}} project{{objects.paginator.count|pluralize}} found
- {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
- No projects found
- {%else%}
- All projects
- {%endif%}
- </h1>
- </div>
-
- {% if objects.paginator.count == 0 %}
- <div class="row-fluid">
- <div class="alert">
- <form class="no-results input-append" id="searchform">
- <input id="search" name="search" class="input-xxlarge" type="text" value="
- {% if request.GET.search %}
- {{request.GET.search}}
- {% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
- <button class="btn" type="submit" value="Search">Search</button>
- <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all projects</button>
- </form>
- </div>
- </div>
-
- {% else %} {# We have builds to display #}
- {% include "basetable_top.html" %}
- {% for o in objects %}
- <tr class="data" data-project="{{ o.id }}">
- <td data-project-field="name">
- <a href="{% project_url o %}">{{o.name}}</a>
- </td>
- <td class="updated"><a href="{% project_url o %}">{{o.updated|date:"d/m/y H:i"}}</a></td>
- <td data-project-field="release">
- {% if o.release %}
- <a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a>
- {% elif o.is_default %}
- <span class="muted">Not applicable</span>
- <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project does not have a release set. It simply collects information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
- {% else %}
- No release available
- {% endif %}
- </td>
- <td data-project-field="machine">
- {% if o.is_default %}
- <span class="muted">Not applicable</span>
- <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project does not have a machine set. It simply collects information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
- {% else %}
- <a href="{% url 'project' o.id %}#machine-distro">{{o.get_current_machine_name}}</a>
- {% endif %}
- </td>
- {% if o.get_number_of_builds == 0 %}
- <td class="muted">{{o.get_number_of_builds}}</td>
- <td class="loutcome"></td>
- <td class="ltarget"></td>
- <td class="lerrors"></td>
- <td class="lwarnings"></td>
- <td class="limagefiles"></td>
- {% else %}
- <td><a href="{% url 'projectbuilds' o.id %}">{{o.get_number_of_builds}}</a></td>
- <td class="loutcome"><a href="{% url "builddashboard" o.get_last_build_id %}">{%if o.get_last_outcome == build_SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif o.get_last_outcome == build_FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td>
- <td class="ltarget"><a href="{% url "builddashboard" o.get_last_build_id %}">{{o.get_last_target}} </a></td>
- <td class="lerrors">{% if o.get_last_errors %}<a class="errors.count error" href="{% url "builddashboard" o.get_last_build_id %}#errors">{{o.get_last_errors}} error{{o.get_last_errors|pluralize}}</a>{%endif%}</td>
- <td class="lwarnings">{% if o.get_last_warnings %}<a class="warnings.count warning" href="{% url "builddashboard" o.get_last_build_id %}#warnings">{{o.get_last_warnings}} warning{{o.get_last_warnings|pluralize}}</a>{%endif%}</td>
- <td class="limagefiles">
- {% if o.get_last_outcome == build_SUCCEEDED %}
- <a href="{%url "builddashboard" o.get_last_build_id %}#images">{{fstypes|get_dict_value:o.id}}</a>
- {% endif %}
- </td>
-
- {% endif %}
- </tr>
- {% endfor %}
- {% include "basetable_bottom.html" %}
- {% endif %} {# empty #}
-
-{% endblock %}
-
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
index ee86b5481..007de06ff 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
@@ -1,6 +1,24 @@
+{% load static %}
+<script src="{% static 'js/projecttopbar.js' %}"></script>
+<script>
+ $(document).ready(function () {
+ var ctx = {
+ numProjectLayers : {{project.get_project_layer_versions.count}},
+ machine : "{{project.get_current_machine_name|default_if_none:""}}",
+ }
+
+ try {
+ projectTopBarInit(ctx);
+ } catch (e) {
+ document.write("Sorry, An error has occurred loading this page");
+ console.warn(e);
+ }
+ });
+</script>
+
<div class="alert alert-success lead" id="project-created-notification" style="margin-top:15px; display:none">
<button type="button" class="close" data-dismiss="alert">×</button>
- Your project <strong>{{project.name}}</strong> has been created. You can now <a href="{% url 'projectmachines' project.id %}">select your target machine</a> and <a href="{% url 'projectsoftwarerecipes' project.id %}">choose image recipes</a> to build.
+ Your project <strong>{{project.name}}</strong> has been created. You can now <a href="{% url 'projectmachines' project.id %}">select your target machine</a> and <a href="{% url 'projectimagerecipes' project.id %}">choose image recipes</a> to build.
</div>
<!-- project name -->
@@ -26,31 +44,29 @@
{% if not project.is_default %}
<div id="project-topbar">
<ul class="nav nav-pills">
- <li>
- <a href="{% url 'projectbuilds' project.id %}">
- Builds (<span class="total-builds">0</span>)
- </a>
- </li>
<li id="topbar-configuration-tab">
<a href="{% url 'project' project.id %}">
Configuration
</a>
</li>
<li>
+ <a href="{% url 'projectbuilds' project.id %}">
+ Builds ({{project.get_number_of_builds}})
+ </a>
+ </li>
+ <li>
<a href="{% url 'importlayer' project.id %}">
Import layer
</a>
</li>
- {% if CUSTOM_IMAGE %}
<li>
<a href="{% url 'newcustomimage' project.id %}">
New custom image
</a>
</li>
- {% endif %}
<li class="pull-right">
<form class="form-inline" style="margin-bottom:0px;">
- <i class="icon-question-sign get-help heading-help" data-placement="left" title="" data-original-title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to the recipe name, like so: <code>busybox:clean</code>"></i>
+ <i class="icon-question-sign get-help heading-help" data-placement="left" title="" data-original-title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a colon and a task name to the recipe name, like so: <code>busybox:clean</code>"></i>
<div class="input-append">
<input id="build-input" type="text" class="input-xlarge input-lg build-target-input" placeholder="Type the recipe you want to build" autocomplete="off" disabled>
<button id="build-button" class="btn btn-primary btn-large build-button" data-project-id="{{project.id}}" disabled>Build</button>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html
index c6ae2f380..1d6d64e3c 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html
@@ -71,6 +71,16 @@
Layer commit
</dt>
<dd class="iscommit">{{layer_version.commit}}</dd>
+ {% if object.provides_set.all %}
+ <dt>
+ <i class="icon-question-sign get-help"
+ title="A list of aliases by which a particular recipe can be known. The additional aliases are
+ synonyms for the recipe and can be useful satisfying dependencies of other recipes during
+ the build"></i>
+ PROVIDES
+ </dt>
+ <dd><code>{% for provider in object.provides_set.all %}{{ provider.name }}&nbsp;{% endfor %}</code></dd>
+ {% endif %}
</dl>
<h2 class="details">Tasks</h2>
@@ -162,7 +172,14 @@
{% for rr in object.r_dependencies_recipe.all|dictsort:"depends_on.name" %}
<tr>
- <td><a href="{% url "recipe" build.pk rr.depends_on.pk %}">{{rr.depends_on.name}}</a></td>
+ <td><a href="{% url "recipe" build.pk rr.depends_on.pk %}">{{rr.depends_on.name}}</a>
+ {% if rr.via %}
+ <span class="muted">satisfied via {{rr.via.name}}</span>
+ <i class="icon-question-sign get-help hover-help"
+ title="This dependency is satisfied by the PROVIDES value
+ {{rr.via.name}} in the {{rr.depends_on.name}} recipe"></i>
+ {% endif %}
+ </td>
<td><a href="{% url "recipe" build.pk rr.depends_on.pk %}">{{rr.depends_on.version}}</a></td>
</tr>
{% endfor %}
@@ -194,7 +211,14 @@
{% for rr in object.r_dependencies_depends.all|dictsort:"recipe.name" %}
<tr>
- <td><a href="{% url "recipe" build.pk rr.recipe.pk %}">{{rr.recipe.name}}</a></td>
+ <td><a href="{% url "recipe" build.pk rr.recipe.pk %}">{{rr.recipe.name}}</a>
+ {% if rr.via %}
+ <span class="muted"> satisfied via {{rr.via.name}}</span>
+ <i class="icon-question-sign get-help hover-help"
+ title="This dependency is satisfied by the PROVIDES value
+ {{rr.via.name}} in the {{rr.depends_on.name}} recipe"></i>
+ {% endif %}
+ </td>
<td><a href="{% url "recipe" build.pk rr.recipe.pk %}">{{rr.recipe.version}}</a></td>
</tr>
{% endfor %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipedetails.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipedetails.html
new file mode 100644
index 000000000..23aa171ce
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipedetails.html
@@ -0,0 +1,177 @@
+{% extends "base.html" %}
+{% load projecttags %}
+{% load humanize %}
+{% load static %}
+{% block pagecontent %}
+
+<div class="section">
+ <ul class="breadcrumb">
+ <li>
+ <a href="{% url 'project' project.id %}">{{project.name}}</a>
+ <span class="divider">&rarr;</span>
+ </li>
+ <li>
+ {% if recipe.is_image %}
+ <a href="{% url 'projectimagerecipes' project.id %}">Image recipes</a>
+ {% else %}
+ <a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a>
+ {% endif %}
+ <span class="divider">&rarr;</span>
+ </li>
+ <li class="active">
+ {{recipe.name}} ({{recipe.layer_version.layer.name}})
+ </li>
+ </ul>
+</div>
+
+<script src="{% static 'js/recipedetails.js' %}"></script>
+<script>
+ $(document).ready(function (){
+ var ctx = {
+ recipe : {
+ id: {{recipe.pk}},
+ name: "{{recipe.name}}",
+ totalPackages: {{packages.count}},
+ layer_version : {
+ id: {{recipe.layer_version.pk}},
+ name: "{{recipe.layer_version.layer.name}}",
+ layerdetailurl: "{% url 'layerdetails' project.pk recipe.layer_version.pk %}"
+ }
+ }
+ };
+
+ try {
+ recipeDetailsPageInit(ctx);
+ } catch (e) {
+ document.write("Sorry, An error has occurred loading this page");
+ console.warn(e);
+ }
+ });
+</script>
+
+{% include 'newcustomimage_modal.html' %}
+
+<div class="row-fluid span11">
+ <div class="alert alert-success lead" id="image-created-notification" style="margin-top: 15px; display: none">
+ <button type="button" data-dismiss="alert" class="close">x</button>
+ Your custom image <strong>{{recipe.name}}</strong> has been created. You can now add or remove packages as needed.
+ </div>
+ <div class="page-header air">
+ <h1>
+ {{recipe.name}}
+ <small>({{recipe.layer_version.layer.name}})</small>
+ </h1>
+ </div>
+</div>
+
+<div class="row-fluid span11">
+ <div class="span8">
+ <div class="button-place btn-group" id="customise-build-btns"
+ style="width: 100%;
+ {% if not in_project %}
+ display:none;
+ {% endif %}">
+ <button class="btn btn-large span6 build-recipe-btn" style="width: 50%">
+ Build {{recipe.name}}
+ </button>
+ {% if recipe.is_image %}
+ <button class="btn btn-large span6 customise-btn" data-recipe="{{recipe.pk}}" style="width: 50%">
+ Customise {{recipe.name}}
+ </button>
+ {% endif %}
+ </div>
+ <div class="button-place">
+ <button class="btn btn-block btn-large" id="add-layer-btn"
+ style="width:100%;
+ {% if in_project %}
+ display:none;
+ {% endif %}">
+ <i class="icon-plus"></i>
+ Add the {{recipe.layer_version.layer.name}} layer to your project to build or customise this image recipe
+ </button>
+ </div>
+
+ <div id="packages-table">
+ {% if packages.count %}
+ {% url 'recipepackages' project.id recipe.id as xhr_table_url %}
+ <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2>
+ {% include "toastertable.html" %}
+ {% else %}
+ <h2>{{title}}</h2>
+ {% endif %}
+
+ <div class="alert alert-info air" id="build-to-get-packages-msg"
+ {# if there are packages and it's in the project don't show this msg #}
+ {% if packages.count or not packages.count and not in_project %}
+ style="display:none"
+ {% endif %} >
+ <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p>
+ <button class="btn btn-info btn-large build-recipe-btn" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button>
+ </div>
+
+ <div class="alert alert-info air" id="packages-alert"
+ {% if packages.count or in_project %}
+ style="display:none"
+ {% endif %}
+ >
+ <p class="lead">Toaster has no package information for {{recipe.name}}
+ </p>
+ </div>
+ </div>
+ </div>
+ <div class="span4 well">
+ <h2 style="margin-bottom:20px;">About {{recipe.name}}</h2>
+ <dl>
+ <dt>
+ Approx. packages included
+ <i class="icon-question-sign get-help" title="" data-original-title="The number of packages included is based on information from previous builds and from parsing layers, so we can never be sure it is 100% accurate"></i>
+ </dt>
+ <dd class="no-packages">{{packages.count}}</dd>
+ <dt>
+ Approx. package size
+ <i class="icon-question-sign get-help" title="" data-original-title="Package size is based on information from previous builds, so we can never be sure it is 100% accurate"></i>
+ </dt>
+ <dd>{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd>
+ {% if last_build %}
+ <dt>Last build</dt>
+ <dd>
+ <i class="icon-ok-sign success"></i>
+ <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
+ </dd>
+ {% endif %}
+ <dt>Recipe file</dt>
+ <dd>
+ <code>{{recipe.file_path|cut_path_prefix:recipe.layer_version.local_path}}</code>
+ <a href="{{recipe.get_vcs_recipe_file_link_url}}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a>
+ </dd>
+ <dt>Layer</dt>
+ <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
+ <dt>
+ Summary
+ </dt>
+ <dd>
+ {{recipe.summary}}
+ </dd>
+ <dt>
+ Description
+ </dt>
+ <dd>
+ {{recipe.description}}
+ </dd>
+ <dt>Version</dt>
+ <dd>
+ {{recipe.version}}
+ </dd>
+ <dt>Section</dt>
+ <dd>
+ {{recipe.section}}
+ </dd>
+ <dt>License</dt>
+ <dd>
+ {{recipe.license}}
+ </dd>
+ </dl>
+ </div>
+</div>
+
+{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html
new file mode 100644
index 000000000..a3fcdb09e
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html
@@ -0,0 +1,14 @@
+{# Popover that displays the dependences and sizes of a package 'data' used in the Packages table #}
+{% with data.package_dependencies_source.all_depends.count as dep_count %}
+{% load projecttags %}
+{% if dep_count %}
+ <a data-content="<ul class='unstyled'>
+ {% for dep in data.package_dependencies_source.all_depends %}
+ <li>{{dep.depends_on.name}} {% if dep.depends_on.size > 0 %}({{dep.depends_on.size|filtered_filesizeformat}}){% endif %}</li>
+ {% endfor %}
+ </ul>" title="" class="btn" data-original-title="
+ <strong>{{data.name}}</strong> dependencies - <strong>{{data.package_dependencies_source.get_total_source_deps_size.depends_on__size__sum|filtered_filesizeformat}}</strong>">
+ {{dep_count}}
+</a>
+{% endif %}
+{% endwith %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
new file mode 100644
index 000000000..453a9d013
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
@@ -0,0 +1,14 @@
+{# Popover that displays the reverse dependencies and sizes of a package 'data' used in the Packages table #}
+{% with data.package_dependencies_target.all_depends.count as dep_count %}
+{% load projecttags %}
+{% if dep_count %}
+ <a data-content="<ul class='unstyled'>
+ {% for dep in data.package_dependencies_target.all_depends|dictsort:'package.name' %}
+ <li>{{dep.package.name}} {% if dep.package.size > 0 %}({{dep.package.size|filtered_filesizeformat}}){% endif %}</li>
+ {% endfor %}
+ </ul>" title="" class="btn" data-original-title="
+ <strong>{{data.name}}</strong> reverse dependencies - <strong>{{data.package_dependencies_target.get_total_revdeps_size.package_id__size__sum|filtered_filesizeformat}}</strong>">
+ {{dep_count}}
+</a>
+{% endif %}
+{% endwith %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html
index ef628d9f9..576826243 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html
@@ -238,7 +238,7 @@
</dl>
{# Performance section - shown only for executed tasks #}
-{%if task.elapsed_time or task.cpu_usage or task.disk_io %}
+{%if task.elapsed_time or task.cpu_time_user or task.cpu_time_system or task.disk_io %}
<h2 class="details">Performance</h2>
{% endif %}
<dl class="dl-horizontal">
@@ -249,19 +249,26 @@
</dt>
<dd>{{task.elapsed_time|format_none_and_zero|floatformat:2}}</dd>
{% endif %}
- {% if task.cpu_usage > 0 %}
+ {% if task.cpu_time_user > 0 %}
<dt>
- <i class="icon-question-sign get-help" title="The percentage of task CPU utilization"></i>
- CPU usage
+ <i class="icon-question-sign get-help" title="Total amount of time spent executing in user mode, in seconds. Note that this time can be greater than the task time due to parallel execution."></i>
+ User CPU time (secs)
</dt>
- <dd>{{task.cpu_usage|format_none_and_zero|floatformat:2}}%</dd>
+ <dd>{{task.cpu_time_user|format_none_and_zero|floatformat:2}}</dd>
+ {% endif %}
+ {% if task.cpu_time_system > 0 %}
+ <dt>
+ <i class="icon-question-sign get-help" title="Total amount of time spent executing in kernel mode, in seconds. Note that this time can be greater than the task time due to parallel execution."></i>
+ System CPU time (secs)
+ </dt>
+ <dd>{{task.cpu_time_system|format_none_and_zero|floatformat:2}}</dd>
{% endif %}
{% if task.disk_io > 0 %}
<dt>
- <i class="icon-question-sign get-help" title="Number of miliseconds the task spent doing disk input and output"></i>
- Disk I/O (ms)
+ <i class="icon-question-sign get-help" title="Number of bytes written to and read from the disk during the task"></i>
+ Disk I/O (bytes)
</dt>
- <dd>{{task.disk_io|format_none_and_zero}}</dd>
+ <dd>{{task.disk_io|format_none_and_zero|intcomma}}</dd>
{% endif %}
</dl>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html
index 353410f92..84bc10386 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html
@@ -1,4 +1,5 @@
{% extends "basebuildpage.html" %}
+{% load humanize %}
{% load projecttags %}
{% block title %} {{mainheading}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster{% endblock %}
@@ -20,13 +21,15 @@
<li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
{% endif %}
{% endblock %}
-{% block nav-cpuusage %}
- {% if 'CPU usage' == mainheading %}
- <li class="active"><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
+
+{% block nav-cputime %}
+ {% if 'CPU time' == mainheading %}
+ <li class="active"><a href="{% url 'cputime' build.pk %}">CPU time</a></li>
{% else %}
- <li><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
+ <li><a href="{% url 'cputime' build.pk %}">CPU time</a></li>
{% endif %}
{% endblock %}
+
{% block nav-diskio %}
{% if 'Disk I/O' == mainheading %}
<li class="active"><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
@@ -107,11 +110,14 @@
<td class="time_taken">
{{task.elapsed_time|format_none_and_zero|floatformat:2}}
</td>
- <td class="cpu_used">
- {{task.cpu_usage|format_none_and_zero|floatformat:2}}{% if task.cpu_usage %}%{% endif %}
+ <td class="cpu_time_system">
+ {{task.cpu_time_system|format_none_and_zero|floatformat:2}}
+ </td>
+ <td class="cpu_time_user">
+ {{task.cpu_time_user|format_none_and_zero|floatformat:2}}
</td>
<td class="disk_io">
- {{task.disk_io|format_none_and_zero}}
+ {{task.disk_io|format_none_and_zero|intcomma}}
</td>
</tr>
@@ -125,7 +131,7 @@
<script type="text/javascript">
$(document).ready(function() {
- // enable blue hightlight animation for the order link
+ // highlight heading on the column for the field used for ordering
if (location.href.search('#') > -1) {
var task_order = location.href.split('#')[1];
$("#" + task_order).addClass("highlight");
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html
index 7c8dc49b3..4d28793bf 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html
@@ -10,7 +10,9 @@
<span id="filter-actions-{{table_name}}"></span>
</div>
<div class="modal-footer">
- <button class="btn btn-primary" type="submit">Apply</button>
+ <button class="btn btn-primary" type="submit" data-role="filter-apply">
+ Apply
+ </button>
</div>
</form>
</div>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html
index 98a715f27..21c3d36c7 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html
@@ -32,8 +32,11 @@
<a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
<i class="icon-remove"></i>
</a>
- <button class="btn search-submit-{{table_name}}" >Search</button>
- <button class="btn btn-link remove-search-btn-{{table_name}}">Show {{title|lower}}
+ <button class="btn search-submit-{{table_name}}">
+ Search
+ </button>
+ <button class="btn btn-link show-all-{{table_name}} remove-search-btn-{{table_name}}">
+ Show all
</button>
</form>
</div>
@@ -43,9 +46,9 @@
<!-- control header -->
<div class="navbar" id="table-chrome-{{table_name}}">
<div class="navbar-inner">
- <div class="navbar-search input-append pull-left">
+ <div class="navbar-search input-append pull-left span6">
- <input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
+ <input id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
<a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
<i class="icon-remove"></i>
</a>
@@ -54,7 +57,7 @@
<div class="pull-right">
<div class="btn-group">
- <button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
+ <button id="edit-columns-button" class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
<span class="caret"></span>
</button>
<ul class="dropdown-menu editcol">
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html
index 0301a6c60..2d3d02c2e 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html
@@ -3,15 +3,14 @@
{% load humanize %}
{% load static %}
-{% block title %} Build artifact no longer exists - Toaster {% endblock %}
+{% block title %} Build artifact does not exist - Toaster {% endblock %}
{% block pagecontent %}
-
-<div class="row-fluid air">
- <div class="alert alert-info span8 lead">
- <p"> The build artifact you are trying to download no longer exists.</p>
- <p><a href="javascript:window.history.back()">Back to previous page</a></p>
+ <div class="row-fluid air">
+ <div class="alert alert-info span8 lead">
+ <p>The build artifact you are trying to download does not exist.</p>
+ <p><a href="javascript:window.history.back()">Back to previous page</a></p>
+ </div>
</div>
-</div>
{% endblock %}
OpenPOWER on IntegriCloud