Sha256: e27cc11d3b8edbc27f9504fd2978fe1d5896ecd1f68d2576177b0a08d6b09f72

Contents?: true

Size: 636 Bytes

Versions: 32

Compression:

Stored size: 636 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Web
    module Ui
      module Controllers
        # Routing presentation controller
        class Routing < Base
          # Routing list
          def index
            @routes = Karafka::App.routes

            respond
          end

          # Given route details
          #
          # @param topic_id [String] topic id
          def show(topic_id)
            @topic = Karafka::Routing::Router.find_by(id: topic_id)

            @topic || raise(::Karafka::Web::Errors::Ui::NotFoundError, topic_id)

            respond
          end
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
karafka-web-0.7.10 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.9 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.8 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.7 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.6 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.5 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.4 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.3 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.2 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.1 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.7.0 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.6.3 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.6.2 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.6.1 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.6.0 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.5.2 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.5.1 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.5.0 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.4.1 lib/karafka/web/ui/controllers/routing.rb
karafka-web-0.4.0 lib/karafka/web/ui/controllers/routing.rb