-
Notifications
You must be signed in to change notification settings - Fork 649
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creates first version of UI consisting of queue details and sidekiq s…
…tats: - Adds route for UI to config - Controller fetches metrics from service class - Service class renamed and fetches data and manipulates it as needed - View created using haml template to display information - Adds descriptions of queues / metrics in locales en.yml
- Loading branch information
1 parent
d19a4a0
commit 2978545
Showing
5 changed files
with
154 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
class SystemStatusController < ApplicationController | ||
# service = SystemMetricsService.new | ||
def index | ||
system_metrics = GetSystemMetrics.new | ||
|
||
@sidekiq_stats = system_metrics.fetch_sidekiq_stats | ||
@queue_metrics = system_metrics.fetch_queue_management_metrics | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.container.queues | ||
.module | ||
.section-header | ||
%h3 Queues Overview | ||
.notification | ||
.container | ||
- if @queue_metrics[:all_operational] | ||
%p All Queues Operational | ||
- else | ||
%p All Queues Operational except: | ||
.notifications | ||
.notice | ||
.container | ||
- @queue_metrics[:paused_queues].each do |queue_name| | ||
%p= queue_name.humanize | ||
%br/ | ||
|
||
%table.table.table--hoverable | ||
%thead | ||
%tr | ||
%th Queue | ||
%th Purpose | ||
%th Status | ||
%th | ||
.tooltip-trigger | ||
= t("status.size") | ||
%span.tooltip-indicator | ||
.tooltip.dark | ||
%p= t("status.size_doc") | ||
%th | ||
.tooltip-trigger | ||
= t("status.latency") | ||
%span.tooltip-indicator | ||
.tooltip.dark | ||
%p= t("status.latency_doc") | ||
%tbody | ||
- @queue_metrics[:queues].each do |queue| | ||
%tr{ class: queue[:size].zero? ? "table-row--success" : "table-row--warning" } | ||
%td | ||
.tooltip-trigger | ||
= t("status.#{queue[:name]}") | ||
%span.tooltip-indicator | ||
.tooltip.dark | ||
%p= t("status.#{queue[:name]}_description") | ||
%td= t("status.#{queue[:name]}_doc") | ||
%td= queue[:status] | ||
%td= queue[:size] | ||
%td= queue[:latency] | ||
|
||
.container.sidekiq_stats | ||
%br/ | ||
%h3 Sidekiq Stats | ||
.stat-display | ||
- @sidekiq_stats.each do |key, value| | ||
.stat-display__stat.tooltip-trigger | ||
.stat-display__value= value | ||
%small= key.to_s.humanize | ||
|
||
.tooltip.dark | ||
- case key | ||
- when :enqueued_jobs | ||
%p= t("status.enqueued_jobs_doc") | ||
- when :active_jobs | ||
%p= t("status.active_jobs_doc") | ||
- else | ||
%p No additional info available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters