Wave 64-65 cleanup: Proto regeneration and build system updates from Tonic 0.12→0.14 upgrade Files updated: - Cargo.lock: Dependency resolution for Tonic 0.14.2 - All build.rs: Updated for tonic-prost-build - Proto files: Regenerated with tonic-prost 0.14 - Examples/tests: Updated for new gRPC API 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
79 lines
3.8 KiB
Rust
79 lines
3.8 KiB
Rust
//! Configuration Dashboard Demo
|
|
//!
|
|
//! This example demonstrates the TLI Configuration Dashboard functionality.
|
|
//! Note: Configuration management is now handled by the shared config crate,
|
|
//! not directly by TLI which is a pure client.
|
|
#![allow(unused_crate_dependencies)]
|
|
|
|
use tli::prelude::*;
|
|
use tokio::sync::mpsc;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> TliResult<()> {
|
|
println!("🚀 TLI Configuration Dashboard Demo");
|
|
println!("=====================================");
|
|
|
|
// Create a mock event channel
|
|
let (_event_sender, _event_receiver) = mpsc::channel(100);
|
|
|
|
// Create the configuration dashboard
|
|
let config_dashboard = tli::dashboards::ConfigurationDashboard::new(_event_sender);
|
|
|
|
println!("✅ Configuration Dashboard created successfully!");
|
|
|
|
// Note: Actual configuration management is done through the config crate
|
|
// which TLI accesses via gRPC services, not directly
|
|
println!(
|
|
"
|
|
Note: Configuration is managed by the config crate and accessed via gRPC.
|
|
TLI is a pure client that doesn't directly manage configuration."
|
|
);
|
|
|
|
let _ = config_dashboard; // Use the dashboard to avoid unused warning
|
|
|
|
println!("\n📋 Configuration Dashboard Features:");
|
|
println!(" 🌳 Hierarchical category tree navigation");
|
|
println!(" ⚙️ Real-time configuration editing");
|
|
println!(" ✅ Live validation with error reporting");
|
|
println!(" 📜 Change history with rollback capability");
|
|
println!(" 🔍 Search functionality across settings");
|
|
println!(" 🔥 Hot-reload indicator for immediate changes");
|
|
println!(" 🔐 Sensitive value masking");
|
|
println!(" 🎯 Environment-specific configurations");
|
|
|
|
println!("\n🎮 Keyboard Controls:");
|
|
println!(" [Tab] - Switch between panels");
|
|
println!(" [↑↓] - Navigate lists");
|
|
println!(" [Enter] - Select/Edit");
|
|
println!(" [Space] - Toggle category expansion");
|
|
println!(" [E] - Edit current setting");
|
|
println!(" [S] - Search settings");
|
|
println!(" [R] - Reset to default");
|
|
println!(" [F5] - Refresh data");
|
|
println!(" [Esc] - Cancel/Exit");
|
|
|
|
println!("\n🏗️ Architecture:");
|
|
println!(" Client: TLI Terminal Application");
|
|
println!(" Database: PostgreSQL with config schema");
|
|
println!(" UI: Ratatui terminal interface");
|
|
println!(" Validation: Real-time with custom rules");
|
|
|
|
println!("\n🎯 Dashboard Layout:");
|
|
println!("┌─ CONFIGURATION DASHBOARD ────────────────────────────────────────┐");
|
|
println!("│ Category Tree │ Settings Editor │ Validation & History │");
|
|
println!("│ ▼ System │ Key: log_level │ Status: ✓ VALID │");
|
|
println!("│ ├─ Logging │ Value: [info ▼] │ Type: string │");
|
|
println!("│ ├─ Database │ Description: │ Required: Yes │");
|
|
println!("│ └─ gRPC │ Global log level │ Hot Reload: Yes │");
|
|
println!("│ ▼ Trading │ │ │");
|
|
println!("│ ├─ Execution │ [SAVE CHANGES] │ Recent Changes: │");
|
|
println!("│ ├─ Strategies │ [RESET] │ 14:30 - risk.var_conf │");
|
|
println!("│ └─ Position │ [VALIDATE] │ 14:25 - ml.model_thresh │");
|
|
println!("└──────────────────┴──────────────────┴──────────────────────────┘");
|
|
|
|
println!("\n✨ Demo completed successfully!");
|
|
println!("📌 To run with real database: Set DATABASE_URL environment variable");
|
|
|
|
Ok(())
|
|
}
|