Peace 4 weeks ago
parent ac20b76e65
commit 07eee63e35
  1. 1
      web/.env
  2. 2
      web/.gitignore
  3. 23
      web/.vscode/launch.json
  4. 3
      web/src/app/sensor-groups/[groupId]/page.tsx
  5. 7
      web/src/app/sensor-groups/page.tsx
  6. 3
      web/src/app/sensors/[sensorId]/page.tsx

@ -0,0 +1 @@
NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:3001

2
web/.gitignore vendored

@ -31,7 +31,7 @@ yarn-error.log*
.pnpm-debug.log*
# env files (can opt-in for committing if needed)
.env*
# .env*
# vercel
.vercel

@ -1,15 +1,26 @@
{
// IntelliSense .
// .
// https://go.microsoft.com/fwlink/?linkid=830387() .
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Next.js cliend debug",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
"name": "Next.js client debug (Chrome)",
"url": "http://127.0.0.1:3000",
"webRoot": "${workspaceFolder}",
"sourceMaps": true,
"trace": true,
"timeout": 20000
},
{
"type": "chrome",
"request": "launch",
"name": "Next.js client debug (Whale)",
"url": "http://127.0.0.1:3000",
"webRoot": "${workspaceFolder}",
"runtimeExecutable": "C:\\Program Files\\Naver\\Naver Whale\\Application\\whale.exe",
"sourceMaps": true,
"trace": true,
"timeout": 20000
}
]
}

@ -1,5 +1,6 @@
'use client';
import Guard from '@/components/guard';
import { Button } from '@/components/ui/button';
import {
Table,
@ -20,6 +21,7 @@ export default function GroupSensorsPage() {
const { data, isLoading, isError, refetch } = useGroupSensors(groupId);
return (
<Guard>
<main className="mx-auto max-w-full px-4 py-6">
<div className="mb-4 flex items-center justify-between">
<div className="flex items-center gap-2">
@ -70,5 +72,6 @@ export default function GroupSensorsPage() {
</div>
)}
</main>
</Guard>
);
}

@ -1,5 +1,6 @@
'use client';
import Guard from '@/components/guard';
import { Button } from '@/components/ui/button';
import {
Table,
@ -16,6 +17,7 @@ export default function SensorGroupPage() {
const { data, isLoading, isError, refetch } = useSensorGroups();
return (
<Guard>
<main className="mx-auto px-4 py-6">
<div className="mb-4 flex items-center justify-between">
<h1 className="text-xl font-semibold"> </h1>
@ -41,7 +43,9 @@ export default function SensorGroupPage() {
<TableRow key={g.id}>
<TableCell className="px-4 py-2 text-center">{g.id}</TableCell>
<TableCell className="px-4 py-2 text-center">{g.name}</TableCell>
<TableCell className="px-4 py-2 text-center">{g.description ?? '-'}</TableCell>
<TableCell className="px-4 py-2 text-center">
{g.description ?? '-'}
</TableCell>
<TableCell className="flex items-center justify-center px-4 py-2">
<Button asChild variant="outline">
<Link href={`/sensor-groups/${g.id}`}></Link>
@ -61,5 +65,6 @@ export default function SensorGroupPage() {
</div>
)}
</main>
</Guard>
);
}

@ -1,5 +1,6 @@
'use client';
import Guard from '@/components/guard';
import { useParams, useRouter, useSearchParams } from 'next/navigation';
export default function SensorDetailPage() {
@ -11,8 +12,10 @@ export default function SensorDetailPage() {
const limit = search.get('limit') ? Number(search.get('limit')) : undefined;
return (
<Guard>
<main>
<div></div>
</main>
</Guard>
);
}

Loading…
Cancel
Save