pms_md 1.0.4 → 1.0.5

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.
package/.gitignore ADDED
@@ -0,0 +1,158 @@
1
+ # Dependencies
2
+ node_modules/
3
+ npm-debug.log*
4
+ yarn-debug.log*
5
+ yarn-error.log*
6
+ pnpm-debug.log*
7
+ package-lock.json
8
+ yarn.lock
9
+ pnpm-lock.yaml
10
+
11
+ # Build outputs
12
+ dist/
13
+ build/
14
+ *.tsbuildinfo
15
+
16
+ # Logs
17
+ logs/
18
+ *.log
19
+ npm-debug.log*
20
+ yarn-debug.log*
21
+ yarn-error.log*
22
+ lerna-debug.log*
23
+ .pnpm-debug.log*
24
+
25
+ # Runtime data
26
+ pids/
27
+ *.pid
28
+ *.seed
29
+ *.pid.lock
30
+
31
+ # Coverage directory used by tools like istanbul
32
+ coverage/
33
+ *.lcov
34
+ .nyc_output/
35
+
36
+ # Environment variables
37
+ .env
38
+ .env.local
39
+ .env.development.local
40
+ .env.test.local
41
+ .env.production.local
42
+ .env*.local
43
+
44
+ # IDE and Editor files
45
+ .vscode/
46
+ .idea/
47
+ *.swp
48
+ *.swo
49
+ *~
50
+ .DS_Store
51
+ *.sublime-project
52
+ *.sublime-workspace
53
+
54
+ # OS files
55
+ Thumbs.db
56
+ .DS_Store
57
+ .AppleDouble
58
+ .LSOverride
59
+
60
+ # Temporary files
61
+ tmp/
62
+ temp/
63
+ *.tmp
64
+
65
+ # Database files
66
+ *.sqlite
67
+ *.sqlite3
68
+ *.db
69
+
70
+ # Email credentials (for monitoring)
71
+ email-config.json
72
+ smtp-credentials.json
73
+
74
+ # Monitoring specific
75
+ monitoring-data/
76
+ error-reports/
77
+
78
+ # Optional npm cache directory
79
+ .npm
80
+
81
+ # Optional eslint cache
82
+ .eslintcache
83
+
84
+ # Optional REPL history
85
+ .node_repl_history
86
+
87
+ # Output of 'npm pack'
88
+ *.tgz
89
+
90
+ # dotenv environment variable files
91
+ .env
92
+ .env.development
93
+ .env.production
94
+ .env.test
95
+
96
+ # TypeScript cache
97
+ *.tsbuildinfo
98
+
99
+ # Optional stylelint cache
100
+ .stylelintcache
101
+
102
+ # Microbundle cache
103
+ .rpt2_cache/
104
+ .rts2_cache_cjs/
105
+ .rts2_cache_es/
106
+ .rts2_cache_umd/
107
+
108
+ # Optional REPL history
109
+ .node_repl_history
110
+
111
+ # Output of 'npm pack'
112
+ *.tgz
113
+
114
+ # Yarn Integrity file
115
+ .yarn-integrity
116
+
117
+ # parcel-bundler cache
118
+ .cache
119
+ .parcel-cache
120
+
121
+ # Next.js build output
122
+ .next
123
+ out
124
+
125
+ # Nuxt.js build / generate output
126
+ .nuxt
127
+ dist
128
+
129
+ # Gatsby files
130
+ .cache/
131
+
132
+ # Serverless directories
133
+ .serverless/
134
+
135
+ # FuseBox cache
136
+ .fusebox/
137
+
138
+ # DynamoDB Local files
139
+ .dynamodb/
140
+
141
+ # TernJS port file
142
+ .tern-port
143
+
144
+ # Stores VSCode versions used for testing VSCode extensions
145
+ .vscode-test
146
+
147
+ # Compiled binary addons
148
+ build/Release
149
+
150
+ # Dependency directories
151
+ jspm_packages/
152
+
153
+ # Snowpack dependency directory
154
+ web_modules/
155
+
156
+ # TypeScript v1 declaration files
157
+ typings/
158
+
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 🚀 PMS_MD - Comprehensive Node.js Monitoring Solution
2
2
 
3
- [![npm version](https://img.shields.io/badge/npm-1.0.3-blue.svg)](https://www.npmjs.com/package/pms_md)
3
+ [![npm version](https://img.shields.io/badge/npm-1.0.5-blue.svg)](https://www.npmjs.com/package/pms_md)
4
4
  [![License: ISC](https://img.shields.io/badge/License-ISC-green.svg)](LICENSE)
5
5
  [![Node.js](https://img.shields.io/badge/node-%3E%3D14.0.0-brightgreen.svg)](https://nodejs.org/)
6
6
 
@@ -10,6 +10,7 @@
10
10
 
11
11
  ## ✨ Features
12
12
 
13
+ - 🎨 **Beautiful UI Dashboard** - One-line integration with stunning monitoring UI (NEW!)
13
14
  - 🗄️ **13+ Database Support** - MongoDB, PostgreSQL, MySQL, MariaDB, MSSQL, SQLite, Redis, Cassandra, Elasticsearch, DynamoDB, Neo4j, CouchDB, Sequelize
14
15
  - 📧 **Email Notifications** - Automatic alerts for errors, crashes, and database failures
15
16
  - 📊 **Health Monitoring** - System resources (CPU, Memory), API errors, database connections
@@ -118,6 +119,73 @@ module.exports = app;
118
119
 
119
120
  ---
120
121
 
122
+ ## 🎨 Beautiful Monitoring UI (NEW!)
123
+
124
+ ### One-Line Integration 🚀
125
+
126
+ Add a complete monitoring dashboard to your app with just **one line of code**:
127
+
128
+ ```javascript
129
+ const express = require('express');
130
+ const NodeMonitor = require('pms_md');
131
+
132
+ const app = express();
133
+
134
+ const monitor = new NodeMonitor({
135
+ app: { name: 'My App' }
136
+ });
137
+
138
+ // ===== ONE LINE TO ENABLE ENTIRE UI! =====
139
+ monitor.serveUI(app);
140
+
141
+ monitor.start();
142
+ app.listen(3000);
143
+ ```
144
+
145
+ ### What You Get
146
+
147
+ After calling `monitor.serveUI(app)`, you get:
148
+
149
+ - 🏠 **Home Page** - `/` - Navigation hub with quick links
150
+ - 📊 **Dashboard** - `/monitor/dashboard` - Complete monitoring overview
151
+ - 💚 **Health Check** - `/health` - Live health status with auto-refresh
152
+ - 📈 **Metrics** - `/monitor/metrics` - Interactive charts (CPU, Memory)
153
+ - 📋 **Status** - `/monitor/status` - Real-time status overview
154
+ - 🚨 **Error Logs** - `/monitor/error-logs` - Error tracking
155
+
156
+ ### Features
157
+
158
+ ✅ **Zero Configuration** - Works out of the box
159
+ ✅ **No File Copying** - Everything served from `node_modules`
160
+ ✅ **Beautiful Design** - Modern, responsive UI
161
+ ✅ **Real-time Updates** - Auto-refresh dashboards
162
+ ✅ **Interactive Charts** - Powered by Chart.js
163
+ ✅ **Dark/Light Theme** - User preference support
164
+ ✅ **Content Negotiation** - Supports both HTML and JSON
165
+
166
+ ### Advanced Configuration
167
+
168
+ ```javascript
169
+ // Custom base path
170
+ monitor.serveUI(app, {
171
+ basePath: '/monitoring',
172
+ appName: 'Production API',
173
+ enableErrorLogs: true
174
+ });
175
+
176
+ // UI now available at:
177
+ // http://localhost:3000/monitoring/
178
+ // http://localhost:3000/monitoring/dashboard
179
+ ```
180
+
181
+ ### Screenshots
182
+
183
+ Visit `http://localhost:3000/` after starting your server to see the beautiful UI!
184
+
185
+ 📚 **[Complete UI Integration Guide →](./UI_INTEGRATION_GUIDE.md)**
186
+
187
+ ---
188
+
121
189
  ## 🗄️ Database Monitoring
122
190
 
123
191
  ### MSSQL (SQL Server)
@@ -0,0 +1,286 @@
1
+ # 🎨 Design Improvements - Error Logs Page
2
+
3
+ ## Overview
4
+ Comprehensive design improvements made to the Error Logs page to enhance visual appeal, user experience, and modern aesthetics.
5
+
6
+ ---
7
+
8
+ ## ✨ Key Improvements
9
+
10
+ ### 1. **Modern Header with Gradient Background**
11
+ - **Before:** Simple text header
12
+ - **After:** Full-width gradient header with purple/blue theme
13
+ - **Features:**
14
+ - Large icon (📋) with drop shadow
15
+ - Bold, prominent title with text shadow
16
+ - Descriptive subtitle
17
+ - Matches the overall app theme
18
+ - Responsive design for mobile devices
19
+
20
+ ### 2. **Enhanced Filter Buttons**
21
+ - **Before:** Simple inline buttons with basic styling
22
+ - **After:** Modern card-based filter system
23
+ - **Features:**
24
+ - Grid layout with responsive columns
25
+ - Each button shows:
26
+ - Icon
27
+ - Label
28
+ - Count (large, prominent number)
29
+ - Animated left border that expands on active state
30
+ - Gradient backgrounds for each filter type:
31
+ - All Errors: Purple gradient
32
+ - API Errors: Red gradient
33
+ - Server Errors: Orange gradient
34
+ - Database Errors: Purple gradient
35
+ - Smooth hover effects with icon scaling
36
+ - Active state fills entire button with gradient
37
+
38
+ ### 3. **Improved Stats Cards**
39
+ - **Before:** Basic white cards
40
+ - **After:** Modern cards with visual enhancements
41
+ - **Features:**
42
+ - Left border accent (purple)
43
+ - Decorative gradient background element in top-right
44
+ - Hover effect (lifts up with shadow)
45
+ - Better typography with uppercase labels
46
+ - Larger, bolder values
47
+ - Smooth transitions
48
+
49
+ ### 4. **Enhanced Error Item Cards**
50
+ - **Before:** Simple list items with border
51
+ - **After:** Interactive cards with hover effects
52
+ - **Features:**
53
+ - Left border appears on hover (purple)
54
+ - Gradient background on hover
55
+ - Smooth padding transition
56
+ - Better visual feedback
57
+
58
+ ### 5. **Modernized Badges**
59
+ - **Before:** Flat colored badges
60
+ - **After:** Gradient badges with depth
61
+ - **Features:**
62
+ - Gradient backgrounds
63
+ - Border for definition
64
+ - Box shadow for depth
65
+ - Scale animation on hover
66
+ - Better contrast and readability
67
+
68
+ ### 6. **Improved Action Buttons**
69
+ - **Before:** Basic gradient buttons
70
+ - **After:** Interactive buttons with ripple effect
71
+ - **Features:**
72
+ - Ripple animation on hover (expanding circle)
73
+ - Better shadows
74
+ - Smooth lift effect on hover
75
+ - Icon and text separated for better layout
76
+ - Larger, more clickable
77
+
78
+ ### 7. **Enhanced File Selector**
79
+ - **Before:** Simple dropdown
80
+ - **After:** Styled container with visual hierarchy
81
+ - **Features:**
82
+ - Gradient background container
83
+ - Border for definition
84
+ - Icon in label (📅)
85
+ - Better focus states with ring effect
86
+ - Hover effect on dropdown
87
+ - Improved typography
88
+
89
+ ### 8. **Inline Stats in Header**
90
+ - **New Feature:** Quick stats at a glance
91
+ - **Features:**
92
+ - Shows Total, API, and Server error counts
93
+ - Icon for each stat type
94
+ - Gradient background cards
95
+ - Left border accent
96
+ - Updates in real-time
97
+
98
+ ### 9. **Responsive Design**
99
+ - **Mobile Optimizations:**
100
+ - Stacked layout for small screens
101
+ - Adjusted font sizes
102
+ - Full-width buttons
103
+ - Centered header content
104
+ - Smaller icons and padding
105
+
106
+ ### 10. **Smooth Animations**
107
+ - **Added:**
108
+ - Fade-in animation for error items
109
+ - Smooth scroll behavior
110
+ - Hover transitions on all interactive elements
111
+ - Scale animations on badges
112
+ - Ripple effect on buttons
113
+ - Border expansion animations
114
+
115
+ ---
116
+
117
+ ## 🎨 Color Scheme
118
+
119
+ ### Primary Colors:
120
+ - **Purple Gradient:** `#667eea` → `#764ba2`
121
+ - **Red (API Errors):** `#ef4444` → `#dc2626`
122
+ - **Orange (Server Errors):** `#f59e0b` → `#d97706`
123
+ - **Purple (Database Errors):** `#8b5cf6` → `#7c3aed`
124
+ - **Green (Success):** `#10b981` → `#059669`
125
+ - **Blue (Info):** `#3b82f6` → `#2563eb`
126
+
127
+ ### Neutral Colors:
128
+ - **Background:** `#f9fafb`, `#f3f4f6`
129
+ - **Text:** `#1f2937`, `#6b7280`
130
+ - **Borders:** `#e5e7eb`
131
+
132
+ ---
133
+
134
+ ## 📱 Responsive Breakpoints
135
+
136
+ ### Mobile (max-width: 768px):
137
+ - Single column layout
138
+ - Stacked filter buttons
139
+ - Full-width action buttons
140
+ - Smaller header icon and title
141
+ - Centered content
142
+
143
+ ---
144
+
145
+ ## 🔧 Technical Details
146
+
147
+ ### CSS Features Used:
148
+ - **Flexbox** - For flexible layouts
149
+ - **CSS Grid** - For responsive filter buttons
150
+ - **Gradients** - Linear gradients for backgrounds
151
+ - **Transitions** - Smooth animations
152
+ - **Transform** - Scale and translate effects
153
+ - **Box Shadow** - Depth and elevation
154
+ - **Pseudo-elements** - `::before` for decorative elements
155
+ - **Keyframe Animations** - Fade-in and spin animations
156
+
157
+ ### Performance Optimizations:
158
+ - Hardware-accelerated transforms
159
+ - Efficient CSS selectors
160
+ - Minimal repaints
161
+ - Smooth 60fps animations
162
+
163
+ ---
164
+
165
+ ## 🎯 User Experience Improvements
166
+
167
+ ### Visual Hierarchy:
168
+ 1. **Header** - Most prominent, sets context
169
+ 2. **Quick Stats** - Immediate overview
170
+ 3. **File Selector & Actions** - Primary controls
171
+ 4. **Filter Buttons** - Secondary navigation
172
+ 5. **Stats Cards** - Detailed metrics
173
+ 6. **Error List** - Main content
174
+
175
+ ### Interaction Feedback:
176
+ - ✅ Hover states on all clickable elements
177
+ - ✅ Active states for current selection
178
+ - ✅ Loading states with spinner
179
+ - ✅ Empty states with friendly message
180
+ - ✅ Smooth transitions for all state changes
181
+
182
+ ### Accessibility:
183
+ - ✅ High contrast colors
184
+ - ✅ Large click targets (min 44x44px)
185
+ - ✅ Clear visual feedback
186
+ - ✅ Readable font sizes
187
+ - ✅ Semantic HTML structure
188
+
189
+ ---
190
+
191
+ ## 📊 Before & After Comparison
192
+
193
+ ### Header:
194
+ - **Before:** Plain text "📋 API Error Logs"
195
+ - **After:** Full-width gradient banner with large icon, title, and subtitle
196
+
197
+ ### Filter Buttons:
198
+ - **Before:** 4 inline buttons with basic colors
199
+ - **After:** Grid of modern cards with icons, labels, counts, and animations
200
+
201
+ ### Stats Cards:
202
+ - **Before:** Simple white cards
203
+ - **After:** Cards with accents, decorative elements, and hover effects
204
+
205
+ ### Error Items:
206
+ - **Before:** Static list items
207
+ - **After:** Interactive cards with hover animations
208
+
209
+ ---
210
+
211
+ ## 🚀 Future Enhancements (Optional)
212
+
213
+ ### Potential Additions:
214
+ 1. **Dark Mode** - Toggle for dark theme
215
+ 2. **Export Options** - CSV, JSON, PDF export
216
+ 3. **Search & Filter** - Text search within errors
217
+ 4. **Date Range Picker** - Filter by custom date range
218
+ 5. **Error Grouping** - Group similar errors
219
+ 6. **Charts & Graphs** - Visual error trends
220
+ 7. **Real-time Updates** - WebSocket for live updates
221
+ 8. **Keyboard Shortcuts** - Quick navigation
222
+ 9. **Customizable Views** - Save filter preferences
223
+ 10. **Error Details Modal** - Expanded view for errors
224
+
225
+ ---
226
+
227
+ ## 📝 Code Structure
228
+
229
+ ### File Modified:
230
+ - `node-monitor/examples/views/error-logs.ejs`
231
+
232
+ ### Sections Updated:
233
+ 1. **CSS Styles** (Lines 8-647)
234
+ - Page header gradient
235
+ - Filter buttons
236
+ - Stats cards
237
+ - Error items
238
+ - Badges
239
+ - Action buttons
240
+ - File selector
241
+ - Responsive design
242
+ - Animations
243
+
244
+ 2. **HTML Structure** (Lines 648-908)
245
+ - New gradient header
246
+ - Inline stats
247
+ - Restructured filter buttons
248
+ - Updated action buttons
249
+
250
+ ---
251
+
252
+ ## ✅ Testing Checklist
253
+
254
+ - [x] Desktop view (1920x1080)
255
+ - [x] Tablet view (768x1024)
256
+ - [x] Mobile view (375x667)
257
+ - [x] Hover states
258
+ - [x] Active states
259
+ - [x] Loading states
260
+ - [x] Empty states
261
+ - [x] Long text handling
262
+ - [x] Multiple errors display
263
+ - [x] Filter functionality
264
+ - [x] Refresh functionality
265
+ - [x] Download functionality
266
+
267
+ ---
268
+
269
+ ## 🎉 Summary
270
+
271
+ The Error Logs page has been transformed from a functional but basic interface into a modern, visually appealing, and highly interactive dashboard. The improvements focus on:
272
+
273
+ 1. **Visual Appeal** - Modern gradients, shadows, and animations
274
+ 2. **User Experience** - Clear hierarchy, intuitive interactions
275
+ 3. **Responsiveness** - Works great on all devices
276
+ 4. **Performance** - Smooth 60fps animations
277
+ 5. **Accessibility** - High contrast, large targets, clear feedback
278
+
279
+ The new design maintains the functionality while significantly enhancing the aesthetics and user experience!
280
+
281
+ ---
282
+
283
+ **Last Updated:** 2025-11-12
284
+ **Version:** 2.0
285
+ **Author:** Manish Desai
286
+