refactor: change analysis to upload
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { Loader2, Play, TrendingUp } from 'lucide-react';
|
||||
import { Loader2, TrendingUp, UploadCloud } from 'lucide-react';
|
||||
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@@ -12,9 +12,9 @@ import { videoService } from '@/services/api';
|
||||
import type { SessionContext } from '@/types';
|
||||
import { ROUTES } from '@/utils/routes';
|
||||
|
||||
import { AnalysisSettingsSection } from './components/AnalysisSettingsSection';
|
||||
import { InputDataSection } from './components/InputDataSection';
|
||||
import { LocationSection } from './components/LocationSection';
|
||||
import { UploadSettingsSection } from './components/UploadSettingsSection';
|
||||
|
||||
export default function UploadPage() {
|
||||
const router = useRouter();
|
||||
@@ -34,7 +34,7 @@ export default function UploadPage() {
|
||||
|
||||
const handleSubmit = async () => {
|
||||
if (!session?.chainageId || !videoFile || !gpsFile) {
|
||||
setError('Complete location and input data before starting analysis.');
|
||||
setError('Complete location and input data before upload.');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ export default function UploadPage() {
|
||||
return (
|
||||
<div className="space-y-5">
|
||||
<PageHeader
|
||||
title="Create Analysis Job"
|
||||
description="Configure location, upload data, and start AI analysis."
|
||||
title="Upload"
|
||||
description="Configure location, upload data, and submit it for processing."
|
||||
icon={TrendingUp}
|
||||
/>
|
||||
|
||||
@@ -94,7 +94,7 @@ export default function UploadPage() {
|
||||
|
||||
<Separator />
|
||||
|
||||
<AnalysisSettingsSection
|
||||
<UploadSettingsSection
|
||||
value={analysisMethod}
|
||||
onValueChange={setAnalysisMethod}
|
||||
disabled={isSubmitting}
|
||||
@@ -117,12 +117,12 @@ export default function UploadPage() {
|
||||
{isSubmitting ? (
|
||||
<>
|
||||
<Loader2 className="size-4 animate-spin" />
|
||||
Starting analysis...
|
||||
Uploading...
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Play className="size-4" />
|
||||
Start Analysis
|
||||
<UploadCloud className="size-4" />
|
||||
Upload
|
||||
</>
|
||||
)}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user