Repository: spark Updated Branches: refs/heads/master f3a3fed76 -> 3a3e65ada
[SPARK-18606][HISTORYSERVER] remove useless elements while searching ## What changes were proposed in this pull request? When we search applications in HistoryServer, it will include all contents between <td> tag, which including useless elemtns like "<span title...", "a href" and making results confused. We should remove those to make it clear. ## How was this patch tested? manual tests. Before:  After:  Author: WangTaoTheTonic <[email protected]> Closes #16031 from WangTaoTheTonic/span. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3a3e65ad Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3a3e65ad Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3a3e65ad Branch: refs/heads/master Commit: 3a3e65adaf3e4c7b92d1284e61ae89ffdf8ed5c3 Parents: f3a3fed Author: WangTaoTheTonic <[email protected]> Authored: Sat Dec 10 16:43:08 2016 +0000 Committer: Sean Owen <[email protected]> Committed: Sat Dec 10 16:43:08 2016 +0000 ---------------------------------------------------------------------- .../main/resources/org/apache/spark/ui/static/historypage.js | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/3a3e65ad/core/src/main/resources/org/apache/spark/ui/static/historypage.js ---------------------------------------------------------------------- diff --git a/core/src/main/resources/org/apache/spark/ui/static/historypage.js b/core/src/main/resources/org/apache/spark/ui/static/historypage.js index 8fd9186..54810ed 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/historypage.js +++ b/core/src/main/resources/org/apache/spark/ui/static/historypage.js @@ -78,6 +78,12 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { } } ); +jQuery.extend( jQuery.fn.dataTableExt.ofnSearch, { + "appid-numeric": function ( a ) { + return a.replace(/[\r\n]/g, " ").replace(/<.*?>/g, ""); + } +} ); + $(document).ajaxStop($.unblockUI); $(document).ajaxStart(function(){ $.blockUI({ message: '<h3>Loading history summary...</h3>'}); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
