track requesters for builds releases deployments and migrations
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-10 10:42:56 +09:00
parent ad52c48bca
commit 9625752a81
20 changed files with 1166 additions and 53 deletions
+37
View File
@@ -3,6 +3,7 @@ import { useEffect, useMemo, useState } from 'react';
import { Badge, Button, Card, CardHeader, Modal } from '../../components/ui';
import { useToast } from '../../components/toast';
import { PageTitle } from '../../layout/AppLayout';
import { readCurrentAdmin } from '../../lib/admin-app-permissions';
import { formatDateTime } from '../../lib/date-format';
import { LoadingModal, useMinimumLoading } from '../operations/operation-utils';
import {
@@ -48,6 +49,41 @@ function jobTime(job: LauncherBuildJob) {
return Number.isNaN(value) ? 0 : value;
}
function BuildWorker({ job }: { job: LauncherBuildJob }) {
const [failed, setFailed] = useState(false);
const currentAdmin = readCurrentAdmin();
const name = job.requestedByName
|| job.createdByName
|| job.requestedBy
|| job.createdBy
|| currentAdmin?.name
|| currentAdmin?.email
|| 'admin';
const avatarUrl = job.requestedByAvatarUrl
|| job.createdByAvatarUrl
|| currentAdmin?.avatarUrl
|| '';
const initial = name.trim().charAt(0).toUpperCase() || '?';
return (
<span className="inline-flex min-w-0 items-center gap-2">
{avatarUrl && !failed ? (
<img
src={avatarUrl}
alt=""
className="size-6 shrink-0 rounded-full border border-border bg-muted object-cover"
onError={() => setFailed(true)}
/>
) : (
<span className="inline-flex size-6 shrink-0 items-center justify-center rounded-full border border-border bg-muted text-[11px] font-semibold text-muted-foreground">
{initial}
</span>
)}
<b className="truncate text-foreground">{name}</b>
</span>
);
}
const launcherBuildJobPageSize = 3;
type BuildTarget = 'launcher-client' | 'launcher-backend';
type BuildRange = 'week' | 'month' | 'all';
@@ -405,6 +441,7 @@ export function LauncherBuildPage() {
<div className="mt-3 flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground">
<span>브랜치 <b className="text-foreground">{job.branch}</b></span>
<span>커밋 <b className="font-mono text-foreground">{job.commitSha || '-'}</b></span>
<span className="inline-flex min-w-0 items-center gap-2">작업자 <BuildWorker job={job} /></span>
<span>생성 <b className="text-foreground">{formatDate(job.createdAt)}</b></span>
</div>
</div>