<% @periods.each do |name, options| %>
<%= link_to name, system_path(params: options) %>
<% end %>
<% path_options = {params: {duration: @duration, period: @period}} %>
CPU
Loading...
<%= javascript_tag nonce: true do %>
new Chartkick.LineChart("chart-1", <%= pghero_js_value(cpu_usage_path(path_options)) %>, {max: 100, colors: ["#5bc0de"], suffix: "%", library: {plugins: {tooltip: {intersect: false, mode: "index"}}}})
<% end %>
Load
Loading...
<%= javascript_tag nonce: true do %>
new Chartkick.LineChart("chart-2", <%= pghero_js_value(load_stats_path(path_options)) %>, {colors: ["#5bc0de", "#d9534f"], library: {plugins: {tooltip: {intersect: false, mode: "nearest"}}}})
<% end %>
Connections
Loading...
<%= javascript_tag nonce: true do %>
new Chartkick.LineChart("chart-3", <%= pghero_js_value(connection_stats_path(path_options)) %>, {colors: ["#5bc0de"], library: {plugins: {tooltip: {intersect: false, mode: "index"}}}})
<% end %>
<% if @database.replica? %>
Replication Lag
Loading...
<%= javascript_tag nonce: true do %>
new Chartkick.LineChart("chart-4", <%= pghero_js_value(replication_lag_stats_path(path_options)) %>, {colors: ["#5bc0de"], library: {plugins: {tooltip: {intersect: false, mode: "index"}}}})
<% end %>
<% end %>