feat: show timestamp in results page
This commit is contained in:
parent
21ff6741a0
commit
94eb76c188
3 changed files with 13 additions and 7 deletions
|
@ -66,7 +66,7 @@ mime = "0.3.16"
|
|||
|
||||
#sailfish = "0.3.2"
|
||||
tracing = { version = "0.1.37", features = ["log"] }
|
||||
tera = "1.17.1"
|
||||
tera = { version="1.17.1", features=["builtins"]}
|
||||
|
||||
#tokio = "1.11.0"
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@ pub mod runners {
|
|||
#[derive(Debug)]
|
||||
struct InternalSurveyResp {
|
||||
id: i32,
|
||||
submitted_at: OffsetDateTime,
|
||||
user_id: Uuid,
|
||||
threads: Option<i32>,
|
||||
device_user_provided: String,
|
||||
|
@ -198,6 +199,7 @@ pub mod runners {
|
|||
device_software_recognised,
|
||||
threads,
|
||||
user_id,
|
||||
submitted_at,
|
||||
device_user_provided
|
||||
FROM
|
||||
survey_responses
|
||||
|
@ -256,6 +258,7 @@ pub mod runners {
|
|||
user,
|
||||
device_user_provided: r.device_user_provided,
|
||||
device_software_recognised: r.device_software_recognised,
|
||||
submitted_at: r.submitted_at.unix_timestamp(),
|
||||
id: r.id as usize,
|
||||
threads: r.threads.map(|t| t as usize),
|
||||
})
|
||||
|
@ -314,6 +317,7 @@ pub struct SurveyResponse {
|
|||
pub device_software_recognised: String,
|
||||
pub id: usize,
|
||||
pub threads: Option<usize>,
|
||||
pub submitted_at: i64,
|
||||
pub benches: Vec<Bench>,
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>Submission ID</th>
|
||||
<th>Time (UTC)</th>
|
||||
<th>User ID</th>
|
||||
<th>Device make (user provided)</th>
|
||||
<th>Device make (detected)</th>
|
||||
|
@ -21,12 +22,13 @@
|
|||
<tbody>
|
||||
{% for sub in payload.submissions %}
|
||||
<tr>
|
||||
<th>{{ sub.id }}</th>
|
||||
<th>{{ sub.user.id }}</th>
|
||||
<th>{{ sub.device_user_provided }}</th>
|
||||
<th>{{ sub.device_software_recognised }}</th>
|
||||
<th>{{ sub.threads }}</th>
|
||||
<th>
|
||||
<td>{{ sub.id }}</td>
|
||||
<td>{{ sub.submitted_at | date(format="%Y-%m-%d %H:%M", timezone="GMT") }}</td>
|
||||
<td>{{ sub.user.id }}</td>
|
||||
<td>{{ sub.device_user_provided }}</td>
|
||||
<td>{{ sub.device_software_recognised }}</td>
|
||||
<td>{{ sub.threads }}</td>
|
||||
<td>
|
||||
<table>
|
||||
<thead>
|
||||
<th>Difficulty</th>
|
||||
|
|
Loading…
Reference in a new issue