You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Sam Okrent (Code Review)" <ge...@cloudera.org> on 2017/07/17 22:23:18 UTC

[kudu-CR] Integrate Mustache templates to webserver

Sam Okrent has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/7448

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 420 insertions(+), 151 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/1
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#14).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 436 insertions(+), 185 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/14
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 14
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Sam Okrent has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 10:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:

Line 479: void Webserver::RenderMainTemplate(const string& content, stringstream* output) {
> How come you decided to keep this template inline instead of putting into t
It's inlined so that something displays on the page even if the doc root isn't configured (if it was in a file it wouldn't be rendered). The benefits of having the other templates in separate files include
- They can be modified without recompiling
- You can use syntax highlighting when editing
- Naming them by their url path eliminates the need for some kind of lookup table (would be required if they were inlined)

I'm moving the main template to it's own file and instead printing out a simple plain-text error message if the doc root isn't configured.


http://gerrit.cloudera.org:8080/#/c/7448/8/src/kudu/server/webserver.h
File src/kudu/server/webserver.h:

Line 63:                            const PathHandlerCallback& callback,
> reindent the param lists here and below.
Done


http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/server/webserver.h
File src/kudu/server/webserver.h:

Line 67:                                       const PrerenderedPathHandlerCallback& callback,
> re-indent here and above
Done


http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/util/easy_json.cc
File src/kudu/util/easy_json.cc:

Line 187:     push_val.SetArray();
> I think this needs a final 'else { LOG(FATAL) << "Unknown initializer type"
Done


http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/util/easy_json.h
File src/kudu/util/easy_json.h:

Line 120:   // Returns the child object.
> This method and below don't return a reference, perhaps just 'Returns the c
Woops, copy-paste error


Line 161:   std::string ToString() const;
> I think it'd be better to keep ToString without a param, since that matches
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#10).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
A www/main.mustache
17 files changed, 434 insertions(+), 185 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/10
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#5).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 422 insertions(+), 153 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/5
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 9:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:

Line 479: static const char* const kMainTemplate = R"(
How come you decided to keep this template inline instead of putting into the www/ directory?  I don't have much an opinion on inlining vs. not, but seems like we should keep it consistent.  In fact it may make things simpler to always inline?  I know we discussed this previously, but the templates in www/ seem simple enough that inlining wouldn't be too bad, especially with these fancy raw string initializers.


http://gerrit.cloudera.org:8080/#/c/7448/8/src/kudu/server/webserver.h
File src/kudu/server/webserver.h:

Line 63:                                    const PathHandlerCallback& callback,
reindent the param lists here and below.


http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/server/webserver.h
File src/kudu/server/webserver.h:

Line 67:                                               const PrerenderedPathHandlerCallback& callback,
re-indent here and above


http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/util/easy_json.cc
File src/kudu/util/easy_json.cc:

Line 187:   }
I think this needs a final 'else { LOG(FATAL) << "Unknown initializer type" }'; it's possible to case an arbitrary int to a C++ enum.


http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/util/easy_json.h
File src/kudu/util/easy_json.h:

Line 120:   // Returns a reference to the child object.
This method and below don't return a reference, perhaps just 'Returns the child object.'?


Line 161:   std::string ToString(bool html = false) const;
I think it'd be better to keep ToString without a param, since that matches the style of the rest of the codebase.  Instead you could add 'ToStringHtml', or just inline the <pre> tag generation into the caller, since it looks like it's only used once currently.


-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 9
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 13:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7448/13/src/kudu/util/easy_json.h
File src/kudu/util/easy_json.h:

Line 191: std::ostream& operator<<(std::ostream& os, const EasyJson& ej);
We talked about this offline - but I'd skip this API for now.  There's a note in the RapidJson about the overhead of OStreamWrapper, so it's not a clear perf. win.


-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 13
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#7).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 425 insertions(+), 179 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/7
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 7
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#6).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 424 insertions(+), 177 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/6
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#9).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 434 insertions(+), 184 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/9
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 9
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#3).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 420 insertions(+), 151 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/3
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#2).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 420 insertions(+), 151 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/2
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7448/12/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:

Line 549:     string json_str = use_style ? Substitute("<pre>$0</pre>", ej.ToString()) : ej.ToString();
In order to save an intermediate copy of the serialized json, change this to not use substitute.


-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 12
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 14: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 14
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: No

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has submitted this change and it was merged.

Change subject: Integrate Mustache templates to webserver
......................................................................


Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Reviewed-on: http://gerrit.cloudera.org:8080/7448
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <da...@apache.org>
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 436 insertions(+), 185 deletions(-)

Approvals:
  Dan Burkert: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 15
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#8).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 431 insertions(+), 181 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/8
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 8
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 9:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7448/9/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:

Line 479: static const char* const kMainTemplate = R"(
> It's inlined so that something displays on the page even if the doc root is
SGTM


-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 9
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#11).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
A www/main.mustache
17 files changed, 475 insertions(+), 185 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/11
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 11
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Sam Okrent has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 9:

This commit didn't go anywhere near raft consensus, and the log doesn't look like the failure of RaftConsensusITest.TestChurnyElections was anything related to this code. Different tests from RaftConsensusITest have failed intermittently over the past few builds, but RaftConsensusITest passes locally and on ve0518.

-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 9
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: No

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#4).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 423 insertions(+), 154 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/4
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Dan Burkert (Code Review)" <ge...@cloudera.org>.
Dan Burkert has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 8:

(1 comment)

sorry I realized I had this old review item from a previous revision, but looks like it still applies.  Will review the latest revision shortly.

http://gerrit.cloudera.org:8080/#/c/7448/5/src/kudu/server/CMakeLists.txt
File src/kudu/server/CMakeLists.txt:

Line 94:   mustache)
keep in alphabetical order


-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 8
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#13).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 466 insertions(+), 185 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/13
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 13
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/7448

to look at the new patch set (#12).

Change subject: Integrate Mustache templates to webserver
......................................................................

Integrate Mustache templates to webserver

This commit alters the design of webserver path handlers
to use Mustache templates instead of generating HTML
in server code. Path handlers now accept a json object
as a parameter, and fill out the fields of this object
with information to be displayed on their web page.
This json object is then passed to Mustache, along with
the name of the corresponding template, to be rendered.

Many path handlers still conform to the old design of
generating raw HTML; this commit converts two path
handlers to the new design as an example. Converting
old path handlers, and adding new ones, is a simple
process that consists of defining a callback that
accepts a json object and fills out its fields,
passing the function to RegisterPathHandler(), and
adding a new mustache template to www/.

Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
---
M src/kudu/master/master-path-handlers.cc
M src/kudu/server/CMakeLists.txt
M src/kudu/server/default-path-handlers.cc
M src/kudu/server/pprof-path-handlers.cc
M src/kudu/server/rpcz-path-handler.cc
M src/kudu/server/tracing-path-handlers.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/tserver/tserver-path-handlers.cc
M src/kudu/util/easy_json-test.cc
M src/kudu/util/easy_json.cc
M src/kudu/util/easy_json.h
M src/kudu/util/thread.cc
M src/kudu/util/web_callback_registry.h
A www/home.mustache
A www/logs.mustache
16 files changed, 438 insertions(+), 185 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/7448/12
-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 12
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot

[kudu-CR] Integrate Mustache templates to webserver

Posted by "Sam Okrent (Code Review)" <ge...@cloudera.org>.
Sam Okrent has posted comments on this change.

Change subject: Integrate Mustache templates to webserver
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7448/12/src/kudu/server/webserver.cc
File src/kudu/server/webserver.cc:

Line 549:     string json_str = use_style ? Substitute("<pre>$0</pre>", ej.ToString()) : ej.ToString();
> In order to save an intermediate copy of the serialized json, change this t
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/7448
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8cf8181b2b2904a57c9b24ce73316b92a4f6700f
Gerrit-PatchSet: 12
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <sa...@cloudera.com>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes