3 new revisions:

Revision: fb5a254f0c14
Author:   Pekka Klärck
Date:     Wed Jun  8 03:41:06 2011
Log:      don't init templates that don't exist anymore
http://code.google.com/p/robotframework/source/detail?r=fb5a254f0c14

Revision: 5aec348439e1
Author:   Pekka Klärck
Date:     Wed Jun  8 04:14:56 2011
Log:      clean up populating execution errors
http://code.google.com/p/robotframework/source/detail?r=5aec348439e1

Revision: 417e4448b590
Author:   Pekka Klärck
Date:     Wed Jun  8 04:15:04 2011
Log:      Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=417e4448b590

==============================================================================
Revision: fb5a254f0c14
Author:   Pekka Klärck
Date:     Wed Jun  8 03:41:06 2011
Log:      don't init templates that don't exist anymore
http://code.google.com/p/robotframework/source/detail?r=fb5a254f0c14

Modified:
 /src/robot/webcontent/log.html

=======================================
--- /src/robot/webcontent/log.html      Wed Jun  8 03:28:50 2011
+++ /src/robot/webcontent/log.html      Wed Jun  8 03:41:06 2011
@@ -389,16 +389,9 @@
         suiteStatRow: $('#suite_statistics_row').template(),
         noTagsRow: $('#no_tags_row').template(),
         suite: $('#suite_template').template(),
-        metadata: $('#metadata_template').template(),
         test: $('#test_template').template(),
         keyword: $('#keyword_template').template(),
         message: $('#message_template').template(),
-        metadataElement: $('#metadata_element_template').template(),
- documentationElement: $('#documentation_element_template').template(), - failureAndStatsMessageElement: $('#failure_and_stats_message_template').template(),
-        statsMessageElement: $('#stats_message_template').template(),
-        sourceElement: $('#source_element_template').template(),
-        statusElement: $('#status_element_template').template(),
         errors: $('#errors_template').template(),
linkableErrorElement: $('#linkable_error_element_template').template(),
         errorElement: $('#error_element_template').template()

==============================================================================
Revision: 5aec348439e1
Author:   Pekka Klärck
Date:     Wed Jun  8 04:14:56 2011
Log:      clean up populating execution errors
http://code.google.com/p/robotframework/source/detail?r=5aec348439e1

Modified:
 /src/robot/webcontent/js/testdata.js
 /src/robot/webcontent/log.html

=======================================
--- /src/robot/webcontent/js/testdata.js        Tue Jun  7 07:42:34 2011
+++ /src/robot/webcontent/js/testdata.js        Wed Jun  8 04:14:56 2011
@@ -265,10 +265,13 @@
         return timestamp(window.data[0]);
     }

+    function errors() {
+        return util.map(window.data[4], message);
+    }
+
+    // TODO: Is this used anymore?
     function error(index) {
-        if (window.data[4].length <= index)
-            return undefined;
-        return message(window.data[4][index]);
+        return errors()[index];
     }

     function statistics() {
@@ -278,6 +281,7 @@

     return {
         suite: suite,
+        errors: errors,
         error: error,
         find: findById,
         pathToTest: pathToTest,
=======================================
--- /src/robot/webcontent/log.html      Wed Jun  8 03:41:06 2011
+++ /src/robot/webcontent/log.html      Wed Jun  8 04:14:56 2011
@@ -338,14 +338,10 @@
 }

 function addErrors() {
-    if(window.testdata.error(0)){
-        var errors = $.tmpl(window.templates.errors, {});
-        errors.appendTo($('body'));
-        for (var i = 0; window.testdata.error(i) !== undefined; i++) {
-            var message = window.testdata.error(i);
- var err = $.tmpl((message.link === undefined) ? window.templates.errorElement : window.templates.linkableErrorElement, message);
-            err.appendTo($('#errors_list'));
-        }
+    var errors = window.testdata.errors();
+    if (errors.length) {
+        $.tmpl(window.templates.errorHeader).appendTo($('body'));
+        $.tmpl(window.templates.error, errors).appendTo($('#error_table'));
     }
 }

@@ -388,13 +384,12 @@
         tagStatRow: $('#tag_statistics_row').template(),
         suiteStatRow: $('#suite_statistics_row').template(),
         noTagsRow: $('#no_tags_row').template(),
+        errorHeader: $('#error_header_template').template(),
+        error: $('#error_template').template(),
         suite: $('#suite_template').template(),
         test: $('#test_template').template(),
         keyword: $('#keyword_template').template(),
         message: $('#message_template').template(),
-        errors: $('#errors_template').template(),
- linkableErrorElement: $('#linkable_error_element_template').template(),
-        errorElement: $('#error_element_template').template()
     };
 };
 </script>
@@ -475,24 +470,20 @@
   </tr>
 </script>

-<script type="text/html" id="errors_template">
+<script type="text/html" id="error_header_template">
   <h2>Test Execution Errors</h2>
-  <table class="errors" id="errors_list"></table>
+  <table class="errors" id="error_table"></table>
 </script>

-<script type="text/html" id="error_element_template">
-  <tr>
-    <td class="time">${date()}</td>
-    <td class="${level} level">${levelText}</td>
-    <td class="msg">{{html text}}</td>
-  </tr>
-</script>
-
-<script type="text/html" id="linkable_error_element_template">
+<script type="text/html" id="error_template">
   <tr>
     <td class="time">
+      {{if link}}
       <a onclick="makeElementVisible('${link}')"
          href="#${link}" title="Link to details.">${date}</a>
+      {{else}}
+      ${date}
+      {{/if}}
     </td>
     <td class="${level} level">${levelText}</td>
     <td class="msg">{{html text}}</td>

==============================================================================
Revision: 417e4448b590
Author:   Pekka Klärck
Date:     Wed Jun  8 04:15:04 2011
Log:      Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=417e4448b590

Modified:
 /src/robot/webcontent/js/testdata.js

=======================================
--- /src/robot/webcontent/js/testdata.js        Wed Jun  8 03:54:00 2011
+++ /src/robot/webcontent/js/testdata.js        Wed Jun  8 04:15:04 2011
@@ -278,10 +278,13 @@
         return timestamp(window.data[0]);
     }

+    function errors() {
+        return util.map(window.data[4], message);
+    }
+
+    // TODO: Is this used anymore?
     function error(index) {
-        if (window.data[4].length <= index)
-            return undefined;
-        return message(window.data[4][index]);
+        return errors()[index];
     }

     function statistics() {
@@ -291,6 +294,7 @@

     return {
         suite: suite,
+        errors: errors,
         error: error,
         find: findById,
         pathToTest: pathToTest,

Reply via email to