kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject kudu git commit: KUDU-2060: Show primary keys in the master's table web UI page
Date Tue, 08 Aug 2017 21:21:38 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 4a0417018 -> 28c4b8c28


KUDU-2060: Show primary keys in the master's table web UI page

Change-Id: I5563f2bbe31e0b61e1f0f222327c2a4837250fb7
Reviewed-on: http://gerrit.cloudera.org:8080/7569
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>


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

Branch: refs/heads/master
Commit: 28c4b8c28a7006cbeeab7b7179938d4eae96f85f
Parents: 4a04170
Author: SriSaiKumar-Inspur <srisaikumarravipati@inspur.com>
Authored: Thu Jul 27 16:12:42 2017 -0700
Committer: Todd Lipcon <todd@apache.org>
Committed: Tue Aug 8 21:12:51 2017 +0000

----------------------------------------------------------------------
 src/kudu/server/webui_util.cc          | 6 +++++-
 src/kudu/tserver/tablet_server-test.cc | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/28c4b8c2/src/kudu/server/webui_util.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/webui_util.cc b/src/kudu/server/webui_util.cc
index 2a7307f..6be5486 100644
--- a/src/kudu/server/webui_util.cc
+++ b/src/kudu/server/webui_util.cc
@@ -42,6 +42,10 @@ void HtmlOutputSchemaTable(const Schema& schema,
   *output << "<tbody>";
   for (int i = 0; i < schema.num_columns(); i++) {
     const ColumnSchema& col = schema.column(i);
+    const string& html_escaped_col_name = EscapeForHtmlToString(col.name());
+    const string& col_name = schema.is_key_column(col.name()) ?
+                                 Substitute("<u>$0</u>", html_escaped_col_name)
:
+                                 html_escaped_col_name;
     string read_default = "-";
     if (col.has_read_default()) {
       read_default = col.Stringify(col.read_default_value());
@@ -55,7 +59,7 @@ void HtmlOutputSchemaTable(const Schema& schema,
     const string& compression = CompressionType_Name(attrs.compression);
     *output << Substitute("<tr><th>$0</th><td>$1</td><td>$2</td><td>$3</td>"
                           "<td>$4</td><td>$5</td><td>$6</td></tr>\n",
-                          EscapeForHtmlToString(col.name()),
+                          col_name,
                           schema.column_id(i),
                           col.TypeToString(),
                           EscapeForHtmlToString(encoding),

http://git-wip-us.apache.org/repos/asf/kudu/blob/28c4b8c2/src/kudu/tserver/tablet_server-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tserver/tablet_server-test.cc b/src/kudu/tserver/tablet_server-test.cc
index 4419d83..9fe3a3c 100644
--- a/src/kudu/tserver/tablet_server-test.cc
+++ b/src/kudu/tserver/tablet_server-test.cc
@@ -181,7 +181,7 @@ TEST_F(TabletServerTest, TestWebPages) {
   // Tablet page should include the schema.
   ASSERT_OK(c.FetchURL(Substitute("http://$0/tablet?id=$1", addr, kTabletId),
                        &buf));
-  ASSERT_STR_CONTAINS(buf.ToString(), "<th>key</th>");
+  ASSERT_STR_CONTAINS(buf.ToString(), "<th><u>key</u></th>");
   ASSERT_STR_CONTAINS(buf.ToString(), "<td>string NULLABLE</td>");
 
   // Test fetching metrics.


Mime
View raw message