Class: McpLogs::CallsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- McpLogs::CallsController
- Includes:
- Pagy::Method
- Defined in:
- app/controllers/mcp_logs/calls_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/mcp_logs/calls_controller.rb', line 5 def index scope = Call.recent .for_method(params[:method]) .for_tool(params[:tool]) .with_status(params[:status]) .for_session(params[:session]) @pagy, @calls = pagy(:offset, scope, limit: McpLogs.page_size) # The filter dropdowns list what has actually been logged, so they can never # offer a method or tool that would return an empty page. @methods = (:rpc_method, params[:method]) @tools = (:tool_name, params[:tool]) end |
#show ⇒ Object
20 21 22 |
# File 'app/controllers/mcp_logs/calls_controller.rb', line 20 def show @call = Call.find(params[:id]) end |