Display local time in the browser
This commit is contained in:
@@ -155,24 +155,26 @@
|
||||
<!-- Events Timeline Chart -->
|
||||
<div class="bg-white shadow rounded-lg">
|
||||
<div class="px-6 py-4 border-b border-gray-200">
|
||||
<h3 class="text-lg font-medium text-gray-900">Events Timeline (Last 24 Hours)</h3>
|
||||
<div class="flex items-center justify-between">
|
||||
<h3 class="text-lg font-medium text-gray-900">Events Timeline (Last 24 Hours)</h3>
|
||||
<span class="text-sm text-gray-500">Times shown in your local timezone</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<div class="space-y-4">
|
||||
<div class="space-y-4" data-controller="timeline">
|
||||
<% @chart_data[:timeline].each do |data| %>
|
||||
<div class="flex items-center">
|
||||
<div class="w-16 text-sm text-gray-500"><%= data[:time] %></div>
|
||||
<div class="flex items-center" data-timeline-target="row" data-time-iso="<%= data[:time_iso] %>" data-total="<%= data[:total] %>">
|
||||
<div class="w-20 text-sm text-gray-500" data-timeline-target="time">--:--</div>
|
||||
<div class="flex-1 mx-4">
|
||||
<div class="bg-gray-200 rounded-full h-4">
|
||||
<div class="bg-blue-600 h-4 rounded-full"
|
||||
style="width: <%= [((data[:total].to_f / [@chart_data[:timeline].map { |d| d[:total] }.max, 1].max) * 100), 5].max %>%">
|
||||
</div>
|
||||
<div class="bg-blue-600 h-4 rounded-full" data-timeline-target="bar" style="width: 0%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-12 text-sm text-gray-900 text-right"><%= data[:total] %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user