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 = params[:tag] || [] if .present? @definitions = @definitions.tagged_by() end @instances = Kuroko2::JobInstance.working.where(job_definition: @definitions) = @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 version=\"1.0\" encoding=\"UTF-8\" ?>\n <OpenSearchDescription xmlns=\"http://a9.com/-/spec/opensearch/1.1/\">\n <ShortName>Kuroko2</ShortName>\n <Description>Search Kuroko2</Description>\n <InputEncoding>UTF-8</InputEncoding>\n <Url type=\"text/html\" method=\"get\" template=\"\#{job_definitions_url}?q={searchTerms}\"/>\n <Image width=\"16\" height=\"16\" type=\"image/x-icon\">\#{root_url}favicon.ico</Image>\n </OpenSearchDescription>\n XML\nend\n".strip_heredoc |