Sha256: eb4991dd7d2c7380d3a6aba7a56299952c2e6a907521a6447aac1a952b4a2303

Contents?: true

Size: 969 Bytes

Versions: 17

Compression:

Stored size: 969 Bytes

Contents

class Kuroko2::DashboardController < Kuroko2::ApplicationController
  def index
    @definitions = current_user.job_definitions.includes(:tags, :job_schedules)

    @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

  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
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
kuroko2-0.8.0 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.7.0 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.6.0 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.5.2 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.5.1 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.5.0 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.4.6 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.4.5 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.4.4 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.4.3 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.4.2 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.4.1 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.4.0 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.3.4 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.3.3 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.3.2 app/controllers/kuroko2/dashboard_controller.rb
kuroko2-0.3.1 app/controllers/kuroko2/dashboard_controller.rb