mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Show datetime with seconds in the Points page.
This commit is contained in:
parent
5ac61fa848
commit
72927379b7
3 changed files with 16 additions and 1 deletions
|
|
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
- Vector maps are supported in non-self-hosted mode.
|
- Vector maps are supported in non-self-hosted mode.
|
||||||
- Credentials for Sidekiq UI are now being set via environment variables: `SIDEKIQ_USERNAME` and `SIDEKIQ_PASSWORD`. Default credentials are `sidekiq` and `password`.
|
- Credentials for Sidekiq UI are now being set via environment variables: `SIDEKIQ_USERNAME` and `SIDEKIQ_PASSWORD`. Default credentials are `sidekiq` and `password`.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Datetime is now being displayed with seconds in the Points page. #1088
|
||||||
|
|
||||||
## Removed
|
## Removed
|
||||||
|
|
||||||
- Sample points are no longer being imported automatically for new users.
|
- Sample points are no longer being imported automatically for new users.
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,17 @@ module ApplicationHelper
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def human_datetime_with_seconds(datetime)
|
||||||
|
return unless datetime
|
||||||
|
|
||||||
|
content_tag(
|
||||||
|
:span,
|
||||||
|
datetime.strftime('%e %b %Y, %H:%M:%S'),
|
||||||
|
class: 'tooltip',
|
||||||
|
data: { tip: datetime.iso8601 }
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
def speed_text_color(speed)
|
def speed_text_color(speed)
|
||||||
return 'text-default' if speed.to_i >= 0
|
return 'text-default' if speed.to_i >= 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
%>
|
%>
|
||||||
</td>
|
</td>
|
||||||
<td class='<%= speed_text_color(point.velocity) %>'><%= point.velocity %></td>
|
<td class='<%= speed_text_color(point.velocity) %>'><%= point.velocity %></td>
|
||||||
<td><%= human_datetime(point.recorded_at) %></td>
|
<td><%= human_datetime_with_seconds(point.recorded_at) %></td>
|
||||||
<td><%= point.lat %>, <%= point.lon %></td>
|
<td><%= point.lat %>, <%= point.lon %></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue