'use client' import { useState } from 'react' interface TestingValidationProps { systemInfo: any configData: any onComplete: (data: any) => void onBack?: () => void isCompleted: boolean } export default function TestingValidation({ systemInfo, configData, onComplete, onBack, isCompleted }: TestingValidationProps) { const [testing, setTesting] = useState(false) const handleRunTests = async () => { setTesting(true) // Simulate testing process await new Promise(resolve => setTimeout(resolve, 3000)) setTesting(false) onComplete({ testing: { passed: true, completedAt: new Date().toISOString() } }) } const getClusterDashboardUrl = () => { // Get the WebUI port from config, default to 9090 const webuiPort = configData?.network?.ports?.webui || 9090 return `http://localhost:${webuiPort}/dashboard` } const handleGoToDashboard = () => { const dashboardUrl = getClusterDashboardUrl() // Clear setup state since we're done localStorage.removeItem('bzzz-setup-state') // Open cluster dashboard in new tab window.open(dashboardUrl, '_blank') // Show completion message and suggest closing this tab const shouldClose = window.confirm( 'Setup complete! The cluster dashboard has opened in a new tab.\n\n' + 'You can now close this setup tab. Click OK to close automatically, or Cancel to keep it open.' ) if (shouldClose) { window.close() } } return (
Validate your BZZZ cluster configuration and test all connections.
Your CHORUS:agents cluster has been successfully configured and deployed.
Cluster Dashboard: {getClusterDashboardUrl()}
The setup process will be terminated and you'll be redirected to your operational cluster.