From 63f2c1cdac5b58f0471e3f45dd089ad8fef05273 Mon Sep 17 00:00:00 2001 From: Akshay Sudheer <74921542+AkshayTSudheer@users.noreply.github.com> Date: Wed, 3 Mar 2021 13:57:42 +0530 Subject: [PATCH] HBASE-25367 Sort broken after Change 'State time' in UI (#2964) Signed-off-by: Duo Zhang Signed-off-by: Pankaj Kumar (cherry picked from commit 5d9a6ed1fe47f0186acf08165c3b82ff63276f35) --- .../apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon | 1 + .../hbase-webapps/static/js/parser-date-iso8601.min.js | 4 ++++ pom.xml | 1 + 3 files changed, 6 insertions(+) create mode 100644 hbase-server/src/main/resources/hbase-webapps/static/js/parser-date-iso8601.min.js 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 000a0338214..1b746928dd7 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 @@ -410,6 +410,7 @@ AssignmentManager assignmentManager = master.getAssignmentManager(); + diff --git a/hbase-server/src/main/resources/hbase-webapps/static/js/parser-date-iso8601.min.js b/hbase-server/src/main/resources/hbase-webapps/static/js/parser-date-iso8601.min.js new file mode 100644 index 00000000000..fe116cb92d2 --- /dev/null +++ b/hbase-server/src/main/resources/hbase-webapps/static/js/parser-date-iso8601.min.js @@ -0,0 +1,4 @@ +(function(factory){if (typeof define === 'function' && define.amd){define(['jquery'], factory);} else if (typeof module === 'object' && typeof module.exports === 'object'){module.exports = factory(require('jquery'));} else {factory(jQuery);}}(function(jQuery){ + +/*! Parser: ISO-8601 date - updated 10/26/2014 (v2.18.0) */ +!function(e){"use strict";var s=/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?$/;e.tablesorter.addParser({id:"iso8601date",is:function(e){return!!e&&e.match(s)},format:function(e){var t=e?e.match(s):e;if(t){var r=new Date(t[1],0,1);return t[3]&&r.setMonth(t[3]-1),t[5]&&r.setDate(t[5]),t[7]&&r.setHours(t[7]),t[8]&&r.setMinutes(t[8]),t[10]&&r.setSeconds(t[10]),t[12]&&r.setMilliseconds(1e3*Number("0."+t[12])),r.getTime()}return e},type:"numeric"})}(jQuery);return jQuery;})); diff --git a/pom.xml b/pom.xml index 2e4ca356ab2..7875c1f9cb3 100755 --- a/pom.xml +++ b/pom.xml @@ -738,6 +738,7 @@ **/jquery.min.js **/jquery.tablesorter.min.js + **/parser-date-iso8601.min.js **/src/main/resources/hbase-webapps/static/*/bootstrap*