summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2018-08-15 18:04:09 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-20 10:20:51 +0100
commit08fbdc02e32d715ae94e3b9603fb3ec8351c8fd3 (patch)
tree8b1eb6531f782ba531903cc7248fbd5705e5adf3 /bitbake/lib/toaster/toastergui/templates
parent9af0f1a46bbb6ad9ee8b35957251f4aa826b023f (diff)
downloadpoky-08fbdc02e32d715ae94e3b9603fb3ec8351c8fd3.tar.gz
bitbake: Toaster: Implement the project-specific feature and releated enhancements and defects.
Here is the primary driving enhancement: * Bug 12785 - Support Project Specific configuration for external tools (e.g. ISS, Eclipse) - Isolated project-specific configuration page (full Toaster context hidden) - Support for new project, reconfigure existing project, and import existing command line project - Ability to define variables (e.g. image recipe) and pass them back to external GUI - Ability to execute the cloning phase, so that external GUI receive a buildable project - Ability to call back to the external GUI when updates are completed and ready - Compatibility of above projects with the normal full Toaster interface - Ability to pass to a 'complete' or 'cancel' web page so that the external GUI can immediately stop that Toaster instance, and not leave dangling servers nor edit sessions open Here are the supporting enhancements, where at least the back end is implemented: * Bug 12821 - Make Toaster conf changes compatible with command line usage * Bug 12822 - Support importing user changes to conf files into Toaster * Bug 12823 - Support importing user build directories into Toaster * Bug 12824 - Scan imported layers for content so that they are immediately available * Bug 12825 - show layer clone item in progress bar Here are defects fixed: * Bug 12817 - builddelete.py requires explicit 'add_arguments' * Bug 12818 - Remove orphaned imported layers when project is deleted * Bug 12826 - fix imported layer management * Bug 12819 - build using selected bitbake env, not Toaster's env * Bug 12820 - Toaster randomizes the layer order in toaster_bblayers.conf [YOCTO #12785] (Bitbake rev: 985d6cec290bdd80998a63483561a73c75d82d65) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/base_specific.html128
-rw-r--r--bitbake/lib/toaster/toastergui/templates/baseprojectspecificpage.html48
-rw-r--r--bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/importlayer.html4
-rw-r--r--bitbake/lib/toaster/toastergui/templates/landing_specific.html50
-rw-r--r--bitbake/lib/toaster/toastergui/templates/layerdetails.html3
-rw-r--r--bitbake/lib/toaster/toastergui/templates/mrb_section.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/newcustomimage.html4
-rw-r--r--bitbake/lib/toaster/toastergui/templates/newproject_specific.html95
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project.html7
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project_specific.html162
-rw-r--r--bitbake/lib/toaster/toastergui/templates/project_specific_topbar.html80
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectconf.html7
-rw-r--r--bitbake/lib/toaster/toastergui/templates/recipe_add_btn.html23
14 files changed, 604 insertions, 11 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/base_specific.html b/bitbake/lib/toaster/toastergui/templates/base_specific.html
new file mode 100644
index 0000000000..e377cadd73
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/base_specific.html
@@ -0,0 +1,128 @@
1<!DOCTYPE html>
2{% load static %}
3{% load projecttags %}
4{% load project_url_tag %}
5<html lang="en">
6 <head>
7 <title>
8 {% block title %} Toaster {% endblock %}
9 </title>
10 <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
11 <!--link rel="stylesheet" href="{% static 'css/bootstrap-theme.css' %}" type="text/css"/-->
12 <link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'/>
13 <link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'/>
14
15 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
16 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
17 <script src="{% static 'js/jquery-2.0.3.min.js' %}">
18 </script>
19 <script src="{% static 'js/jquery.cookie.js' %}">
20 </script>
21 <script src="{% static 'js/bootstrap.min.js' %}">
22 </script>
23 <script src="{% static 'js/typeahead.jquery.js' %}">
24 </script>
25 <script src="{% static 'js/jsrender.min.js' %}">
26 </script>
27 <script src="{% static 'js/highlight.pack.js' %}">
28 </script>
29 <script src="{% static 'js/libtoaster.js' %}">
30 </script>
31 {% if DEBUG %}
32 <script>
33 libtoaster.debug = true;
34 </script>
35 {% endif %}
36 <script>
37 /* Set JsRender delimiters (mrb_section.html) different than Django's */
38 $.views.settings.delimiters("<%", "%>");
39
40 /* This table allows Django substitutions to be passed to libtoaster.js */
41 libtoaster.ctx = {
42 jsUrl : "{% static 'js/' %}",
43 htmlUrl : "{% static 'html/' %}",
44 projectsUrl : "{% url 'all-projects' %}",
45 projectsTypeAheadUrl: {% url 'xhr_projectstypeahead' as prjurl%}{{prjurl|json}},
46 {% if project.id %}
47 landingSpecificURL : "{% url 'landing_specific' project.id %}",
48 landingSpecificCancelURL : "{% url 'landing_specific_cancel' project.id %}",
49 projectId : {{project.id}},
50 projectPageUrl : {% url 'project' project.id as purl %}{{purl|json}},
51 projectSpecificPageUrl : {% url 'project_specific' project.id as purl %}{{purl|json}},
52 xhrProjectUrl : {% url 'xhr_project' project.id as pxurl %}{{pxurl|json}},
53 projectName : {{project.name|json}},
54 recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}},
55 layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}},
56 machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}},
57 distrosTypeAheadUrl: {% url 'xhr_distrostypeahead' project.id as paturl%}{{paturl|json}},
58 projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}},
59 xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}",
60 projectId : {{project.id}},
61 xhrBuildRequestUrl: "{% url 'xhr_buildrequest' project.id %}",
62 mostRecentBuildsUrl: "{% url 'most_recent_builds' %}?project_id={{project.id}}",
63 xhrProjectUpdateUrl: "{% url 'xhr_projectupdate' project.id %}",
64 xhrProjectCancelUrl: "{% url 'landing_specific_cancel' project.id %}",
65 xhrSetDefaultImageUrl: "{% url 'xhr_setdefaultimage' project.id %}",
66 {% else %}
67 mostRecentBuildsUrl: "{% url 'most_recent_builds' %}",
68 projectId : undefined,
69 projectPageUrl : undefined,
70 projectName : undefined,
71 {% endif %}
72 };
73 </script>
74 {% block extraheadcontent %}
75 {% endblock %}
76 </head>
77
78 <body>
79
80 {% csrf_token %}
81 <div id="loading-notification" class="alert alert-warning lead text-center" style="display:none">
82 Loading <i class="fa-pulse icon-spinner"></i>
83 </div>
84
85 <div id="change-notification" class="alert alert-info alert-dismissible change-notification" style="display:none">
86 <button type="button" class="close" id="hide-alert" data-toggle="alert">&times;</button>
87 <span id="change-notification-msg"></span>
88 </div>
89
90 <nav class="navbar navbar-default navbar-fixed-top">
91 <div class="container-fluid">
92 <div class="navbar-header">
93 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#global-nav" aria-expanded="false">
94 <span class="sr-only">Toggle navigation</span>
95 <span class="icon-bar"></span>
96 <span class="icon-bar"></span>
97 <span class="icon-bar"></span>
98 </button>
99 <div class="toaster-navbar-brand">
100 {% if project_specific %}
101 <img class="logo" src="{% static 'img/logo.png' %}" class="" alt="Yocto Project logo"/>
102 Toaster
103 {% else %}
104 <a href="/">
105 </a>
106 <a href="/">
107 <img class="logo" src="{% static 'img/logo.png' %}" class="" alt="Yocto Project logo"/>
108 </a>
109 <a class="brand" href="/">Toaster</a>
110 {% endif %}
111 {% if DEBUG %}
112 <span class="glyphicon glyphicon-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>
113 {% endif %}
114 </div>
115 </div>
116 <div class="collapse navbar-collapse" id="global-nav">
117 <ul class="nav navbar-nav">
118 <h3> Project Configuration Page </h3>
119 </div>
120 </div>
121 </nav>
122
123 <div class="container-fluid">
124 {% block pagecontent %}
125 {% endblock %}
126 </div>
127 </body>
128</html>
diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectspecificpage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectspecificpage.html
new file mode 100644
index 0000000000..d0b588de98
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/baseprojectspecificpage.html
@@ -0,0 +1,48 @@
1{% extends "base_specific.html" %}
2
3{% load projecttags %}
4{% load humanize %}
5
6{% block title %} {{title}} - {{project.name}} - Toaster {% endblock %}
7
8{% block pagecontent %}
9
10<div class="row">
11 {% include "project_specific_topbar.html" %}
12 <script type="text/javascript">
13$(document).ready(function(){
14 $("#config-nav .nav li a").each(function(){
15 if (window.location.pathname === $(this).attr('href'))
16 $(this).parent().addClass('active');
17 else
18 $(this).parent().removeClass('active');
19 });
20
21 $("#topbar-configuration-tab").addClass("active")
22 });
23 </script>
24
25 <!-- only on config pages -->
26 <div id="config-nav" class="col-md-2">
27 <ul class="nav nav-pills nav-stacked">
28 <li><a class="nav-parent" href="{% url 'project' project.id %}">Configuration</a></li>
29 <li class="nav-header">Compatible metadata</li>
30 <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a></li>
31 <li><a href="{% url 'projectimagerecipes' project.id %}">Image recipes</a></li>
32 <li><a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a></li>
33 <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li>
34 <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li>
35 <li><a href="{% url 'projectdistros' project.id %}">Distros</a></li>
36 <li class="nav-header">Extra configuration</li>
37 <li><a href="{% url 'projectconf' project.id %}">BitBake variables</a></li>
38
39 <li class="nav-header">Actions</li>
40 </ul>
41 </div>
42 <div class="col-md-10">
43 {% block projectinfomain %}{% endblock %}
44 </div>
45
46</div>
47{% endblock %}
48
diff --git a/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html b/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
index b3eabe1a26..99fbb38970 100644
--- a/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
+++ b/bitbake/lib/toaster/toastergui/templates/generic-toastertable-page.html
@@ -1,4 +1,4 @@
1{% extends "baseprojectpage.html" %} 1{% extends project_specific|yesno:"baseprojectspecificpage.html,baseprojectpage.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4{% load static %} 4{% load static %}
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html
index 97d52c76c1..e0c987eef1 100644
--- a/bitbake/lib/toaster/toastergui/templates/importlayer.html
+++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html
@@ -1,4 +1,4 @@
1{% extends "base.html" %} 1{% extends project_specific|yesno:"baseprojectspecificpage.html,base.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4{% load static %} 4{% load static %}
@@ -6,7 +6,7 @@
6{% block pagecontent %} 6{% block pagecontent %}
7 7
8<div class="row"> 8<div class="row">
9 {% include "projecttopbar.html" %} 9 {% include project_specific|yesno:"project_specific_topbar.html,projecttopbar.html" %}
10 {% if project and project.release %} 10 {% if project and project.release %}
11 <script src="{% static 'js/layerDepsModal.js' %}"></script> 11 <script src="{% static 'js/layerDepsModal.js' %}"></script>
12 <script src="{% static 'js/importlayer.js' %}"></script> 12 <script src="{% static 'js/importlayer.js' %}"></script>
diff --git a/bitbake/lib/toaster/toastergui/templates/landing_specific.html b/bitbake/lib/toaster/toastergui/templates/landing_specific.html
new file mode 100644
index 0000000000..e289c7d4a5
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/landing_specific.html
@@ -0,0 +1,50 @@
1{% extends "base_specific.html" %}
2
3{% load static %}
4{% load projecttags %}
5{% load humanize %}
6
7{% block title %} Welcome to Toaster {% endblock %}
8
9{% block pagecontent %}
10
11 <div class="container">
12 <div class="row">
13 <!-- Empty - no build module -->
14 <div class="page-header top-air">
15 <h1>
16 Configuration {% if status == "cancel" %}Canceled{% else %}Completed{% endif %}! You can now close this window.
17 </h1>
18 </div>
19 <div class="alert alert-info lead">
20 <p>
21 Your project configuration {% if status == "cancel" %}changes have been canceled{% else %}has completed!{% endif %}
22 <br>
23 <br>
24 <ul>
25 <li>
26 The Toaster instance for project configuration has been shut down
27 </li>
28 <li>
29 You can start Toaster independently for advanced project management and analysis:
30 <pre><code>
31 Set up bitbake environment:
32 $ cd {{install_dir}}
33 $ . oe-init-build-env [toaster_server]
34
35 Option 1: Start a local Toaster server, open local browser to "localhost:8000"
36 $ . toaster start webport=8000
37
38 Option 2: Start a shared Toaster server, open any browser to "[host_ip]:8000"
39 $ . toaster start webport=0.0.0.0:8000
40
41 To stop the Toaster server:
42 $ . toaster stop
43 </code></pre>
44 </li>
45 </ul>
46 </p>
47 </div>
48 </div>
49
50{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
index e0069db80c..1e26e31c8b 100644
--- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html
+++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -1,4 +1,4 @@
1{% extends "base.html" %} 1{% extends project_specific|yesno:"baseprojectspecificpage.html,base.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4{% load static %} 4{% load static %}
@@ -310,6 +310,7 @@
310 {% endwith %} 310 {% endwith %}
311 {% endwith %} 311 {% endwith %}
312 </div> 312 </div>
313
313 </div> <!-- end tab content --> 314 </div> <!-- end tab content -->
314 </div> <!-- end tabable --> 315 </div> <!-- end tabable -->
315 316
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index c5b9fe90d3..98d9fac822 100644
--- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -119,7 +119,7 @@
119 title="Toaster is cloning the repos required for your build"> 119 title="Toaster is cloning the repos required for your build">
120 </span> 120 </span>
121 121
122 Cloning <span id="repos-cloned-percentage-<%:id%>"><%:repos_cloned_percentage%></span>% complete 122 Cloning <span id="repos-cloned-percentage-<%:id%>"><%:repos_cloned_percentage%></span>% complete <span id="repos-cloned-progressitem-<%:id%>">(<%:progress_item%>)</span>
123 123
124 <%include tmpl='#cancel-template'/%> 124 <%include tmpl='#cancel-template'/%>
125 </div> 125 </div>
diff --git a/bitbake/lib/toaster/toastergui/templates/newcustomimage.html b/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
index 980179a406..0766e5e4cf 100644
--- a/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
+++ b/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
@@ -1,4 +1,4 @@
1{% extends "base.html" %} 1{% extends project_specific|yesno:"baseprojectspecificpage.html,base.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4{% load static %} 4{% load static %}
@@ -8,7 +8,7 @@
8 8
9<div class="row"> 9<div class="row">
10 10
11 {% include "projecttopbar.html" %} 11 {% include project_specific|yesno:"project_specific_topbar.html,projecttopbar.html" %}
12 12
13 <div class="col-md-12"> 13 <div class="col-md-12">
14 {% url table_name project.id as xhr_table_url %} 14 {% url table_name project.id as xhr_table_url %}
diff --git a/bitbake/lib/toaster/toastergui/templates/newproject_specific.html b/bitbake/lib/toaster/toastergui/templates/newproject_specific.html
new file mode 100644
index 0000000000..cfa77f2e40
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/newproject_specific.html
@@ -0,0 +1,95 @@
1{% extends "base.html" %}
2{% load projecttags %}
3{% load humanize %}
4
5{% block title %} Create a new project - Toaster {% endblock %}
6
7{% block pagecontent %}
8<div class="row">
9 <div class="col-md-12">
10 <div class="page-header">
11 <h1>Create a new project</h1>
12 </div>
13 {% if alert %}
14 <div class="alert alert-danger" role="alert">{{alert}}</div>
15 {% endif %}
16
17 <form method="POST" action="{%url "newproject_specific" project_pk %}">{% csrf_token %}
18 <div class="form-group" id="validate-project-name">
19 <label class="control-label">Project name <span class="text-muted">(required)</span></label>
20 <input type="text" class="form-control" required id="new-project-name" name="display_projectname" value="{{projectname}}" disabled>
21 </div>
22 <p class="help-block text-danger" style="display: none;" id="hint-error-project-name">A project with this name exists. Project names must be unique.</p>
23 <input type="hidden" name="ptype" value="build" />
24 <input type="hidden" name="projectname" value="{{projectname}}" />
25
26 {% if releases.count > 0 %}
27 <div class="release form-group">
28 {% if releases.count > 1 %}
29 <label class="control-label">
30 Release
31 <span class="glyphicon glyphicon-question-sign get-help" title="The version of the build system you want to use"></span>
32 </label>
33 <select name="projectversion" id="projectversion" class="form-control">
34 {% for release in releases %}
35 <option value="{{release.id}}"
36 {%if defaultbranch == release.name %}
37 selected
38 {%endif%}
39 >{{release.description}}</option>
40 {% endfor %}
41 </select>
42 <div class="row">
43 <div class="col-md-4">
44 {% for release in releases %}
45 <div class="helptext" id="description-{{release.id}}" style="display: none">
46 <span class="help-block">{{release.helptext|safe}}</span>
47 </div>
48 {% endfor %}
49 {% else %}
50 <input type="hidden" name="projectversion" value="{{releases.0.id}}"/>
51 {% endif %}
52 </div>
53 </div>
54 </fieldset>
55 {% endif %}
56 <div class="top-air">
57 <input type="submit" id="create-project-button" class="btn btn-primary btn-lg" value="Create project"/>
58 <span class="help-inline" style="vertical-align:middle;">To create a project, you need to specify the release</span>
59 </div>
60
61 </form>
62 </div>
63 </div>
64
65 <script type="text/javascript">
66 $(document).ready(function () {
67 // hide the new project button, name is preset
68 $("#new-project-button").hide();
69
70 // enable submit button when all required fields are populated
71 $("input#new-project-name").on('input', function() {
72 if ($("input#new-project-name").val().length > 0 ){
73 $('.btn-primary').removeAttr('disabled');
74 $(".help-inline").css('visibility','hidden');
75 }
76 else {
77 $('.btn-primary').attr('disabled', 'disabled');
78 $(".help-inline").css('visibility','visible');
79 }
80 });
81
82 // show relevant help text for the selected release
83 var selected_release = $('select').val();
84 $("#description-" + selected_release).show();
85
86 $('select').change(function(){
87 var new_release = $('select').val();
88 $(".helptext").hide();
89 $('#description-' + new_release).fadeIn();
90 });
91
92 });
93 </script>
94
95{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index 11603d1e12..fa41e3c909 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -1,4 +1,4 @@
1{% extends "baseprojectpage.html" %} 1{% extends project_specific|yesno:"baseprojectspecificpage.html,baseprojectpage.html" %}
2 2
3{% load projecttags %} 3{% load projecttags %}
4{% load humanize %} 4{% load humanize %}
@@ -18,7 +18,7 @@
18 try { 18 try {
19 projectPageInit(ctx); 19 projectPageInit(ctx);
20 } catch (e) { 20 } catch (e) {
21 document.write("Sorry, An error has occurred loading this page"); 21 document.write("Sorry, An error has occurred loading this page (project):"+e);
22 console.warn(e); 22 console.warn(e);
23 } 23 }
24 }); 24 });
@@ -93,6 +93,7 @@
93 </form> 93 </form>
94 </div> 94 </div>
95 95
96 {% if not project_specific %}
96 <div class="well well-transparent"> 97 <div class="well well-transparent">
97 <h3>Most built recipes</h3> 98 <h3>Most built recipes</h3>
98 99
@@ -105,6 +106,7 @@
105 </ul> 106 </ul>
106 <button class="btn btn-primary" id="freq-build-btn" disabled="disabled">Build selected recipes</button> 107 <button class="btn btn-primary" id="freq-build-btn" disabled="disabled">Build selected recipes</button>
107 </div> 108 </div>
109 {% endif %}
108 110
109 <div class="well well-transparent"> 111 <div class="well well-transparent">
110 <h3>Project release</h3> 112 <h3>Project release</h3>
@@ -157,5 +159,6 @@
157 <ul class="list-unstyled lead" id="layers-in-project-list"> 159 <ul class="list-unstyled lead" id="layers-in-project-list">
158 </ul> 160 </ul>
159 </div> 161 </div>
162
160</div> 163</div>
161{% endblock %} 164{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/project_specific.html b/bitbake/lib/toaster/toastergui/templates/project_specific.html
new file mode 100644
index 0000000000..f625d18baf
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/project_specific.html
@@ -0,0 +1,162 @@
1{% extends "baseprojectspecificpage.html" %}
2
3{% load projecttags %}
4{% load humanize %}
5{% load static %}
6
7{% block title %} Configuration - {{project.name}} - Toaster {% endblock %}
8{% block projectinfomain %}
9
10<script src="{% static 'js/layerDepsModal.js' %}"></script>
11<script src="{% static 'js/projectpage.js' %}"></script>
12<script>
13 $(document).ready(function (){
14 var ctx = {
15 testReleaseChangeUrl: "{% url 'xhr_testreleasechange' project.id %}",
16 };
17
18 try {
19 projectPageInit(ctx);
20 } catch (e) {
21 document.write("Sorry, An error has occurred loading this page");
22 console.warn(e);
23 }
24 });
25</script>
26
27<div id="delete-project-modal" class="modal fade" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false">
28 <div class="modal-dialog">
29 <div class="modal-content">
30 <div class="modal-header">
31 <h4>Are you sure you want to delete this project?</h4>
32 </div>
33 <div class="modal-body">
34 <p>Deleting the <strong class="project-name"></strong> project
35 will:</p>
36 <ul>
37 <li>Cancel its builds currently in progress</li>
38 <li>Remove its configuration information</li>
39 <li>Remove its imported layers</li>
40 <li>Remove its custom images</li>
41 <li>Remove all its build information</li>
42 </ul>
43 </div>
44 <div class="modal-footer">
45 <button type="button" class="btn btn-primary" id="delete-project-confirmed">
46 <span data-role="submit-state">Delete project</span>
47 <span data-role="loading-state" style="display:none">
48 <span class="fa-pulse">
49 <i class="fa-pulse icon-spinner"></i>
50 </span>
51 &nbsp;Deleting project...
52 </span>
53 </button>
54 <button type="button" class="btn btn-link" data-dismiss="modal">Cancel</button>
55 </div>
56 </div><!-- /.modal-content -->
57 </div><!-- /.modal-dialog -->
58</div>
59
60
61<div class="row" id="project-page" style="display:none">
62 <div class="col-md-6">
63 <div class="well well-transparent" id="machine-section">
64 <h3>Machine</h3>
65
66 <p class="lead"><span id="project-machine-name"></span> <span class="glyphicon glyphicon-edit" id="change-machine-toggle"></span></p>
67
68 <form id="select-machine-form" style="display:none;" class="form-inline">
69 <span class="help-block">Machine suggestions come from the list of layers added to your project. If you don't see the machine you are looking for, <a href="{% url 'projectmachines' project.id %}">check the full list of machines</a></span>
70 <div class="form-group" id="machine-input-form">
71 <input class="form-control" id="machine-change-input" autocomplete="off" value="" data-provide="typeahead" data-minlength="1" data-autocomplete="off" type="text">
72 </div>
73 <button id="machine-change-btn" class="btn btn-default" type="button">Save</button>
74 <a href="#" id="cancel-machine-change" class="btn btn-link">Cancel</a>
75 <span class="help-block text-danger" id="invalid-machine-name-help" style="display:none">A valid machine name cannot include spaces.</span>
76 <p class="form-link"><a href="{% url 'projectmachines' project.id %}">View compatible machines</a></p>
77 </form>
78 </div>
79
80 <div class="well well-transparent" id="distro-section">
81 <h3>Distro</h3>
82
83 <p class="lead"><span id="project-distro-name"></span> <span class="glyphicon glyphicon-edit" id="change-distro-toggle"></span></p>
84
85 <form id="select-distro-form" style="display:none;" class="form-inline">
86 <span class="help-block">Distro suggestions come from the Layer Index</a></span>
87 <div class="form-group">
88 <input class="form-control" id="distro-change-input" autocomplete="off" value="" data-provide="typeahead" data-minlength="1" data-autocomplete="off" type="text">
89 </div>
90 <button id="distro-change-btn" class="btn btn-default" type="button">Save</button>
91 <a href="#" id="cancel-distro-change" class="btn btn-link">Cancel</a>
92 <p class="form-link"><a href="{% url 'projectdistros' project.id %}">View compatible distros</a></p>
93 </form>
94 </div>
95
96 <div class="well well-transparent">
97 <h3>Most built recipes</h3>
98
99 <div class="alert alert-info" style="display:none" id="no-most-built">
100 <h4>You haven't built any recipes yet</h4>
101 <p class="form-link"><a href="{% url 'projectimagerecipes' project.id %}">Choose a recipe to build</a></p>
102 </div>
103
104 <ul class="list-unstyled lead" id="freq-build-list">
105 </ul>
106 <button class="btn btn-primary" id="freq-build-btn" disabled="disabled">Build selected recipes</button>
107 </div>
108
109 <div class="well well-transparent">
110 <h3>Project release</h3>
111
112 <p class="lead"><span id="project-release-title"></span>
113
114 <!-- Comment out the ability to change the project release, until we decide what to do with this functionality -->
115
116 <!--i title="" data-original-title="" id="release-change-toggle" class="icon-pencil"></i-->
117 </p>
118
119 <!-- Comment out the ability to change the project release, until we decide what to do with this functionality -->
120
121 <!--form class="form-inline" id="change-release-form" style="display:none;">
122 <select></select>
123 <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>
124 </form-->
125 </div>
126 </div>
127
128 <div class="col-md-6">
129 <div class="well well-transparent" id="layer-container">
130 <h3>Layers <span class="counter">(<span id="project-layers-count"></span>)</span>
131 <span title="OpenEmbedded organises recipes and machines into thematic groups called <strong>layers</strong>. Click on a layer name to see the recipes and machines it includes." class="glyphicon glyphicon-question-sign get-help"></span>
132 </h3>
133
134 <div class="alert alert-warning" id="no-layers-in-project" style="display:none">
135 <h4>This project has no layers</h4>
136 In order to build this project you need to add some layers first. For that you can:
137 <ul>
138 <li><a href="{% url 'projectlayers' project.id %}">Choose from the layers compatible with this project</a></li>
139 <li><a href="{% url 'importlayer' project.id %}">Import a layer</a></li>
140 <li><a href="http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the documentation</a></li>
141 <li>Or type a layer name below</li>
142 </ul>
143 </div>
144
145 <form class="form-inline">
146 <div class="form-group">
147 <input id="layer-add-input" class="form-control" autocomplete="off" placeholder="Type a layer name" data-minlength="1" data-autocomplete="off" data-provide="typeahead" data-source="" type="text">
148 </div>
149 <button id="add-layer-btn" class="btn btn-default" disabled>Add layer</button>
150 <p class="form-link">
151 <a href="{% url 'projectlayers' project.id %}" id="view-compatible-layers">View compatible layers</a>
152 <span class="text-muted">|</span>
153 <a href="{% url 'importlayer' project.id %}">Import layer</a>
154 </p>
155 </form>
156
157 <ul class="list-unstyled lead" id="layers-in-project-list">
158 </ul>
159 </div>
160
161</div>
162{% endblock %}
diff --git a/bitbake/lib/toaster/toastergui/templates/project_specific_topbar.html b/bitbake/lib/toaster/toastergui/templates/project_specific_topbar.html
new file mode 100644
index 0000000000..622787c4bc
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/project_specific_topbar.html
@@ -0,0 +1,80 @@
1{% load static %}
2<script src="{% static 'js/projecttopbar.js' %}"></script>
3<script>
4 $(document).ready(function () {
5 var ctx = {
6 numProjectLayers : {{project.get_project_layer_versions.count}},
7 machine : "{{project.get_current_machine_name|default_if_none:""}}",
8 }
9
10 try {
11 projectTopBarInit(ctx);
12 } catch (e) {
13 document.write("Sorry, An error has occurred loading this page (pstb):"+e);
14 console.warn(e);
15 }
16 });
17</script>
18
19<div class="col-md-12">
20 <div class="alert alert-success alert-dismissible change-notification" id="project-created-notification" style="display:none">
21 <button type="button" class="close" data-dismiss="alert">&times;</button>
22 <p>Your project <strong>{{project.name}}</strong> has been created. You can now <a class="alert-link" href="{% url 'projectmachines' project.id %}">select your target machine</a> and <a class="alert-link" href="{% url 'projectimagerecipes' project.id %}">choose image recipes</a> to build.</p>
23 </div>
24 <!-- project name -->
25 <div class="page-header">
26 <h1 id="project-name-container">
27 <span class="project-name">{{project.name}}</span>
28 {% if project.is_default %}
29 <span class="glyphicon glyphicon-question-sign get-help" title="This project shows information about the builds you start from the command line while Toaster is running"></span>
30 {% endif %}
31 </h1>
32 <form id="project-name-change-form" class="form-inline" style="display: none;">
33 <div class="form-group">
34 <input class="form-control input-lg" type="text" id="project-name-change-input" autocomplete="off" value="{{project.name}}">
35 </div>
36 <button id="project-name-change-btn" class="btn btn-default btn-lg" type="button">Save</button>
37 <a href="#" id="project-name-change-cancel" class="btn btn-lg btn-link">Cancel</a>
38 </form>
39 </div>
40
41 {% with mrb_type='project' %}
42 {% include "mrb_section.html" %}
43 {% endwith %}
44
45 {% if not project.is_default %}
46 <div id="project-topbar">
47 <ul class="nav nav-tabs">
48 <li id="topbar-configuration-tab">
49 <a href="{% url 'project_specific' project.id %}">
50 Configuration
51 </a>
52 </li>
53 <li>
54 <a href="{% url 'importlayer' project.id %}">
55 Import layer
56 </a>
57 </li>
58 <li>
59 <a href="{% url 'newcustomimage' project.id %}">
60 New custom image
61 </a>
62 </li>
63 <li class="pull-right">
64 <form class="form-inline">
65 <div class="form-group">
66 <span class="glyphicon glyphicon-question-sign get-help" data-placement="left" 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>"></span>
67 <input id="build-input" type="text" class="form-control input-lg" placeholder="Select the default image recipe" autocomplete="off" disabled value="{{project.get_default_image}}">
68 </div>
69 {% if project.get_is_new %}
70 <button id="update-project-button" class="btn btn-primary btn-lg" data-project-id="{{project.id}}">Prepare Project</button>
71 {% else %}
72 <button id="cancel-project-button" class="btn info btn-lg" data-project-id="{{project.id}}">Cancel</button>
73 <button id="update-project-button" class="btn btn-primary btn-lg" data-project-id="{{project.id}}">Update</button>
74 {% endif %}
75 </form>
76 </li>
77 </ul>
78 </div>
79 {% endif %}
80</div>
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html
index 933c588f34..fb20b26f22 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectconf.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -1,4 +1,4 @@
1{% extends "baseprojectpage.html" %} 1{% extends project_specific|yesno:"baseprojectspecificpage.html,baseprojectpage.html" %}
2{% load projecttags %} 2{% load projecttags %}
3{% load humanize %} 3{% load humanize %}
4 4
@@ -438,8 +438,11 @@ function onEditPageUpdate(data) {
438 var_context='m'; 438 var_context='m';
439 } 439 }
440 } 440 }
441 if (configvars_sorted[i][0].startsWith("INTERNAL_")) {
442 var_context='m';
443 }
441 if (var_context == undefined) { 444 if (var_context == undefined) {
442 orightml += '<dt><span id="config_var_entry_'+configvars_sorted[i][2]+'" class="js-config-var-name"></span><span class="glyphicon glyphicon-trash js-icon-trash-config_var" id="config_var_trash_'+configvars_sorted[i][2]+'" x-data="'+configvars_sorted[i][2]+'"></span> </dt>' 445 orightml += '<dt><span id="config_var_entry_'+configvars_sorted[i][2]+'" class="js-config-var-name"></span><span class="glyphicon glyphicon-trash js-icon-trash-config_var" id="config_var_trash_'+configvars_sorted[i][2]+'" x-data="'+configvars_sorted[i][2]+'"></span> </dt>'
443 orightml += '<dd class="variable-list">' 446 orightml += '<dd class="variable-list">'
444 orightml += ' <span class="lead" id="config_var_value_'+configvars_sorted[i][2]+'"></span>' 447 orightml += ' <span class="lead" id="config_var_value_'+configvars_sorted[i][2]+'"></span>'
445 orightml += ' <span class="glyphicon glyphicon-edit js-icon-pencil-config_var" x-data="'+configvars_sorted[i][2]+'"></span>' 448 orightml += ' <span class="glyphicon glyphicon-edit js-icon-pencil-config_var" x-data="'+configvars_sorted[i][2]+'"></span>'
diff --git a/bitbake/lib/toaster/toastergui/templates/recipe_add_btn.html b/bitbake/lib/toaster/toastergui/templates/recipe_add_btn.html
new file mode 100644
index 0000000000..06c464561e
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/recipe_add_btn.html
@@ -0,0 +1,23 @@
1<a data-recipe-name="{{data.name}}" class="btn btn-default btn-block layer-exists-{{data.layer_version.pk}} set-default-recipe-btn" style="margin-top: 5px;
2 {% if data.layer_version.pk not in extra.current_layers %}
3 display:none;
4 {% endif %}"
5 >
6 Set recipe
7</a>
8<a class="btn btn-default btn-block layerbtn layer-add-{{data.layer_version.pk}}"
9 data-layer='{
10 "id": {{data.layer_version.pk}},
11 "name": "{{data.layer_version.layer.name}}",
12 "layerdetailurl": "{%url "layerdetails" extra.pid data.layer_version.pk%}",
13 "xhrLayerUrl": "{% url "xhr_layer" extra.pid data.layer_version.pk %}"
14 }' data-directive="add"
15 {% if data.layer_version.pk in extra.current_layers %}
16 style="display:none;"
17 {% endif %}
18>
19 <span class="glyphicon glyphicon-plus"></span>
20 Add layer
21 <span class="glyphicon glyphicon-question-sign get-help" title="To set this
22 recipe you must first add the {{data.layer_version.layer.name}} layer to your project"></i>
23</a>