Compare commits
1 Commits
feat/multi
...
fix/versio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b96d773065 |
@@ -120,6 +120,7 @@ export async function GET() {
|
|||||||
ok: envError === null,
|
ok: envError === null,
|
||||||
error: envError,
|
error: envError,
|
||||||
},
|
},
|
||||||
|
version: "0.5.0",
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ import {
|
|||||||
} from "@/components/ui/select";
|
} from "@/components/ui/select";
|
||||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
import { cn, formatBytes, timeAgo } from "@/lib/utils";
|
import { cn, formatBytes, timeAgo } from "@/lib/utils";
|
||||||
|
import { DASHBOARD_VERSION } from "@/lib/version";
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Types
|
// Types
|
||||||
@@ -1560,8 +1561,11 @@ export default function DashboardPage() {
|
|||||||
|
|
||||||
<footer className="border-t border-border bg-card/30 mt-auto">
|
<footer className="border-t border-border bg-card/30 mt-auto">
|
||||||
<div className="mx-auto max-w-7xl px-4 sm:px-6 py-3 flex items-center justify-between text-xs text-muted-foreground">
|
<div className="mx-auto max-w-7xl px-4 sm:px-6 py-3 flex items-center justify-between text-xs text-muted-foreground">
|
||||||
<div>
|
<div className="flex items-center gap-2">
|
||||||
GPU-Node Dashboard ·{" "}
|
<span className="font-mono font-medium text-foreground">
|
||||||
|
v{DASHBOARD_VERSION}
|
||||||
|
</span>
|
||||||
|
<span>·</span>
|
||||||
<a
|
<a
|
||||||
href="https://github.com/ggml-org/llama.cpp"
|
href="https://github.com/ggml-org/llama.cpp"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -225,23 +225,21 @@ export async function startModelDownload(
|
|||||||
const last = segments.pop() || "model.gguf";
|
const last = segments.pop() || "model.gguf";
|
||||||
filename = last;
|
filename = last;
|
||||||
// For HuggingFace URLs: /<user>/<repo>/resolve/main/<file>
|
// For HuggingFace URLs: /<user>/<repo>/resolve/main/<file>
|
||||||
// → subdir = "<user>___<repo>" (sanitized)
|
// → subdir = "<repo>" (just the repo name, not user___repo)
|
||||||
// For GitHub releases: /<user>/<repo>/releases/download/<tag>/<file>
|
// For GitHub releases: /<user>/<repo>/releases/download/<tag>/<file>
|
||||||
// → subdir = "<user>___<repo>"
|
// → subdir = "<repo>"
|
||||||
const host = parsed.hostname.toLowerCase();
|
const host = parsed.hostname.toLowerCase();
|
||||||
if (host === "huggingface.co" || host === "hf.co") {
|
if (host === "huggingface.co" || host === "hf.co") {
|
||||||
// HF URL: /user/repo/resolve/branch/file
|
// HF URL: /user/repo/resolve/branch/file
|
||||||
if (segments.length >= 2) {
|
if (segments.length >= 2) {
|
||||||
const user = segments[0];
|
|
||||||
const repo = segments[1];
|
const repo = segments[1];
|
||||||
subdir = `${user}___${repo}`.replace(/[^\w.\-]/g, "_");
|
subdir = repo.replace(/[^\w.\-]/g, "_");
|
||||||
}
|
}
|
||||||
} else if (host === "github.com" && segments.includes("releases")) {
|
} else if (host === "github.com" && segments.includes("releases")) {
|
||||||
// GitHub: /user/repo/releases/download/tag/file
|
// GitHub: /user/repo/releases/download/tag/file
|
||||||
if (segments.length >= 2) {
|
if (segments.length >= 2) {
|
||||||
const user = segments[0];
|
|
||||||
const repo = segments[1];
|
const repo = segments[1];
|
||||||
subdir = `${user}___${repo}`.replace(/[^\w.\-]/g, "_");
|
subdir = repo.replace(/[^\w.\-]/g, "_");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
dashboard/src/lib/version.ts
Normal file
15
dashboard/src/lib/version.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Dashboard version — bump this on every PR merge.
|
||||||
|
*
|
||||||
|
* Displayed in the footer and available via /api/debug so the user can
|
||||||
|
* verify the update actually took effect.
|
||||||
|
*/
|
||||||
|
export const DASHBOARD_VERSION = "0.5.0";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build timestamp — set at build time by Next.js.
|
||||||
|
* Falls back to "dev" when running in dev mode.
|
||||||
|
*/
|
||||||
|
export const BUILD_ID =
|
||||||
|
process.env.NEXT_PUBLIC_BUILD_ID ||
|
||||||
|
(process.env.NODE_ENV === "production" ? "prod" : "dev");
|
||||||
Reference in New Issue
Block a user