Module: RoundhouseUi
- Defined in:
- lib/roundhouse_ui.rb,
lib/roundhouse_ui/audit.rb,
lib/roundhouse_ui/fetch.rb,
lib/roundhouse_ui/pause.rb,
lib/roundhouse_ui/engine.rb,
lib/roundhouse_ui/metrics.rb,
lib/roundhouse_ui/version.rb,
lib/roundhouse_ui/redaction.rb,
lib/roundhouse_ui/snapshots.rb,
lib/roundhouse_ui/cancellation.rb,
lib/roundhouse_ui/observability.rb,
lib/roundhouse_ui/cancel_middleware.rb,
app/helpers/roundhouse_ui/nav_helper.rb,
app/helpers/roundhouse_ui/application_helper.rb,
app/controllers/roundhouse_ui/busy_controller.rb,
app/controllers/roundhouse_ui/dead_controller.rb,
app/controllers/roundhouse_ui/jobs_controller.rb,
app/controllers/roundhouse_ui/audit_controller.rb,
app/controllers/roundhouse_ui/redis_controller.rb,
app/helpers/roundhouse_ui/observability_helper.rb,
app/controllers/roundhouse_ui/assets_controller.rb,
app/controllers/roundhouse_ui/errors_controller.rb,
app/controllers/roundhouse_ui/queues_controller.rb,
app/controllers/roundhouse_ui/metrics_controller.rb,
app/controllers/roundhouse_ui/retries_controller.rb,
app/controllers/roundhouse_ui/workers_controller.rb,
app/controllers/roundhouse_ui/capsules_controller.rb,
app/controllers/roundhouse_ui/dashboard_controller.rb,
app/controllers/roundhouse_ui/scheduled_controller.rb,
app/controllers/roundhouse_ui/snapshots_controller.rb,
app/controllers/roundhouse_ui/application_controller.rb,
app/controllers/concerns/roundhouse_ui/job_set_browsing.rb
Overview
Brand name is "Roundhouse"; the gem and Ruby namespace are RoundhouseUi
(matching the published gem name roundhouse_ui).
Defined Under Namespace
Modules: ApplicationHelper, Audit, Cancellation, JobSetBrowsing, NavHelper, Observability, ObservabilityHelper, Pause, Redaction, Snapshots Classes: ApplicationController, AssetsController, AuditController, BusyController, CancelMiddleware, CapsulesController, DashboardController, DeadController, Engine, ErrorsController, Fetch, JobsController, Metrics, MetricsController, QueuesController, RedisController, RetriesController, ScheduledController, SnapshotsController, WorkersController
Constant Summary collapse
- VERSION =
"0.2.0"
Class Attribute Summary collapse
-
.actor_resolver ⇒ Object
How the audit log names the person taking an action.
-
.allow_job_editing ⇒ Object
Opt-in: enqueue brand-new jobs and edit/re-enqueue existing ones from the UI.
- .observability ⇒ Object
-
.read_only ⇒ Object
When true, destructive actions (purge, retry, delete, …) are disabled.
-
.redact_args ⇒ Object
Argument keys (substring, case-insensitive) to mask when displaying jobs.
- .snapshot_store ⇒ Object
Class Method Summary collapse
-
.cancelled?(jid) ⇒ Boolean
Cooperative cancellation check for long-running jobs: raise SomeStop if RoundhouseUi.cancelled?(jid).
-
.configure {|_self| ... } ⇒ Object
Configure in an initializer:.
Class Attribute Details
.actor_resolver ⇒ Object
How the audit log names the person taking an action. Auth is the host's job, so give Roundhouse a callable that pulls the actor from the request:
RoundhouseUi.actor_resolver = ->(controller) { controller.current_user&.email }
Defaults to "anonymous".
44 45 46 |
# File 'lib/roundhouse_ui.rb', line 44 def actor_resolver @actor_resolver end |
.allow_job_editing ⇒ Object
Opt-in: enqueue brand-new jobs and edit/re-enqueue existing ones from the UI. Off by default — it's a sharp tool (bad edits create unrunnable jobs).
48 49 50 |
# File 'lib/roundhouse_ui.rb', line 48 def allow_job_editing @allow_job_editing end |
.observability ⇒ Object
34 35 36 |
# File 'lib/roundhouse_ui.rb', line 34 def observability @observability ||= Observability::NullAdapter.new end |
.read_only ⇒ Object
When true, destructive actions (purge, retry, delete, …) are disabled. Mount Roundhouse read-only where operators should only observe.
20 21 22 |
# File 'lib/roundhouse_ui.rb', line 20 def read_only @read_only end |
.redact_args ⇒ Object
Argument keys (substring, case-insensitive) to mask when displaying jobs. e.g. RoundhouseUi.redact_args = %w[password token secret]. Default: none.
52 53 54 |
# File 'lib/roundhouse_ui.rb', line 52 def redact_args @redact_args end |
.snapshot_store ⇒ Object
26 27 28 |
# File 'lib/roundhouse_ui.rb', line 26 def snapshot_store @snapshot_store ||= Snapshots::RedisStore.new end |
Class Method Details
.cancelled?(jid) ⇒ Boolean
Cooperative cancellation check for long-running jobs:
raise SomeStop if RoundhouseUi.cancelled?(jid)
65 66 67 |
# File 'lib/roundhouse_ui.rb', line 65 def cancelled?(jid) Cancellation.cancelled?(jid) end |
.configure {|_self| ... } ⇒ Object
Configure in an initializer:
RoundhouseUi.configure do |c|
c.read_only = !Rails.env.development?
end
59 60 61 |
# File 'lib/roundhouse_ui.rb', line 59 def configure yield self end |