hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [05/13] git commit: YARN-2610. Hamlet should close table tags. (Ray Chiang via kasha)
Date Wed, 01 Oct 2014 01:06:19 GMT
YARN-2610. Hamlet should close table tags. (Ray Chiang via kasha)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f7743dd0
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f7743dd0
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f7743dd0

Branch: refs/heads/HDFS-6581
Commit: f7743dd07dfbe0dde9be71acfaba16ded52adba7
Parents: cdf1af0
Author: Karthik Kambatla <kasha@apache.org>
Authored: Mon Sep 29 11:33:44 2014 -0700
Committer: Karthik Kambatla <kasha@apache.org>
Committed: Tue Sep 30 11:46:07 2014 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                      |  2 ++
 .../org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java | 10 +++++-----
 .../apache/hadoop/yarn/webapp/hamlet/TestHamlet.java |  4 ++--
 .../hadoop/yarn/webapp/view/TestInfoBlock.java       | 15 ++++++++-------
 4 files changed, 17 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f7743dd0/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index a15a98e..c1172de 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -480,6 +480,8 @@ Release 2.6.0 - UNRELEASED
     YARN-2606. Application History Server tries to access hdfs before doing
     secure login (Mit Desai via jeagles)
 
+    YARN-2610. Hamlet should close table tags. (Ray Chiang via kasha)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f7743dd0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java
index 7076c9a..83fa5da 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/hamlet/Hamlet.java
@@ -2423,10 +2423,10 @@ public class Hamlet extends HamletImpl implements HamletSpec._Html
{
   }
 
   private <T extends _> TH<T> th_(T e, boolean inline) {
-    return new TH<T>("th", e, opt(false, inline, false)); }
+    return new TH<T>("th", e, opt(true, inline, false)); }
 
   private <T extends _> TD<T> td_(T e, boolean inline) {
-    return new TD<T>("td", e, opt(false, inline, false)); }
+    return new TD<T>("td", e, opt(true, inline, false)); }
 
   public class COL<T extends _> extends EImp<T> implements HamletSpec.COL {
     public COL(String name, T parent, EnumSet<EOpt> opts) {
@@ -3719,10 +3719,10 @@ public class Hamlet extends HamletImpl implements HamletSpec._Html
{
     return new COLGROUP<T>("colgroup", e, opt(false, inline, false)); }
 
   private <T extends _> THEAD<T> thead_(T e, boolean inline) {
-    return new THEAD<T>("thead", e, opt(false, inline, false)); }
+    return new THEAD<T>("thead", e, opt(true, inline, false)); }
 
   private <T extends _> TFOOT<T> tfoot_(T e, boolean inline) {
-    return new TFOOT<T>("tfoot", e, opt(false, inline, false)); }
+    return new TFOOT<T>("tfoot", e, opt(true, inline, false)); }
 
   private <T extends _> TBODY<T> tbody_(T e, boolean inline) {
     return new TBODY<T>("tbody", e, opt(true, inline, false)); }
@@ -3731,7 +3731,7 @@ public class Hamlet extends HamletImpl implements HamletSpec._Html {
     return new COL<T>("col", e, opt(false, inline, false)); }
 
   private <T extends _> TR<T> tr_(T e, boolean inline) {
-    return new TR<T>("tr", e, opt(false, inline, false)); }
+    return new TR<T>("tr", e, opt(true, inline, false)); }
 
   public class BUTTON<T extends _> extends EImp<T> implements HamletSpec.BUTTON
{
     public BUTTON(String name, T parent, EnumSet<EOpt> opts) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f7743dd0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java
index 1ea8bcf..d9eaa37 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/hamlet/TestHamlet.java
@@ -88,8 +88,8 @@ public class TestHamlet {
     assertEquals(0, h.nestLevel);
     verify(out).print("<table");
     verify(out).print("</table>");
-    verify(out, never()).print("</td>");
-    verify(out, never()).print("</tr>");
+    verify(out, atLeast(1)).print("</td>");
+    verify(out, atLeast(1)).print("</tr>");
   }
 
   @Test public void testEnumAttrs() {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/f7743dd0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java
index 4ec1434..da5efbb 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/webapp/view/TestInfoBlock.java
@@ -68,7 +68,7 @@ public class TestInfoBlock {
 
     static {
       resInfo = new ResponseInfo();
-      resInfo._("Single_line_value", "This is one line.");
+      resInfo._("Multiple_line_value", "This is one line.");
       resInfo._("Multiple_line_value", "This is first line.\nThis is second line.");	
     }
 
@@ -98,13 +98,14 @@ public class TestInfoBlock {
     WebAppTests.testBlock(MultilineInfoBlock.class);
     TestInfoBlock.pw.flush();
     String output = TestInfoBlock.sw.toString().replaceAll(" +", " ");
-    String expectedSinglelineData = String.format("<tr class=\"odd\">%n"
-      + " <th>%n Single_line_value%n <td>%n This is one line.%n");
-    String expectedMultilineData = String.format("<tr class=\"even\">%n"
-      + " <th>%n Multiple_line_value%n <td>%n <div>%n"
+    String expectedMultilineData1 = String.format("<tr class=\"odd\">%n"
+      + " <th>%n Multiple_line_value%n </th>%n"
+      + " <td>%n This is one line.%n </td>%n");
+    String expectedMultilineData2 = String.format("<tr class=\"even\">%n"
+      + " <th>%n Multiple_line_value%n </th>%n <td>%n <div>%n"
       + " This is first line.%n </div>%n <div>%n"
       + " This is second line.%n </div>%n");
-    assertTrue(output.contains(expectedSinglelineData) && output.contains(expectedMultilineData));
+    assertTrue(output.contains(expectedMultilineData1) && output.contains(expectedMultilineData2));
   }
   
   @Test(timeout=60000L)
@@ -115,4 +116,4 @@ public class TestInfoBlock {
     assertFalse(output.contains("<script>"));
     assertTrue(output.contains(JAVASCRIPT_ESCAPED));
   }
-}
\ No newline at end of file
+}


Mime
View raw message