This MVP release provides a complete full-stack solution for managing action mappings in Geutebruck's GeViScope and GeViSoft video surveillance systems. ## Features ### Flutter Web Application (Port 8081) - Modern, responsive UI for managing action mappings - Action picker dialog with full parameter configuration - Support for both GSC (GeViScope) and G-Core server actions - Consistent UI for input and output actions with edit/delete capabilities - Real-time action mapping creation, editing, and deletion - Server categorization (GSC: prefix for GeViScope, G-Core: prefix for G-Core servers) ### FastAPI REST Backend (Port 8000) - RESTful API for action mapping CRUD operations - Action template service with comprehensive action catalog (247 actions) - Server management (G-Core and GeViScope servers) - Configuration tree reading and writing - JWT authentication with role-based access control - PostgreSQL database integration ### C# SDK Bridge (gRPC, Port 50051) - Native integration with GeViSoft SDK (GeViProcAPINET_4_0.dll) - Action mapping creation with correct binary format - Support for GSC and G-Core action types - Proper Camera parameter inclusion in action strings (fixes CrossSwitch bug) - Action ID lookup table with server-specific action IDs - Configuration reading/writing via SetupClient ## Bug Fixes - **CrossSwitch Bug**: GSC and G-Core actions now correctly display camera/PTZ head parameters in GeViSet - Action strings now include Camera parameter: `@ PanLeft (Comment: "", Camera: 101028)` - Proper filter flags and VideoInput=0 for action mappings - Correct action ID assignment (4198 for GSC, 9294 for G-Core PanLeft) ## Technical Stack - **Frontend**: Flutter Web, Dart, Dio HTTP client - **Backend**: Python FastAPI, PostgreSQL, Redis - **SDK Bridge**: C# .NET 8.0, gRPC, GeViSoft SDK - **Authentication**: JWT tokens - **Configuration**: GeViSoft .set files (binary format) ## Credentials - GeViSoft/GeViScope: username=sysadmin, password=masterkey - Default admin: username=admin, password=admin123 ## Deployment All services run on localhost: - Flutter Web: http://localhost:8081 - FastAPI: http://localhost:8000 - SDK Bridge gRPC: localhost:50051 - GeViServer: localhost (default port) Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
4.8 KiB
How to Test the New Action Picker Features
Prerequisites
✅ API server is running on http://100.81.138.77:8000 ✅ All new files are in place
Steps to See the New Features
1. Stop the Running App
If the Flutter app is currently running, stop it completely:
- VS Code: Press the stop button (red square) or Shift+F5
- Android Studio: Click Stop (red square) in the toolbar
2. Rebuild and Run
Start the app fresh to pick up the new code:
- VS Code: Press F5 or click Run > Start Debugging
- Android Studio: Click Run (green triangle) or Shift+F10
IMPORTANT: Hot reload (⚡) won't work for these changes - you need a full restart!
3. Navigate to Action Mappings
- Login with your credentials
- Open the menu (≡)
- Click "Action Mappings"
- Click "Add Action Mapping" or edit an existing one
4. Test the New Action Picker
Adding an Output Action:
- In the form, scroll to "Output Actions" section
- Click the "Add Output Action" button
- You should see a NEW dialog (800x600px) with:
- Left side: Category dropdown + Action list
- Right side: Parameters section
Using the Action Picker:
- Select a category (e.g., "Camera Control")
- Click an action from the list (e.g., "PanStop")
- Enable parameters by checking boxes
- Fill in parameter values
- Enter a caption
- Click "Ok"
- The action should appear in the form with all parameters
Editing an Action:
- Click the edit button (✎) on any output action card
- The action picker should open with existing values
- Modify and click "Ok"
Reordering Actions:
- Add 2+ output actions
- Use the ▲ ▼ buttons to reorder them
5. What You Should See
Before (Old UI):
- Dropdown with 29 hardcoded actions
- Manual parameter editing dialogs
- No reordering
After (New UI):
- "Add Output Action" button
- Action picker dialog with categories
- 45 actions across 10 categories
- Dynamic parameter fields with checkboxes
- Action descriptions shown
- Up/Down buttons to reorder
Troubleshooting
Issue: Still seeing the old UI with dropdown
Solution: You didn't do a full rebuild
- Stop the app completely
- Close all running processes
- Run from IDE again (not hot reload!)
Issue: "Failed to load action templates"
Check:
- API server is running: http://100.81.138.77:8000
- You're logged in
- Check browser/app logs for errors
Test the API endpoints manually:
# Get token
curl -X POST http://100.81.138.77:8000/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin123"}'
# Test categories endpoint
curl http://100.81.138.77:8000/api/v1/configuration/action-categories \
-H "Authorization: Bearer YOUR_TOKEN"
# Test action types endpoint
curl http://100.81.138.77:8000/api/v1/configuration/action-types \
-H "Authorization: Bearer YOUR_TOKEN"
Issue: Build errors / Red squiggles
Check these files exist:
- ✅
lib/data/models/action_template.dart - ✅
lib/data/services/action_template_service.dart - ✅
lib/presentation/widgets/action_picker_dialog.dart
Run in terminal:
cd C:\DEV\COPILOT\geutebruck_app
flutter clean
flutter pub get
flutter run
Issue: "ApiConstants.baseUrl not found"
The file exists at lib/core/constants/api_constants.dart
Make sure imports are correct in action_template_service.dart
Files Changed
New Files (3):
lib/data/models/action_template.dartlib/data/services/action_template_service.dartlib/presentation/widgets/action_picker_dialog.dart
Modified Files (1):
4. lib/presentation/screens/action_mappings/action_mapping_form_screen.dart
Backend Endpoints
These should all be working:
- ✅ GET
/api/v1/configuration/action-categories - ✅ GET
/api/v1/configuration/action-types - ✅ GET
/api/v1/configuration/action-types/{name}
Expected Behavior
Creating a New Action Mapping:
- Fill name, description, input action
- Click "Add Output Action"
- NEW DIALOG APPEARS ← This is the key change!
- Select category "Camera Control"
- Select action "PanStop"
- Check "GCoreServer" parameter
- Enter value "gscope-cdu-3"
- Check "PTZ head" parameter
- Enter value "101027"
- Enter caption "Stop Pan Camera 1"
- Click "Ok"
- Action appears in form with 2 parameters shown
- Click "Create Action Mapping"
Editing Existing Action:
- Open existing mapping
- Click edit button (✎) on output action
- NEW DIALOG APPEARS with existing values
- Modify parameters
- Click "Ok"
- Click "Update Action Mapping"
Still Not Working?
Send me:
- Screenshot of what you see
- Any error messages from console/logs
- What step you're at in the process
The dialog MUST appear when you click "Add Output Action" - if you don't see it, the app hasn't picked up the new code yet.