Sha256: 676d7492ca73cc3bde5739121f476f514ebcf3ec605edf5fc4e34e90c868ae69
Contents?: true
Size: 1.92 KB
Versions: 4
Compression:
Stored size: 1.92 KB
Contents
# frozen_string_literal: true module Karafka module Web # Web UI namespace module Ui # Main Roda Web App that servers all the metrics and stats class App < Base # Use the gem views and assets location opts[:root] = Karafka::Web.gem_root.join('lib/karafka/web/ui') instance_exec(&CONTEXT_DETAILS) route do |r| r.root { r.redirect root_path('consumers') } @current_page = params.current_page r.on 'consumers' do r.get String, 'subscriptions' do |_process_id| raise Errors::Ui::ProOnlyError end r.get do @breadcrumbs = false controller = Controllers::Consumers.new(params) render_response controller.index end end %w[ health explorer dlq ].each do |route| r.get route, [String, true], [String, true] do raise Errors::Ui::ProOnlyError end end r.get 'jobs' do controller = Controllers::Jobs.new(params) render_response controller.index end r.on 'routing' do controller = Controllers::Routing.new(params) r.get String do |topic_id| render_response controller.show(topic_id) end r.get do render_response controller.index end end r.get 'cluster' do controller = Controllers::Cluster.new(params) render_response controller.index end r.on 'errors' do controller = Controllers::Errors.new(params) r.get Integer do |offset| render_response controller.show(offset) end r.get do render_response controller.index end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
karafka-web-0.1.3 | lib/karafka/web/ui/app.rb |
karafka-web-0.1.2 | lib/karafka/web/ui/app.rb |
karafka-web-0.1.1 | lib/karafka/web/ui/app.rb |
karafka-web-0.1.0 | lib/karafka/web/ui/app.rb |