Skip to content

Commit 4554bee

Browse files
authored
Complete Phase 6: Frontend Core Implementation
2 parents 07d44ce + 3804e8d commit 4554bee

File tree

135 files changed

+9319
-1370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+9319
-1370
lines changed

.claude/settings.local.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,17 @@
77
"Bash(curl:*)",
88
"Bash(taskkill:*)",
99
"Bash(dotnet clean:*)",
10+
<<<<<<< HEAD
11+
"mcp__chakra-ui__get_component_example",
12+
"Bash(npm run build:*)",
13+
"Bash(npm run lint)",
14+
"mcp__chakra-ui__list_components"
15+
=======
1016
"Bash(dotnet run:*)",
1117
"Bash(powershell:*)",
1218
"Bash(dotnet build:*)",
1319
"Bash(powershell:*)"
20+
>>>>>>> eca8109102259deb41bba4cf33476a6cf6005f65
1421
],
1522
"deny": [],
1623
"ask": []

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ ThingConnect Pulse is a network availability monitoring system for manufacturing
3838
- React frontend has default template
3939
- No monitoring logic implemented yet
4040
- No database integration yet
41-
- Ready to begin implementation based on issues
41+
- Ready to begin implementation based on issues
42+
- When using Chakra UI always refer to the MCP and not on your own

DEVELOPMENT_PLAN.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,39 @@ You can effectively work on **up to 6 parallel worktrees** without conflicts:
127127
| #28 | P2 | 4-6h | Daily rollup job | 3 |**COMPLETE** |
128128
| #29 | P2 | 4-6h | Prune tool for raw data | 3 |**COMPLETE** |
129129

130-
### PHASE 6: Frontend Core (Week 2-3, Parallel)
130+
### PHASE 6: Frontend Core (Week 2-3, Parallel)**COMPLETE**
131131
**UI foundation - EPIC #7**
132132

133-
| Issue | Priority | Time | Description | Worktree |
134-
|-------|----------|------|-------------|----------|
135-
| ENV-10 | P1 | 1d | Frontend dev setup, Vite config | 5 |
136-
| #17 | P1 | 4-6h | App shell, routing, layout | 5 |
137-
| #18 | P1 | 1d | Live board dashboard page | 5 |
138-
| #19 | P2 | 1d | Endpoint detail page | 5 |
139-
| #20 | P1 | 1d | History view & CSV export | 5 |
133+
| Issue | Priority | Time | Description | Worktree | Status |
134+
|-------|----------|------|-------------|----------|---------|
135+
| ENV-10 | P1 | 1d | Frontend dev setup, Vite config | 5 |**COMPLETE** - Documentation created |
136+
| #17 | P1 | 4-6h | App shell, routing, layout | 5 |**COMPLETE** - Closed |
137+
| #18 | P1 | 1d | Live board dashboard page | 5 |**COMPLETE** - Live data integration working |
138+
| #19 | P2 | 1d | Endpoint detail page | 5 |**COMPLETE** - Full functionality with fallback |
139+
| #20 | P1 | 1d | History view & CSV export | 5 |**COMPLETE** |
140+
141+
**Phase 6 Summary**: Core frontend infrastructure is complete and operational:
142+
- React 19 + TypeScript + Chakra UI v3 setup with Vite
143+
- Real-time dashboard displaying live monitoring data from backend API
144+
- CORS-enabled frontend-backend integration with 5-second auto-refresh
145+
- App shell with navigation, routing, and responsive layout
146+
- Live status table and card views with sparkline charts
147+
- Environment-based configuration with .env support
148+
- **Endpoint detail page** with comprehensive monitoring data (Issue #19):
149+
- Dynamic routing for `/endpoints/{id}` with React Router v7
150+
- Real-time refresh with 10-second polling using React Query
151+
- Recent checks timeline, outage tracking, and performance statistics
152+
- Intelligent fallback mechanism for missing backend endpoints
153+
- Responsive design optimized for desktop, tablet, and mobile
154+
- Full end-to-end testing with Puppeteer verification
155+
- **NEW: History View & CSV Export** with complete functionality (Issue #20):
156+
- Interactive date range picker with quick presets (1h, 24h, week, month)
157+
- Bucket selector for data granularity (raw, 15-minute, daily)
158+
- Custom SVG availability charts with area visualization
159+
- Comprehensive history table with pagination and sorting
160+
- Client-side CSV export with full data formatting
161+
- Performance statistics dashboard showing uptime trends
162+
- Responsive design for all screen sizes with proper error handling
140163

141164
### PHASE 7: Service & Deployment (Week 3, Days 3-5)
142165
**Windows service - EPIC #8**
@@ -228,7 +251,7 @@ git worktree remove ../pulse-env-setup
228251
- **Phase 3**: ✅ **COMPLETE** - Can detect UP/DOWN state changes with continuous monitoring, outage tracking, and concurrent probe execution
229252
- **Phase 4**: ✅ **COMPLETE** - All 4 API endpoints implemented and tested: live status, history, config apply, and config versions.
230253
- **Phase 5**: ✅ **COMPLETE** - Issues #27, #28, and #29 complete: 15-minute and daily rollups computed automatically every 5 minutes with watermark tracking, plus configurable raw data pruning with 60-day default retention
231-
- **Phase 6**: UI loads, shows live status
254+
- **Phase 6**: **COMPLETE** - UI loads, shows live status with real-time updates from backend, CORS integration working
232255
- **Phase 7**: Service installs and runs
233256
- **Phase 8**: All tests pass, code quality gates met
234257

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ cd thingconnect.pulse.client
2424
npm install
2525
cd ..
2626

27-
# Run application
27+
# Run backend server
2828
cd ThingConnect.Pulse.Server
2929
dotnet run
30-
# Backend: http://localhost:8080
31-
# Frontend: http://localhost:8080 (proxied)
30+
# Backend API: http://localhost:8080
31+
32+
# Run frontend (in separate terminal)
33+
cd thingconnect.pulse.client
34+
npm run dev
35+
# Frontend: https://localhost:55610 (or similar port)
3236
```
3337

3438
## Project Structure
@@ -95,9 +99,15 @@ For development and testing:
9599

96100
## API Endpoints
97101

98-
The server provides REST API endpoints for configuration management:
102+
The server provides REST API endpoints for configuration management and monitoring data:
99103

100104
```bash
105+
# Live monitoring data
106+
GET /api/status/live
107+
108+
# Historical data by endpoint
109+
GET /api/history/endpoint/{id}
110+
101111
# Apply YAML configuration
102112
POST /api/config/apply
103113
Content-Type: text/plain
@@ -126,6 +136,7 @@ GET /api/test/monitoring/outages
126136
## Development
127137

128138
- **[Backend Setup](./ops/dev-backend.md)** - Zero-to-first-run backend development
139+
- **[Frontend Setup](./ops/dev-frontend.md)** - Frontend development environment setup
129140
- **[General Commands](./ops/dev.md)** - Code formatting, testing, and build commands
130141

131142
## Issues & Project Management
@@ -154,7 +165,7 @@ GET /api/test/monitoring/outages
154165
- **Network Monitoring**: ✅ ICMP ping, TCP connect, HTTP status checks with concurrent execution
155166
- **Configuration**: ✅ YAML-based with JSON Schema validation and version tracking
156167
- **Data Storage**: ✅ SQLite with automatic 15-minute/daily rollups running every 5 minutes
157-
- **Web Interface**: Real-time status dashboard and historical views
168+
- **Web Interface**: Real-time status dashboard with live data integration, endpoint detail pages, history view with CSV export, and responsive layout
158169
- **Configuration Management**: ✅ Apply, list, and download configuration versions
159170
- **Settings Management**: ✅ Key-value store with watermark tracking for rollup jobs
160171
- **Alerting**: ✅ Status change detection with flap damping (2/2 thresholds)

ThingConnect.Pulse.Server/Controllers/StatusController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,4 @@ public async Task<ActionResult<HistoryResponseDto>> GetEndpointHistoryAsync(
144144
return StatusCode(500, new { message = "Internal server error while retrieving endpoint history" });
145145
}
146146
}
147-
}
147+
}

ThingConnect.Pulse.Server/Controllers/TestMonitoringController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,4 @@ public async Task<IActionResult> GetOutages()
160160

161161
return Ok(new { Outages = outages, Count = outages.Count });
162162
}
163-
}
163+
}

ThingConnect.Pulse.Server/Controllers/TestRollupController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ public async Task<IActionResult> ProcessRollupDailyAsync()
5656
return StatusCode(500, new { message = "Error processing rollups", error = ex.Message });
5757
}
5858
}
59-
}
59+
}

ThingConnect.Pulse.Server/Infrastructure/PlainTextInputFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ public override async Task<InputFormatterResult> ReadRequestBodyAsync(
2222
string content = await reader.ReadToEndAsync();
2323
return await InputFormatterResult.SuccessAsync(content);
2424
}
25-
}
25+
}

ThingConnect.Pulse.Server/Models/CheckResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ public static CheckResult Failure(Guid endpointId, DateTimeOffset timestamp, str
6161
Error = error
6262
};
6363
}
64-
}
64+
}

ThingConnect.Pulse.Server/Models/ConfigDtos.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ public sealed class TargetSection
7676
public string? Path { get; set; }
7777
public string? ExpectText { get; set; }
7878
public string? UserAgent { get; set; }
79-
}
79+
}

0 commit comments

Comments
 (0)