5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 22:46:23 +00:00

poder ver y filtrar por rangos

This commit is contained in:
f 2022-04-30 20:42:38 -03:00
parent c8ff6de9ae
commit 62bdfff98c

View file

@ -9,9 +9,13 @@
%time{ datetime: @last_stat.updated_at } %time{ datetime: @last_stat.updated_at }
#{time_ago_in_words @last_stat.updated_at}. #{time_ago_in_words @last_stat.updated_at}.
.mb-5 %form.mb-5.form-inline{ method: 'get' }
- Stat::INTERVALS.each do |interval| - Stat::INTERVALS.each do |interval|
= link_to t(".#{interval}"), site_stats_path(interval: interval, urls: params[:urls]), class: "btn #{'btn-primary active' if @interval == interval}" = link_to t(".#{interval}"), site_stats_path(interval: interval, urls: params[:urls], period_start: params[:period_start].to_date.try(:"beginning_of_#{interval}").to_date, period_end: params[:period_end]), class: "mb-0 btn #{'btn-primary active' if @interval == interval}"
%input.form-control{ type: 'date', name: :period_start, value: params[:period_start] }
%input.form-control{ type: 'date', name: :period_end, value: params[:period_end] }
%button.btn.mb-0{ type: 'submit' }= t('.filter')
.mb-5 .mb-5
%h2= t('.host.title', count: @hostnames.size) %h2= t('.host.title', count: @hostnames.size)