Improve demo seed
This commit is contained in:
@@ -104,7 +104,7 @@ export const DemoSetupPage: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
<div className="flex flex-col items-center justify-center min-h-[60vh]">
|
||||
<LoadingSpinner size="large" />
|
||||
<LoadingSpinner size="lg" />
|
||||
<p className="mt-4 text-[var(--text-secondary)]">
|
||||
Inicializando entorno demo...
|
||||
</p>
|
||||
@@ -159,7 +159,7 @@ export const DemoSetupPage: React.FC = () => {
|
||||
{progressPercentage}%
|
||||
</span>
|
||||
</div>
|
||||
<ProgressBar value={progressPercentage} variant="primary" />
|
||||
<ProgressBar value={progressPercentage} variant="default" animated />
|
||||
</div>
|
||||
|
||||
{status.status === 'pending' && (
|
||||
@@ -225,12 +225,15 @@ function calculateProgressPercentage(status: SessionStatusResponse): number {
|
||||
if (!status.progress) return 0;
|
||||
|
||||
const services = Object.values(status.progress);
|
||||
if (services.length === 0) return 0;
|
||||
|
||||
const completedServices = services.filter(
|
||||
(s) => s.status === 'completed' || s.status === 'failed'
|
||||
).length;
|
||||
const totalServices = services.length;
|
||||
|
||||
return Math.round((completedServices / totalServices) * 100);
|
||||
const percentage = (completedServices / totalServices) * 100;
|
||||
return Math.round(isNaN(percentage) ? 0 : percentage);
|
||||
}
|
||||
|
||||
export default DemoSetupPage;
|
||||
|
||||
Reference in New Issue
Block a user