style: refine platform management table layouts
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-15 14:10:02 +09:00
parent b3119aba9e
commit 616a5e2412
3 changed files with 35 additions and 10 deletions
+3 -3
View File
@@ -441,15 +441,15 @@ export function RuntimeConfigPage() {
</Card>
<Card className="p-5">
<p className="text-sm text-muted-foreground">구성요소</p>
<p className="mt-4 text-2xl font-medium text-foreground">{components.length}개</p>
<p className="mt-4 text-2xl font-medium text-foreground">{components.length}</p>
</Card>
<Card className="p-5">
<p className="text-sm text-muted-foreground">환경변수</p>
<p className="mt-4 text-2xl font-medium text-foreground">{envCount}개</p>
<p className="mt-4 text-2xl font-medium text-foreground">{envCount}</p>
</Card>
<Card className="p-5">
<p className="text-sm text-muted-foreground">시크릿</p>
<p className="mt-4 text-2xl font-medium text-foreground">{secretCount}개</p>
<p className="mt-4 text-2xl font-medium text-foreground">{secretCount}</p>
</Card>
</div>
@@ -20,7 +20,7 @@ type HeadscaleNode = {
};
type AclRule = { id: string; action: string; sources: string[]; destinations: string[] };
type PlatformRow = HeadscaleNode & { device?: PlatformDevice; controllers: string[] };
type PlatformRow = HeadscaleNode & { device?: PlatformDevice; controllers: string[]; no: number };
function normalize(value?: string | null) {
return (value ?? '').toLowerCase().replace(/[^a-z0-9]/g, '');
@@ -55,8 +55,10 @@ export function RuntimeDeviceControlPage() {
])
.then(([nodeResponse, aclResponse, devices]) => {
const rules = aclResponse.policy?.acls ?? [];
setRows((nodeResponse.nodes ?? []).map((node) => ({
const nodes = nodeResponse.nodes ?? [];
setRows(nodes.map((node, index) => ({
...node,
no: nodes.length - index,
device: findDevice(node, devices),
controllers: findControllers(node, rules),
})));
@@ -71,6 +73,7 @@ export function RuntimeDeviceControlPage() {
const columns = useMemo<Array<DataTableColumn<PlatformRow>>>(
() => [
{ key: 'no', header: 'No.', className: 'w-14 px-3 py-3 text-center font-medium', cell: (row) => <span>{row.no}</span> },
{
key: 'platform',
header: '플랫폼',