<div dir="ltr">that sounds good</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 2, 2013 at 10:57 AM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 06/28/2013 06:49 AM, Dylan Baker wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This new page is able to convey the same information, but takes less<br>
time to generate<br>
<br>
Signed-off-by: Dylan Baker <<a href="mailto:baker.dylan.c@gmail.com" target="_blank">baker.dylan.c@gmail.com</a>><br>
---<br>
  framework/summary.py        | 21 ++++++++++++++++-----<br>
  templates/empty_status.mako | 27 +++++++++++++++++++++++++++<br>
  2 files changed, 43 insertions(+), 5 deletions(-)<br>
  create mode 100644 templates/empty_status.mako<br>
<br>
diff --git a/framework/summary.py b/framework/summary.py<br>
index a2794d9..5d4fe57 100644<br>
--- a/framework/summary.py<br>
+++ b/framework/summary.py<br>
@@ -756,6 +756,10 @@ class NewSummary:<br>
                           output_encoding="utf-8",<br>
                           module_directory=".makotmp")<br>
<br>
+        empty_status = Template(filename="templates/<u></u>empty_status.mako",<br>
+                                output_encoding="utf-8",<br>
+                                module_directory=".makotmp")<br>
+<br>
          # A list of pages to be generated<br>
          # If there is only one set of results, then there cannot be changes,<br>
          # regressions or fixes, so don't generate those pages<br>
@@ -778,9 +782,16 @@ class NewSummary:<br>
          # Generate the rest of the pages<br>
          for page in pages:<br>
              file = open(path.join(destination, page + '.html'), 'w')<br>
-            file.write(index.render(<u></u>results=HTMLIndex(self, self.tests[page]),<br>
-                                    page=page,<br>
-                                    pages=pages,<br>
-                                    colnum=len(self.results),<br>
-                                    exclude=exclude))<br>
+            # If there is information to display display it<br>
+            if self.tests[page]:<br>
+                file.write(index.render(<u></u>results=HTMLIndex(self,<br>
+                                                          self.tests[page]),<br>
+                                        pages=pages,<br>
+                                        page=page,<br>
+                                        colnum=len(self.results),<br>
+                                        exclude=exclude))<br>
+            # otherwise provide an empty page<br>
+            else:<br>
+                file.write(empty_status.<u></u>render(page=page, pages=pages))<br>
+<br>
              file.close()<br>
diff --git a/templates/empty_status.mako b/templates/empty_status.mako<br>
new file mode 100644<br>
index 0000000..56a4b70<br>
--- /dev/null<br>
+++ b/templates/empty_status.mako<br>
@@ -0,0 +1,27 @@<br>
+<?xml version="1.0" encoding="UTF-8"?><br>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br>
+ "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/<u></u>DTD/xhtml1-strict.dtd</a>"><br>
+<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/<u></u>xhtml</a>"><br>
+  <head><br>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><br>
+    <title>Result summary</title><br>
+    <link rel="stylesheet" href="status.css" type="text/css" /><br>
+  </head><br>
+  <body><br>
+    <h1>Result summary</h1><br>
+    <p>Currently showing: ${page}</p><br>
+    <p>Show:<br>
+      ## Index is a logical choice to put first, it will always be a link<br>
+      ## and we don't want in preceeded by a |<br>
+      <a href="index.html">index</a><br>
+      % for i in pages:<br>
+        % if i == page:<br>
+          | ${i}<br>
+        % else:<br>
+          | <a href="${i}.html">${i}</a><br>
+        % endif<br>
+      % endfor<br>
+    </p><br>
+    <h1>This page is empty! Yay?</h1><br>
+  </body><br>
+</html><br>
</blockquote>
<br></div></div>
Could we make this say "No ${page}." rather than "This page is empty! Yay?"<br>
<br>
Then it would say things like:<br>
No changes.<br>
No regressions.<br>
No problems.<br>
<br>
--Ken<br>
</blockquote></div><br></div>