Repository: spark
Updated Branches:
  refs/heads/branch-2.1 95de4672e -> 62969e9be


[SPARK-20705][WEB-UI] The sort function can not be used in the master page when 
you use Firefox or Google Chrome.

## What changes were proposed in this pull request?
When you open the master page, when you use Firefox or Google Chrom, the 
console of Firefox or Google Chrome is wrong. But The IE  is no problem.
e.g.
![error](https://cloud.githubusercontent.com/assets/26266482/25946143/74467a5c-367c-11e7-8f9f-d3585b1aea88.png)

My Firefox version is 48.0.2.
My Google Chrome version  is 49.0.2623.75 m.

## How was this patch tested?

manual tests

Please review http://spark.apache.org/contributing.html before opening a pull 
request.

Author: guoxiaolong <guo.xiaolo...@zte.com.cn>
Author: 郭小龙 10207633 <guo.xiaolo...@zte.com.cn>
Author: guoxiaolongzte <guo.xiaolo...@zte.com.cn>

Closes #17952 from guoxiaolongzte/SPARK-20705.

(cherry picked from commit 99d5799927301e7dfceb9405e2829af3433f104b)
Signed-off-by: Sean Owen <so...@cloudera.com>


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

Branch: refs/heads/branch-2.1
Commit: 62969e9be01b55e1cf5ab2c9b273a9e08d6bc2c3
Parents: 95de467
Author: guoxiaolong <guo.xiaolo...@zte.com.cn>
Authored: Mon May 15 07:51:50 2017 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Mon May 15 07:52:09 2017 +0100

----------------------------------------------------------------------
 core/src/main/resources/org/apache/spark/ui/static/sorttable.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/62969e9b/core/src/main/resources/org/apache/spark/ui/static/sorttable.js
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/spark/ui/static/sorttable.js 
b/core/src/main/resources/org/apache/spark/ui/static/sorttable.js
index ff24147..9960d5c 100644
--- a/core/src/main/resources/org/apache/spark/ui/static/sorttable.js
+++ b/core/src/main/resources/org/apache/spark/ui/static/sorttable.js
@@ -207,8 +207,8 @@ sorttable = {
 
     hasInputs = (typeof node.getElementsByTagName == 'function') &&
                  node.getElementsByTagName('input').length;
-    
-    if (node.getAttribute("sorttable_customkey") != null) {
+
+    if (node.nodeType == 1 && node.getAttribute("sorttable_customkey") != 
null) {
       return node.getAttribute("sorttable_customkey");
     }
     else if (typeof node.textContent != 'undefined' && !hasInputs) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to