From 549f0dc24e0f395223d16069bb2692bafdf3e2da Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 8 Mar 2018 11:32:33 +0100 Subject: dashboard/app: allow sorting crash table Sorting at least by date may be useful. --- dashboard/app/bug.html | 22 +++++++++++----------- dashboard/app/static/common.js | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/dashboard/app/bug.html b/dashboard/app/bug.html index 89f8d6c05..3f99d798f 100644 --- a/dashboard/app/bug.html +++ b/dashboard/app/bug.html @@ -32,17 +32,17 @@ Page with details about a single bug. - - - - - - - - - - - + + + + + + + + + + + {{range $c := $.Crashes}} diff --git a/dashboard/app/static/common.js b/dashboard/app/static/common.js index d3e408e64..c2e021d81 100644 --- a/dashboard/app/static/common.js +++ b/dashboard/app/static/common.js @@ -62,3 +62,26 @@ function timeSort(v) { return parseInt(v) * 60 * 24; return 1000000000; } + +function dateSort(v) { + if (v == "") + return 0; + switch (v.substring(0, 3)) { + case "Jan": w = 0; break; + case "Feb": w = 1; break; + case "Mar": w = 2; break; + case "Apr": w = 3; break; + case "May": w = 4; break; + case "Jun": w = 5; break; + case "Jul": w = 6; break; + case "Aug": w = 7; break; + case "Sep": w = 8; break; + case "Oct": w = 9; break; + case "Nov": w = 10; break; + case "Dec": w = 11; break; + } + w = w * 100 + parseInt(v.substring(4, 6)); + w = w * 100 + parseInt(v.substring(7, 9)); + w = w * 100 + parseInt(v.substring(10, 12)); + return -w; +} -- cgit mrf-deployment
Crashes ({{.Bug.NumCrashes}}):
ManagerTimeKernelCommitSyzkallerConfigLogReportSyz reproC reproMaintainersManagerTimeKernelCommitSyzkallerConfigLogReportSyz reproC reproMaintainers