The Extension Attributes Automation Worker Service now includes a rich web interface built with ASP.NET Core MVC and Razor Pages. The interface provides real-time monitoring, configuration management, and audit tracking capabilities.
- Modern welcome page with application overview
- Quick access to all major features
- Live system statistics
- Feature highlights and quick links
- Authentication interface (currently demo mode)
- Designed for Windows Authentication / Entra AD integration
- Clean, modern design with gradient background
- Automatic redirection for authenticated users
- Live event stream using SignalR
- Real-time statistics (total events, success/failure rates, devices affected)
- WebSocket-based updates for instant notifications
- Event filtering and sorting capabilities
- Click-through to detailed event information
- Visual display of all configuration settings
- Data source status (Active Directory, Intune)
- Extension attribute mapping details
- Export and audit configuration
- Quick action buttons
- System information and version details
- Component list and technology stack
- Feature overview
- Documentation links and API endpoints
- Real-time uptime calculation
- Detailed view of individual audit events
- Shows complete event information including:
- Event metadata (ID, type, severity, timestamp)
- Device and attribute details
- Value changes (old vs new)
- Error messages and duration
- Related events for the same device/attribute
- Print-friendly layout
- Hub Location:
/hubs/audit - Events:
ReceiveAuditEvent: Broadcasts new audit events in real-timeReceiveConfigurationUpdate: Notifies clients of configuration changes
Index: Landing pageLogin: Authentication pageDashboard: Real-time monitoringConfiguration: Configuration summaryAbout: System informationChangeDetail: Event details
The AuditLogger service now automatically broadcasts events to connected SignalR clients:
// Events are automatically sent to all connected clients
await _hubContext.Clients.All.SendAsync("ReceiveAuditEvent", auditEvent);# Run in web/dashboard mode
dotnet run -- --web
# Or use the alias
dotnet run -- --dashboard
dotnet run -- -wOnce running, the following URLs are available:
- Home:
http://localhost:5000/ - Dashboard:
http://localhost:5000/Home/Dashboard - Configuration:
http://localhost:5000/Home/Configuration - About:
http://localhost:5000/Home/About - API Docs:
http://localhost:5000/api-docs - Health UI:
http://localhost:5000/health-ui - SignalR Hub:
ws://localhost:5000/hubs/audit
The original static HTML pages are still available:
- Legacy Dashboard:
http://localhost:5000/index.html - Audit Logs:
http://localhost:5000/audit.html
- Bootstrap 5: UI framework
- Font Awesome 6: Icons
- SignalR Client: Real-time communication
- Vanilla JavaScript: Interactivity
- ASP.NET Core 9.0: Web framework
- MVC + Razor: View engine
- SignalR: Real-time messaging
- Entity Framework: (Future: database integration)
// Connect to SignalR hub
const connection = new signalR.HubConnectionBuilder()
.withUrl("/hubs/audit")
.withAutomaticReconnect()
.build();
// Listen for audit events
connection.on("ReceiveAuditEvent", function (event) {
console.log("New event:", event);
// Update UI with the event
});
// Start connection
await connection.start();// In AuditLogger.cs
await _hubContext.Clients.All.SendAsync("ReceiveAuditEvent", auditEvent);The interface uses CSS custom properties for easy theming:
:root {
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--success-color: #28a745;
--danger-color: #dc3545;
--warning-color: #ffc107;
--info-color: #17a2b8;
}All Razor views are located in:
ExtensionAttributes.Worker/Views/
├── Home/
│ ├── Index.cshtml (Landing page)
│ ├── Login.cshtml (Login page)
│ ├── Dashboard.cshtml (Real-time dashboard)
│ ├── Configuration.cshtml (Configuration summary)
│ ├── About.cshtml (About page)
│ ├── ChangeDetail.cshtml (Event details)
│ └── Error.cshtml (Error page)
├── Shared/
│ └── _Layout.cshtml (Master layout)
├── _ViewStart.cshtml
└── _ViewImports.cshtml
Potential improvements include:
- User authentication with Entra AD
- Role-based access control (RBAC)
- Database persistence for audit logs
- Advanced filtering and search
- Export to multiple formats (PDF, Excel)
- Custom dashboards and widgets
- Email notifications
- Mobile-responsive improvements
- Currently in demo mode for authentication
- In production, implement:
- Windows Authentication
- Entra AD (Azure AD) authentication
- HTTPS enforcement
- CSRF protection (built-in with ASP.NET Core)
- Content Security Policy headers
- Rate limiting for API endpoints
- Ensure the web application is running in
--webmode - Check browser console for connection errors
- Verify CORS settings if accessing from different origin
- Ensure all
.cshtmlfiles are present in the Views folder - Check
_ViewImports.cshtmlfor correct namespaces - Verify the build includes the Views folder
- Check that static files middleware is configured
- Ensure CDN links are accessible
- Verify wwwroot folder contains static assets
For issues, questions, or contributions:
- GitHub Issues: [Repository Issues Page]
- Documentation: See other markdown files in the repository
- API Documentation: Available at
/api-docswhen running
Built with ❤️ by the Extension Attributes Automation Community