Class: ActiveAgent::Dashboard::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- ActiveAgent::Dashboard::Engine
- Defined in:
- lib/active_agent/dashboard/engine.rb
Overview
Rails Engine for the ActiveAgent Dashboard.
Provides the free self-hosted dashboard: telemetry traces, metrics, and the local trace ingestion API.
Mount in your routes:
mount ActiveAgent::Dashboard::Engine => "/activeagents"
Class Method Summary collapse
-
.dashboard_root ⇒ Object
Alias for consistency with existing code.
-
.find_root(_from) ⇒ Object
The engine lives at lib/active_agent/dashboard rather than the gem root.
- .root ⇒ Object
Class Method Details
.dashboard_root ⇒ Object
Alias for consistency with existing code
36 37 38 |
# File 'lib/active_agent/dashboard/engine.rb', line 36 def self.dashboard_root root end |
.find_root(_from) ⇒ Object
The engine lives at lib/active_agent/dashboard rather than the gem
root. Rails derives an engine's load paths (app/models,
app/controllers, app/jobs, app/views, config/routes.rb) from
find_root when config is first materialized — which
isolate_namespace below triggers via routes — so this override
must be defined before anything touches config. Overriding only
root leaves the engine's classes off host applications' autoload
paths entirely.
22 23 24 |
# File 'lib/active_agent/dashboard/engine.rb', line 22 def self.find_root(_from) root end |
.root ⇒ Object
26 27 28 |
# File 'lib/active_agent/dashboard/engine.rb', line 26 def self.root @root ||= Pathname.new(File.("..", __FILE__)) end |