dbwatcher 1.1.4 → 1.1.6
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 +4 -4
- data/README.md +80 -26
- data/app/assets/config/dbwatcher_manifest.js +9 -0
- data/app/assets/images/dbwatcher/README.md +24 -0
- data/app/assets/images/dbwatcher/apple-touch-icon.png +0 -0
- data/app/assets/images/dbwatcher/dbwatcher-tranparent_512x512.png +0 -0
- data/app/assets/images/dbwatcher/favicon-96x96.png +0 -0
- data/app/assets/images/dbwatcher/favicon.ico +0 -0
- data/app/assets/images/dbwatcher/site.webmanifest +21 -0
- data/app/assets/images/dbwatcher/unused-assets.zip +0 -0
- data/app/assets/images/dbwatcher/web-app-manifest-192x192.png +0 -0
- data/app/assets/images/dbwatcher/web-app-manifest-512x512.png +0 -0
- data/app/assets/stylesheets/dbwatcher/application.css +38 -4
- data/app/assets/stylesheets/dbwatcher/components/_tabulator.scss +57 -13
- data/app/controllers/dbwatcher/api/v1/system_info_controller.rb +1 -1
- data/app/controllers/dbwatcher/dashboard_controller.rb +1 -1
- data/app/views/dbwatcher/dashboard/_overview.html.erb +8 -7
- data/app/views/dbwatcher/sessions/index.html.erb +42 -59
- data/app/views/layouts/dbwatcher/application.html.erb +22 -6
- data/lib/dbwatcher/configuration.rb +49 -83
- data/lib/dbwatcher/logging.rb +2 -2
- data/lib/dbwatcher/services/diagram_analyzers/concerns/activerecord_introspection.rb +60 -0
- data/lib/dbwatcher/services/diagram_analyzers/concerns/association_scope_filtering.rb +60 -0
- data/lib/dbwatcher/services/diagram_analyzers/model_analysis/association_extractor.rb +224 -0
- data/lib/dbwatcher/services/diagram_analyzers/model_analysis/dataset_builder.rb +226 -0
- data/lib/dbwatcher/services/diagram_analyzers/model_analysis/model_discovery.rb +161 -0
- data/lib/dbwatcher/services/diagram_analyzers/model_association_analyzer.rb +27 -514
- data/lib/dbwatcher/services/diagram_data/attribute.rb +22 -83
- data/lib/dbwatcher/services/diagram_data/base.rb +129 -0
- data/lib/dbwatcher/services/diagram_data/entity.rb +23 -72
- data/lib/dbwatcher/services/diagram_data/relationship.rb +15 -66
- data/lib/dbwatcher/services/mermaid_syntax/erd_builder.rb +2 -2
- data/lib/dbwatcher/services/mermaid_syntax/sanitizer.rb +4 -14
- data/lib/dbwatcher/services/system_info/runtime_info_collector.rb +7 -7
- data/lib/dbwatcher/services/system_info/system_info_collector.rb +3 -3
- data/lib/dbwatcher/services/timeline_data_service/entry_builder.rb +23 -1
- data/lib/dbwatcher/storage/session_storage.rb +2 -2
- data/lib/dbwatcher/storage.rb +1 -1
- data/lib/dbwatcher/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cf4c24fcda38648ede006957633b758593dc107cf214bb3cf3d264864d618fd
|
4
|
+
data.tar.gz: 71fc6512b3b0950304c9439e57c61e653337338c1d34d73c74bb1c95d5efddcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0b90b3d7471286e9cbf55ff1955b2464a1cb7909412dfbfcdcee9d7db5f67d70bb82ef971c1d5b0dfa25f442ce140c93d8827a3b39cef08547b24f875f6750b
|
7
|
+
data.tar.gz: b0afd7877856e356911163220e0a43153c1fa70607939e8b78266b23817a94ec4a14a3c5052f62dcbb164f83438a4c397b3639dd2cd388f20e272a824217085c
|
data/README.md
CHANGED
@@ -1,14 +1,32 @@
|
|
1
|
-
|
1
|
+
<div align="center">
|
2
|
+
<img src="https://raw.githubusercontent.com/patrick204nqh/dbwatcher/master/app/assets/images/dbwatcher/dbwatcher_512x512.png" alt="dbwatcher Logo" width="120" height="120">
|
3
|
+
|
4
|
+
<h1 align="center">dbwatcher</h1>
|
5
|
+
|
6
|
+
<p align="center">
|
7
|
+
<em>🔍 Track, visualize, and debug database operations in your Rails applications</em>
|
8
|
+
</p>
|
9
|
+
</div>
|
2
10
|
|
3
11
|
[](https://github.com/patrick204nqh/dbwatcher/actions/workflows/ci.yml)
|
4
12
|
[](https://github.com/patrick204nqh/dbwatcher/actions/workflows/release.yml)
|
5
13
|
[](https://badge.fury.io/rb/dbwatcher)
|
14
|
+
[](https://rubygems.org/gems/dbwatcher)
|
15
|
+
[](https://opensource.org/licenses/MIT)
|
6
16
|
[](https://qlty.sh/gh/patrick204nqh/projects/dbwatcher)
|
7
17
|
[](https://qlty.sh/gh/patrick204nqh/projects/dbwatcher)
|
8
|
-
[](https://opensource.org/licenses/MIT)
|
9
18
|
|
10
19
|
A Rails gem that tracks and visualizes database operations in your application. Built for developers who need to understand complex data flows and debug database interactions.
|
11
20
|
|
21
|
+
## Why dbwatcher?
|
22
|
+
|
23
|
+
When developing Rails applications, understanding what database operations occur during code execution can be challenging. **dbwatcher** provides a simple way to:
|
24
|
+
|
25
|
+
- Track database changes within specific code blocks
|
26
|
+
- Monitor SQL operations during HTTP requests
|
27
|
+
- Visualize database relationships and model associations
|
28
|
+
- Debug complex data flows with an intuitive web interface
|
29
|
+
|
12
30
|
## Key Features
|
13
31
|
|
14
32
|
- **Database Operation Tracking** - Capture SQL operations (INSERT, UPDATE, DELETE)
|
@@ -22,11 +40,11 @@ A Rails gem that tracks and visualizes database operations in your application.
|
|
22
40
|
|
23
41
|
### Dashboard Interface
|
24
42
|
|
25
|
-

|
26
44
|
|
27
45
|
### Session View
|
28
46
|
|
29
|
-

|
30
48
|
|
31
49
|
[View more screenshots in here →](docs/screenshots.md)
|
32
50
|
|
@@ -75,17 +93,47 @@ Visit `/dbwatcher` in your browser to explore tracked operations.
|
|
75
93
|
|
76
94
|
## Configuration
|
77
95
|
|
78
|
-
|
96
|
+
**dbwatcher** works out of the box with zero configuration - simply install the gem and visit `/dbwatcher` in your Rails application.
|
97
|
+
|
98
|
+
### Configuration Options
|
99
|
+
|
100
|
+
<details>
|
101
|
+
<summary>View All Configuration Settings</summary>
|
102
|
+
|
103
|
+
| Setting | Type | Default | Description |
|
104
|
+
| ----------------------------- | ------- | ----------------- | --------------------------------------------------- |
|
105
|
+
| **Core Settings** |
|
106
|
+
| `enabled` | Boolean | `true` | Enable or disable DBWatcher |
|
107
|
+
| `storage_path` | String | `"tmp/dbwatcher"` | Directory for session data storage |
|
108
|
+
| **Session Management** |
|
109
|
+
| `max_sessions` | Integer | `50` | Maximum number of sessions to retain |
|
110
|
+
| `auto_clean_days` | Integer | `7` | Automatically delete sessions older than N days |
|
111
|
+
| **Query Tracking** |
|
112
|
+
| `track_queries` | Boolean | `false` | Enable full SQL query tracking (resource intensive) |
|
113
|
+
| **System Information** |
|
114
|
+
| `system_info` | Boolean | `true` | Collect system information for debugging |
|
115
|
+
| `debug_mode` | Boolean | `false` | Enable detailed debug logging |
|
116
|
+
| **Database Diagram Options** |
|
117
|
+
| `diagram_show_attributes` | Boolean | `true` | Display model attributes in diagrams |
|
118
|
+
| `diagram_show_cardinality` | Boolean | `true` | Show relationship cardinality indicators |
|
119
|
+
| `diagram_show_methods` | Boolean | `false` | Include model methods in diagrams |
|
120
|
+
| `diagram_max_attributes` | Integer | `10` | Maximum attributes displayed per model |
|
121
|
+
| `diagram_attribute_types` | Boolean | `true` | Show data types for attributes |
|
122
|
+
| `diagram_relationship_labels` | Boolean | `true` | Display labels on relationship lines |
|
123
|
+
|
124
|
+
### Configuration Example
|
79
125
|
|
80
126
|
```ruby
|
81
|
-
|
82
|
-
|
83
|
-
config.enabled =
|
84
|
-
config.max_sessions = 100
|
85
|
-
config.
|
127
|
+
# config/environments/development.rb
|
128
|
+
Rails.application.configure do
|
129
|
+
config.dbwatcher.enabled = true
|
130
|
+
config.dbwatcher.max_sessions = 100
|
131
|
+
config.dbwatcher.track_queries = true
|
86
132
|
end
|
87
133
|
```
|
88
134
|
|
135
|
+
</details>
|
136
|
+
|
89
137
|
## Advanced Features
|
90
138
|
|
91
139
|
### Custom Metadata
|
@@ -101,17 +149,22 @@ Dbwatcher.track(
|
|
101
149
|
end
|
102
150
|
```
|
103
151
|
|
104
|
-
###
|
152
|
+
### Access Current Session
|
105
153
|
|
106
|
-
|
154
|
+
Access the current tracking session:
|
107
155
|
|
108
156
|
```ruby
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
157
|
+
session = Dbwatcher.current_session
|
158
|
+
puts "Session ID: #{session.id}"
|
159
|
+
puts "Total changes: #{session.changes.count}"
|
160
|
+
```
|
161
|
+
|
162
|
+
### Clear All Data
|
163
|
+
|
164
|
+
Remove all stored sessions and queries:
|
165
|
+
|
166
|
+
```ruby
|
167
|
+
Dbwatcher.clear_all
|
115
168
|
```
|
116
169
|
|
117
170
|
## Development
|
@@ -134,14 +187,6 @@ COVERAGE=true bundle exec rake test
|
|
134
187
|
|
135
188
|
Coverage reports will be generated in the `coverage/` directory.
|
136
189
|
|
137
|
-
### CI Coverage Setup
|
138
|
-
|
139
|
-
To enable coverage uploads to Qlty in CI:
|
140
|
-
|
141
|
-
1. Create an account at [Qlty.sh](https://qlty.sh)
|
142
|
-
2. Create a new project and get your coverage token
|
143
|
-
3. Add the token as a GitHub repository secret named `QLTY_COVERAGE_TOKEN`
|
144
|
-
|
145
190
|
### Local Development
|
146
191
|
|
147
192
|
```bash
|
@@ -157,6 +202,8 @@ bundle exec rubocop # Linting
|
|
157
202
|
bundle exec brakeman # Security analysis
|
158
203
|
```
|
159
204
|
|
205
|
+
[Changelog →](CHANGELOG.md)
|
206
|
+
|
160
207
|
## Contributing
|
161
208
|
|
162
209
|
1. Fork the repository
|
@@ -170,6 +217,13 @@ bundle exec brakeman # Security analysis
|
|
170
217
|
|
171
218
|
[Contributing guidelines →](CONTRIBUTING.md)
|
172
219
|
|
220
|
+
## Resources
|
221
|
+
|
222
|
+
- [Documentation](https://rubydoc.info/gems/dbwatcher)
|
223
|
+
- [Changelog](CHANGELOG.md)
|
224
|
+
- [Report Bug](https://github.com/patrick204nqh/dbwatcher/issues/new)
|
225
|
+
- [Request Feature](https://github.com/patrick204nqh/dbwatcher/issues/new)
|
226
|
+
|
173
227
|
## License
|
174
228
|
|
175
229
|
Released under the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -14,3 +14,12 @@
|
|
14
14
|
// Stylesheets
|
15
15
|
//= link dbwatcher/application.css
|
16
16
|
//= link dbwatcher/vendor/tabulator.min.css
|
17
|
+
|
18
|
+
// Images - Required assets
|
19
|
+
//= link dbwatcher/dbwatcher-tranparent_512x512.png
|
20
|
+
//= link dbwatcher/favicon.ico
|
21
|
+
//= link dbwatcher/favicon-96x96.png
|
22
|
+
//= link dbwatcher/apple-touch-icon.png
|
23
|
+
//= link dbwatcher/web-app-manifest-192x192.png
|
24
|
+
//= link dbwatcher/web-app-manifest-512x512.png
|
25
|
+
//= link dbwatcher/site.webmanifest
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# DBWatcher Image Assets
|
2
|
+
|
3
|
+
## Active Assets
|
4
|
+
These image assets are currently used by the gem and declared in `app/assets/config/dbwatcher_manifest.js`:
|
5
|
+
|
6
|
+
- `dbwatcher-tranparent_512x512.png` - Main logo used in dashboard and session views
|
7
|
+
- `favicon.ico` - Browser favicon
|
8
|
+
- `favicon-96x96.png` - High-res favicon for modern browsers
|
9
|
+
- `apple-touch-icon.png` - iOS home screen icon
|
10
|
+
- `web-app-manifest-192x192.png` - PWA manifest icon (192x192)
|
11
|
+
- `web-app-manifest-512x512.png` - PWA manifest icon (512x512)
|
12
|
+
- `site.webmanifest` - Web app manifest file
|
13
|
+
|
14
|
+
## Archived Assets
|
15
|
+
The following assets were moved to `unused-assets.zip` as they are not currently referenced in the codebase:
|
16
|
+
|
17
|
+
- `dbwatcher-social-preview.svg` - Social media preview image (SVG)
|
18
|
+
- `dbwatcher_512x512.svg` - Logo in SVG format
|
19
|
+
- `dbwatcher-social-preview-with-bg.svg` - Social preview with background
|
20
|
+
- `favicon.svg` - SVG favicon (unused)
|
21
|
+
- `dbwatcher-social-preview.png` - Social media preview image (PNG)
|
22
|
+
- `dbwatcher_512x512.png` - Alternative logo PNG
|
23
|
+
|
24
|
+
These files can be extracted from the zip if needed in the future.
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"name": "dbwatcher",
|
3
|
+
"short_name": "dbwatcher",
|
4
|
+
"icons": [
|
5
|
+
{
|
6
|
+
"src": "/web-app-manifest-192x192.png",
|
7
|
+
"sizes": "192x192",
|
8
|
+
"type": "image/png",
|
9
|
+
"purpose": "maskable"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"src": "/web-app-manifest-512x512.png",
|
13
|
+
"sizes": "512x512",
|
14
|
+
"type": "image/png",
|
15
|
+
"purpose": "maskable"
|
16
|
+
}
|
17
|
+
],
|
18
|
+
"theme_color": "#ffffff",
|
19
|
+
"background_color": "#ffffff",
|
20
|
+
"display": "standalone"
|
21
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* DBWatcher Application Styles
|
3
3
|
* Compiled CSS for all components
|
4
|
-
* Generated at 2025-07-11
|
4
|
+
* Generated at 2025-07-20 11:15:05 +0700
|
5
5
|
*/
|
6
6
|
|
7
7
|
/**
|
@@ -572,6 +572,10 @@ pre[x-ref="codeContainer"]::-webkit-scrollbar-thumb:hover {
|
|
572
572
|
z-index: 20;
|
573
573
|
background: #f3f3f3;
|
574
574
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
|
575
|
+
will-change: transform;
|
576
|
+
transform: translateZ(0);
|
577
|
+
opacity: 1;
|
578
|
+
transition: opacity 0.1s ease-out;
|
575
579
|
}
|
576
580
|
|
577
581
|
.tabulator .tabulator-header .tabulator-col.sticky-left-1 {
|
@@ -580,6 +584,10 @@ pre[x-ref="codeContainer"]::-webkit-scrollbar-thumb:hover {
|
|
580
584
|
z-index: 19;
|
581
585
|
background: #f3f3f3;
|
582
586
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
|
587
|
+
will-change: transform;
|
588
|
+
transform: translateZ(0);
|
589
|
+
opacity: 1;
|
590
|
+
transition: opacity 0.1s ease-out;
|
583
591
|
}
|
584
592
|
|
585
593
|
.tabulator .tabulator-header .tabulator-col.sticky-left-2 {
|
@@ -588,6 +596,10 @@ pre[x-ref="codeContainer"]::-webkit-scrollbar-thumb:hover {
|
|
588
596
|
z-index: 18;
|
589
597
|
background: #f3f3f3;
|
590
598
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
|
599
|
+
will-change: transform;
|
600
|
+
transform: translateZ(0);
|
601
|
+
opacity: 1;
|
602
|
+
transition: opacity 0.1s ease-out;
|
591
603
|
}
|
592
604
|
|
593
605
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row {
|
@@ -646,53 +658,75 @@ pre[x-ref="codeContainer"]::-webkit-scrollbar-thumb:hover {
|
|
646
658
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell.sticky-left-0 {
|
647
659
|
position: sticky;
|
648
660
|
left: 0;
|
649
|
-
background: white;
|
661
|
+
background: white !important;
|
662
|
+
background-color: white !important;
|
650
663
|
z-index: 5;
|
651
664
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
|
665
|
+
will-change: transform;
|
666
|
+
transform: translateZ(0);
|
667
|
+
opacity: 1 !important;
|
668
|
+
transition: opacity 0.1s ease-out;
|
652
669
|
}
|
653
670
|
|
654
671
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell.sticky-left-1 {
|
655
672
|
position: sticky;
|
656
673
|
left: 60px;
|
657
|
-
background: white;
|
674
|
+
background: white !important;
|
675
|
+
background-color: white !important;
|
658
676
|
z-index: 4;
|
659
677
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
|
678
|
+
will-change: transform;
|
679
|
+
transform: translateZ(0);
|
680
|
+
opacity: 1 !important;
|
681
|
+
transition: opacity 0.1s ease-out;
|
660
682
|
}
|
661
683
|
|
662
684
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell.sticky-left-2 {
|
663
685
|
position: sticky;
|
664
686
|
left: 108px;
|
665
|
-
background: white;
|
687
|
+
background: white !important;
|
688
|
+
background-color: white !important;
|
666
689
|
z-index: 3;
|
667
690
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
|
691
|
+
will-change: transform;
|
692
|
+
transform: translateZ(0);
|
693
|
+
opacity: 1 !important;
|
694
|
+
transition: opacity 0.1s ease-out;
|
668
695
|
}
|
669
696
|
|
670
697
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row:hover .tabulator-cell.sticky-left-0, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row:hover .tabulator-cell.sticky-left-1, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row:hover .tabulator-cell.sticky-left-2 {
|
671
698
|
background: #f9fafb;
|
699
|
+
opacity: 1;
|
672
700
|
}
|
673
701
|
|
674
702
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-insert .tabulator-cell.sticky-left-0, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-insert .tabulator-cell.sticky-left-1, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-insert .tabulator-cell.sticky-left-2 {
|
675
703
|
background-color: rgba(16, 185, 129, 0.05);
|
704
|
+
opacity: 1;
|
676
705
|
}
|
677
706
|
|
678
707
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-update .tabulator-cell.sticky-left-0, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-update .tabulator-cell.sticky-left-1, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-update .tabulator-cell.sticky-left-2 {
|
679
708
|
background-color: rgba(108, 173, 223, 0.05);
|
709
|
+
opacity: 1;
|
680
710
|
}
|
681
711
|
|
682
712
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-delete .tabulator-cell.sticky-left-0, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-delete .tabulator-cell.sticky-left-1, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-delete .tabulator-cell.sticky-left-2 {
|
683
713
|
background-color: rgba(239, 68, 68, 0.05);
|
714
|
+
opacity: 1;
|
684
715
|
}
|
685
716
|
|
686
717
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-insert:hover .tabulator-cell.sticky-left-0, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-insert:hover .tabulator-cell.sticky-left-1, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-insert:hover .tabulator-cell.sticky-left-2 {
|
687
718
|
background-color: rgba(16, 185, 129, 0.1);
|
719
|
+
opacity: 1;
|
688
720
|
}
|
689
721
|
|
690
722
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-update:hover .tabulator-cell.sticky-left-0, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-update:hover .tabulator-cell.sticky-left-1, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-update:hover .tabulator-cell.sticky-left-2 {
|
691
723
|
background-color: rgba(108, 173, 223, 0.1);
|
724
|
+
opacity: 1;
|
692
725
|
}
|
693
726
|
|
694
727
|
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-delete:hover .tabulator-cell.sticky-left-0, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-delete:hover .tabulator-cell.sticky-left-1, .tabulator .tabulator-tableholder .tabulator-table .tabulator-row.operation-delete:hover .tabulator-cell.sticky-left-2 {
|
695
728
|
background-color: rgba(239, 68, 68, 0.1);
|
729
|
+
opacity: 1;
|
696
730
|
}
|
697
731
|
|
698
732
|
.row-detail {
|
@@ -35,24 +35,39 @@
|
|
35
35
|
position: sticky;
|
36
36
|
left: 0;
|
37
37
|
z-index: 20;
|
38
|
-
background: #f3f3f3;
|
38
|
+
background: #f3f3f3 !important;
|
39
|
+
background-color: #f3f3f3 !important;
|
39
40
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
|
41
|
+
will-change: transform;
|
42
|
+
transform: translateZ(0);
|
43
|
+
opacity: 1 !important;
|
44
|
+
transition: opacity 0.1s ease-out;
|
40
45
|
}
|
41
46
|
|
42
47
|
&.sticky-left-1 {
|
43
48
|
position: sticky;
|
44
49
|
left: 60px;
|
45
50
|
z-index: 19;
|
46
|
-
background: #f3f3f3;
|
51
|
+
background: #f3f3f3 !important;
|
52
|
+
background-color: #f3f3f3 !important;
|
47
53
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
|
54
|
+
will-change: transform;
|
55
|
+
transform: translateZ(0);
|
56
|
+
opacity: 1 !important;
|
57
|
+
transition: opacity 0.1s ease-out;
|
48
58
|
}
|
49
59
|
|
50
60
|
&.sticky-left-2 {
|
51
61
|
position: sticky;
|
52
62
|
left: 108px;
|
53
63
|
z-index: 18;
|
54
|
-
background: #f3f3f3;
|
64
|
+
background: #f3f3f3 !important;
|
65
|
+
background-color: #f3f3f3 !important;
|
55
66
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
|
67
|
+
will-change: transform;
|
68
|
+
transform: translateZ(0);
|
69
|
+
opacity: 1 !important;
|
70
|
+
transition: opacity 0.1s ease-out;
|
56
71
|
}
|
57
72
|
}
|
58
73
|
}
|
@@ -115,25 +130,40 @@
|
|
115
130
|
&.sticky-left-0 {
|
116
131
|
position: sticky;
|
117
132
|
left: 0;
|
118
|
-
background: white;
|
133
|
+
background: white !important;
|
134
|
+
background-color: white !important;
|
119
135
|
z-index: 5;
|
120
136
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
|
137
|
+
will-change: transform;
|
138
|
+
transform: translateZ(0);
|
139
|
+
opacity: 1 !important;
|
140
|
+
transition: opacity 0.1s ease-out;
|
121
141
|
}
|
122
142
|
|
123
143
|
&.sticky-left-1 {
|
124
144
|
position: sticky;
|
125
145
|
left: 60px;
|
126
|
-
background: white;
|
146
|
+
background: white !important;
|
147
|
+
background-color: white !important;
|
127
148
|
z-index: 4;
|
128
149
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
|
150
|
+
will-change: transform;
|
151
|
+
transform: translateZ(0);
|
152
|
+
opacity: 1 !important;
|
153
|
+
transition: opacity 0.1s ease-out;
|
129
154
|
}
|
130
155
|
|
131
156
|
&.sticky-left-2 {
|
132
157
|
position: sticky;
|
133
158
|
left: 108px;
|
134
|
-
background: white;
|
159
|
+
background: white !important;
|
160
|
+
background-color: white !important;
|
135
161
|
z-index: 3;
|
136
162
|
box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
|
163
|
+
will-change: transform;
|
164
|
+
transform: translateZ(0);
|
165
|
+
opacity: 1 !important;
|
166
|
+
transition: opacity 0.1s ease-out;
|
137
167
|
}
|
138
168
|
}
|
139
169
|
|
@@ -143,7 +173,9 @@
|
|
143
173
|
&.sticky-left-0,
|
144
174
|
&.sticky-left-1,
|
145
175
|
&.sticky-left-2 {
|
146
|
-
background: #f9fafb;
|
176
|
+
background: #f9fafb !important;
|
177
|
+
background-color: #f9fafb !important;
|
178
|
+
opacity: 1 !important;
|
147
179
|
}
|
148
180
|
}
|
149
181
|
}
|
@@ -151,38 +183,50 @@
|
|
151
183
|
// Operation-specific sticky cell backgrounds
|
152
184
|
&.operation-insert .tabulator-cell {
|
153
185
|
&.sticky-left-0, &.sticky-left-1, &.sticky-left-2 {
|
154
|
-
background
|
186
|
+
background: rgba(16, 185, 129, 0.05) !important;
|
187
|
+
background-color: rgba(16, 185, 129, 0.05) !important;
|
188
|
+
opacity: 1 !important;
|
155
189
|
}
|
156
190
|
}
|
157
191
|
|
158
192
|
&.operation-update .tabulator-cell {
|
159
193
|
&.sticky-left-0, &.sticky-left-1, &.sticky-left-2 {
|
160
|
-
background
|
194
|
+
background: rgba(108, 173, 223, 0.05) !important;
|
195
|
+
background-color: rgba(108, 173, 223, 0.05) !important;
|
196
|
+
opacity: 1 !important;
|
161
197
|
}
|
162
198
|
}
|
163
199
|
|
164
200
|
&.operation-delete .tabulator-cell {
|
165
201
|
&.sticky-left-0, &.sticky-left-1, &.sticky-left-2 {
|
166
|
-
background
|
202
|
+
background: rgba(239, 68, 68, 0.05) !important;
|
203
|
+
background-color: rgba(239, 68, 68, 0.05) !important;
|
204
|
+
opacity: 1 !important;
|
167
205
|
}
|
168
206
|
}
|
169
207
|
|
170
208
|
// Operation-specific sticky cell hover backgrounds
|
171
209
|
&.operation-insert:hover .tabulator-cell {
|
172
210
|
&.sticky-left-0, &.sticky-left-1, &.sticky-left-2 {
|
173
|
-
background
|
211
|
+
background: rgba(16, 185, 129, 0.1) !important;
|
212
|
+
background-color: rgba(16, 185, 129, 0.1) !important;
|
213
|
+
opacity: 1 !important;
|
174
214
|
}
|
175
215
|
}
|
176
216
|
|
177
217
|
&.operation-update:hover .tabulator-cell {
|
178
218
|
&.sticky-left-0, &.sticky-left-1, &.sticky-left-2 {
|
179
|
-
background
|
219
|
+
background: rgba(108, 173, 223, 0.1) !important;
|
220
|
+
background-color: rgba(108, 173, 223, 0.1) !important;
|
221
|
+
opacity: 1 !important;
|
180
222
|
}
|
181
223
|
}
|
182
224
|
|
183
225
|
&.operation-delete:hover .tabulator-cell {
|
184
226
|
&.sticky-left-0, &.sticky-left-1, &.sticky-left-2 {
|
185
|
-
background
|
227
|
+
background: rgba(239, 68, 68, 0.1) !important;
|
228
|
+
background-color: rgba(239, 68, 68, 0.1) !important;
|
229
|
+
opacity: 1 !important;
|
186
230
|
}
|
187
231
|
}
|
188
232
|
}
|
@@ -166,7 +166,7 @@ module Dbwatcher
|
|
166
166
|
#
|
167
167
|
# @return [void]
|
168
168
|
def ensure_system_info_enabled
|
169
|
-
return if Dbwatcher.configuration.
|
169
|
+
return if Dbwatcher.configuration.system_info
|
170
170
|
|
171
171
|
render json: {
|
172
172
|
error: "System information collection is disabled",
|
@@ -10,7 +10,7 @@ module Dbwatcher
|
|
10
10
|
@active_tab = params[:tab] || "overview"
|
11
11
|
|
12
12
|
# Add system information if enabled
|
13
|
-
return unless Dbwatcher.configuration.
|
13
|
+
return unless Dbwatcher.configuration.system_info
|
14
14
|
|
15
15
|
@system_info_summary = system_info_storage.summary
|
16
16
|
@system_info = system_info_storage.cached_info
|
@@ -118,10 +118,11 @@
|
|
118
118
|
</div>
|
119
119
|
<% else %>
|
120
120
|
<div class="p-8 text-center text-gray-500">
|
121
|
-
|
122
|
-
|
123
|
-
|
121
|
+
<%= image_tag "dbwatcher/dbwatcher-tranparent_512x512.png",
|
122
|
+
alt: "DBWatcher Logo",
|
123
|
+
class: "w-12 h-12 mx-auto opacity-30 mb-2" %>
|
124
124
|
<p class="text-sm">No recent sessions</p>
|
125
|
+
<p class="text-xs text-gray-400 mt-1">Start tracking with <code>?dbwatch=true</code></p>
|
125
126
|
</div>
|
126
127
|
<% end %>
|
127
128
|
</div>
|
@@ -175,11 +176,11 @@
|
|
175
176
|
</div>
|
176
177
|
<% else %>
|
177
178
|
<div class="p-8 text-center text-gray-500">
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
</svg>
|
179
|
+
<%= image_tag "dbwatcher/dbwatcher-tranparent_512x512.png",
|
180
|
+
alt: "DBWatcher Logo",
|
181
|
+
class: "w-12 h-12 mx-auto opacity-30 mb-2" %>
|
182
182
|
<p class="text-sm">No active tables</p>
|
183
|
+
<p class="text-xs text-gray-400 mt-1">Tables will appear when data changes</p>
|
183
184
|
</div>
|
184
185
|
<% end %>
|
185
186
|
</div>
|