This is an automated email from the ASF dual-hosted git repository. stack pushed a commit to branch branch-2.3 in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.3 by this push: new 9091b2c HBASE-24652 master-status UI make date type fields sortable 9091b2c is described below commit 9091b2c51aa56f7606b2bad0a69585763e44c0cf Author: eomiks <jeongmin....@navercorp.com> AuthorDate: Mon Jun 29 01:18:45 2020 +0900 HBASE-24652 master-status UI make date type fields sortable --- .../apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon index e41a3aa..ebcf472 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon @@ -450,8 +450,20 @@ AssignmentManager assignmentManager = master.getAssignmentManager(); return $.tablesorter.formatFloat( s.replace(/,/g,'') ); }, type: "numeric" }); + $.tablesorter.addParser( + { + id: "dateTime", + is: function (s) { + return /^([a-zA-Z]{3}\s){2}\d{2}\s\d{2}:\d{2}:\d{2}\s[a-zA-Z]{3}\s\d{4}$/.test(s); + }, format: function (s) { + var split = s.split(" "); + var time = Date.parse(split[1] + " " + split[2] + " " + split[3] + " " + split[5]); + return $.tablesorter.formatFloat(time); + }, type: "numeric" + }); $("#baseStatsTable").tablesorter({ headers: { + 1: {sorter: 'dateTime'}, 4: {sorter: 'separator'}, 5: {sorter: 'separator'} }