Skip to content

Commit

Permalink
[test dashboard] show test time
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Jun 11, 2013
1 parent feaa281 commit 4b3d2a0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/test-dashboard/models.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
(function() {

var moment = require('moment');

var mongoose, db;

// DB connect.
Expand Down Expand Up @@ -88,6 +90,12 @@
return this.errors && this.errors.length > 0;
};

PageTestLogSchema.methods.created_at_format = function() {
return moment(this.created_at).format("DD:MM:YY HH:mm");
};



exports.PluginTest = db.model('PluginTest', PluginTestSchema);
exports.PageTestLog = db.model('PageTestLog', PageTestLogSchema);
exports.TestUrlsSet = db.model('TestUrlsSet', TestUrlsSetSchema);
Expand Down
1 change: 1 addition & 0 deletions test-plugins.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node ./modules/test-dashboard/tester
5 changes: 5 additions & 0 deletions views/test-dashboard/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<th class="span2">Result</th>
<th class="span2"></th>
<th>URL</th>
<th class="span4">tested at</th>
</tr>
</thead>
Expand Down Expand Up @@ -82,6 +83,10 @@
<a target="_blank" href="<%= url %>"><%= url %></a>
</td>
<td>
<%= log.created_at_format() %>
</td>
</tr>
<% }); %>
Expand Down

0 comments on commit 4b3d2a0

Please sign in to comment.