File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,19 @@ def self.policy_class
1515 ProxES ::StatusPolicy
1616 end
1717
18+ get '/pools/?' do
19+ pools = client_with_context ( user_id : current_user &.id ) . cat . thread_pool ( format : 'json' )
20+
21+ respond_to do |format |
22+ format . html do
23+ haml :'status/pools' , locals : { title : 'Clustr Pools' , pools : pools }
24+ end
25+ format . json do
26+ json result
27+ end
28+ end
29+ end
30+
1831 # This provides a URL that can be polled by a monitoring system. It will return
1932 # 200 OK if all the checks pass, or 500 if any of the checks fail.
2033 get '/check' do
Original file line number Diff line number Diff line change 1+ .row
2+ .col-md-12
3+ %table .table.table-striped.table-bordered.table-hover
4+ %thead .thead-dark
5+ %tr
6+ %th Node
7+ %th Pool
8+ %th Active
9+ %th Queued
10+ %th Rejected
11+ %tbody
12+ - pools.each do |pool|
13+ %tr { class: pool['queue'] < pool['active'] * 12.5 ? '' : 'table-warning' }
14+ %td= pool['node_name']
15+ %td= pool['name']
16+ %td= pool['active']
17+ %td= pool['queue']
18+ %td= pool['rejected']
You can’t perform that action at this time.
0 commit comments