You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2016/08/18 19:27:26 UTC
[2/3] kudu git commit: Add State Message column to /tables
Add State Message column to /tables
The state message portion of a table's metadata is displayed in the
same table cell as the state, separated by a space. This patch puts
the state message in its own column.
Change-Id: I5d438042d760a33a815dead0f6872c005368722e
Reviewed-on: http://gerrit.cloudera.org:8080/4014
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <to...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/8e099101
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/8e099101
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/8e099101
Branch: refs/heads/master
Commit: 8e099101f0b457dffdce05cedb518184284d32d0
Parents: 3acfe91
Author: Will Berkeley <wd...@gmail.com>
Authored: Wed Aug 17 01:05:23 2016 -0400
Committer: Todd Lipcon <to...@apache.org>
Committed: Thu Aug 18 19:06:58 2016 +0000
----------------------------------------------------------------------
src/kudu/master/master-path-handlers.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/8e099101/src/kudu/master/master-path-handlers.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/master-path-handlers.cc b/src/kudu/master/master-path-handlers.cc
index 68f090c..533866c 100644
--- a/src/kudu/master/master-path-handlers.cc
+++ b/src/kudu/master/master-path-handlers.cc
@@ -95,7 +95,8 @@ void MasterPathHandlers::HandleCatalogManager(const Webserver::WebRequest& req,
master_->catalog_manager()->GetAllTables(&tables);
*output << "<table class='table table-striped'>\n";
- *output << " <tr><th>Table Name</th><th>Table Id</th><th>State</th></tr>\n";
+ *output << " <tr><th>Table Name</th><th>Table Id</th>" <<
+ "<th>State</th><th>State Message</th></tr>\n";
typedef std::map<string, string> StringMap;
StringMap ordered_tables;
for (const scoped_refptr<TableInfo>& table : tables) {
@@ -106,7 +107,8 @@ void MasterPathHandlers::HandleCatalogManager(const Webserver::WebRequest& req,
string state = SysTablesEntryPB_State_Name(l.data().pb.state());
Capitalize(&state);
ordered_tables[l.data().name()] = Substitute(
- "<tr><th>$0</th><td><a href=\"/table?id=$1\">$1</a></td><td>$2 $3</td></tr>\n",
+ "<tr><th>$0</th><td><a href=\"/table?id=$1\">$1</a></td>"
+ "<td>$2</td><td>$3</td></tr>\n",
EscapeForHtmlToString(l.data().name()),
EscapeForHtmlToString(table->id()),
state,