fix baffle_host
This commit is contained in:
@@ -13,7 +13,8 @@ class Dsn < ApplicationRecord
|
||||
def full_dsn_url
|
||||
# Generate a complete DSN URL like Sentry does
|
||||
# Format: https://{key}@{domain}/api/events
|
||||
domain = Rails.application.config.action_mailer.default_url_options[:host] ||
|
||||
domain = ENV['BAFFLE_HOST'] ||
|
||||
Rails.application.config.action_mailer.default_url_options[:host] ||
|
||||
ENV['RAILS_HOST'] ||
|
||||
'localhost:3000'
|
||||
|
||||
@@ -23,7 +24,8 @@ class Dsn < ApplicationRecord
|
||||
|
||||
def api_endpoint_url
|
||||
# Just the API endpoint URL (without key)
|
||||
domain = Rails.application.config.action_mailer.default_url_options[:host] ||
|
||||
domain = ENV['BAFFLE_HOST'] ||
|
||||
Rails.application.config.action_mailer.default_url_options[:host] ||
|
||||
ENV['RAILS_HOST'] ||
|
||||
'localhost:3000'
|
||||
|
||||
|
||||
@@ -111,11 +111,13 @@
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">Actions</h3>
|
||||
<div class="mt-5 space-x-3">
|
||||
<% if @dsn.enabled? && policy(@dsn).disable? %>
|
||||
<%= link_to "Disable DSN", disable_dsn_path(@dsn), method: :post,
|
||||
data: { confirm: "Are you sure you want to disable this DSN? Agents will no longer be able to authenticate with this key." },
|
||||
<%= button_to "Disable DSN", disable_dsn_path(@dsn),
|
||||
method: :post,
|
||||
data: { turbo_confirm: "Are you sure you want to disable this DSN? Agents will no longer be able to authenticate with this key." },
|
||||
class: "inline-flex items-center px-4 py-2 border border-red-300 rounded-md shadow-sm text-sm font-medium text-red-700 bg-white hover:bg-red-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
|
||||
<% elsif !@dsn.enabled? && policy(@dsn).enable? %>
|
||||
<%= link_to "Enable DSN", enable_dsn_path(@dsn), method: :post,
|
||||
<%= button_to "Enable DSN", enable_dsn_path(@dsn),
|
||||
method: :post,
|
||||
class: "inline-flex items-center px-4 py-2 border border-green-300 rounded-md shadow-sm text-sm font-medium text-green-700 bg-white hover:bg-green-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
2
test/fixtures/ipv4_ranges.yml
vendored
2
test/fixtures/ipv4_ranges.yml
vendored
@@ -1,2 +0,0 @@
|
||||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
# Empty fixtures - tests create their own data
|
||||
2
test/fixtures/ipv6_ranges.yml
vendored
2
test/fixtures/ipv6_ranges.yml
vendored
@@ -1,2 +0,0 @@
|
||||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
# Empty fixtures - tests create their own data
|
||||
1
test/fixtures/rule_sets.yml
vendored
1
test/fixtures/rule_sets.yml
vendored
@@ -1 +0,0 @@
|
||||
# Empty fixtures
|
||||
Reference in New Issue
Block a user