Spaces:
Running
Running
Avijit Ghosh
commited on
Commit
·
56d40a2
1
Parent(s):
928f843
pretty
Browse files- app/about/page.tsx +25 -8
- app/evaluation/[id]/page.client.tsx +20 -8
app/about/page.tsx
CHANGED
|
@@ -1,20 +1,37 @@
|
|
|
|
|
|
|
|
| 1 |
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
| 2 |
import { Badge } from "@/components/ui/badge"
|
| 3 |
import { Separator } from "@/components/ui/separator"
|
| 4 |
import { Button } from "@/components/ui/button"
|
| 5 |
import Link from "next/link"
|
| 6 |
-
import { ArrowLeft, ExternalLink } from "lucide-react"
|
|
|
|
| 7 |
|
| 8 |
export default function AboutPage() {
|
|
|
|
|
|
|
| 9 |
return (
|
| 10 |
<div className="container mx-auto px-4 py-8 max-w-4xl">
|
| 11 |
<div className="mb-6">
|
| 12 |
-
<
|
| 13 |
-
<
|
| 14 |
-
<
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
</Button>
|
| 17 |
-
</
|
| 18 |
<h1 className="text-4xl font-bold mb-2">About AI Evaluation Dashboard</h1>
|
| 19 |
<p className="text-xl text-muted-foreground">
|
| 20 |
A comprehensive platform for documenting and sharing AI system evaluations
|
|
@@ -160,7 +177,7 @@ export default function AboutPage() {
|
|
| 160 |
</CardContent>
|
| 161 |
</Card>
|
| 162 |
|
| 163 |
-
<Card>
|
| 164 |
<CardHeader>
|
| 165 |
<CardTitle>Technical Implementation</CardTitle>
|
| 166 |
<CardDescription>
|
|
@@ -183,7 +200,7 @@ export default function AboutPage() {
|
|
| 183 |
</div>
|
| 184 |
</div>
|
| 185 |
</CardContent>
|
| 186 |
-
</Card>
|
| 187 |
</div>
|
| 188 |
|
| 189 |
<Separator className="my-8" />
|
|
|
|
| 1 |
+
"use client"
|
| 2 |
+
|
| 3 |
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
| 4 |
import { Badge } from "@/components/ui/badge"
|
| 5 |
import { Separator } from "@/components/ui/separator"
|
| 6 |
import { Button } from "@/components/ui/button"
|
| 7 |
import Link from "next/link"
|
| 8 |
+
import { ArrowLeft, ExternalLink, Sun, Moon } from "lucide-react"
|
| 9 |
+
import { useTheme } from "next-themes"
|
| 10 |
|
| 11 |
export default function AboutPage() {
|
| 12 |
+
const { theme, setTheme } = useTheme()
|
| 13 |
+
|
| 14 |
return (
|
| 15 |
<div className="container mx-auto px-4 py-8 max-w-4xl">
|
| 16 |
<div className="mb-6">
|
| 17 |
+
<div className="flex items-center justify-between mb-4">
|
| 18 |
+
<Link href="/">
|
| 19 |
+
<Button variant="ghost">
|
| 20 |
+
<ArrowLeft className="mr-2 h-4 w-4" />
|
| 21 |
+
Back to Dashboard
|
| 22 |
+
</Button>
|
| 23 |
+
</Link>
|
| 24 |
+
<Button
|
| 25 |
+
variant="ghost"
|
| 26 |
+
size="sm"
|
| 27 |
+
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
|
| 28 |
+
className="h-9 w-9 p-0"
|
| 29 |
+
>
|
| 30 |
+
<Sun className="h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
|
| 31 |
+
<Moon className="absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
|
| 32 |
+
<span className="sr-only">Toggle theme</span>
|
| 33 |
</Button>
|
| 34 |
+
</div>
|
| 35 |
<h1 className="text-4xl font-bold mb-2">About AI Evaluation Dashboard</h1>
|
| 36 |
<p className="text-xl text-muted-foreground">
|
| 37 |
A comprehensive platform for documenting and sharing AI system evaluations
|
|
|
|
| 177 |
</CardContent>
|
| 178 |
</Card>
|
| 179 |
|
| 180 |
+
{/* <Card>
|
| 181 |
<CardHeader>
|
| 182 |
<CardTitle>Technical Implementation</CardTitle>
|
| 183 |
<CardDescription>
|
|
|
|
| 200 |
</div>
|
| 201 |
</div>
|
| 202 |
</CardContent>
|
| 203 |
+
</Card> */}
|
| 204 |
</div>
|
| 205 |
|
| 206 |
<Separator className="my-8" />
|
app/evaluation/[id]/page.client.tsx
CHANGED
|
@@ -2,10 +2,11 @@
|
|
| 2 |
|
| 3 |
import { useParams, useRouter } from "next/navigation"
|
| 4 |
import { useState, useEffect } from "react"
|
|
|
|
| 5 |
import { Button } from "@/components/ui/button"
|
| 6 |
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
| 7 |
import { Badge } from "@/components/ui/badge"
|
| 8 |
-
import { ArrowLeft, Download, Eye, EyeOff, Info, Database, Globe, Calendar, User, Building, Cpu, MonitorSpeaker, Hash, Tags, Clock, Activity, Settings,
|
| 9 |
// Section icons
|
| 10 |
Target, BarChart3, Shield, AlertTriangle,
|
| 11 |
// Capability icons
|
|
@@ -90,6 +91,7 @@ const getCategoryIcon = (categoryId: string) => {
|
|
| 90 |
export default function EvaluationDetailsPage() {
|
| 91 |
const params = useParams()
|
| 92 |
const router = useRouter()
|
|
|
|
| 93 |
const evaluationId = params.id as string
|
| 94 |
|
| 95 |
const [evaluation, setEvaluation] = useState<any>(null)
|
|
@@ -273,6 +275,16 @@ export default function EvaluationDetailsPage() {
|
|
| 273 |
About
|
| 274 |
</Button>
|
| 275 |
</Link>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
<Button variant="outline" size="sm">
|
| 277 |
<Download className="h-4 w-4 mr-2" />
|
| 278 |
Export Report
|
|
@@ -291,7 +303,7 @@ export default function EvaluationDetailsPage() {
|
|
| 291 |
<CardHeader>
|
| 292 |
<div className="flex items-center justify-between w-full">
|
| 293 |
<div>
|
| 294 |
-
<CardTitle className="flex items-center gap-2">
|
| 295 |
<Database className="h-5 w-5 text-blue-600" />
|
| 296 |
System Information
|
| 297 |
</CardTitle>
|
|
@@ -472,7 +484,7 @@ export default function EvaluationDetailsPage() {
|
|
| 472 |
<CardHeader>
|
| 473 |
<div className="flex items-center justify-between w-full">
|
| 474 |
{/* compute applicable count as non-NA categories from the full CATEGORIES list */}
|
| 475 |
-
<CardTitle className="flex items-center gap-2">
|
| 476 |
<Target className="h-5 w-5 text-green-600" />
|
| 477 |
Applicable Categories ({
|
| 478 |
getAllCategories().filter((c) => {
|
|
@@ -641,7 +653,7 @@ export default function EvaluationDetailsPage() {
|
|
| 641 |
{/* Overall Statistics */}
|
| 642 |
<Card className="mb-6">
|
| 643 |
<CardHeader>
|
| 644 |
-
<CardTitle className="flex items-center gap-2">
|
| 645 |
<BarChart3 className="h-5 w-5 text-blue-600" />
|
| 646 |
Overall Statistics
|
| 647 |
</CardTitle>
|
|
@@ -680,7 +692,7 @@ export default function EvaluationDetailsPage() {
|
|
| 680 |
{((evaluation.overallStats?.weakCategories || []).length > 0 || (evaluation.overallStats?.insufficientCategories || []).length > 0) && (
|
| 681 |
<Card className="mb-6">
|
| 682 |
<CardHeader>
|
| 683 |
-
<CardTitle className="flex items-center gap-2">
|
| 684 |
<AlertTriangle className="h-5 w-5 text-amber-600" />
|
| 685 |
Priority Areas
|
| 686 |
</CardTitle>
|
|
@@ -778,7 +790,7 @@ export default function EvaluationDetailsPage() {
|
|
| 778 |
<CardHeader>
|
| 779 |
<div className="flex items-start justify-between w-full gap-4">
|
| 780 |
<div>
|
| 781 |
-
<CardTitle className="flex items-center gap-2">
|
| 782 |
{(() => {
|
| 783 |
const IconComponent = getCategoryIcon(categoryId)
|
| 784 |
return <IconComponent className="h-5 w-5" />
|
|
@@ -1152,8 +1164,8 @@ export default function EvaluationDetailsPage() {
|
|
| 1152 |
{data.additionalAspects && (
|
| 1153 |
<div>
|
| 1154 |
<h4 className="font-semibold mb-3">Part C: Additional Aspects</h4>
|
| 1155 |
-
<div className="
|
| 1156 |
-
|
| 1157 |
</div>
|
| 1158 |
</div>
|
| 1159 |
)}
|
|
|
|
| 2 |
|
| 3 |
import { useParams, useRouter } from "next/navigation"
|
| 4 |
import { useState, useEffect } from "react"
|
| 5 |
+
import { useTheme } from "next-themes"
|
| 6 |
import { Button } from "@/components/ui/button"
|
| 7 |
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
| 8 |
import { Badge } from "@/components/ui/badge"
|
| 9 |
+
import { ArrowLeft, Download, Eye, EyeOff, Info, Database, Globe, Calendar, User, Building, Cpu, MonitorSpeaker, Hash, Tags, Clock, Activity, Settings, Sun, Moon,
|
| 10 |
// Section icons
|
| 11 |
Target, BarChart3, Shield, AlertTriangle,
|
| 12 |
// Capability icons
|
|
|
|
| 91 |
export default function EvaluationDetailsPage() {
|
| 92 |
const params = useParams()
|
| 93 |
const router = useRouter()
|
| 94 |
+
const { theme, setTheme } = useTheme()
|
| 95 |
const evaluationId = params.id as string
|
| 96 |
|
| 97 |
const [evaluation, setEvaluation] = useState<any>(null)
|
|
|
|
| 275 |
About
|
| 276 |
</Button>
|
| 277 |
</Link>
|
| 278 |
+
<Button
|
| 279 |
+
variant="ghost"
|
| 280 |
+
size="sm"
|
| 281 |
+
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
|
| 282 |
+
className="h-9 w-9 p-0"
|
| 283 |
+
>
|
| 284 |
+
<Sun className="h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
|
| 285 |
+
<Moon className="absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
|
| 286 |
+
<span className="sr-only">Toggle theme</span>
|
| 287 |
+
</Button>
|
| 288 |
<Button variant="outline" size="sm">
|
| 289 |
<Download className="h-4 w-4 mr-2" />
|
| 290 |
Export Report
|
|
|
|
| 303 |
<CardHeader>
|
| 304 |
<div className="flex items-center justify-between w-full">
|
| 305 |
<div>
|
| 306 |
+
<CardTitle className="flex items-center gap-2 text-xl font-bold">
|
| 307 |
<Database className="h-5 w-5 text-blue-600" />
|
| 308 |
System Information
|
| 309 |
</CardTitle>
|
|
|
|
| 484 |
<CardHeader>
|
| 485 |
<div className="flex items-center justify-between w-full">
|
| 486 |
{/* compute applicable count as non-NA categories from the full CATEGORIES list */}
|
| 487 |
+
<CardTitle className="flex items-center gap-2 text-xl font-bold">
|
| 488 |
<Target className="h-5 w-5 text-green-600" />
|
| 489 |
Applicable Categories ({
|
| 490 |
getAllCategories().filter((c) => {
|
|
|
|
| 653 |
{/* Overall Statistics */}
|
| 654 |
<Card className="mb-6">
|
| 655 |
<CardHeader>
|
| 656 |
+
<CardTitle className="flex items-center gap-2 text-xl font-bold">
|
| 657 |
<BarChart3 className="h-5 w-5 text-blue-600" />
|
| 658 |
Overall Statistics
|
| 659 |
</CardTitle>
|
|
|
|
| 692 |
{((evaluation.overallStats?.weakCategories || []).length > 0 || (evaluation.overallStats?.insufficientCategories || []).length > 0) && (
|
| 693 |
<Card className="mb-6">
|
| 694 |
<CardHeader>
|
| 695 |
+
<CardTitle className="flex items-center gap-2 text-xl font-bold">
|
| 696 |
<AlertTriangle className="h-5 w-5 text-amber-600" />
|
| 697 |
Priority Areas
|
| 698 |
</CardTitle>
|
|
|
|
| 790 |
<CardHeader>
|
| 791 |
<div className="flex items-start justify-between w-full gap-4">
|
| 792 |
<div>
|
| 793 |
+
<CardTitle className="flex items-center gap-2 text-xl font-bold">
|
| 794 |
{(() => {
|
| 795 |
const IconComponent = getCategoryIcon(categoryId)
|
| 796 |
return <IconComponent className="h-5 w-5" />
|
|
|
|
| 1164 |
{data.additionalAspects && (
|
| 1165 |
<div>
|
| 1166 |
<h4 className="font-semibold mb-3">Part C: Additional Aspects</h4>
|
| 1167 |
+
<div className="text-sm text-muted-foreground">
|
| 1168 |
+
{data.additionalAspects}
|
| 1169 |
</div>
|
| 1170 |
</div>
|
| 1171 |
)}
|