Add bundled reference files download links
Some checks are pending
CI / Engine — lint / typecheck / test (push) Waiting to run
CI / API — lint / typecheck / test (push) Waiting to run
CI / Web — typecheck / lint / build (push) Waiting to run

This commit is contained in:
Manohar Gupta 2026-05-23 17:39:39 +05:30
parent 0ba21e8936
commit 874877f5ba

View file

@ -340,6 +340,39 @@ export function ProfileViewer() {
{/* Content */}
<div className="flex-1 overflow-y-auto p-4">
{/* Bundled profiles section */}
<div className="mb-6">
<h3 className="text-sm font-medium mb-3 text-muted-foreground">Bundled Reference Files</h3>
<div className="grid grid-cols-3 gap-3">
{[
{ name: "Solar - Gujarat", path: "/api/profiles/solar/GJ", type: "solar" },
{ name: "Solar - Karnataka", path: "/api/profiles/solar/KA", type: "solar" },
{ name: "Solar - Rajasthan", path: "/api/profiles/solar/RJ", type: "solar" },
{ name: "Wind - Gujarat", path: "/api/profiles/wind/GJ", type: "wind" },
{ name: "Wind - Karnataka", path: "/api/profiles/wind/KA", type: "wind" },
{ name: "Wind - Rajasthan", path: "/api/profiles/wind/RJ", type: "wind" },
].map((profile) => (
<a
key={profile.path}
href={`${process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000'}${profile.path}?as_csv=true`}
download
className="flex items-center gap-2 p-3 border rounded-lg hover:bg-accent transition-colors"
>
<span className="text-lg">{profile.type === "solar" ? "☀️" : "💨"}</span>
<div className="flex-1">
<div className="text-sm font-medium">{profile.name}</div>
<div className="text-xs text-muted-foreground">8760 hourly values</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
</svg>
</a>
))}
</div>
</div>
{activeTab === "solar" && (
<div className="space-y-6">
<div>