app/views/charts/accounts_last_bandwidth_updated.html.haml
.card.border-top-0{style: 'padding-top: 0'}
.card-block
.row
.col-md-12
%div.float-right
.row
.col-sm-12
= form_tag chart_accounts_last_bandwidth_updated_path, method: :get, class: 'form-inline' do
.form-group
%label{for: :days} Days:
= number_field_tag :days, @days, class: 'form-control form-control-sm', style: 'width: 64px'
.form-group
%label{for: :segments} Segments:
= select_tag :segments, options_for_select([['Default', 'default'], ['Hourly', 'hourly']], @segments)
.form-group
%label{for: :style} Style:
= select_tag :style, options_for_select([['Default', 'default'], ['Cumlative', 'cumlative']], @style)
= submit_tag 'Draw', class: 'btn btn-primary'
%h1
Accounts Last Bandwidth Updated
= surround '(', ')' do
= pluralize(@days, 'Day')
- if @style == 'cumlative'
= area_chart @account_last_bandwidth_updates
- else
= line_chart @account_last_bandwidth_updates
%small
Total:
= @total
- unless @segments == 'hourly'
\|
Average:
= @average
per day