Class: Myreplicator::HomeController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Myreplicator::HomeController
- Defined in:
- app/controllers/myreplicator/home_controller.rb
Instance Method Summary collapse
Instance Method Details
#errors ⇒ Object
18 19 20 21 22 23 |
# File 'app/controllers/myreplicator/home_controller.rb', line 18 def errors @tab = 'home' @option = 'errors' @exports = Export.where("error is not null").order('source_schema ASC') @logs = Log.where(:state => 'error').order("started_at DESC") end |
#index ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/myreplicator/home_controller.rb', line 6 def index @tab = 'home' @option = 'overview' @exports = Export.order('state DESC') @logs = Log.where(:state => 'running').order("started_at DESC") @now = Time.zone.now respond_to do |format| format.html # index.html.erb format.json { render json: @exports } end end |
#kill ⇒ Object
25 26 27 28 29 |
# File 'app/controllers/myreplicator/home_controller.rb', line 25 def kill @log = Log.find(params[:id]) @log.kill redirect_to :action => 'index' end |