Class: Kuroko2::DashboardController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Kuroko2::DashboardController
- Defined in:
- app/controllers/kuroko2/dashboard_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#index ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/controllers/kuroko2/dashboard_controller.rb', line 2 def index @definitions = current_user.job_definitions @input_tags = params[:tag] || [] if @input_tags.present? @definitions = @definitions.tagged_by(@input_tags) end @instances = Kuroko2::JobInstance.working.where(job_definition: @definitions) @related_tags = @definitions.includes(:tags).map(&:tags).flatten.uniq end |
#osd ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/kuroko2/dashboard_controller.rb', line 15 def osd render xml: <<-XML.strip_heredoc <?xml version="1.0" encoding="UTF-8" ?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>Kuroko2</ShortName> <Description>Search Kuroko2</Description> <InputEncoding>UTF-8</InputEncoding> <Url type="text/html" method="get" template="#{job_definitions_url}?q={searchTerms}"/> <Image width="16" height="16" type="image/x-icon">#{root_url}favicon.ico</Image> </OpenSearchDescription> XML end |