module Sinatra::UC3HomeRoutes
client specific routes
Public Class Methods
Source
# File app/lib/routes/home.rb, line 39 def self.registered(app) app.get '/test/routes' do content_type :json UC3::TestClient.client.test_paths.to_json end app.get '/test/routes/links' do table = AdminUI::FilterTable.new( columns: [ AdminUI::Column.new(:link, header: 'Link') ] ) UC3::TestClient.client.test_paths.each do |route| table.add_row(AdminUI::Row.make_row(table.columns, { link: { value: route, href: route } })) end adminui_show_table( AdminUI::Context.new(request.path), table ) end app.get '/test/consistency' do content_type :json UC3::TestClient.client.consistency_checks.to_json end app.get '/test/consistency/links' do table = AdminUI::FilterTable.new( columns: [ AdminUI::Column.new(:link, header: 'Link') ] ) UC3::TestClient.client.consistency_checks.each do |route| table.add_row(AdminUI::Row.make_row(table.columns, { link: { value: route, href: route } })) end adminui_show_table( AdminUI::Context.new(request.path), table ) end app.get '/robots.txt' do content_type :text "User-agent: *\nDisallow: /" end app.get '/ops/cloudwatch' do redirect ENV.fetch('CLOUDWATCH_URL', '/') end app.get '/ops/opensearch' do redirect ENV.fetch('OPENSEARCH_URL', '/') end app.get '/markdown/*' do |md| adminui_show_markdown( AdminUI::Context.new(request.path), "app/markdown/mrt/#{md}" ) end app.get '/index.html' do redirect '/' end end