Module: SolidStackWeb

Defined in:
lib/solid_stack_web.rb,
lib/solid_stack_web/engine.rb,
lib/solid_stack_web/version.rb,
app/models/solid_stack_web/job.rb,
app/models/solid_stack_web/audit_event.rb,
app/models/solid_stack_web/cable_stats.rb,
app/models/solid_stack_web/cache_stats.rb,
app/models/solid_stack_web/queue_stats.rb,
app/models/solid_stack_web/alert_webhook.rb,
app/models/solid_stack_web/cable_timeline.rb,
app/models/solid_stack_web/cache_timeline.rb,
app/models/solid_stack_web/cache_size_stats.rb,
app/helpers/solid_stack_web/application_helper.rb,
app/controllers/solid_stack_web/jobs_controller.rb,
app/models/solid_stack_web/failed_job_sparkline.rb,
app/models/solid_stack_web/throughput_sparkline.rb,
app/controllers/solid_stack_web/audit_controller.rb,
app/controllers/solid_stack_web/cable_controller.rb,
app/controllers/solid_stack_web/cache_controller.rb,
app/controllers/solid_stack_web/stats_controller.rb,
app/models/solid_stack_web/queue_depth_sparkline.rb,
app/controllers/solid_stack_web/queues_controller.rb,
app/models/solid_stack_web/error_frequency_report.rb,
app/controllers/solid_stack_web/history_controller.rb,
app/controllers/solid_stack_web/metrics_controller.rb,
app/controllers/solid_stack_web/dashboard_controller.rb,
app/controllers/solid_stack_web/processes_controller.rb,
app/controllers/solid_stack_web/application_controller.rb,
app/controllers/solid_stack_web/failed_jobs_controller.rb,
app/controllers/solid_stack_web/cable/purges_controller.rb,
app/controllers/solid_stack_web/cache/flushes_controller.rb,
app/controllers/solid_stack_web/cache_entries_controller.rb,
app/controllers/solid_stack_web/queues/pauses_controller.rb,
lib/generators/solid_stack_web/install/install_generator.rb,
app/controllers/solid_stack_web/cable_messages_controller.rb,
app/controllers/solid_stack_web/scheduled_jobs_controller.rb,
app/controllers/solid_stack_web/jobs/selections_controller.rb,
app/controllers/solid_stack_web/recurring_tasks_controller.rb,
lib/generators/solid_stack_web/install/migrations_generator.rb,
app/controllers/solid_stack_web/failed_jobs/errors_controller.rb,
app/controllers/solid_stack_web/cable/channel_purges_controller.rb,
app/controllers/solid_stack_web/recurring_tasks/runs_controller.rb,
app/controllers/solid_stack_web/failed_jobs/arguments_controller.rb,
app/controllers/solid_stack_web/failed_jobs/selections_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, FailedJobs, Generators, Jobs Classes: AlertWebhook, ApplicationController, AuditController, AuditEvent, CableController, CableMessagesController, CableStats, CableTimeline, CacheController, CacheEntriesController, CacheSizeStats, CacheStats, CacheTimeline, DashboardController, Engine, ErrorFrequencyReport, FailedJobSparkline, FailedJobsController, HistoryController, Job, JobsController, MetricsController, ProcessesController, QueueDepthSparkline, QueueStats, QueuesController, RecurringTasksController, ScheduledJobsController, StatsController, ThroughputSparkline

Constant Summary collapse

VERSION =
"1.4.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.alert_failure_thresholdObject



33
34
35
# File 'lib/solid_stack_web.rb', line 33

def alert_failure_threshold
  @alert_failure_threshold
end

.alert_queue_thresholdsObject



37
38
39
# File 'lib/solid_stack_web.rb', line 37

def alert_queue_thresholds
  @alert_queue_thresholds || {}
end

.alert_slow_job_count_thresholdObject



41
42
43
# File 'lib/solid_stack_web.rb', line 41

def alert_slow_job_count_threshold
  @alert_slow_job_count_threshold
end

.alert_stale_process_thresholdObject



45
46
47
# File 'lib/solid_stack_web.rb', line 45

def alert_stale_process_threshold
  @alert_stale_process_threshold
end

.alert_webhook_cooldownObject



29
30
31
# File 'lib/solid_stack_web.rb', line 29

def alert_webhook_cooldown
  @alert_webhook_cooldown || 3600
end

.alert_webhook_urlObject



25
26
27
# File 'lib/solid_stack_web.rb', line 25

def alert_webhook_url
  @alert_webhook_url
end

.allow_value_previewObject



61
62
63
# File 'lib/solid_stack_web.rb', line 61

def allow_value_preview
  @allow_value_preview || false
end

.connects_toObject



17
18
19
# File 'lib/solid_stack_web.rb', line 17

def connects_to
  @connects_to
end

.dashboard_refresh_intervalObject



49
50
51
# File 'lib/solid_stack_web.rb', line 49

def dashboard_refresh_interval
  @dashboard_refresh_interval || 5_000
end

.default_refresh_intervalObject



53
54
55
# File 'lib/solid_stack_web.rb', line 53

def default_refresh_interval
  @default_refresh_interval || 10_000
end

.page_sizeObject



13
14
15
# File 'lib/solid_stack_web.rb', line 13

def page_size
  @page_size || 25
end

.search_results_limitObject



57
58
59
# File 'lib/solid_stack_web.rb', line 57

def search_results_limit
  @search_results_limit || 25
end

.slow_job_thresholdObject



21
22
23
# File 'lib/solid_stack_web.rb', line 21

def slow_job_threshold
  @slow_job_threshold
end

Class Method Details

.authenticate(&block) ⇒ Object



82
83
84
85
# File 'lib/solid_stack_web.rb', line 82

def authenticate(&block)
  @authenticate = block if block_given?
  @authenticate
end

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (SolidStackWeb)

    the object that the method was called on



78
79
80
# File 'lib/solid_stack_web.rb', line 78

def configure
  yield self
end

.current_actor(&block) ⇒ Object



87
88
89
90
# File 'lib/solid_stack_web.rb', line 87

def current_actor(&block)
  @current_actor = block if block_given?
  @current_actor
end

.deprecatorObject



92
93
94
# File 'lib/solid_stack_web.rb', line 92

def deprecator
  @deprecator ||= ActiveSupport::Deprecation.new("1.0", "SolidStackWeb")
end

.mount_pathObject

Returns the path at which the engine is mounted in the host application, derived automatically from the host’s routes. Host apps can use this to build links to the dashboard without hardcoding the mount path.

link_to "Dashboard", SolidStackWeb.mount_path


71
72
73
74
75
76
# File 'lib/solid_stack_web.rb', line 71

def mount_path
  route = Rails.application.routes.routes.find do |r|
    r.app.respond_to?(:app) && r.app.app == SolidStackWeb::Engine
  end
  route&.path&.spec&.to_s&.sub(%r{\(.*\)\z}, "") || "/"
end