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>
This commit is contained in:
parent
641c50d79b
commit
bb83fccb4b
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue