mirror of
https://github.com/apache/impala.git
synced 2026-01-10 09:00:16 -05:00
This patch changes all remaining non-templated webpages to use the templating engine to produce their HTML and text output. The main motivation for this change is to make it much harder for unescaped output to appear in HTML pages, where it might be interpreted by the browser as e.g. JavaScript. The template engine automatically escapes all text. As a side-effect, moving everything to the templating engine allows us to remove the 'HTML' path from the webserver. Every callback now produces Json and is rendered via a template. This patch also changes the mechanism via which pages are presented to the browser as text, rather than HTML. Any URL that includes the argument '?raw' will automatically be rendered as text, not HTML, but still passes through the template process. Any callback that wishes to ensure that is only ever rendered as text (e.g. /jsonmetrics) has only to set the special '__raw__' key in its Json output. Finally, this patch removes the 'is_styled' parameter to Register*Callback(); this logic belongs in the template, not inside the webserver itself. Change-Id: Ia33df77c52ebfa8125c5cf1fbcf40ea4b1da5497 Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3810 Reviewed-by: Henry Robinson <henry@cloudera.com> Tested-by: jenkins
22 lines
676 B
Cheetah
22 lines
676 B
Cheetah
<!--
|
|
Copyright 2012- Cloudera Inc.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
{{> www/common-header.tmpl }}
|
|
|
|
{{#thrift_string}}
|
|
<pre>{{.}}</pre>
|
|
{{/thrift_string}}
|
|
{{> www/common-footer.tmpl }}
|