diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-12-09 16:52:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-12 20:44:54 +0000 |
commit | 6f3d33c2931033dc5381cc67fe2c40a4c296fdca (patch) | |
tree | db78728ed946317f87ce47de260504a5e387f528 /bitbake/lib/toaster/toastergui/templates | |
parent | ccb36cc5499b9f3d93b44f629aff4e3cc0ba4f1c (diff) | |
download | poky-6f3d33c2931033dc5381cc67fe2c40a4c296fdca.tar.gz |
bitbake: toaster: Switch front end to use Layer get REST API
Switch the front end to use the proper REST API for retrieving layer
information.
(Bitbake rev: 5ea25c49091f4d4b5007af948e063ed25ba5766f)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
4 files changed, 26 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/layer_btn.html b/bitbake/lib/toaster/toastergui/templates/layer_btn.html index b2f73eba7a..1580991a16 100644 --- a/bitbake/lib/toaster/toastergui/templates/layer_btn.html +++ b/bitbake/lib/toaster/toastergui/templates/layer_btn.html | |||
@@ -1,4 +1,9 @@ | |||
1 | <a class="btn btn-danger btn-block layer-exists-{{data.pk}} layerbtn" data-layer='{ "id": {{data.pk}}, "name": "{{data.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.pk%}"}' data-directive="remove" | 1 | <a class="btn btn-danger btn-block layer-exists-{{data.pk}} layerbtn" data-layer='{ |
2 | "id": {{data.pk}}, | ||
3 | "name": "{{data.layer.name}}", | ||
4 | "xhrLayerUrl": "{% url "xhr_layer" extra.pid data.pk %}", | ||
5 | "layerdetailurl": "{% url 'layerdetails' extra.pid data.pk %}" | ||
6 | }' data-directive="remove" | ||
2 | {% if data.pk not in extra.current_layers %} | 7 | {% if data.pk not in extra.current_layers %} |
3 | style="display:none;" | 8 | style="display:none;" |
4 | {% endif %} | 9 | {% endif %} |
@@ -6,7 +11,12 @@ | |||
6 | <span class="glyphicon glyphicon-trash"></span> | 11 | <span class="glyphicon glyphicon-trash"></span> |
7 | Remove layer | 12 | Remove layer |
8 | </a> | 13 | </a> |
9 | <a class="btn btn-default btn-block layer-add-{{data.pk}} layerbtn" data-layer='{ "id": {{data.pk}}, "name": "{{data.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.pk%}"}' data-directive="add" | 14 | <a class="btn btn-default btn-block layer-add-{{data.pk}} layerbtn" |
15 | data-layer='{ "id": {{data.pk}}, | ||
16 | "name": "{{data.layer.name}}", | ||
17 | "xhrLayerUrl": "{% url "xhr_layer" extra.pid data.pk %}", | ||
18 | "layerdetailurl": "{%url "layerdetails" extra.pid data.pk %}" | ||
19 | }' data-directive="add" | ||
10 | {% if data.pk in extra.current_layers %} | 20 | {% if data.pk in extra.current_layers %} |
11 | style="display:none;" | 21 | style="display:none;" |
12 | {% endif %} | 22 | {% endif %} |
@@ -14,4 +24,3 @@ | |||
14 | <span class="glyphicon glyphicon-plus"></span> | 24 | <span class="glyphicon glyphicon-plus"></span> |
15 | Add layer | 25 | Add layer |
16 | </a> | 26 | </a> |
17 | |||
diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html index f1569bd630..e0069db80c 100644 --- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html +++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html | |||
@@ -71,6 +71,7 @@ | |||
71 | inCurrentPrj : false, | 71 | inCurrentPrj : false, |
72 | {% endif %} | 72 | {% endif %} |
73 | layerdetailurl : "{% url 'layerdetails' project.id layerversion.id %}", | 73 | layerdetailurl : "{% url 'layerdetails' project.id layerversion.id %}", |
74 | xhrLayerUrl: "{% url 'xhr_layer' project.id layerversion.id %}", | ||
74 | layer_source: {{layerversion.layer_source|json}}, | 75 | layer_source: {{layerversion.layer_source|json}}, |
75 | }, | 76 | }, |
76 | layerSourceTypes: {{layer_source|json}}, | 77 | layerSourceTypes: {{layer_source|json}}, |
diff --git a/bitbake/lib/toaster/toastergui/templates/machine_btn.html b/bitbake/lib/toaster/toastergui/templates/machine_btn.html index 5d93d7aa9d..12b5c96c2c 100644 --- a/bitbake/lib/toaster/toastergui/templates/machine_btn.html +++ b/bitbake/lib/toaster/toastergui/templates/machine_btn.html | |||
@@ -4,7 +4,12 @@ | |||
4 | {% endif %} | 4 | {% endif %} |
5 | > | 5 | > |
6 | Select machine</a> | 6 | Select machine</a> |
7 | <a class="btn btn-default 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" | 7 | <a class="btn btn-default btn-block layerbtn |
8 | layer-add-{{data.layer_version.id}}" data-layer='{ "id": | ||
9 | {{data.layer_version.id}}, "name": "{{data.layer_version.layer.name}}", | ||
10 | "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}, | ||
11 | "xhrLayerUrl": "{% url "xhr_layer" extra.pid data.pk %}", | ||
12 | }' data-directive="add" | ||
8 | {% if data.layer_version.pk in extra.current_layers %} | 13 | {% if data.layer_version.pk in extra.current_layers %} |
9 | style="display:none;" | 14 | style="display:none;" |
10 | {% endif %} | 15 | {% endif %} |
diff --git a/bitbake/lib/toaster/toastergui/templates/recipe_btn.html b/bitbake/lib/toaster/toastergui/templates/recipe_btn.html index e3729643a5..0ee0ba5593 100644 --- a/bitbake/lib/toaster/toastergui/templates/recipe_btn.html +++ b/bitbake/lib/toaster/toastergui/templates/recipe_btn.html | |||
@@ -5,7 +5,13 @@ | |||
5 | > | 5 | > |
6 | Build recipe | 6 | Build recipe |
7 | </a> | 7 | </a> |
8 | <a class="btn btn-default btn-block layerbtn layer-add-{{data.layer_version.pk}}" data-layer='{ "id": {{data.layer_version.pk}}, "name": "{{data.layer_version.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.pk%}"}' data-directive="add" | 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" | ||
9 | {% if data.layer_version.pk in extra.current_layers %} | 15 | {% if data.layer_version.pk in extra.current_layers %} |
10 | style="display:none;" | 16 | style="display:none;" |
11 | {% endif %} | 17 | {% endif %} |