Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/src/database/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import DatabaseHelper from './databasehelper.js';
const logger = getLogger('sitespeedio.database.search');

const LIMITED_COLUMS =
'id, location, test_type, run_date, added_date, connectivity, browser_name, url, result_url, status, scripting_name, label, slug';
'id, location, test_type, run_date, added_date, finished_date, connectivity, browser_name, url, result_url, status, scripting_name, label, slug';

/**
* Get a test by text (searching).
Expand Down
4 changes: 3 additions & 1 deletion server/views/search.pug
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,9 @@ block content
a(role='button' data-add='label:' + test.label title='Add label to search') #{test.label}
if nconf.get('search:showSlug') === true
a(role='button' data-add='slug:' + test.slug title='Add slug to search') #{test.slug}
td.run-date #{dayjs(test.run_date?test.run_date:test.added_date).format(nconf.get('dateformat'))}
- var runMs = (test.run_date && test.finished_date) ? (new Date(test.finished_date) - new Date(test.run_date)) : null;
- var runLabel = (runMs != null && runMs >= 0) ? (runMs < 1000 ? runMs + 'ms' : runMs < 60000 ? (runMs/1000).toFixed(1) + 's' : Math.floor(runMs/60000) + 'm ' + Math.round((runMs%60000)/1000) + 's') : null;
td.run-date(title=runLabel ? 'Run time: ' + runLabel : undefined) #{dayjs(test.run_date?test.run_date:test.added_date).format(nconf.get('dateformat'))}
td
a(role='button' data-add='location:' + test.location title='Add location to search') #{test.location}
td.is-capitalized
Expand Down
Loading