[Buildbot-commits] [SPAM] [Buildbot] #901: console html template: wrong div, broken CDATA, escaped URL

Buildbot buildbot-devel at lists.sourceforge.net
Fri Jun 18 13:41:13 UTC 2010


#901: console html template: wrong div, broken CDATA, escaped URL
-------------------+--------------------------------------------------------
Reporter:  axel    |       Owner:                       
    Type:  defect  |      Status:  new                  
Priority:  major   |   Milestone:  undecided            
 Version:  0.8.0   |    Keywords:  console.html template
-------------------+--------------------------------------------------------
 Hi,

 attached patch fixes three issues
 * the window.onload script doesn't use the correct div (it references a
 non-existing div)
 * the URL does not work for me (Twisted 10, client firefox 3.6.3); nor
 url-encoding it makes it work
 * one of the CDATA sections is broken because it's invalid Javascript and
 must be commented.

 Cheers, Axel.


 {{{
 --- status/web/templates/console.html.org       2010-05-24
 17:31:04.000000000 +0200
 +++ status/web/templates/console.html   2010-06-18 12:16:46.298816240
 +0200
 @@ -107,7 +107,8 @@
          </div>
        </td>
        <td width="33%" align="right" class="right_align">
 -        <script type="text/javascript"> <![CDATA[
 +        <script type="text/javascript">
 +// <![CDATA[
            function reload_page() {
              name_value = document.getElementById('namebox').value
              if (document.location.href.lastIndexOf('?') == -1)
 @@ -190,7 +191,7 @@
          <tr>
      {% for b in r.builds[c.name] %}
            <td class='DevStatusBox'>
 -            <a href='#' onclick='showBuildBox("{{ b.url|urlencode }}",
 event); return false;'
 +            <a href='#' onclick='showBuildBox("{{ b.url }}", event);
 return false;'
                 title='{{ b.title }}' class='DevStatusBox {{ b.color }} {{
 b.tag }}'
                 target="_blank"></a>
            </td>
 @@ -243,7 +244,7 @@
  <script type="text/javascript">
  // replace 'onload="updateDiv(event);" with this, as iframe doesn't have
 onload event in xhtml
  window.onload = function() {
 -  document.getElementById('myframe').onload = function(event) {
 +  document.getElementById('frameBox').onload = function(event) {
      updateDiv(event);
    };
  };

 }}}

-- 
Ticket URL: <http://buildbot.net/trac/ticket/901>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list