Skip to content

Commit

Permalink
cmd/hiveview: show dates as ISO 8601
Browse files Browse the repository at this point in the history
DataTables can only sort date columns using this format.
  • Loading branch information
fjl committed Jul 4, 2021
1 parent 915cc22 commit beebe58
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 90 deletions.
4 changes: 2 additions & 2 deletions cmd/hiveview/assets/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ function onFileListing(data, error) {
title: "Start time",
data: "start",
type: "date",
width: "10em",
width: "12.5em",
render: function(data) {
return new Date(data).toLocaleString();
return new Date(data).toISOString();
},
},
{
Expand Down
174 changes: 87 additions & 87 deletions cmd/hiveview/assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/hiveview/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Scripts are jquery, bootstrap and datatables -->
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="//cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<script src="//cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
<!-- CSS resources are bootstrap default, plus datatables default -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="//cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css">
Expand Down

0 comments on commit beebe58

Please sign in to comment.