diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
6 files changed, 122 insertions, 425 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 8def2daf8e..4c6676c6e7 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html | |||
@@ -38,6 +38,8 @@ | |||
38 | projectName : {{project.name|json}}, | 38 | projectName : {{project.name|json}}, |
39 | projectTargetsUrl: {% url 'projectavailabletargets' project.id as paturl%}{{paturl|json}}, | 39 | projectTargetsUrl: {% url 'projectavailabletargets' project.id as paturl%}{{paturl|json}}, |
40 | projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}}, | 40 | projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}}, |
41 | projectLayersUrl: {% url 'projectlayers' project.id as plurl %}{{plurl|json}}, | ||
42 | projectMachinesUrl: {% url 'projectmachines' project.id as pmurl %}{{pmurl|json}}, | ||
41 | projectId : {{project.id}}, | 43 | projectId : {{project.id}}, |
42 | {% else %} | 44 | {% else %} |
43 | projectId : undefined, | 45 | projectId : undefined, |
@@ -69,6 +71,11 @@ | |||
69 | Loading <i class="fa-pulse icon-spinner"></i> | 71 | Loading <i class="fa-pulse icon-spinner"></i> |
70 | </div> | 72 | </div> |
71 | 73 | ||
74 | <div id="change-notification" class="alert lead alert-info" style="display:none"> | ||
75 | <button type="button" class="close" id="hide-alert">×</button> | ||
76 | <span id="change-notification-msg"></span> | ||
77 | </div> | ||
78 | |||
72 | <div class="navbar navbar-fixed-top"> | 79 | <div class="navbar navbar-fixed-top"> |
73 | <div class="navbar-inner"> | 80 | <div class="navbar-inner"> |
74 | <div class="container-fluid"> | 81 | <div class="container-fluid"> |
diff --git a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html index ac32deac2f..0db06a86da 100644 --- a/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html +++ b/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html | |||
@@ -29,8 +29,6 @@ | |||
29 | <li><a href="{% url 'projecttargets' project.id %}">Recipes</a></li> | 29 | <li><a href="{% url 'projecttargets' project.id %}">Recipes</a></li> |
30 | <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li> | 30 | <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li> |
31 | <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li> | 31 | <li><a href="{% url 'projectlayers' project.id %}">Layers</a></li> |
32 | <li class="nav-header">Actions</li> | ||
33 | <li><a href="{% url 'importlayer' project.id %}">Import layer</a></li> | ||
34 | </ul> | 32 | </ul> |
35 | </div> | 33 | </div> |
36 | <div class="span10"> | 34 | <div class="span10"> |
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html index d6984bcc9f..bec5f1aa74 100644 --- a/bitbake/lib/toaster/toastergui/templates/importlayer.html +++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html | |||
@@ -1,10 +1,11 @@ | |||
1 | {% extends "baseprojectpage.html" %} | 1 | {% extends "base.html" %} |
2 | {% load projecttags %} | 2 | {% load projecttags %} |
3 | {% load humanize %} | 3 | {% load humanize %} |
4 | {% load static %} | 4 | {% load static %} |
5 | {% block pagecontent %} | ||
5 | 6 | ||
7 | {% include "projecttopbar.html" %} | ||
6 | 8 | ||
7 | {% block projectinfomain %} | ||
8 | 9 | ||
9 | {% if project and project.release %} | 10 | {% if project and project.release %} |
10 | <script src="{% static 'js/layerDepsModal.js' %}"></script> | 11 | <script src="{% static 'js/layerDepsModal.js' %}"></script> |
@@ -24,12 +25,10 @@ | |||
24 | }); | 25 | }); |
25 | </script> | 26 | </script> |
26 | 27 | ||
27 | <h2>Import layer</h2> | 28 | <form class="span11"> |
28 | |||
29 | <form> | ||
30 | <span class="help-block">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span> | ||
31 | <fieldset class="air"> | 29 | <fieldset class="air"> |
32 | <legend>Layer repository information</legend> | 30 | <legend>Layer repository information</legend> |
31 | <span class="help-block">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span> | ||
33 | <div class="alert alert-error" id="import-error" style="display:none"> | 32 | <div class="alert alert-error" id="import-error" style="display:none"> |
34 | <button type="button" class="close" data-dismiss="alert">×</button> | 33 | <button type="button" class="close" data-dismiss="alert">×</button> |
35 | <h3> </h3> | 34 | <h3> </h3> |
@@ -136,5 +135,4 @@ | |||
136 | </div> | 135 | </div> |
137 | 136 | ||
138 | {% endif %} | 137 | {% endif %} |
139 | |||
140 | {% endblock %} | 138 | {% endblock %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/machine_btn.html b/bitbake/lib/toaster/toastergui/templates/machine_btn.html index 54ff5def71..d2cb55bab4 100644 --- a/bitbake/lib/toaster/toastergui/templates/machine_btn.html +++ b/bitbake/lib/toaster/toastergui/templates/machine_btn.html | |||
@@ -1,4 +1,4 @@ | |||
1 | <a href="{% url 'project' extra.pid %}#/machineselect={{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.id}}" style="margin-top: 5px; display:none"> | 1 | <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"> |
2 | Select machine</a> | 2 | Select machine</a> |
3 | <button class="btn btn-block layerbtn layer-add-{{data.layer_version.id}}" data-layer='{ "id": {{data.layer_version.id}}, "name": "{{data.layer_version.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add"> | 3 | <button class="btn btn-block layerbtn layer-add-{{data.layer_version.id}}" data-layer='{ "id": {{data.layer_version.id}}, "name": "{{data.layer_version.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add"> |
4 | <i class="icon-plus"></i> | 4 | <i class="icon-plus"></i> |
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index 0fbfb599b7..aad79b4860 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html | |||
@@ -1,446 +1,130 @@ | |||
1 | {% extends "baseprojectpage.html" %} | 1 | {% extends "baseprojectpage.html" %} |
2 | <!-- | 2 | |
3 | vim: expandtab tabstop=2 | ||
4 | --> | ||
5 | {% load projecttags %} | 3 | {% load projecttags %} |
6 | {% load humanize %} | 4 | {% load humanize %} |
7 | {% load static %} | 5 | {% load static %} |
8 | 6 | ||
9 | |||
10 | {% block projectinfomain %} | 7 | {% block projectinfomain %} |
11 | <script src="{% static "js/angular.min.js" %}"></script> | ||
12 | <script src="{% static "js/angular-animate.min.js" %}"></script> | ||
13 | <script src="{% static "js/angular-cookies.min.js" %}"></script> | ||
14 | <script src="{% static "js/angular-route.min.js" %}"></script> | ||
15 | <script src="{% static "js/angular-sanitize.min.js" %}"></script> | ||
16 | <script src="{% static "js/ui-bootstrap-tpls-0.11.0.js" %}"></script> | ||
17 | 8 | ||
18 | {% if lvs_nos == 0 %} | 9 | <script src="{% static 'js/layerDepsModal.js' %}"></script> |
10 | <script src="{% static 'js/projectpage.js' %}"></script> | ||
11 | <script> | ||
12 | $(document).ready(function (){ | ||
13 | var ctx = { | ||
14 | typeaheadUrl : "{% url 'xhr_datatypeahead' project.id %}", | ||
15 | |||
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> | ||
19 | 26 | ||
20 | <div class="page-header"> | 27 | <div id="change-release-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="change-release-modal" aria-hidden="false"> |
21 | <h1> {{ project.name }} </h1> | 28 | <div class="modal-header"> |
29 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> | ||
30 | <h3>Changing Yocto Project release to <span class="proposed-release-change-name"></span></h3> | ||
22 | </div> | 31 | </div> |
23 | <div class="alert alert-info lead"> | 32 | <div class="modal-body"> |
24 | <p>Toaster has no layer information. Without layer information, you cannot run builds. To generate layer information you can:</p> | 33 | <p>The following added layers do not exist for <span class="proposed-release-change-name"></span>: </p> |
25 | <ul> | 34 | <ul id="layers-to-remove-list"> |
26 | <li> <a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">Configure a layer source</a></li> | 35 | </ul> |
27 | <li> <a href="{% url 'importlayer' project.id %}">Import a layer</a></li> | 36 | <p>If you change the Yocto Project release to <span class="proposed-release-change-name"></span>, the above layers will be deleted from your added layers.</p> |
28 | </ul> | ||
29 | </div> | ||
30 | |||
31 | {%else%} | ||
32 | |||
33 | <div id="main" role="main" data-ng-app="project" data-ng-controller="prjCtrl" data-ng-cloak> | ||
34 | |||
35 | <!-- alerts section 1--> | ||
36 | <div data-ng-repeat="a in zone1alerts"> | ||
37 | <div class="alert alert-dismissible lead" role="alert" data-ng-class="a.type"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span></button> | ||
38 | <span data-ng-bind-html="a.text"></span> | ||
39 | </div> | ||
40 | </div> | 37 | </div> |
38 | <div class="modal-footer"> | ||
39 | <button id="change-release-and-rm-layers" data-dismiss="modal" type="submit" class="btn btn-primary">Change release and delete layers</button> | ||
40 | <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button> | ||
41 | </div> | ||
42 | </div> | ||
41 | 43 | ||
42 | <!-- custom templates for ng --> | ||
43 | |||
44 | <style> | ||
45 | .missing-layer { | ||
46 | color: lightgrey; | ||
47 | } | ||
48 | </style> | ||
49 | <script type="text/ng-template" id="recipes_suggestion_details"> | ||
50 | <a> {[match.model.name]} | ||
51 | <span data-ng-class="{'missing-layer':($parent.$parent.$parent.$parent.filterProjectLayerIds().indexOf(match.model.projectcompatible_layer.id) == -1)}"> | ||
52 | [{[match.model.layer_version__layer__name]}] | ||
53 | </span> | ||
54 | </a> | ||
55 | </script> | ||
56 | |||
57 | <script type="text/ng-template" id="machines_suggestion_details"> | ||
58 | <a> {[match.model.name]} <span class="{'missing-layer':(filterProjectLayerIds().indexOf(match.model.layer_version_compatible_id) == -1)}">[{[match.model.layer_version__layer__name]}]</span> </a> | ||
59 | </script> | ||
60 | 44 | ||
61 | <script type="text/ng-template" id="layers_suggestion_details"> | 45 | <div class="row-fluid" id="project-page" style="display:none"> |
62 | <a> {[match.model['layer__name']]} ( {[match.model.layer__vcs_url]} ) </a> | 46 | <div class="span6"> |
63 | </script> | 47 | <div class="well well-transparent" id="machine-section"> |
48 | <h3>Machine</h3> | ||
64 | 49 | ||
50 | <p class="lead"><span id="project-machine-name"></span> <i title="" data-original-title="" id="change-machine-toggle" class="icon-pencil"></i></p> | ||
65 | 51 | ||
52 | <form id="select-machine-form" style="display:none;"> | ||
53 | <div class="alert alert-info"> | ||
54 | <strong>Machine changes have a big impact on build outcome.</strong> You cannot really compare the builds for the new machine with the previous ones. | ||
55 | </div> | ||
66 | 56 | ||
57 | <div class="input-append"> | ||
58 | <input id="machine-change-input" autocomplete="off" value="" data-provide="typeahead" data-minlength="1" data-autocomplete="off" type="text"> | ||
59 | <button id="machine-change-btn" class="btn" type="button">Save</button> <a href="#" id="cancel-machine-change" class="btn btn-link">Cancel</a> | ||
60 | </div> | ||
67 | 61 | ||
68 | <!-- modal dialogs --> | 62 | <p><a href="{% url 'projectmachines' project.id %}" class="link">View compatible machines</a></p> |
69 | <script type="text/ng-template" id="dependencies_modal"> | 63 | </form> |
70 | <div class="modal-header"> | ||
71 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> | ||
72 | <h3><span data-ng-bind="layerAddName"></span> dependencies</h3> | ||
73 | </div> | ||
74 | <div class="modal-body"> | ||
75 | <p><strong>{[layerAddName]}</strong> depends on some layers that are not added to your project. Select the ones you want to add:</p> | ||
76 | <ul class="unstyled"> | ||
77 | <li data-ng-repeat="ld in items"> | ||
78 | <label class="checkbox"> | ||
79 | <input type="checkbox" data-ng-model="selectedItems[ld.id]"> {[ld.name]} | ||
80 | </label> | ||
81 | </li> | ||
82 | </ul> | ||
83 | </div> | ||
84 | <div class="modal-footer"> | ||
85 | <button class="btn btn-primary" data-ng-click="ok()">Add layers</button> | ||
86 | <button class="btn" data-ng-click="cancel()">Cancel</button> | ||
87 | </div> | 64 | </div> |
88 | </form> | ||
89 | </script> | ||
90 | 65 | ||
66 | <div class="well well-transparent"> | ||
67 | <h3>Most built recipes</h3> | ||
91 | 68 | ||
92 | <script type="text/ng-template" id="change_version_modal"> | 69 | <div class="alert alert-info" style="display:none" id="no-most-built"> |
93 | <div class="modal-header"> | 70 | <span class="lead">You haven't built any recipes yet</span> |
94 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> | ||
95 | <h3>Changing release to {[releaseDescription]}</h3> | ||
96 | </div> | 71 | </div> |
97 | <div class="modal-body"> | ||
98 | <p>The following project layers do not exist for the {[releaseDescription]} release:</p> | ||
99 | <ul> | ||
100 | <li data-ng-repeat="i in items"><span class="layer-info" data-toggle="tooltip" tooltip="{[i.detail]}">{[i.name]}</span></li> | ||
101 | </ul> | ||
102 | <p>If you change the release to {[releaseDescription]}, the above layers will be deleted from your project.</p> | ||
103 | </div> | ||
104 | <div class="modal-footer"> | ||
105 | <button class="btn btn-primary" data-ng-click="ok()">Change release and delete layers</button> | ||
106 | <button class="btn" data-ng-click="cancel()">Cancel</button> | ||
107 | </div> | ||
108 | </script> | ||
109 | |||
110 | <script type="text/ng-template" id="target_display"> | ||
111 | <div data-ng-switch on="t.task.length"> | ||
112 | <div data-ng-switch-when="undefined">{[t.target]}</div> | ||
113 | <div data-ng-switch-default>{[t.target]}:{[t.task]}</div> | ||
114 | </div> | ||
115 | </script> | ||
116 | |||
117 | |||
118 | <!-- latest builds list --> | ||
119 | |||
120 | <a id="buildslist"></a> | ||
121 | <h2 class="air" data-ng-if="builds.length">Latest builds</h2> | ||
122 | <div class="animate-repeat alert" data-ng-repeat="b in builds track by b.id" data-ng-class="{'queued':'alert-info', 'In Progress':'alert-info', 'Succeeded':'alert-success', 'Failed':'alert-error'}[b.status]"> | ||
123 | <div class="row-fluid"> | ||
124 | <switch data-ng-switch="b.status"> | ||
125 | |||
126 | <case data-ng-switch-when="Failed"> | ||
127 | <div class="lead span3"> | ||
128 | <a data-ng-class="{'Succeeded': 'success', 'Failed': 'error'}[b.status]" href="{[b.br_page_url]}"> | ||
129 | <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> | ||
130 | </a> | ||
131 | </div> | ||
132 | <div class="span2 lead"> | ||
133 | <ngif data-ng-if="b.updated - todaydate > 0"> | ||
134 | {[b.updated|date:'HH:mm']} | ||
135 | </ngif> | ||
136 | <ngif data-ng-if="b.updated - todaydate < 0"> | ||
137 | {[b.updated|date:'dd/MM/yy HH:mm']} | ||
138 | </ngif> | ||
139 | </div> | ||
140 | <div class="span2"> | ||
141 | <ngif data-ng-if="b.errors.length"> | ||
142 | <span> | ||
143 | <i class="icon-minus-sign red lead"></i> | ||
144 | <a href="{[b.br_page_url]}#errors" class="lead error">{[b.errors.length]} | ||
145 | <ng-pluralize count="b.errors.length" when="{'1':'error','other':'errors'}"></ng-pluralize></a> | ||
146 | </span> | ||
147 | </ngif> | ||
148 | </div> | ||
149 | <div class="span2"> | ||
150 | <!-- we don't have warnings in this case --> | ||
151 | </div> | ||
152 | <div> <span class="lead">Build time: {[b.command_time|timediff]}</span> | ||
153 | <button class="btn pull-right" data-ng-class="{'Succeeded': 'btn-success', 'Failed': 'btn-danger'}[b.status]" | ||
154 | data-ng-click="buildExistingTarget(b.targets)">Run again</button> | ||
155 | |||
156 | </div> | ||
157 | </case> | ||
158 | |||
159 | <case data-ng-switch-when="queued"> | ||
160 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> | ||
161 | <div class="span4 lead" >Build queued | ||
162 | <i title="This build will start as soon as a build server is available" class="icon-question-sign get-help get-help-blue heading-help" data-toggle="tooltip"></i> | ||
163 | </div> | ||
164 | <button class="btn pull-right btn-info" data-ng-click="buildCancel(b)">Cancel</button> | ||
165 | </case> | ||
166 | |||
167 | <case data-ng-switch-when="In Progress"> | ||
168 | <switch data-ng-switch="b.build.length"> | ||
169 | <case data-ng-switch-when="0"> | ||
170 | <div class="lead span5"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> | ||
171 | <div class="span4 lead"> | ||
172 | Checking out layers | ||
173 | </div> | ||
174 | </case> | ||
175 | <case data-ng-switch-default=""> | ||
176 | <div class="lead span3"> <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> </div> | ||
177 | <div class="span4 offset1" > | ||
178 | <div class="progress" style="margin-top:5px;" data-toggle="tooltip" tooltip="{[b.build[0].completeper]}% of tasks complete"> | ||
179 | <div style="width: {[b.build[0].completeper]}%;" class="bar"></div> | ||
180 | </div> | ||
181 | </div> | ||
182 | <div class="text-right lead">{[b.build[0].completeper]}% tasks completed</div> | ||
183 | </case> | ||
184 | </case> | ||
185 | |||
186 | 72 | ||
187 | <case data-ng-switch-when="Succeeded"> | 73 | <ul class="unstyled configuration-list" id="freq-build-list"> |
188 | <div class="lead span3"> | 74 | </ul> |
189 | <a data-ng-class="{'Succeeded': 'success', 'Failed': 'error'}[b.build[0].status]" href="{[b.build[0].build_page_url]}"> | 75 | <button class="btn btn-primary" id="freq-build-btn" disabled="disabled">Build selected recipes</button> |
190 | <span data-ng-repeat="t in b.targets" data-ng-include src="'target_display'"></span> | 76 | </div> |
191 | </a> | ||
192 | </div> | ||
193 | <div class="span2 lead"> | ||
194 | <ngif data-ng-if="b.build[0].completed_on - todaydate > 0"> | ||
195 | {[b.build[0].completed_on|date:'HH:mm']} | ||
196 | </ngif> | ||
197 | <ngif data-ng-if="b.build[0].completed_on - todaydate < 0"> | ||
198 | {[b.build[0].completed_on|date:'dd/MM/yy HH:mm']} | ||
199 | </ngif> | ||
200 | </div> | ||
201 | <div class="span2"> | ||
202 | <ngif data-ng-if="b.build[0].errors"> | ||
203 | <span> | ||
204 | <i class="icon-minus-sign red lead"></i> | ||
205 | <a href="{[b.build[0].build_page_url]}#errors" class="lead error">{[b.build[0].errors]} | ||
206 | <ng-pluralize count="b.build[0].errors" when="{'1':'error','other':'errors'}"></ng-pluralize></a> | ||
207 | </span> | ||
208 | </ngif> | ||
209 | </div> | ||
210 | <div class="span2"> | ||
211 | <ngif data-ng-if="b.build[0].warnings"> | ||
212 | <span> | ||
213 | <i class="icon-warning-sign yellow lead"></i> | ||
214 | <a href="{[b.build[0].build_page_url]}#warnings" class="lead warning">{[b.build[0].warnings]} | ||
215 | <ng-pluralize count="b.build[0].warnings" when="{'1':'warning','other':'warnings'}"></ng-pluralize></a> | ||
216 | </span> | ||
217 | </ngif> | ||
218 | </div> | ||
219 | <div> <span class="lead">Build time: <a href="{[b.build[0].build_time_page_url]}">{[b.build[0].build_time|timediff]}</a></span> | ||
220 | <button class="btn pull-right" data-ng-class="{'Succeeded': 'btn-success', 'Failed': 'btn-danger'}[b.build[0].status]" | ||
221 | data-ng-click="buildExistingTarget(b.targets)">Run again</button> | ||
222 | 77 | ||
223 | </div> | 78 | <div class="well well-transparent"> |
224 | </case> | 79 | <h3>Project release</h3> |
225 | 80 | ||
81 | <p class="lead"><span id="project-release-title"></span> <i title="" data-original-title="" id="release-change-toggle" class="icon-pencil"></i></p> | ||
226 | 82 | ||
227 | <case data-ng-switch-default=""> | 83 | <form class="form-inline" id="change-release-form" style="display:none;"> |
228 | <div>FIXME!</div> | 84 | <select></select> |
229 | </case> | 85 | <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> |
230 | </switch> | 86 | </form> |
231 | <div class="lead pull-right"> | ||
232 | </div> | ||
233 | </div> | 87 | </div> |
234 | </div> | 88 | </div> |
235 | 89 | ||
236 | <h2 class="air">Project configuration</h2> | 90 | <div class="span6"> |
91 | <div class="well well-transparent" id="layer-container"> | ||
92 | <h3>Layers <span class="muted counter">(<span id="project-layers-count"></span>)</span> | ||
93 | <i data-original-title="OpenEmbedded organises metadata into modules called 'layers'. Layers allow you to isolate different types of customizations from each other. <a href='http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers' target='_blank'>More on layers</a>" class="icon-question-sign get-help heading-help" title=""></i> | ||
94 | </h3> | ||
237 | 95 | ||
238 | <!-- alerts section 2 --> | 96 | <div class="alert lead" id="no-layers-in-project" style="display:none"> |
239 | <div data-ng-repeat="a in zone2alerts"> | 97 | You need to add some layers. For that you can: |
240 | <div class="alert alert-dismissible lead" role="alert" data-ng-class="a.type"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span></button> | 98 | <ul> |
241 | <span data-ng-bind-html="a.text"></span> | 99 | <li><a href="{% url 'projectlayers' project.id %}">View all layers compatible with this project</a></li> |
242 | </div> | 100 | <li><a href="{% url 'importlayer' project.id %}">Import a layer</a></li> |
243 | </div> | 101 | <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> |
102 | </ul> | ||
103 | <p>Or type a layer name below.</p> | ||
104 | </div> | ||
244 | 105 | ||
245 | <div class="row-fluid"> | 106 | <form style="margin-top:20px"> |
107 | <!--div class="control-group error"--> | ||
246 | 108 | ||
247 | <!-- project layers --> | ||
248 | <div id="layer-container" class="well well-transparent span4"> | ||
249 | <h3> | ||
250 | Layers <span class="muted counter">({[layers.length]})</span> | ||
251 | <i class="icon-question-sign get-help heading-help" title="Bitbake reads metadata files from modules called 'layers'. Layers allow you to isolate different types of customizations from each other. <a href='http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#understanding-and-creating-layers' target='_blank'>More on layers</a>"></i> | ||
252 | </h3> | ||
253 | <div class="alert" data-ng-if="project.release && !layers.length"> | ||
254 | <b>You need to add some layers </b> | ||
255 | <p> | ||
256 | You can: | ||
257 | <ul> | ||
258 | <li> <a href="{% url 'projectlayers' project.id %}">View all compatible layers available in Toaster</a> | ||
259 | <li> <a href="{% url 'importlayer' project.id %}">Import a layer</a> | ||
260 | <li> <a href="https://www.yoctoproject.org/docs/1.6.1/dev-manual/dev-manual.html#understanding-and-creating-layers" target="_blank">Read about layers in the manual</a> | ||
261 | </ul> | ||
262 | Or type a layer name below. | ||
263 | </p> | ||
264 | </div> | ||
265 | <form data-ng-submit="layerAdd()"> | ||
266 | <div class="input-append"> | 109 | <div class="input-append"> |
267 | <input type="text" style="width: 100%" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" data-ng-model="layerAddName" data-typeahead="e for e in getLayersAutocompleteSuggestions($viewValue)" data-typeahead-template-url="layers_suggestion_details" data-typeahead-on-select="onLayerSelect($item, $model, $label)" data-typeahead-editable="false" data-ng-class="{ 'has-error': layerAddName.$invalid }" data-ng-disabled="!project.release" /> | 110 | <input id="layer-add-input" autocomplete="off" placeholder="Type a layer name" data-minlength="1" data-autocomplete="off" data-provide="typeahead" data-source="" type="text"> |
268 | <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/> | 111 | <button id="add-layer-btn" class="btn" disabled>Add</button> |
269 | </div> | 112 | </div> |
270 | {% csrf_token %} | ||
271 | </form> | ||
272 | <p> | ||
273 | <a href="{% url 'projectlayers' project.id %}">View all compatible layers</a> | ||
274 | <i class="icon-question-sign get-help" title="View all the layers you can build with the release selected for this project, which is {[project.release.desc]}"></i> | ||
275 | | | ||
276 | <a href="{% url 'importlayer' project.id %}">Import layer</a></p> | ||
277 | <ul class="unstyled configuration-list"> | ||
278 | <li data-ng-repeat="l in layers track by l.id" class="animate-repeat"> | ||
279 | <a href="{[l.layerdetailurl]}" class="layer-info" data-toggle="tooltip" tooltip-placement="right" tooltip="{[l.giturl]} | {[l.branch.name]}">{[l.name]}</a> | ||
280 | <i class="icon-trash" data-ng-click="layerDel(l.id)" tooltip="Delete"></i> | ||
281 | </li> | ||
282 | </ul> | ||
283 | </div> | ||
284 | 113 | ||
285 | 114 | <div id="import-alert" class="alert alert-info" style="display:none;"> | |
286 | <!-- project targets --> | 115 | Toaster does not know about this layer. Please <a href="#">import it</a> |
287 | <div id="target-container" class="well well-transparent span4"> | ||
288 | <h3> | ||
289 | Recipes | ||
290 | <i class="icon-question-sign get-help heading-help" title="What you build, often an image recipe that produces a root file system file. Something like <code>core-image-minimal</code> or <code>core-image-sato</code>"></i> | ||
291 | </h3> | ||
292 | <form data-ng-submit="buildNamedTarget()"> | ||
293 | <div class="input-append"> | ||
294 | <input type="text" style="width: 100%" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-minLength="1" data-ng-model="targetName1" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!project.release || !layers.length"> | ||
295 | <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length"> | ||
296 | Build </button> | ||
297 | </div> | ||
298 | {% csrf_token %} | ||
299 | </form> | ||
300 | <p> | ||
301 | <a href="{% url 'projecttargets' project.id %}">View all compatible recipes</a> | ||
302 | <i class="icon-question-sign get-help" title="View all the recipes you can build with the release selected for this project, which is {[project.release.desc]}"></i> | ||
303 | </p> | ||
304 | <div data-ng-if="frequenttargets.length"> | ||
305 | <h4 class="air"> | ||
306 | Most built recipes | ||
307 | </h4> | ||
308 | <ul class="unstyled configuration-list {[mutedtargets]}"> | ||
309 | <li data-ng-repeat="t in frequenttargets"> | ||
310 | <label class="checkbox"> | ||
311 | <input type="checkbox" data-ng-model="mostBuiltTargets[t]" data-ng-disabled="disableBuildCheckbox(t)" data-ng-checked="mostBuiltTargets[t] && !disableBuildCheckbox(t)">{[t]} | ||
312 | </label> | ||
313 | </li> | ||
314 | </ul> | ||
315 | <button class="btn btn-large btn-primary" data-ng-disabled="enableBuildSelectedTargets()" data-ng-click="buildSelectedTargets()">Build selected recipes</button> | ||
316 | </div> | 116 | </div> |
317 | </div> | ||
318 | 117 | ||
319 | <!-- project configuration --> | ||
320 | <div id="machine-distro" class="well well-transparent span4"> | ||
321 | <h3> | ||
322 | Machine | ||
323 | <i class="icon-question-sign get-help heading-help" title="The machine is the hardware for which you want to build. You can only set one machine per project"></i> | ||
324 | </h3> | ||
325 | <p class="lead" id="select-machine-opposite"> | ||
326 | <span>{[machine.name]}</span> | ||
327 | <i id="change-machine" class="icon-pencil" data-ng-click="toggle('#select-machine')"></i> | ||
328 | </p> | ||
329 | <div id="select-machine" style="display: none"> | ||
330 | <div class="alert alert-info"> | ||
331 | <strong>Machine changes have a big impact on build outcome.</strong> | ||
332 | You cannot really compare the builds for the new machine with the previous ones. | ||
333 | </div> | ||
334 | <form data-ng-submit="editProjectSettings('#select-machine')" class="input-append"> | ||
335 | <input type="text" id="machine" autocomplete="off" data-ng-model="machineName" value="{[machine.name]}" data-typeahead="m.name for m in getMachinesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="machines_suggestion_details" /> | ||
336 | <input type="submit" id="apply-change-machine" class="btn" data-ng-disabled="machineName == machine.name || machineName.length == 0" value="Save"/> | ||
337 | <input type="reset" id="cancel-machine" class="btn btn-link" data-ng-click="toggle('#select-machine')" value="Cancel"/> | ||
338 | {% csrf_token %} | ||
339 | </form> | ||
340 | <p> | 118 | <p> |
341 | <a href="{% url 'projectmachines' project.id %}" class="link">View all compatible machines</a> | 119 | <a href="{% url 'projectlayers' project.id %}" id="view-compatible-layers">View compatible layers</a> |
342 | <i class="icon-question-sign get-help" title="View all the machines you can set with the release selected for this project, which is {[project.release.desc]}"></i> | 120 | <i data-original-title="View all the layers you can build with the release selected for this project, which is Yocto Project master" class="icon-question-sign get-help" title=""></i> |
343 | </p> | 121 | | <a href="{% url 'importlayer' project.id %}">Import layer</a> |
344 | </div> | 122 | </p> |
345 | <p class="link-action"> | ||
346 | <a href="{% url 'projectconf' project.id %}" class="link">Edit configuration variables</a> | ||
347 | <i data-original-title="You can set other project configuration options here. Each option, like everything else in the build system, is a variable - value pair" class="icon-question-sign get-help heading-help" title=""></i> | ||
348 | </p> | ||
349 | </div> | ||
350 | </div> | ||
351 | |||
352 | |||
353 | <h2>Project details</h2> | ||
354 | |||
355 | <!-- alerts section 3 --> | ||
356 | <div data-ng-repeat="a in zone3alerts"> | ||
357 | <div class="alert alert-dismissible lead" role="alert" data-ng-class="a.type"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span></button> | ||
358 | <span data-ng-bind-html="a.text"></span> | ||
359 | </div> | ||
360 | </div> | ||
361 | |||
362 | |||
363 | <div id="project-details" class="well well-transparent"> | ||
364 | <h3>Project name</h3> | ||
365 | <p class="lead" id="change-project-name-opposite"> | ||
366 | <span >{[project.name]}</span> | ||
367 | <i class="icon-pencil" data-ng-click="toggle('#change-project-name')" ></i> | ||
368 | </p> | ||
369 | <div id="change-project-name" style="display:none;"> | ||
370 | <form data-ng-submit="editProjectSettings('#change-project-name')" class="input-append"> | ||
371 | <input type="text" class="input-xlarge" id="type-project-name" data-ng-model="projectName" value="{[project.name]}"> | ||
372 | <input type="submit" class="btn" value="Save" data-ng-disabled="project.name == projectName"/> | ||
373 | <input type="reset" class="btn btn-link" value="Cancel" data-ng-click="toggle('#change-project-name')"> | ||
374 | </form> | ||
375 | </div> | ||
376 | |||
377 | <h3 data-ng-if="releases.length > 1"> | ||
378 | Release | ||
379 | <i class="icon-question-sign get-help heading-help" title="The version of the build system you want to use"></i> | ||
380 | </h3> | ||
381 | <p data-ng-if="releases.length > 1" class="lead" id="change-project-version-opposite"> | ||
382 | <span id="project-version">{[project.release.desc]}</span> | ||
383 | <i id="change-version" class="icon-pencil" data-ng-click="toggle('#change-project-version')" ></i> | ||
384 | </p> | ||
385 | <div class="div-inline" id="change-project-version" style="display:none;"> | ||
386 | <form data-ng-submit="testProjectSettingsChange('#change-project-version')" class="input-append"> | ||
387 | <select id="select-version" data-ng-model="projectVersion"> | ||
388 | <option data-ng-repeat="r in releases" value="{[r.id]}" data-ng-selected="r.id == project.release.id">{[r.description]}</option> | ||
389 | </select> | ||
390 | <input type="submit" class="btn" style="margin-left:5px;" value="Save" data-ng-disabled="project.release.id == projectVersion"/> | ||
391 | <input type="reset" class="btn btn-link" value="Cancel" data-ng-click="toggle('#change-project-version')"/> | ||
392 | |||
393 | </form> | 123 | </form> |
124 | |||
125 | <ul class="unstyled configuration-list" id="layers-in-project-list"> | ||
126 | </ul> | ||
394 | </div> | 127 | </div> |
395 | </div> | 128 | </div> |
396 | 129 | </div> | |
397 | </div> <!-- end main --> | ||
398 | |||
399 | </div> <!-- end row --> | ||
400 | |||
401 | |||
402 | |||
403 | <!-- load application logic !--> | ||
404 | <script src="{% static "js/projectapp.js" %}"></script> | ||
405 | |||
406 | <!-- dump initial data for use in the angular app --> | ||
407 | <script> | ||
408 | angular.element(document).ready(function() { | ||
409 | scope = angular.element("#main").scope(); | ||
410 | scope.urls = {}; | ||
411 | scope.urls.xhr_build = "{% url 'projectbuilds' project.id %}"; | ||
412 | scope.urls.xhr_edit = "{% url 'project' project.id %}?format=json"; | ||
413 | scope.urls.layers = "{% url 'projectlayers' project.id %}"; | ||
414 | scope.urls.targets = "{% url 'projectavailabletargets' project.id %}"; | ||
415 | scope.urls.machines = "{% url 'projectmachines' project.id %}"; | ||
416 | scope.urls.importlayer = "{% url 'importlayer' project.id %}"; | ||
417 | scope.urls.xhr_datatypeahead = {% url 'xhr_datatypeahead' project.id as xhrdta %}{{xhrdta|json}}; | ||
418 | scope.project = {{prj|json}}; | ||
419 | scope.builds = {{builds|json}}; | ||
420 | scope.layers = {{layers|json}}; | ||
421 | scope.targets = {{targets|json}}; | ||
422 | scope.frequenttargets = {{freqtargets|json}}; | ||
423 | scope.machine = {{machine|json}}; | ||
424 | scope.releases = {{releases|json}}; | ||
425 | scope.layerCount = scope.layers.length; | ||
426 | scope.mutedtargets = (scope.layerCount == 0 ? "muted" : "") | ||
427 | var now = (new Date()).getTime(); | ||
428 | scope.todaydate = now - (now % 86400000); | ||
429 | |||
430 | scope.zone1alerts = []; | ||
431 | scope.zone2alerts = []; | ||
432 | scope.zone3alerts = []; | ||
433 | |||
434 | scope.mostBuiltTargets = {}; | ||
435 | |||
436 | scope.updateDisplayWithCommands(); | ||
437 | scope.validateData(); | ||
438 | |||
439 | scope.init(); | ||
440 | scope.$digest(); | ||
441 | |||
442 | }); | ||
443 | </script> | ||
444 | |||
445 | {% endif %} {# from lvs_nos check #} | ||
446 | {% endblock %} | 130 | {% endblock %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html index 46473cb76b..d4d1951ae4 100644 --- a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html +++ b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html | |||
@@ -1,3 +1,8 @@ | |||
1 | <div class="alert alert-success lead" id="project-created-notification" style="margin-top:15px; display:none"> | ||
2 | <button type="button" class="close" data-dismiss="alert">×</button> | ||
3 | 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 'projecttargets' project.id %}">choose image recipes</a> to build. | ||
4 | </div> | ||
5 | |||
1 | <!-- project name --> | 6 | <!-- project name --> |
2 | <div class="row-fluid page-header"> | 7 | <div class="row-fluid page-header"> |
3 | <h1>{{project.name}}</h1> | 8 | <h1>{{project.name}}</h1> |
@@ -7,7 +12,7 @@ | |||
7 | <ul class="nav nav-pills"> | 12 | <ul class="nav nav-pills"> |
8 | <li> | 13 | <li> |
9 | <a href="{% url 'projectbuilds' project.id %}"> | 14 | <a href="{% url 'projectbuilds' project.id %}"> |
10 | Builds (<span class="total-builds"></span>) | 15 | Builds (<span class="total-builds">0</span>) |
11 | </a> | 16 | </a> |
12 | </li> | 17 | </li> |
13 | <li id="topbar-configuration-tab"> | 18 | <li id="topbar-configuration-tab"> |
@@ -15,6 +20,11 @@ | |||
15 | Configuration | 20 | Configuration |
16 | </a> | 21 | </a> |
17 | </li> | 22 | </li> |
23 | <li> | ||
24 | <a href="{% url 'importlayer' project.id %}"> | ||
25 | Import layer | ||
26 | </a> | ||
27 | </li> | ||
18 | <!-- Coming soon | 28 | <!-- Coming soon |
19 | <li> | 29 | <li> |
20 | <a href="my-image-recipes.html"> | 30 | <a href="my-image-recipes.html"> |
@@ -23,16 +33,16 @@ | |||
23 | </li> | 33 | </li> |
24 | --> | 34 | --> |
25 | <li class="pull-right"> | 35 | <li class="pull-right"> |
26 | <form class="form-inline" style="margin-bottom: 0"> | ||
27 | 36 | ||
28 | <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>"> | 37 | <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>"> |
29 | </i> | 38 | </i> |
30 | <div class="input-append"> | 39 | <div class="input-append"> |
31 | <input type="text" class="input-xlarge build-target-input" placeholder="Type the recipe you want to build" autocomplete="off"> | 40 | <form class="form-inline" style="margin-bottom: 0"> |
32 | <button class="btn btn-primary build-button" data-project-id="{{project.id}}" disabled>Build | 41 | <input type="text" class="input-xlarge input-lg build-target-input" placeholder="Type the recipe you want to build" autocomplete="off" disabled> |
33 | </button> | 42 | <button class="btn btn-primary btn-large build-button" data-project-id="{{project.id}}" disabled>Build |
43 | </button> | ||
44 | </form> | ||
34 | </div> | 45 | </div> |
35 | </form> | 46 | </li> |
36 | </li> | 47 | </ul> |
37 | </ul> | ||
38 | </div> | 48 | </div> |