pg_reports 0.2.1 → 0.2.3

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.
data/config/routes.rb CHANGED
@@ -6,6 +6,7 @@ PgReports::Engine.routes.draw do
6
6
  post "enable_pg_stat_statements", to: "dashboard#enable_pg_stat_statements", as: :enable_pg_stat_statements
7
7
  post "reset_statistics", to: "dashboard#reset_statistics", as: :reset_statistics
8
8
  post "explain_analyze", to: "dashboard#explain_analyze", as: :explain_analyze
9
+ post "execute_query", to: "dashboard#execute_query", as: :execute_query
9
10
  post "create_migration", to: "dashboard#create_migration", as: :create_migration
10
11
 
11
12
  get ":category/:report", to: "dashboard#show", as: :report
@@ -27,6 +27,12 @@ module PgReports
27
27
  # Dashboard settings
28
28
  attr_accessor :dashboard_auth # Proc for dashboard authentication
29
29
 
30
+ # Assets / privacy settings
31
+ attr_accessor :load_external_fonts # When true, loads Google Fonts in the dashboard layout
32
+
33
+ # Development/testing settings
34
+ attr_accessor :fake_source_data # Inject fake source data for IDE link testing
35
+
30
36
  def initialize
31
37
  # Telegram
32
38
  @telegram_bot_token = ENV.fetch("PG_REPORTS_TELEGRAM_TOKEN", nil)
@@ -52,6 +58,12 @@ module PgReports
52
58
 
53
59
  # Dashboard
54
60
  @dashboard_auth = nil
61
+
62
+ # Assets / privacy
63
+ @load_external_fonts = ActiveModel::Type::Boolean.new.cast(ENV.fetch("PG_REPORTS_LOAD_EXTERNAL_FONTS", false))
64
+
65
+ # Development/testing
66
+ @fake_source_data = ENV.fetch("PG_REPORTS_FAKE_SOURCE_DATA", "false") == "true"
55
67
  end
56
68
 
57
69
  def connection
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgReports
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_reports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eldar Avatov
@@ -107,6 +107,10 @@ files:
107
107
  - README.md
108
108
  - app/controllers/pg_reports/dashboard_controller.rb
109
109
  - app/views/layouts/pg_reports/application.html.erb
110
+ - app/views/pg_reports/dashboard/_fake_source_data.html.erb
111
+ - app/views/pg_reports/dashboard/_show_modals.html.erb
112
+ - app/views/pg_reports/dashboard/_show_scripts.html.erb
113
+ - app/views/pg_reports/dashboard/_show_styles.html.erb
110
114
  - app/views/pg_reports/dashboard/index.html.erb
111
115
  - app/views/pg_reports/dashboard/show.html.erb
112
116
  - config/locales/en.yml