Revision bb3916d6
Added by Ohad Levy over 10 years ago
app/controllers/tasks_controller.rb | ||
---|---|---|
class TasksController < ApplicationController
|
||
skip_before_filter :session_expiry, :update_activity_time, :set_taxonomy, :only => [:show]
|
||
before_filter :ajax_request
|
||
|
||
def show
|
||
id = params[:id]
|
||
queue = Rails.cache.fetch(id)
|
||
respond_to do |format|
|
||
format.html {
|
||
@tasks = queue.nil? ? [] : JSON(queue)
|
||
return render :partial => 'list' if ajax?
|
||
}
|
||
format.json { render :json => queue }
|
||
end
|
||
id = params[:id]
|
||
queue = Rails.cache.fetch(id)
|
||
@tasks = queue.nil? ? [] : JSON(queue)
|
||
render :partial => 'list'
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
fixes #3566 - exposes orchestration tasks via the API at /api/orchestration/id/tasks