Class: Dbwatcher::Configuration
- Inherits:
-
Object
- Object
- Dbwatcher::Configuration
- Defined in:
- lib/dbwatcher/configuration.rb
Overview
Configuration class for DBWatcher
Simplified configuration with logical groupings and sensible defaults
Instance Attribute Summary collapse
-
#auto_clean_days ⇒ Object
Session management - how data is stored and cleaned.
-
#debug_mode ⇒ Object
System info - debugging and monitoring.
-
#diagram_attribute_types ⇒ Object
Advanced diagram options - available but not commonly needed.
-
#diagram_max_attributes ⇒ Object
Advanced diagram options - available but not commonly needed.
-
#diagram_relationship_labels ⇒ Object
Advanced diagram options - available but not commonly needed.
-
#diagram_show_attributes ⇒ Object
Advanced diagram options - available but not commonly needed.
-
#diagram_show_cardinality ⇒ Object
Advanced diagram options - available but not commonly needed.
-
#diagram_show_methods ⇒ Object
Advanced diagram options - available but not commonly needed.
-
#enabled ⇒ Object
Core settings - what users need most.
-
#max_sessions ⇒ Object
Session management - how data is stored and cleaned.
-
#storage_path ⇒ Object
Core settings - what users need most.
-
#system_info ⇒ Object
System info - debugging and monitoring.
-
#track_queries ⇒ Object
Query tracking - performance monitoring.
Instance Method Summary collapse
- #collect_sensitive_env_vars? ⇒ Boolean
- #diagram_direction ⇒ Object
-
#initialize ⇒ Configuration
constructor
Initialize with default values.
-
#max_query_logs_per_day ⇒ Object
Fixed defaults for complex options that are still used in codebase but not configurable.
-
#slow_query_threshold ⇒ Object
Fixed defaults for options that are still used in codebase but not configurable.
- #system_info_cache_duration ⇒ Object
- #system_info_include_performance_metrics? ⇒ Boolean
- #system_info_refresh_interval ⇒ Object
-
#valid? ⇒ Boolean
Validate configuration.
Constructor Details
#initialize ⇒ Configuration
Initialize with default values
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/dbwatcher/configuration.rb', line 26 def initialize # Core settings @enabled = true @storage_path = default_storage_path # Session management @max_sessions = 50 @auto_clean_days = 7 # Query tracking @track_queries = false # System info @system_info = true @debug_mode = false # Advanced diagram options - sensible defaults @diagram_show_methods = false @diagram_max_attributes = 10 @diagram_attribute_types = true @diagram_relationship_labels = true @diagram_show_attributes = true @diagram_show_cardinality = true end |
Instance Attribute Details
#auto_clean_days ⇒ Object
Session management - how data is stored and cleaned
12 13 14 |
# File 'lib/dbwatcher/configuration.rb', line 12 def auto_clean_days @auto_clean_days end |
#debug_mode ⇒ Object
System info - debugging and monitoring
18 19 20 |
# File 'lib/dbwatcher/configuration.rb', line 18 def debug_mode @debug_mode end |
#diagram_attribute_types ⇒ Object
Advanced diagram options - available but not commonly needed
21 22 23 |
# File 'lib/dbwatcher/configuration.rb', line 21 def diagram_attribute_types @diagram_attribute_types end |
#diagram_max_attributes ⇒ Object
Advanced diagram options - available but not commonly needed
21 22 23 |
# File 'lib/dbwatcher/configuration.rb', line 21 def diagram_max_attributes @diagram_max_attributes end |
#diagram_relationship_labels ⇒ Object
Advanced diagram options - available but not commonly needed
21 22 23 |
# File 'lib/dbwatcher/configuration.rb', line 21 def diagram_relationship_labels @diagram_relationship_labels end |
#diagram_show_attributes ⇒ Object
Advanced diagram options - available but not commonly needed
21 22 23 |
# File 'lib/dbwatcher/configuration.rb', line 21 def diagram_show_attributes @diagram_show_attributes end |
#diagram_show_cardinality ⇒ Object
Advanced diagram options - available but not commonly needed
21 22 23 |
# File 'lib/dbwatcher/configuration.rb', line 21 def diagram_show_cardinality @diagram_show_cardinality end |
#diagram_show_methods ⇒ Object
Advanced diagram options - available but not commonly needed
21 22 23 |
# File 'lib/dbwatcher/configuration.rb', line 21 def diagram_show_methods @diagram_show_methods end |
#enabled ⇒ Object
Core settings - what users need most
9 10 11 |
# File 'lib/dbwatcher/configuration.rb', line 9 def enabled @enabled end |
#max_sessions ⇒ Object
Session management - how data is stored and cleaned
12 13 14 |
# File 'lib/dbwatcher/configuration.rb', line 12 def max_sessions @max_sessions end |
#storage_path ⇒ Object
Core settings - what users need most
9 10 11 |
# File 'lib/dbwatcher/configuration.rb', line 9 def storage_path @storage_path end |
#system_info ⇒ Object
System info - debugging and monitoring
18 19 20 |
# File 'lib/dbwatcher/configuration.rb', line 18 def system_info @system_info end |
#track_queries ⇒ Object
Query tracking - performance monitoring
15 16 17 |
# File 'lib/dbwatcher/configuration.rb', line 15 def track_queries @track_queries end |
Instance Method Details
#collect_sensitive_env_vars? ⇒ Boolean
65 66 67 |
# File 'lib/dbwatcher/configuration.rb', line 65 def collect_sensitive_env_vars? false end |
#diagram_direction ⇒ Object
56 57 58 |
# File 'lib/dbwatcher/configuration.rb', line 56 def diagram_direction "LR" # Fixed default value end |
#max_query_logs_per_day ⇒ Object
Fixed defaults for complex options that are still used in codebase but not configurable
61 |
# File 'lib/dbwatcher/configuration.rb', line 61 def max_query_logs_per_day = 1000 |
#slow_query_threshold ⇒ Object
Fixed defaults for options that are still used in codebase but not configurable
52 53 54 |
# File 'lib/dbwatcher/configuration.rb', line 52 def slow_query_threshold 200 # Fixed default value end |
#system_info_cache_duration ⇒ Object
63 |
# File 'lib/dbwatcher/configuration.rb', line 63 def system_info_cache_duration = 60 * 60 |
#system_info_include_performance_metrics? ⇒ Boolean
69 70 71 |
# File 'lib/dbwatcher/configuration.rb', line 69 def system_info_include_performance_metrics? true end |
#system_info_refresh_interval ⇒ Object
62 |
# File 'lib/dbwatcher/configuration.rb', line 62 def system_info_refresh_interval = 5 * 60 |
#valid? ⇒ Boolean
Validate configuration
74 75 76 77 78 79 |
# File 'lib/dbwatcher/configuration.rb', line 74 def valid? validate_storage_path validate_max_sessions validate_auto_clean_days true end |