mirror of
https://github.com/apache/impala.git
synced 2025-12-22 03:18:15 -05:00
This patch adds the 'host:port' to all links on the webserver. This will facilitate proxying connections to the debug webui through Knox by allowing us to create rewrite rules that do the transform: <a href="scheme://host:port/path">...</a> => <a href="<knox-host>/topology/impalaui/path?scheme-scheme&host=host&port=port">...</a> which allows us to have a single IMPALAUI Knox service that can proxy connections to any impalad/statestored/catalogd webui in a cluster. Note that this works because currently all of the links on Impala's webui are within the same webserver (it would also be possible to add links to other Impala daemon webuis within a cluster, eg. if we wanted to add webui links on the /backends page). If we ever need to add links to external pages, the Knox service definition will likely need to be modified. This patch also adds hidden fields to all forms for the scheme, host, and port value, so that GET requests from forms will result in the same form as the transformed url shown above. Testing: - Ran the webserver and manually clicked around on a bunch of links to ensure everything works as expected. - Ran in a cluster and verified the new Knox service defintion works as intended with this change. - Added a test that uses a regex to check for template files that don't conform to the requirements. Change-Id: If1195709a0f21f39d9a1e484880a0c46c9967ed2 Reviewed-on: http://gerrit.cloudera.org:8080/14151 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
13 KiB
13 KiB