summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2014-12-11 14:17:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-18 10:24:08 +0000
commitbb83fccb4b4dbb1fbadc7c1cb1f51a39840c9f95 (patch)
treea3d58f2a4feb34fb352ed3eb10a2899333677ce7
parent641c50d79b58e07c58acff0e0010d5177bebbcf5 (diff)
downloadopenembedded-core-contrib-bb83fccb4b4dbb1fbadc7c1cb1f51a39840c9f95.tar.gz
bitbake: toaster: importlayer Tidy up the page initialisation
Tidy up the page initialisation and change the error logging so that it's consistent with other pages. (Bitbake rev: 3a5b78af4f3cab203824d933a73e82a41ab377e3) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/toaster/toastergui/templates/importlayer.html21
1 files changed, 11 insertions, 10 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html
index c92e55257b..a4d8ee1ebd 100644
--- a/bitbake/lib/toaster/toastergui/templates/importlayer.html
+++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html
@@ -12,19 +12,20 @@
<script src="{% static 'js/importlayer.js' %}"></script>
<script>
$(document).ready(function (){
- var ctx = {};
- ctx.xhrDataTypeaheadUrl = "{% url 'xhr_datatypeahead' %}";
- ctx.layerDetailsUrl = "{% url 'layerdetails' %}";
- ctx.xhrImportLayerUrl = "{% url 'xhr_importlayer' %}";
- ctx.xhrEditProjectUrl = "{% url 'xhr_projectedit' project.id %}";
- ctx.projectPageUrl = "{% url 'project' project.id %}";
- ctx.projectId = {{project.id}};
+ var ctx = {
+ xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}",
+ layerDetailsUrl : "{% url 'layerdetails' %}",
+ xhrImportLayerUrl : "{% url 'xhr_importlayer' %}",
+ xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}",
+ projectPageUrl : "{% url 'project' project.id %}",
+ projectId : {{project.id}}
+ };
try {
importLayerPageInit(ctx);
- } catch(e) {
- document.write(e.stack);
- console.log(e);
+ } catch (e) {
+ document.write("Sorry, An error has occurred loading this page");
+ console.warn(e);
}
});
</script>