diff options
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/mrb_section.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index 5ba0b08495..3d17ac62e4 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html | |||
@@ -44,7 +44,7 @@ | |||
44 | Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a> | 44 | Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a> |
45 | </span> | 45 | </span> |
46 | {% if build.project %} | 46 | {% if build.project %} |
47 | <a class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%elif build.outcome == build.FAILED%}btn-danger{%else%}btn-info{%endif%} pull-right" onclick="scheduleBuild({{build.project.name|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})">Run again</a> | 47 | <a class="btn {%if build.outcome == build.SUCCEEDED%}btn-success{%elif build.outcome == build.FAILED%}btn-danger{%else%}btn-info{%endif%} pull-right" onclick="scheduleBuild({%url 'xhr_projectbuild' build.project.id as myurl %}{{myurl|json}}, {{build.project.name|json}}, {{build.get_sorted_target_list|mapselect:'target'|json}})">Run again</a> |
48 | {% endif %} | 48 | {% endif %} |
49 | </div> | 49 | </div> |
50 | {%endif%} | 50 | {%endif%} |
@@ -64,10 +64,10 @@ | |||
64 | 64 | ||
65 | <script> | 65 | <script> |
66 | 66 | ||
67 | function _makeXHRBuildCall(data, onsuccess, onfail) { | 67 | function _makeXHRBuildCall(url, data, onsuccess, onfail) { |
68 | $.ajax( { | 68 | $.ajax( { |
69 | type: "POST", | 69 | type: "POST", |
70 | url: "{% url 'xhr_projectbuild' project.id %}", | 70 | url: url, |
71 | data: data, | 71 | data: data, |
72 | headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, | 72 | headers: { 'X-CSRFToken' : $.cookie('csrftoken')}, |
73 | success: function (_data) { | 73 | success: function (_data) { |
@@ -86,9 +86,9 @@ function _makeXHRBuildCall(data, onsuccess, onfail) { | |||
86 | } | 86 | } |
87 | 87 | ||
88 | 88 | ||
89 | function scheduleBuild(projectName, buildlist) { | 89 | function scheduleBuild(url, projectName, buildlist) { |
90 | console.log("scheduleBuild"); | 90 | console.log("scheduleBuild"); |
91 | // _makeXHRBuildCall({targets: buildlist.join(" ")}, function (_data) { | 91 | // _makeXHRBuildCall(url , {targets: buildlist.join(" ")}, function (_data) { |
92 | 92 | ||
93 | $('#latest-builds').prepend('<div class="alert alert-info" style="padding-top:0px">' + '<span class="label label-info" style="font-weight: normal; margin-bottom: 5px; margin-left:-15px; padding-top:5px;">'+projectName+'</span><div class="row-fluid">' + | 93 | $('#latest-builds').prepend('<div class="alert alert-info" style="padding-top:0px">' + '<span class="label label-info" style="font-weight: normal; margin-bottom: 5px; margin-left:-15px; padding-top:5px;">'+projectName+'</span><div class="row-fluid">' + |
94 | '<div class="span4 lead">' + buildlist.join(" ") + | 94 | '<div class="span4 lead">' + buildlist.join(" ") + |