<% @periods.each do |name, options| %>
<%= link_to name, system_path(options) %>
<% end %>
<% path_options = {duration: params[:duration], period: params[:period]} %>
CPU
<%= line_chart cpu_usage_path(path_options), max: 100, colors: ["#5bc0de"] %>
Load
<%= line_chart load_stats_path(path_options), colors: ["#5bc0de", "#d9534f"] %>
Connections
<%= line_chart connection_stats_path(path_options), colors: ["#5bc0de"] %>
<% if @database.replica? %>
Replication Lag
<%= line_chart replication_lag_stats_path(path_options), colors: ["#5bc0de"] %>
<% end %>