Repository: spark
Updated Branches:
  refs/heads/branch-2.1 252dd05f0 -> 55958bcd1


[SPARK-19622][WEBUI] Fix a http error in a paged table when using a `Go` button 
to search.

## What changes were proposed in this pull request?

The search function of paged table is not available because of we don't skip 
the hash data of the reqeust path.

![](https://issues.apache.org/jira/secure/attachment/12852996/screenshot-1.png)

## How was this patch tested?

Tested manually with my browser.

Author: Stan Zhai <[email protected]>

Closes #16953 from stanzhai/fix-webui-paged-table.

(cherry picked from commit 021062af099d06b4b0095c677b3a81d21f867a9d)
Signed-off-by: Sean Owen <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/55958bcd
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/55958bcd
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/55958bcd

Branch: refs/heads/branch-2.1
Commit: 55958bcd11d13d4e2da59ba2b7895c890e26a9e7
Parents: 252dd05
Author: Stan Zhai <[email protected]>
Authored: Fri Feb 17 15:11:06 2017 +0000
Committer: Sean Owen <[email protected]>
Committed: Fri Feb 17 15:16:39 2017 +0000

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/ui/PagedTable.scala | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/55958bcd/core/src/main/scala/org/apache/spark/ui/PagedTable.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/ui/PagedTable.scala 
b/core/src/main/scala/org/apache/spark/ui/PagedTable.scala
index 2a7c16b..79974df 100644
--- a/core/src/main/scala/org/apache/spark/ui/PagedTable.scala
+++ b/core/src/main/scala/org/apache/spark/ui/PagedTable.scala
@@ -175,13 +175,14 @@ private[ui] trait PagedTable[T] {
 
       val hiddenFormFields = {
         if (goButtonFormPath.contains('?')) {
-          val querystring = goButtonFormPath.split("\\?", 2)(1)
+          val queryString = goButtonFormPath.split("\\?", 2)(1)
+          val search = queryString.split("#")(0)
           Splitter
             .on('&')
             .trimResults()
             .omitEmptyStrings()
             .withKeyValueSeparator("=")
-            .split(querystring)
+            .split(search)
             .asScala
             .filterKeys(_ != pageSizeFormField)
             .filterKeys(_ != prevPageSizeFormField)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to