aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2014-12-11 14:17:10 +0000
committerAlexandru DAMIAN <alexandru.damian@intel.com>2014-12-12 11:40:47 +0000
commit3a5b78af4f3cab203824d933a73e82a41ab377e3 (patch)
treee77e1364e86761de6547439cc29c3d42163e946a
parentc23736003b788f2b45ae7cbcd7c7250ead2e5724 (diff)
downloadbitbake-3a5b78af4f3cab203824d933a73e82a41ab377e3.tar.gz
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. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
-rw-r--r--lib/toaster/toastergui/templates/importlayer.html21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/toaster/toastergui/templates/importlayer.html b/lib/toaster/toastergui/templates/importlayer.html
index c92e55257..a4d8ee1eb 100644
--- a/lib/toaster/toastergui/templates/importlayer.html
+++ b/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>