Skip to main content

Dashboard Ops Center

The Dashboard Ops Center is ValkyrAI's comprehensive operations monitoring solution, providing real-time insights into system health, API object statistics, and workflow performance. Built with a world-class interface matching the CRM design standards, it consolidates all operational monitoring into a unified, elegant dashboard.

Features

🎯 Real-Time API Object Statistics

  • Accurate Counts: Live statistics for all API entities (Workflows, Tasks, Principals, etc.)
  • User Preferences: Customizable monitoring - select which objects to watch
  • Auto-Refresh: Updates every 30 seconds with manual refresh capability
  • Error Handling: Clear error reporting and recovery mechanisms

📊 Multi-View Dashboard

  • Overview: Object statistics and system health at a glance
  • Workflow Metrics: Detailed workflow performance and execution statistics
  • System Operations: Actuator-based system monitoring and health checks

🎨 Professional Design

  • LCARS-Style Interface: Consistent with ValkyrAI design language
  • Responsive Layout: 3D workflow viewer on right, controls and data on left
  • Interactive Elements: Configurable widgets and real-time updates
  • Visual Indicators: Color-coded status and error reporting

Architecture

Backend Components

Statistics Controller

Location: valkyrai/src/main/java/com/valkyrlabs/valkyrai/controller/StatisticsController.java

Provides REST endpoints for table statistics:

  • GET /v1/statistics/tables - All table statistics
  • GET /v1/statistics/tables/{entityName} - Specific entity statistics
  • GET /v1/statistics/summary - Summary statistics

Enhanced Repository Template

Location: valkyrai/src/main/resources/templates/JavaSpring/repository.mustache

All generated repositories now include:

  • countAll{EntityName}() - Get total record count
  • getTableSize() - Default table size implementation
  • getTableName() - Table name for reporting
  • getEntityName() - Entity name for statistics

Frontend Components

ObjectStatsPanel

Location: web/typescript/valkyr_labs_com/src/components/ObjectStatsPanel/index.tsx

Features:

  • Real-time API statistics fetching
  • User preference management with localStorage persistence
  • Configurable entity monitoring
  • Error handling and retry logic
  • Modal configuration interface

DashboardTab

Location: web/typescript/valkyr_labs_com/src/components/Dashboard/tabs/DashboardTab.tsx

Consolidated dashboard featuring:

  • Tabbed navigation (Overview, Workflow Metrics, System Operations)
  • 3D workflow viewer integration
  • Professional LCARS styling
  • Responsive multi-column layout

Usage

Accessing the Dashboard

Navigate to /dashboard-ops in your ValkyrAI application to access the Dashboard Ops Center.

Configuring Monitored Objects

  1. Click the gear (⚙️) icon in the API Object Statistics panel
  2. Select/deselect entities you want to monitor
  3. Changes are automatically saved to localStorage
  4. Preferences persist across browser sessions
  • Overview Tab: Default view showing object statistics and system health
  • Workflow Metrics Tab: Detailed workflow performance data
  • System Operations Tab: Actuator-based system monitoring

Implementation Details

User Preferences Storage

type UserPreferences = {
watchedEntities: string[];
lastUpdated: string;
};

const STORAGE_KEY = "dashboardOps.objectStats.preferences";

Preferences are stored in localStorage and include:

  • List of entities to monitor
  • Last update timestamp for tracking changes

API Integration

The dashboard integrates with multiple backend services:

  • Statistics API: Real-time object counts
  • Actuator Endpoints: System health and metrics
  • Workflow Services: Performance and execution data

Security

All endpoints are protected with Spring Security:

@PreAuthorize("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')")

Configuration

Backend Configuration

Enable statistics collection by ensuring the StatisticsController is included in component scanning:

@ComponentScan(basePackages = {"com.valkyrlabs.valkyrai.controller"})

Frontend Configuration

The dashboard automatically detects the API base URL from environment variables:

  • VITE_basePath (Vite)
  • REACT_APP_BASE_PATH (Create React App)
  • Auto-detection based on current location

Performance Considerations

Database Impact

  • Statistics queries use efficient COUNT operations
  • Repository-level caching can be implemented for frequently accessed statistics
  • Consider database indexing for large datasets

Frontend Optimization

  • 30-second auto-refresh interval balances freshness with performance
  • Component-level state management reduces unnecessary re-renders
  • Lazy loading of configuration modal improves initial load time

Troubleshooting

Statistics Not Loading

  1. Verify backend is running and accessible
  2. Check browser console for API errors
  3. Ensure user has appropriate permissions
  4. Verify statistics endpoints are responding

Configuration Not Persisting

  1. Check browser localStorage is enabled
  2. Verify no browser extensions are blocking storage
  3. Clear localStorage and reconfigure if corrupted

Performance Issues

  1. Reduce refresh frequency if needed
  2. Limit number of monitored entities
  3. Check database performance for COUNT queries

Future Enhancements

Planned Features

  • Custom Refresh Intervals: User-configurable update frequencies
  • Historical Data: Trend analysis and historical statistics
  • Alerting: Threshold-based notifications and alerts
  • Export Capabilities: CSV/JSON data export functionality
  • Advanced Filtering: Date range and condition-based filtering

Integration Opportunities

  • Grafana Integration: Advanced charting and visualization
  • Prometheus Metrics: Time-series data collection
  • Slack/Teams Notifications: Real-time alerting integration

API Reference

GET /v1/statistics/tables

Returns array of table statistics:

[
{
"entityName": "Workflow",
"tableName": "workflow",
"count": 42,
"error": null
}
]

GET /v1/statistics/summary

Returns summary statistics:

{
"totalEntities": 8,
"totalRecords": 1234,
"errors": 0,
"timestamp": "2025-09-15T11:45:26.000Z"
}