Class: EnhanceSwarm::WebUI
- Inherits:
-
Object
- Object
- EnhanceSwarm::WebUI
- Defined in:
- lib/enhance_swarm/web_ui.rb
Instance Attribute Summary collapse
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Instance Method Summary collapse
-
#initialize(port: 4567, host: 'localhost') ⇒ WebUI
constructor
A new instance of WebUI.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(port: 4567, host: 'localhost') ⇒ WebUI
14 15 16 17 18 19 20 |
# File 'lib/enhance_swarm/web_ui.rb', line 14 def initialize(port: 4567, host: 'localhost') @port = port @host = host @orchestrator = Orchestrator.new @process_monitor = ProcessMonitor.new setup_server end |
Instance Attribute Details
#port ⇒ Object (readonly)
Returns the value of attribute port.
12 13 14 |
# File 'lib/enhance_swarm/web_ui.rb', line 12 def port @port end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
12 13 14 |
# File 'lib/enhance_swarm/web_ui.rb', line 12 def server @server end |
Instance Method Details
#start ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/enhance_swarm/web_ui.rb', line 22 def start Logger.info("Starting EnhanceSwarm Web UI on http://#{@host}:#{@port}") puts "š EnhanceSwarm Web UI starting on http://#{@host}:#{@port}".colorize(:blue) puts " š Features: Task Management, Kanban Board, Agent Monitoring" puts " š Open your browser to access the interface" puts " ā¹ļø Press Ctrl+C to stop the server" trap 'INT' do puts "\nš Shutting down EnhanceSwarm Web UI..." @server.shutdown end @server.start end |
#stop ⇒ Object
37 38 39 |
# File 'lib/enhance_swarm/web_ui.rb', line 37 def stop @server&.shutdown end |