class

Kiq::Web

Inherits HTTP::Handler < Reference < Object

Constants

ASSETS = {"/stylesheets/style.css" => Asset.new("text/css", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/stylesheets/style.css") }}), "/javascripts/application.js" => Asset.new("text/javascript", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/javascripts/application.js") }}), "/javascripts/base-charts.js" => Asset.new("text/javascript", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/javascripts/base-charts.js") }}), "/javascripts/chart.min.js" => Asset.new("text/javascript", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/javascripts/chart.min.js") }}), "/javascripts/chartjs-adapter-date-fns.min.js" => Asset.new("text/javascript", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/javascripts/chartjs-adapter-date-fns.min.js") }}), "/javascripts/chartjs-plugin-annotation.min.js" => Asset.new("text/javascript", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/javascripts/chartjs-plugin-annotation.min.js") }}), "/javascripts/dashboard-charts.js" => Asset.new("text/javascript", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/javascripts/dashboard-charts.js") }}), "/javascripts/dashboard.js" => Asset.new("text/javascript", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/javascripts/dashboard.js") }}), "/javascripts/metrics.js" => Asset.new("text/javascript", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/javascripts/metrics.js") }}), "/images/apple-touch-icon.png" => Asset.new("image/png", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/images/apple-touch-icon.png") }}), "/images/favicon.ico" => Asset.new("image/x-icon", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/images/favicon.ico") }}), "/images/logo.png" => Asset.new("image/png", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/images/logo.png") }}), "/images/status.png" => Asset.new("image/png", {{ read_file("/tmp/tmp.IPPFDn/src/src/web/assets/images/status.png") }})}
CSP_HEADER_TEMPLATE = ["default-src 'self' https: http:", "child-src 'self'", "connect-src 'self' https: http: wss: ws:", "font-src 'none'", "frame-src 'self'", "img-src 'self' https: http: data:", "manifest-src 'self'", "media-src 'self'", "object-src 'none'", "script-src 'self' 'nonce-!placeholder!'", "style-src 'self' 'nonce-!placeholder!'", "worker-src 'self'", "base-uri 'self'"].join("; ")
LOCALE_SOURCES = {"en" => {{ read_file("/tmp/tmp.IPPFDn/src/src/web/locales/en.yml") }}, "ru" => {{ read_file("/tmp/tmp.IPPFDn/src/src/web/locales/ru.yml") }}}
METRICS_PERIODS = {"1h" => 60, "2h" => 120, "4h" => 240, "8h" => 480, "24h" => 1440, "48h" => 2880, "72h" => 4320}

period code => window in minutes (sidekiq METRICS_PERIODS)

REDIS_KEYS = ["redis_version", "uptime_in_days", "connected_clients", "used_memory_human", "used_memory_peak_human"]
TABS = [{"Dashboard", ""}, {"Busy", "busy"}, {"Queues", "queues"}, {"Retries", "retries"}, {"Scheduled", "scheduled"}, {"Dead", "morgue"}, {"Metrics", "metrics"}, {"Profiles", "profiles"}] of ::Tuple(String, String)

Class methods

app_url

Adds the "Back to App" link in the header.

Source
app_url=(app_url : String | Nil)

Adds the "Back to App" link in the header.

Source
available_locales
Source
escape(s : String) : String

CGI.escape equivalent (form encoding: space -> "+").

Source
parse_locale(src : String, lang : String) : Hash(String, String)

Sidekiq's WebHelpers#parse_yaml — a deliberately tiny line-based YAML subset parser for the locale files.

Source
percent_decode(s : String) : String
Source
redis_info
Source
routes
Source
session_secret

Rack::Session::Cookie equivalent: HMAC-signed JSON cookie.

Source
session_secret=(session_secret : String)

Rack::Session::Cookie equivalent: HMAC-signed JSON cookie.

Source
store_name
Source
store_version
Source
strings_for(lang : String) : Hash(String, String)
Source

Instance methods

Nested types