From 4f9930fc53eaa73909038d2dd86bbda0d2d6e302 Mon Sep 17 00:00:00 2001 From: Philip Kirkbride Date: Tue, 11 Jul 2017 15:52:50 -0400 Subject: [PATCH] Fix bug breaking date/time sort --- puppetboard/static/js/tables.js | 3 ++- puppetboard/templates/index.html | 2 +- puppetboard/templates/nodes.html | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/puppetboard/static/js/tables.js b/puppetboard/static/js/tables.js index 25c4434..ed99bb5 100644 --- a/puppetboard/static/js/tables.js +++ b/puppetboard/static/js/tables.js @@ -11,7 +11,8 @@ } $('thead th.date').data('sortBy', function(th, td, tablesort) { - return moment.utc(td.text()).unix(); + var tdTime = td.text().replace("-", ""); + return moment.utc(tdTime).unix(); }); $('input.filter-table').parent('div').removeClass('hide'); diff --git a/puppetboard/templates/index.html b/puppetboard/templates/index.html index 7e59e26..ec8f49b 100644 --- a/puppetboard/templates/index.html +++ b/puppetboard/templates/index.html @@ -87,7 +87,7 @@ Status Certname - Report + Report diff --git a/puppetboard/templates/nodes.html b/puppetboard/templates/nodes.html index aefea6a..5301005 100644 --- a/puppetboard/templates/nodes.html +++ b/puppetboard/templates/nodes.html @@ -9,8 +9,8 @@ Status Certname - Catalog - Report + Catalog + Report