dbviewer 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af6ce0a51c2927508c4cba3a86312939e0b563fc05f99b33652d943193b68dc0
|
4
|
+
data.tar.gz: c537277a749f6deb944e056fe54bb6655e6def561d2e3107f4c96b89869db3ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baae9d87c0530de4645de00a5d3736a0afde8296823a0ebcc5eb8e61f2f112f5223456540298612e4d572495bb949bf31f2fff1ee73ab5737ec3ab49e5adcbdd
|
7
|
+
data.tar.gz: b5096bde4016f41244a011c4debed1c8e68a405df9f6c4dc5c787dc7e7c26c1c369a5c6b46c6e3d7452e911aed0bbdb9b55564549ecdc624bf9a248419efe60c
|
@@ -2,7 +2,6 @@ module Dbviewer
|
|
2
2
|
class ApplicationController < ActionController::Base
|
3
3
|
include Dbviewer::DatabaseOperations
|
4
4
|
include Dbviewer::DisabledStateValidation
|
5
|
-
include Dbviewer::DatabaseConnectionValidation
|
6
5
|
|
7
6
|
before_action :authenticate_with_basic_auth
|
8
7
|
before_action :set_tables
|
data/lib/dbviewer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbviewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wailan Tirajoh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -77,7 +77,6 @@ files:
|
|
77
77
|
- app/assets/stylesheets/dbviewer/table.css
|
78
78
|
- app/controllers/concerns/dbviewer/connection_management.rb
|
79
79
|
- app/controllers/concerns/dbviewer/data_export.rb
|
80
|
-
- app/controllers/concerns/dbviewer/database_connection_validation.rb
|
81
80
|
- app/controllers/concerns/dbviewer/database_information.rb
|
82
81
|
- app/controllers/concerns/dbviewer/database_operations.rb
|
83
82
|
- app/controllers/concerns/dbviewer/datatable_support.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module Dbviewer
|
2
|
-
module DatabaseConnectionValidation
|
3
|
-
extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
included do
|
6
|
-
before_action :validate_database_connection
|
7
|
-
end
|
8
|
-
|
9
|
-
private
|
10
|
-
|
11
|
-
# Validate database connections on first access to DBViewer
|
12
|
-
def validate_database_connection
|
13
|
-
return if @database_validated
|
14
|
-
|
15
|
-
begin
|
16
|
-
connection_errors = Dbviewer.validate_connections!
|
17
|
-
if connection_errors.any?
|
18
|
-
Rails.logger.warn "DBViewer: Some database connections failed: #{connection_errors.map { |e| e[:error] }.join(', ')}"
|
19
|
-
end
|
20
|
-
@database_validated = true
|
21
|
-
rescue => e
|
22
|
-
render json: { error: "Database connection failed: #{e.message}" }, status: :service_unavailable and return
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|