Class: KafkaCommand::ClustersController
- Inherits:
- 
      ApplicationController
      
        - Object
- ActionController::Base
- ApplicationController
- KafkaCommand::ClustersController
 
- Defined in:
- app/controllers/kafka_command/clusters_controller.rb
Instance Method Summary collapse
- 
  
    
      #index  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    GET /clusters. 
- 
  
    
      #show  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    GET /clusters/:id. 
Instance Method Details
#index ⇒ Object
GET /clusters
| 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # File 'app/controllers/kafka_command/clusters_controller.rb', line 8 def index @clusters = Cluster.all flash[:search] = params[:name] if params[:name].present? @clusters = @clusters.select do |c| regex = /#{params[:name]}/i c.name.match?(regex) end end render_success(@clusters, flash: flash.to_hash) end |