updates
This commit is contained in:
@@ -5,7 +5,7 @@ import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
|
||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import { CSVUpload } from "@/components/CSVUpload";
|
||||
import { DataUpdateDialog } from "@/components/DataUpdateDialog";
|
||||
import { WorkPackage } from "@/types/traceability";
|
||||
import {
|
||||
Target,
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
Download,
|
||||
ChevronDown,
|
||||
Terminal,
|
||||
Upload,
|
||||
RefreshCw,
|
||||
} from "lucide-react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useState } from "react";
|
||||
@@ -142,7 +142,7 @@ export default function Dashboard() {
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2">
|
||||
<Download className="h-5 w-5" />
|
||||
<RefreshCw className="h-5 w-5" />
|
||||
Data Management
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
@@ -150,19 +150,19 @@ export default function Dashboard() {
|
||||
<div className="flex flex-wrap gap-3">
|
||||
<Button variant="outline" onClick={handleDownloadCSV}>
|
||||
<Download className="h-4 w-4 mr-2" />
|
||||
Download CSV
|
||||
Download Current CSV
|
||||
</Button>
|
||||
<Button variant="outline" onClick={() => setShowUpload(!showUpload)}>
|
||||
<Upload className="h-4 w-4 mr-2" />
|
||||
Upload CSV
|
||||
<Button onClick={() => setShowUpload(!showUpload)}>
|
||||
<RefreshCw className="h-4 w-4 mr-2" />
|
||||
Update Data
|
||||
</Button>
|
||||
<Button variant="outline" onClick={refresh} disabled={loading}>
|
||||
Reload Data
|
||||
Reload from CSV
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{showUpload && (
|
||||
<CSVUpload
|
||||
<DataUpdateDialog
|
||||
onDataLoaded={handleDataLoaded}
|
||||
onClose={() => setShowUpload(false)}
|
||||
/>
|
||||
@@ -186,7 +186,7 @@ export default function Dashboard() {
|
||||
<div key={i} className="opacity-90">{log}</div>
|
||||
))
|
||||
) : (
|
||||
<div className="text-slate-500">No logs available. Click "Reload Data" to see parsing logs.</div>
|
||||
<div className="text-slate-500">No logs available. Click "Reload from CSV" to see parsing logs.</div>
|
||||
)}
|
||||
</div>
|
||||
</ScrollArea>
|
||||
@@ -194,13 +194,6 @@ export default function Dashboard() {
|
||||
</Card>
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
|
||||
<div className="text-xs text-muted-foreground">
|
||||
<p>To update data from OpenProject, run the Python script locally:</p>
|
||||
<code className="bg-muted px-2 py-1 rounded text-xs mt-1 block">
|
||||
python public/data/get_traceability.py
|
||||
</code>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user