Skip to content

Commit

Permalink
Change display of dates in pings and stats tabs.
Browse files Browse the repository at this point in the history
This is a temporary measure until I cannot go on without using any of
the node.js date modules. JavaScript Date object is really not that good
at formatting.
  • Loading branch information
fzaninotto committed May 9, 2012
1 parent 33a3444 commit a226df3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/dashboard/views/_pings.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<script id="ping_template" type="text/template">
<tr class="{{= !ping.isUp ? 'red' : !ping.isResponsive ? 'orange' : '' }}">
<td>{{= new Date(ping.timestamp).toLocaleString() }}</td>
<td>{{= new Date(ping.timestamp).toLocaleDateString() }}, {{= new Date(ping.timestamp).toLocaleTimeString() }}</td>
<td>
<span class="label {{= (ping.isUp ? 'label-success' : 'label-important') }}">{{= (ping.isUp ? 'Up' : 'Down') }}</span>
{{ if (ping.isUp && !ping.isResponsive) { }}<span class="label label-warning">Slow</span>{{ } }}
Expand Down
2 changes: 1 addition & 1 deletion app/dashboard/views/_stats.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</div>
<script id="stat_template" type="text/template">
<tr class="{{= (stat.uptime < 100) ? 'red' : (stat.responsiveness < 100) ? 'orange' : '' }}">
<td>{{= new Date(stat.timestamp).toLocaleString() }}</td>
<td>{{= new Date(stat.timestamp).toLocaleDateString() }}, {{= new Date(stat.timestamp).toLocaleTimeString() }}</td>
<td>{{= String(stat.uptime).replace('.000', '') }}%</td>
<td>{{= String(stat.responsiveness).replace('.000', '') }}%</td>
<td>{{= stat.downtime }}s</td>
Expand Down

0 comments on commit a226df3

Please sign in to comment.