diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-06-08 13:36:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-12 00:01:49 +0100 |
commit | a8be6d4bb18232f13ffcaaf1a4137322db59fe48 (patch) | |
tree | a5faf6af828e1ea571bf862f9c35c3d69e481d4e /bitbake/lib/toaster/toastergui/templates | |
parent | 88dca45a703867581084d15368b7c68117b3184c (diff) | |
download | poky-a8be6d4bb18232f13ffcaaf1a4137322db59fe48.tar.gz |
bitbake: toastergui: remove xhr_datatypeahead and xhr_XXXbuild
We remove the endpoints for XHR on the toastergui application.
The endpoints are now replaced with calls to the respective
REST endpoints (i.e. projectlayers, projecttargets, projectmachines).
(Bitbake rev: 8e7a2c3b125a34fd9d6fa0442ab13290137ecc51)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
5 files changed, 40 insertions, 22 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 5d51bc3c95..7fee26eb42 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html | |||
@@ -33,12 +33,10 @@ | |||
33 | htmlUrl : "{% static 'html/' %}", | 33 | htmlUrl : "{% static 'html/' %}", |
34 | projectsUrl : "{% url 'all-projects' %}", | 34 | projectsUrl : "{% url 'all-projects' %}", |
35 | {% if project.id %} | 35 | {% if project.id %} |
36 | xhrProjectDataTypeaheadUrl : "{% url 'xhr_datatypeahead' project.id %}", | ||
37 | projectPageUrl : "{% url 'project' project.id %}", | 36 | projectPageUrl : "{% url 'project' project.id %}", |
38 | projectName : "{{project.name}}", | 37 | projectName : "{{project.name}}", |
39 | projectId : {{project.id}}, | 38 | projectId : {{project.id}}, |
40 | {% else %} | 39 | {% else %} |
41 | xhrProjectDataTypeaheadUrl : undefined, | ||
42 | projectPageUrl : undefined, | 40 | projectPageUrl : undefined, |
43 | projectName : undefined, | 41 | projectName : undefined, |
44 | projectId : undefined, | 42 | projectId : undefined, |
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html index c27d259a8c..ef1795c0e2 100644 --- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html +++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html | |||
@@ -3,7 +3,7 @@ | |||
3 | {% load humanize %} | 3 | {% load humanize %} |
4 | {% load static %} | 4 | {% load static %} |
5 | {% block localbreadcrumb %} | 5 | {% block localbreadcrumb %} |
6 | <li><a href="{% url 'all-layers' project.id %}">All compatible layers</a></li> | 6 | <li><a href="{% url 'projectlayers' project.id %}">All compatible layers</a></li> |
7 | <li> | 7 | <li> |
8 | {{layerversion.layer.name}} ({{layerversion.get_vcs_reference|truncatechars:13}}) | 8 | {{layerversion.layer.name}} ({{layerversion.get_vcs_reference|truncatechars:13}}) |
9 | </li> | 9 | </li> |
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | $(document).ready(function (){ | 34 | $(document).ready(function (){ |
35 | var ctx = { | 35 | var ctx = { |
36 | projectBuildUrl : "{% url 'xhr_projectbuild' project.id %}", | 36 | projectBuildsUrl : "{% url 'projectbuilds' project.id %}", |
37 | layerDetailsUrl : "{% url 'base_layerdetails' project.id %}", | 37 | layerDetailsUrl : "{% url 'base_layerdetails' project.id %}", |
38 | xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}", | 38 | xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}", |
39 | layerVersion : { | 39 | layerVersion : { |
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html index c93c2af301..47e64eaaab 100644 --- a/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/managed_mrb_section.html | |||
@@ -129,7 +129,7 @@ | |||
129 | <div class="span4 lead">Build queued | 129 | <div class="span4 lead">Build queued |
130 | <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> | 130 | <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> |
131 | </div> | 131 | </div> |
132 | <button class="btn btn-info pull-right cancel-build-btn" data-build-id="{{buildrequest.id}}" data-request-url="{% url 'xhr_projectbuild' buildrequest.project.id %}" >Cancel</button> | 132 | <button class="btn btn-info pull-right cancel-build-btn" data-build-id="{{buildrequest.id}}" data-request-url="{% url 'projectbuilds' buildrequest.project.id %}" >Cancel</button> |
133 | 133 | ||
134 | {% elif buildrequest.state == buildrequest.REQ_CREATED %} | 134 | {% elif buildrequest.state == buildrequest.REQ_CREATED %} |
135 | 135 | ||
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html index e598631304..63fbc40f55 100644 --- a/bitbake/lib/toaster/toastergui/templates/project.html +++ b/bitbake/lib/toaster/toastergui/templates/project.html | |||
@@ -30,7 +30,7 @@ vim: expandtab tabstop=2 | |||
30 | 30 | ||
31 | {%else%} | 31 | {%else%} |
32 | 32 | ||
33 | <div id="main" role="main" data-ng-app="project" data-ng-controller="prjCtrl" class="top-padded"> | 33 | <div id="main" role="main" data-ng-app="project" data-ng-controller="prjCtrl" class="top-padded" data-ng-cloak> |
34 | 34 | ||
35 | <!-- project name --> | 35 | <!-- project name --> |
36 | <div class="page-header"> | 36 | <div class="page-header"> |
@@ -46,10 +46,30 @@ vim: expandtab tabstop=2 | |||
46 | 46 | ||
47 | <!-- custom templates for ng --> | 47 | <!-- custom templates for ng --> |
48 | 48 | ||
49 | <script type="text/ng-template" id="suggestion_details"> | 49 | <style> |
50 | <a> {[match.model.name]} {[match.model.detail]} </a> | 50 | .missing-layer { |
51 | color: lightgrey; | ||
52 | } | ||
53 | </style> | ||
54 | <script type="text/ng-template" id="recipes_suggestion_details"> | ||
55 | <a> {[match.model.name]} | ||
56 | <span data-ng-class="{'missing-layer':($parent.$parent.$parent.$parent.filterProjectLayerIds().indexOf(match.model.projectcompatible_layer.id) == -1)}"> | ||
57 | [{[match.model.layer_version__layer__name]}] | ||
58 | </span> | ||
59 | </a> | ||
51 | </script> | 60 | </script> |
52 | 61 | ||
62 | <script type="text/ng-template" id="machines_suggestion_details"> | ||
63 | <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> | ||
64 | </script> | ||
65 | |||
66 | <script type="text/ng-template" id="layers_suggestion_details"> | ||
67 | <a> {[match.model['layer__name']]} ( {[match.model.layer__vcs_url]} ) </a> | ||
68 | </script> | ||
69 | |||
70 | |||
71 | |||
72 | |||
53 | <!-- modal dialogs --> | 73 | <!-- modal dialogs --> |
54 | <script type="text/ng-template" id="dependencies_modal"> | 74 | <script type="text/ng-template" id="dependencies_modal"> |
55 | <div class="modal-header"> | 75 | <div class="modal-header"> |
@@ -104,14 +124,14 @@ vim: expandtab tabstop=2 | |||
104 | <div class="well"> | 124 | <div class="well"> |
105 | <form class="build-form" data-ng-submit="buildNamedTarget()"> | 125 | <form class="build-form" data-ng-submit="buildNamedTarget()"> |
106 | <div class="input-append controls"> | 126 | <div class="input-append controls"> |
107 | <input type="text" class="huge input-xxlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-ng-model="targetName" data-typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" data-typeahead-template-url="suggestion_details" data-ng-disabled="!layers.length"/> | 127 | <input type="text" class="huge input-xxlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-ng-model="targetName" data-typeahead="a.name for a in getRecipesAutocompleteSuggestions($viewValue)" data-typeahead-template-url="recipes_suggestion_details" data-ng-disabled="!layers.length"/> |
108 | <button type="submit" class="btn btn-large btn-primary" data-ng-disabled="!targetName.length"> | 128 | <button type="submit" class="btn btn-large btn-primary" data-ng-disabled="!targetName.length"> |
109 | Build | 129 | Build |
110 | </button> | 130 | </button> |
111 | </div> | 131 | </div> |
112 | <i class="icon-question-sign get-help get-help-blue" 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 a recipe name, like so: <code>core-image-minimal:do_build</code>"></i> | 132 | <i class="icon-question-sign get-help get-help-blue" 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 a recipe name, like so: <code>core-image-minimal:do_build</code>"></i> |
113 | <p> | 133 | <p> |
114 | <a href="{% url 'all-targets' project.id %}">View all compatible recipes</a> | 134 | <a href="{% url 'projecttargets' project.id %}">View all compatible recipes</a> |
115 | <i class="icon-question-sign get-help get-help-blue heading-help" title="View all the recipes you can build with the release selected for this project, which is {[project.release.desc]}"></i> | 135 | <i class="icon-question-sign get-help get-help-blue heading-help" title="View all the recipes you can build with the release selected for this project, which is {[project.release.desc]}"></i> |
116 | {% if completedbuilds.count %} | 136 | {% if completedbuilds.count %} |
117 | | <a href="{% url 'projectbuilds' project.id %}">View all project builds ({{completedbuilds.count}})</a> | 137 | | <a href="{% url 'projectbuilds' project.id %}">View all project builds ({{completedbuilds.count}})</a> |
@@ -278,7 +298,7 @@ vim: expandtab tabstop=2 | |||
278 | <p> | 298 | <p> |
279 | You can: | 299 | You can: |
280 | <ul> | 300 | <ul> |
281 | <li> <a href="{% url 'all-layers' project.id %}">View all compatible layers available in Toaster</a> | 301 | <li> <a href="{% url 'projectlayers' project.id %}">View all compatible layers available in Toaster</a> |
282 | <li> <a href="{% url 'importlayer' project.id %}">Import a layer</a> | 302 | <li> <a href="{% url 'importlayer' project.id %}">Import a layer</a> |
283 | <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> | 303 | <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> |
284 | </ul> | 304 | </ul> |
@@ -287,13 +307,13 @@ vim: expandtab tabstop=2 | |||
287 | </div> | 307 | </div> |
288 | <form data-ng-submit="layerAdd()"> | 308 | <form data-ng-submit="layerAdd()"> |
289 | <div class="input-append"> | 309 | <div class="input-append"> |
290 | <input type="text" class="input-xlarge" id="layer" autocomplete="off" placeholder="Type a layer name" data-minLength="1" data-ng-model="layerAddName" data-typeahead="e.name for e in getAutocompleteSuggestions('layers', $viewValue)|filter:$viewValue" data-typeahead-template-url="suggestion_details" data-typeahead-on-select="onLayerSelect($item, $model, $label)" data-typeahead-editable="false" data-ng-class="{ 'has-error': layerAddName.$invalid }" /> | 310 | <input type="text" class="input-xlarge" 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 }" /> |
291 | <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/> | 311 | <input type="submit" id="add-layer" class="btn" value="Add" data-ng-disabled="!layerAddName.length"/> |
292 | </div> | 312 | </div> |
293 | {% csrf_token %} | 313 | {% csrf_token %} |
294 | </form> | 314 | </form> |
295 | <p> | 315 | <p> |
296 | <a href="{% url 'all-layers' project.id %}">View all compatible layers</a> | 316 | <a href="{% url 'projectlayers' project.id %}">View all compatible layers</a> |
297 | <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> | 317 | <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> |
298 | | | 318 | | |
299 | <a href="{% url 'importlayer' project.id %}">Import layer</a></p> | 319 | <a href="{% url 'importlayer' project.id %}">Import layer</a></p> |
@@ -314,14 +334,14 @@ vim: expandtab tabstop=2 | |||
314 | </h3> | 334 | </h3> |
315 | <form data-ng-submit="buildNamedTarget()"> | 335 | <form data-ng-submit="buildNamedTarget()"> |
316 | <div class="input-append"> | 336 | <div class="input-append"> |
317 | <input type="text" class="input-xlarge" placeholder="Type the recipe(s) you want to build" autocomplete="off" data-minLength="1" data-ng-model="targetName1" data-typeahead="e.name for e in getAutocompleteSuggestions('targets', $viewValue)|filter:$viewValue" data-typeahead-template-url="suggestion_details" data-ng-disabled="!layers.length"> | 337 | <input type="text" class="input-xlarge" 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="!layers.length"> |
318 | <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length"> | 338 | <button type="submit" class="btn btn-primary" data-ng-disabled="!targetName1.length"> |
319 | Build </button> | 339 | Build </button> |
320 | </div> | 340 | </div> |
321 | {% csrf_token %} | 341 | {% csrf_token %} |
322 | </form> | 342 | </form> |
323 | <p> | 343 | <p> |
324 | <a href="{% url 'all-targets' project.id %}">View all compatible recipes</a> | 344 | <a href="{% url 'projecttargets' project.id %}">View all compatible recipes</a> |
325 | <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> | 345 | <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> |
326 | </p> | 346 | </p> |
327 | <div data-ng-if="frequenttargets.length"> | 347 | <div data-ng-if="frequenttargets.length"> |
@@ -355,13 +375,13 @@ vim: expandtab tabstop=2 | |||
355 | You cannot really compare the builds for the new machine with the previous ones. | 375 | You cannot really compare the builds for the new machine with the previous ones. |
356 | </div> | 376 | </div> |
357 | <form data-ng-submit="editProjectSettings('#select-machine')" class="input-append"> | 377 | <form data-ng-submit="editProjectSettings('#select-machine')" class="input-append"> |
358 | <input type="text" id="machine" autocomplete="off" data-ng-model="machineName" value="{[machine.name]}" data-typeahead="m.name for m in getAutocompleteSuggestions('machines', $viewValue)" data-typeahead-template-url="suggestion_details" /> | 378 | <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" /> |
359 | <input type="submit" id="apply-change-machine" class="btn" data-ng-disabled="machineName == machine.name || machineName.length == 0" value="Save"/> | 379 | <input type="submit" id="apply-change-machine" class="btn" data-ng-disabled="machineName == machine.name || machineName.length == 0" value="Save"/> |
360 | <input type="reset" id="cancel-machine" class="btn btn-link" data-ng-click="toggle('#select-machine')" value="Cancel"/> | 380 | <input type="reset" id="cancel-machine" class="btn btn-link" data-ng-click="toggle('#select-machine')" value="Cancel"/> |
361 | {% csrf_token %} | 381 | {% csrf_token %} |
362 | </form> | 382 | </form> |
363 | <p> | 383 | <p> |
364 | <a href="{% url 'all-machines' project.id %}" class="link">View all compatible machines</a> | 384 | <a href="{% url 'projectmachines' project.id %}" class="link">View all compatible machines</a> |
365 | <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> | 385 | <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> |
366 | </p> | 386 | </p> |
367 | </div> | 387 | </div> |
@@ -429,11 +449,11 @@ vim: expandtab tabstop=2 | |||
429 | angular.element(document).ready(function() { | 449 | angular.element(document).ready(function() { |
430 | scope = angular.element("#main").scope(); | 450 | scope = angular.element("#main").scope(); |
431 | scope.urls = {}; | 451 | scope.urls = {}; |
432 | scope.urls.xhr_build = "{% url 'xhr_projectbuild' project.id %}"; | 452 | scope.urls.xhr_build = "{% url 'projectbuilds' project.id %}"; |
433 | scope.urls.xhr_edit = "{% url 'project' project.id %}?format=json"; | 453 | scope.urls.xhr_edit = "{% url 'project' project.id %}?format=json"; |
434 | scope.urls.xhr_datatypeahead = "{% url 'xhr_datatypeahead' project.id %}"; | 454 | scope.urls.layers = "{% url 'projectlayers' project.id %}"; |
435 | scope.urls.layers = "{% url 'all-layers' project.id %}"; | 455 | scope.urls.targets = "{% url 'projecttargets' project.id %}"; |
436 | scope.urls.targets = "{% url 'all-targets' project.id %}"; | 456 | scope.urls.machines = "{% url 'projectmachines' project.id %}"; |
437 | scope.urls.importlayer = "{% url 'importlayer' project.id %}"; | 457 | scope.urls.importlayer = "{% url 'importlayer' project.id %}"; |
438 | scope.urls.layer = "{% url 'base_layerdetails' project.id %}"; | 458 | scope.urls.layer = "{% url 'base_layerdetails' project.id %}"; |
439 | scope.project = {{prj|json}}; | 459 | scope.project = {{prj|json}}; |
diff --git a/bitbake/lib/toaster/toastergui/templates/runagain.html b/bitbake/lib/toaster/toastergui/templates/runagain.html index a78c0ddc78..b4ba5fbf15 100644 --- a/bitbake/lib/toaster/toastergui/templates/runagain.html +++ b/bitbake/lib/toaster/toastergui/templates/runagain.html | |||
@@ -1,6 +1,6 @@ | |||
1 | {% load projecttags %} | 1 | {% load projecttags %} |
2 | onclick='scheduleBuild( | 2 | onclick='scheduleBuild( |
3 | {% url 'xhr_projectbuild' buildrequest.project.id as bpi %}{{bpi|json}}, | 3 | {% url 'projectbuilds' buildrequest.project.id as bpi %}{{bpi|json}}, |
4 | {{buildrequest.project.name|json}}, | 4 | {{buildrequest.project.name|json}}, |
5 | {% url 'project' buildrequest.project.id as bpurl %}{{bpurl|json}}, | 5 | {% url 'project' buildrequest.project.id as bpurl %}{{bpurl|json}}, |
6 | {{buildrequest.brtarget_set.all|get_tasks|json}}) | 6 | {{buildrequest.brtarget_set.all|get_tasks|json}}) |