connect tailscale node status through platform gateway
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-08 18:13:55 +09:00
parent c71c25016e
commit ecbf57d978
4 changed files with 18 additions and 16 deletions
@@ -83,9 +83,6 @@ export function CommonAppBuildPage() {
<div className="flex min-w-0 items-center gap-2">
<span className={cn('size-2.5 shrink-0 rounded-full', pipelineStatusDotClass(pipeline.status))} />
<p className="truncate text-sm font-semibold">{formatRepositoryName(pipeline.repository)}</p>
{isActivePipelineStatus(pipeline.status) ? (
<Loader2 className="size-3.5 shrink-0 animate-spin text-sky-300" />
) : null}
</div>
<p className="mt-1 truncate text-sm text-muted-foreground">{pipeline.message || '-'}</p>
<div className="mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
+11 -11
View File
@@ -25,10 +25,13 @@ const commitRangeLabels: Record<CommitRange, string> = {
const commitPageSize = 5;
const branchOptions = ['develop', 'release', 'main'];
const defaultCicdBaseUrl = 'http://192.168.0.20:8010';
function repoFullName(repo: GiteaRepo) {
return (repo as GiteaRepo & { fullName?: string }).fullName ?? repo.full_name ?? repo.name;
return repo.fullName ?? repo.full_name ?? repo.name;
}
function repoHtmlUrl(repo?: GiteaRepo) {
return repo?.htmlUrl ?? repo?.html_url ?? '';
}
function splitRepository(repository: string) {
@@ -39,13 +42,7 @@ function splitRepository(repository: string) {
function cicdLabel(pipeline?: CommonAppPipeline) {
if (!pipeline) return '-';
try {
const origin = pipeline.url ? new URL(pipeline.url).origin : '';
const baseUrl = origin && !origin.includes(':3000') ? origin : defaultCicdBaseUrl;
return `Woodpecker / ${baseUrl}`;
} catch {
return `Woodpecker / ${defaultCicdBaseUrl}`;
}
return pipeline.ciUrl ? `Woodpecker / ${pipeline.ciUrl}` : 'Woodpecker';
}
function commitAuthor(commit: GiteaCommit) {
@@ -258,7 +255,10 @@ export function CommonAppSourcePage() {
<button
key={fullName}
type="button"
className={cn('block w-full px-5 py-4 text-left transition-colors hover:bg-muted/20', selected && 'bg-muted/30')}
className={cn(
'block w-full px-5 py-4 text-left transition-colors hover:bg-muted/20',
selected && 'bg-primary/20 shadow-[inset_4px_0_0_var(--color-primary)] hover:bg-primary/25'
)}
onClick={() => setSelectedRepository(fullName)}
>
<div className="flex items-start justify-between gap-3">
@@ -300,7 +300,7 @@ export function CommonAppSourcePage() {
<div>
<p className="text-xs text-muted-foreground">Gitea URL</p>
<div className="mt-2 flex h-9 items-center gap-2 rounded-md border border-border bg-background px-3">
<p className="min-w-0 flex-1 truncate text-xs text-muted-foreground">{selectedRepo?.html_url ?? '-'}</p>
<p className="min-w-0 flex-1 truncate text-xs text-muted-foreground">{repoHtmlUrl(selectedRepo) || '-'}</p>
</div>
</div>
</div>
+3 -2
View File
@@ -7,10 +7,11 @@ export type CommonAppPipeline = {
branch: string;
status: string;
createdAt: number;
ciUrl?: string | null;
url?: string | null;
};
export function listCommonAppPipelines() {
return apiRequest<{ repos?: CommonAppPipeline[] }>('/woodpecker/repos')
.then((result) => result.repos ?? []);
return apiRequest<{ repos?: CommonAppPipeline[]; baseUrl?: string | null }>('/woodpecker/repos')
.then((result) => (result.repos ?? []).map((repo) => ({ ...repo, ciUrl: repo.ciUrl ?? result.baseUrl ?? null })));
}