<% [["HEAP", :heap],["NON-HEAP", :nonheap]].each do |name,sym| %>
<%= name %>
<% used_p = stat[:memory][sym][:used_percent] %> <% committed_p = stat[:memory][sym][:committed_percent] %> <% usage_bar_color = used_p > 80 ? "danger" : (used_p > 60 ? "warning" : "info") %>
<%= used_p %> % used
<%= committed_p %> % used
<% end %>

Server

STARTED: <%= stat[:started] %>
UPTIME: <%= stat[:uptime] %>
HEAP MEMORY USED: <%= stat[:memory][:heap][:used] %>MB (<%= stat[:memory][:heap][:used_percent] %>%), COMMITTED: <%= stat[:memory][:heap][:committed] %>MB, MAX: <%= stat[:memory][:heap][:max] %>MB
NON-HEAP MEMORY USED: <%= stat[:memory][:nonheap][:used] %>MB (<%= stat[:memory][:nonheap][:used_percent] %>%), COMMITTED: <%= stat[:memory][:nonheap][:committed] %>MB, MAX: <%= stat[:memory][:nonheap][:max] %>MB

Data

TARGETS: <%= stat[:targets] %>, QUERIES: <%= stat[:queries] %>
EVENTS INPUT: <%= stat[:input_events] %>
EVENTS PROCESSED: <%= stat[:processed_events] %>
EVENTS OUTPUT: <%= stat[:output_events] %>
<% if queries.size > 0 %> <% queries.each do |query| %> <% end %>
GroupQuery nameTargetsQueryEvents
<%= query.group || "(default)" %> <%= query.name %> <%= query.targets.join(", ") %> <%= pool[query.name] %>
<% else %>

No queries found.

<% end %>

Add Query

<% input_data ||= {}; input_data[:query_add] ||= {} %> <% if input_data[:query_add][:error] %>
<%= input_data[:query_add][:error] %>
<% end %>
<% if targets.size > 0 %> <% targets.each do |target| %> "}.join %> <% else %> (lazy target) <% end %> <% end %>
TargetAuto fieldFields
<%= target[:name] %> <%= target[:auto_field] %> <% if target[:fields].size > 0 %> <% field_html = target[:fields].map{|t| "
#{t[:name]}#{t[:type]}#{t[:optional] ? '(optional)' : ''}
TODO: reserve fields, remove targets
<% else %>

No targets found.

<% end %>