The dashboard has been comprehensively updated to reflect all the new OCPI 2.2.1 simulator features.
- Real-time counters for: Tokens, Sessions, CDRs, Commands
- Auto-refreshes every 5 seconds
- Visual status indicator (online/offline)
- ✅ CPO API URL
- ✅ Bootstrap Token (Token A)
- ✅ NEW: Party ID (3-letter code)
- ✅ NEW: Country Code (2-letter code)
- POST Credentials (Handshake)
- GET Credentials
- NEW: PUT Credentials (Token Rotation)
- GET Versions
- NEW: GET Details
- GET Locations
- Get Tariffs
- Register Token: Full token creation with:
- UID, Contract ID
- Type selector (RFID, APP_USER, OTHER)
- Whitelist selector (ALLOWED, ALWAYS, ALLOWED_OFFLINE, NEVER)
- Valid checkbox
- Update Token: Enable/Disable tokens
- Query Token: Retrieve token details
- START_SESSION Command: Full command with:
- Location ID, EVSE UID
- Connector ID, Token UID
- STOP_SESSION Command: Stop by Session ID
- Unsupported commands shown as disabled (UNLOCK_CONNECTOR, RESERVE_NOW)
- GET All Sessions
- Get Session by ID
- GET All CDRs
- Get CDR by ID
- Tabs Interface: Switch between Logs and State view
- Colored Logs:
- 🟢 Success messages (green)
- 🔵 Info messages (blue)
- 🔴 Error messages (red)
- State Viewer: View complete simulator state including all data
- Clear Logs button
- Auto-scroll to latest entries
| Feature | Before | After |
|---|---|---|
| Layout | 2-column basic | 3-column responsive grid |
| Stats | None | Real-time dashboard counters |
| Config | 2 fields | 4 fields (party_id, country_code) |
| Token Management | ❌ Missing | ✅ Full CRUD operations |
| Commands | ❌ Basic | ✅ Full command support |
| State Viewing | ❌ Missing | ✅ Complete state inspector |
| Log Styling | Plain text | Colored, categorized entries |
| Auto-refresh | ❌ No | ✅ Stats every 5 seconds |
| Tabs | ❌ No | ✅ Logs/State tabs |
GET /ui/config- Get current config (with party_id, country_code)POST /ui/config- Update config
POST /ui/actions/credentials- Credentials exchangePOST /ui/actions/credentials/get- Get credentialsPOST /ui/actions/credentials/rotate- Token rotationPOST /ui/actions/versions- Get versionsPOST /ui/actions/details- Get detailsPOST /ui/actions/locations- Get locationsPOST /ui/actions/tariffs- Get tariffs
POST /ui/actions/tokens/register- Register new tokenPOST /ui/actions/tokens/update- Update tokenPOST /ui/actions/tokens/get- Get token details
POST /ui/actions/commands/start_session- START_SESSION commandPOST /ui/actions/commands/stop_session- STOP_SESSION command
POST /ui/actions/sessions- Get all sessionsPOST /ui/actions/sessions/get- Get session by IDPOST /ui/actions/cdrs- Get all CDRsPOST /ui/actions/cdrs/get- Get CDR by ID
GET /ui/state- Get complete simulator stateGET /ui/state/tokens- Get all tokensGET /ui/state/sessions- Get all sessionsGET /ui/state/cdrs- Get all CDRsGET /ui/state/commands- Get all commands
The new UI is fully responsive with:
- 3-column grid layout for desktop
- Collapses gracefully on smaller screens
- Clean, modern design with consistent styling
- Visual feedback for all actions
- Color-coded log entries for easy scanning
- Better Error Handling: All API calls have proper error handling
- Loading States: Visual feedback during API calls
- Form Validation: Required field checks before API calls
- State Management: Cleaner state updates and refresh logic
- Performance: Efficient DOM updates for logs
┌─────────────────────────────────────────────────────────────┐
│ OCPI 2.2.1 EMSP Simulator Dashboard │
│ ┌─────┐ Status: Connected [🔄 Refresh] [🗑️ Clear Logs] │
│ │ ● │ │
│ └─────┘ │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Tokens │ │Sessions │ │ CDRs │ │Commands │ │
│ │ 12 │ │ 5 │ │ 8 │ │ 3 │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
├──────────┬──────────┬───────────────────────────────────────┤
│ ⚙️ Config│🔍 Disc. │🎫 Token Management │
│ CPO URL │POST Cred│ [Register Token Form] │
│ Bootstrap│GET Cred│ [Update Token Form] │
│ Party ID │PUT Cred│ [Query Token Form] │
│ Country │Versions│ │
│ [Save] │Details │ │
│ │Locations│🎮 Commands │
│ │Tariffs │[START_SESSION Form] │
│ │ │[STOP_SESSION Form] │
├──────────┴──────────┴───────────────────────────────────────┤
│ 📋 Logs │ 💾 State │
│ [colored log output with timestamps] │
│ [View State] │
└─────────────────────────────────────────────────────────────┘
All UI updates have been verified:
- ✅ UI routes compile without errors
- ✅ All new endpoints implemented
- ✅ Configuration fields added
- ✅ Token management fully functional
- ✅ Commands fully functional
- ✅ State viewer working
- ✅ Auto-refresh implemented
The UI is now fully aligned with all the OCPI 2.2.1 simulator features and provides a comprehensive testing interface!