Skip to content

Commit 93813af

Browse files
authored
Merge pull request #76 from iberryful/test_run_timestamp
Test run timestamp
2 parents efba00d + ff889f1 commit 93813af

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/api/handlers/projects/jobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ class Testruns(Resource):
419419
@auth_required(['user'], allow_if_public=True)
420420
def get(self, project_id, job_id):
421421
result = g.db.execute_many_dict('''
422-
SELECT tr.state, t.name, t.suite, tr.duration, t.build_number, tr.message, tr.stack
422+
SELECT tr.state, t.name, t.suite, tr.duration, t.build_number, tr.message, tr.stack, to_char(tr.timestamp, 'YYYY-MM-DD HH24:MI:SS') as timestamp
423423
FROM test t
424424
INNER JOIN test_run tr
425425
ON t.id = tr.test_id

src/dashboard-client/src/components/job/TestList.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<md-table-head md-sort-by="suite">Suite</md-table-head>
99
<md-table-head md-sort-by="duration">Duration</md-table-head>
1010
<md-table-head md-sort-by="result">Result</md-table-head>
11+
<md-table-head md-sort-by="result">Timestamp</md-table-head>
1112
</md-table-row>
1213
</md-table-header>
1314

@@ -21,6 +22,7 @@
2122
<md-table-cell>{{ t.suite }}</md-table-cell>
2223
<md-table-cell>{{ t.duration }} ms</md-table-cell>
2324
<md-table-cell><ib-state :state="t.state"></ib-state></md-table-cell>
25+
<md-table-cell>{{ t.timestamp }}</md-table-cell>
2426
</md-table-row>
2527
</md-table-body>
2628
</md-table>

src/db/migrations/00013.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE test_run ADD COLUMN timestamp TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now();

0 commit comments

Comments
 (0)