2 Commits
Author SHA1 Message Date
valknarandClaude Sonnet 5 1d51c5c887 chore: bump version to 0.4.6
CI / Static checks (push) Successful in 38s
CI / Build and push image (push) Successful in 1m30s
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WpxhtQY3CExQdMs4j7MmJe
2026-08-18 16:58:56 +02:00
valknarandClaude Sonnet 5 2c84a4c9c2 fix: remove project name badges from the Coolify widget
Coolify was the only service reporting the generic detail field
(project name chips); drop it end to end - collector, type, and the
widget's chip row - rather than leave the plumbing for zero producers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WpxhtQY3CExQdMs4j7MmJe
2026-08-18 16:58:47 +02:00
5 changed files with 4 additions and 25 deletions
-9
View File
@@ -60,15 +60,6 @@ export function ServiceWidget({ widget, widgetId }: { widget: ServiceWidget; wid
))} ))}
</div> </div>
)} )}
{data.detail && data.detail.length > 0 && (
<div className="flex flex-wrap gap-1.5">
{data.detail.map((entry) => (
<StatusTag key={entry} tone="neutral">
{entry}
</StatusTag>
))}
</div>
)}
{data.statError && <StatusTag tone="degraded">{data.statError}</StatusTag>} {data.statError && <StatusTag tone="degraded">{data.statError}</StatusTag>}
{widget.showStats && data.docker.cpuPercent !== null && memPercent !== null && ( {widget.showStats && data.docker.cpuPercent !== null && memPercent !== null && (
<div className="mt-0.5 flex gap-4"> <div className="mt-0.5 flex gap-4">
+1 -1
View File
@@ -9,7 +9,7 @@ import { collectUmami } from "./services/umami";
import { collectHeadscale } from "./services/headscale"; import { collectHeadscale } from "./services/headscale";
import { collectTraefikStat } from "./services/traefik"; import { collectTraefikStat } from "./services/traefik";
function collectServiceStat(widget: ServiceWidget): Promise<{ stats: ServiceStat[]; detail?: string[] }> { function collectServiceStat(widget: ServiceWidget): Promise<{ stats: ServiceStat[] }> {
switch (widget.service) { switch (widget.service) {
case "gitea": case "gitea":
return collectGitea(widget); return collectGitea(widget);
+2 -13
View File
@@ -2,12 +2,6 @@ import type { CoolifyServiceWidget } from "@/lib/config/schema";
import type { ServiceStat } from "@/lib/types/service-result"; import type { ServiceStat } from "@/lib/types/service-result";
import { serviceBaseUrl } from "./base-url"; import { serviceBaseUrl } from "./base-url";
const DETAIL_LIMIT = 5;
interface CoolifyProject {
name: string;
}
async function fetchCoolify<T>(base: string, path: string, apiToken: string): Promise<T> { async function fetchCoolify<T>(base: string, path: string, apiToken: string): Promise<T> {
const response = await fetch(`${base}${path}`, { const response = await fetch(`${base}${path}`, {
headers: { Authorization: `Bearer ${apiToken}` }, headers: { Authorization: `Bearer ${apiToken}` },
@@ -19,22 +13,17 @@ async function fetchCoolify<T>(base: string, path: string, apiToken: string): Pr
return (await response.json()) as T; return (await response.json()) as T;
} }
export async function collectCoolify( export async function collectCoolify(widget: CoolifyServiceWidget): Promise<{ stats: ServiceStat[] }> {
widget: CoolifyServiceWidget
): Promise<{ stats: ServiceStat[]; detail?: string[] }> {
const base = serviceBaseUrl(widget); const base = serviceBaseUrl(widget);
const [projects, resources] = await Promise.all([ const [projects, resources] = await Promise.all([
fetchCoolify<CoolifyProject[]>(base, "/api/v1/projects", widget.apiToken), fetchCoolify<unknown[]>(base, "/api/v1/projects", widget.apiToken),
fetchCoolify<unknown[]>(base, "/api/v1/resources", widget.apiToken), fetchCoolify<unknown[]>(base, "/api/v1/resources", widget.apiToken),
]); ]);
const names = projects.slice(0, DETAIL_LIMIT).map((p) => p.name);
if (projects.length > DETAIL_LIMIT) names.push(`+${projects.length - DETAIL_LIMIT} more`);
return { return {
stats: [ stats: [
{ label: "Projects", value: String(projects.length) }, { label: "Projects", value: String(projects.length) },
{ label: "Resources", value: String(resources.length) }, { label: "Resources", value: String(resources.length) },
], ],
detail: names.length > 0 ? names : undefined,
}; };
} }
-1
View File
@@ -8,6 +8,5 @@ export interface ServiceStat {
export interface ServiceWidgetResult { export interface ServiceWidgetResult {
docker: DockerContainerResult; docker: DockerContainerResult;
stats: ServiceStat[]; stats: ServiceStat[];
detail?: string[];
statError?: string; statError?: string;
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "pulsenode", "name": "pulsenode",
"version": "0.4.5", "version": "0.4.6",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "tsx watch server.ts", "dev": "tsx watch server.ts",