Class: PgBouncerHero::DatabaseController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PgBouncerHero::DatabaseController
- Defined in:
- app/controllers/pg_bouncer_hero/database_controller.rb
Instance Method Summary collapse
- #clients ⇒ Object
- #conf ⇒ Object
- #databases ⇒ Object
- #pools ⇒ Object
- #reload ⇒ Object
- #shutdown ⇒ Object
- #stats ⇒ Object
- #summary ⇒ Object
- #suspend ⇒ Object
Instance Method Details
#clients ⇒ Object
31 32 33 34 35 36 37 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 31 def clients if @database.connection @clients = @database.clients else flash[:error] = "#{@database.name} does not look online." end end |
#conf ⇒ Object
38 39 40 41 42 43 44 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 38 def conf if @database.connection @conf = @database.conf else flash[:error] = "#{@database.name} does not look online." end end |
#databases ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 10 def databases if @database.connection @dbs = @database.databases else flash[:error] = "#{@database.name} does not look online." end end |
#pools ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 24 def pools if @database.connection @pools = @database.pools else flash[:error] = "#{@database.name} does not look online." end end |
#reload ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 45 def reload if @database.connection @database.reload flash[:success] = "#{@database.name} has been reloaded." else flash[:error] = "#{@database.name} does not look online." end end |
#shutdown ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 61 def shutdown if @database.connection @database.shutdown flash[:success] = "#{@database.name} has been shutdown." else flash[:error] = "#{@database.name} does not look online." end end |
#stats ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 17 def stats if @database.connection @stats = @database.stats else flash[:error] = "#{@database.name} does not look online." end end |
#summary ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 3 def summary if @database.connection @dbs = @database.summary else flash[:error] = "#{@database.name} does not look online." end end |
#suspend ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'app/controllers/pg_bouncer_hero/database_controller.rb', line 53 def suspend if @database.connection @database.suspend flash[:success] = "#{@database.name} has been suspended." else flash[:error] = "#{@database.name} does not look online." end end |