v1.4.0 release

This commit is contained in:
lone-cloud 2026-01-31 03:45:44 -08:00
parent 2a9f7f09fe
commit 0385d8cf20
3 changed files with 51 additions and 36 deletions

View file

@ -4,9 +4,9 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Snowflake Dashboard</title> <title>Snowflake Dashboard</title>
<link rel="icon" type="image/svg+xml" href="favicon.svg?v=1.4.2" media="(prefers-color-scheme: light)"> <link rel="icon" type="image/svg+xml" href="favicon.svg?v=1.4.0" media="(prefers-color-scheme: light)">
<link rel="icon" type="image/svg+xml" href="favicon-dark.svg?v=1.4.2" media="(prefers-color-scheme: dark)"> <link rel="icon" type="image/svg+xml" href="favicon-dark.svg?v=1.4.0" media="(prefers-color-scheme: dark)">
<link rel="stylesheet" href="styles.css?v=1.4.2"> <link rel="stylesheet" href="styles.css?v=1.4.0">
</head> </head>
<body> <body>
<div class="grid grid-top"> <div class="grid grid-top">

View file

@ -4,14 +4,22 @@ Bun.serve({
const url = new URL(req.url); const url = new URL(req.url);
const path = url.pathname; const path = url.pathname;
const proc = Bun.spawn([ const socketPath = "/var/run/docker.sock";
"docker", const containerName = "snowflake-proxy";
"logs",
"--tail", try {
"500", const response = await fetch(
"snowflake-proxy", `http://localhost/containers/${containerName}/logs?stdout=true&stderr=true&tail=500`,
]); {
const output = await new Response(proc.stdout).text(); unix: socketPath,
},
);
if (!response.ok) {
throw new Error(`Docker API error: ${response.status}`);
}
const output = await response.text();
if (path === "/internal/nat") { if (path === "/internal/nat") {
const natMatch = output const natMatch = output
@ -41,6 +49,13 @@ Bun.serve({
status: 404, status: 404,
headers: { "Content-Type": "text/plain" }, headers: { "Content-Type": "text/plain" },
}); });
} catch (error) {
console.error("Failed to fetch logs:", error);
return new Response("Logs unavailable", {
status: 500,
headers: { "Content-Type": "text/plain" },
});
}
}, },
}); });

View file

@ -1,6 +1,6 @@
{ {
"name": "snowflake-dashboard", "name": "snowflake-dashboard",
"version": "1.4.2", "version": "1.4.0",
"type": "module", "type": "module",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"scripts": { "scripts": {