Skip to content

Commit 833e65a

Browse files
authored
Merge pull request #2365 from airqo-platform/staging
move to production
2 parents bc2e8ee + 270df7f commit 833e65a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+10778
-0
lines changed

netmanager-app/.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["next/core-web-vitals", "next/typescript"]
3+
}

netmanager-app/.gitignore

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
.env.local
75+
76+
# parcel-bundler cache (https://parceljs.org/)
77+
.cache
78+
79+
# Next.js build output
80+
.next/
81+
82+
# Nuxt.js build / generate output
83+
.nuxt
84+
dist
85+
86+
# Gatsby files
87+
.cache/
88+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
89+
# https://nextjs.org/blog/next-9-1#public-directory-support
90+
# public
91+
92+
# vuepress build output
93+
.vuepress/dist
94+
95+
# Serverless directories
96+
.serverless/
97+
98+
# FuseBox cache
99+
.fusebox/
100+
101+
# DynamoDB Local files
102+
.dynamodb/
103+
104+
# TernJS port file
105+
.tern-port
106+
107+
# Cypress files
108+
cypress/videos
109+
cypress/screenshots
110+
111+
# Yarn add output
112+
.pnp.cjs
113+
.pnp.loader.mjs
114+
.yarn/
115+
.yarnrc.yml
116+
117+
# vscode files
118+
.vscode/*
119+

netmanager-app/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React from "react";
2+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
3+
4+
export default function Analytics() {
5+
return (
6+
<div className="p-6">
7+
<h1 className="text-3xl font-semibold text-foreground mb-6">Dashboard</h1>
8+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
9+
<Card>
10+
<CardHeader>
11+
<CardTitle>Total Devices</CardTitle>
12+
</CardHeader>
13+
<CardContent>
14+
<p className="text-4xl font-bold">156</p>
15+
</CardContent>
16+
</Card>
17+
<Card>
18+
<CardHeader>
19+
<CardTitle>Active Sites</CardTitle>
20+
</CardHeader>
21+
<CardContent>
22+
<p className="text-4xl font-bold">42</p>
23+
</CardContent>
24+
</Card>
25+
<Card>
26+
<CardHeader>
27+
<CardTitle>Data Points Collected</CardTitle>
28+
</CardHeader>
29+
<CardContent>
30+
<p className="text-4xl font-bold">1.2M</p>
31+
</CardContent>
32+
</Card>
33+
</div>
34+
</div>
35+
);
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"use client";
2+
3+
import "../globals.css";
4+
import Layout from "../../components/layout";
5+
6+
export default function AuthenticatedLayout({
7+
children,
8+
}: {
9+
children: React.ReactNode;
10+
}) {
11+
return <Layout>{children}</Layout>;
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
"use client";
2+
3+
import { Device } from "@/app/types/sites";
4+
import {
5+
Table,
6+
TableBody,
7+
TableCell,
8+
TableHead,
9+
TableHeader,
10+
TableRow,
11+
} from "@/components/ui/table";
12+
import { Badge } from "@/components/ui/badge";
13+
14+
interface SiteDevicesProps {
15+
devices: Device[];
16+
}
17+
18+
export function SiteDevices({ devices }: SiteDevicesProps) {
19+
return (
20+
<div className="border rounded-lg">
21+
<Table>
22+
<TableHeader>
23+
<TableRow>
24+
<TableHead>Name</TableHead>
25+
<TableHead>Description</TableHead>
26+
<TableHead>Site</TableHead>
27+
<TableHead>Is Primary</TableHead>
28+
<TableHead>Is Co-located</TableHead>
29+
<TableHead>Added On</TableHead>
30+
<TableHead>Deployment status</TableHead>
31+
</TableRow>
32+
</TableHeader>
33+
<TableBody>
34+
{devices.map((device) => (
35+
<TableRow key={device.name}>
36+
<TableCell>{device.name}</TableCell>
37+
<TableCell>{device.description || "N/A"}</TableCell>
38+
<TableCell>{device.site || "N/A"}</TableCell>
39+
<TableCell>
40+
<Badge variant={device.isPrimary ? "default" : "secondary"}>
41+
{device.isPrimary ? "Yes" : "No"}
42+
</Badge>
43+
</TableCell>
44+
<TableCell>
45+
<Badge variant={device.isCoLocated ? "default" : "secondary"}>
46+
{device.isCoLocated ? "Yes" : "No"}
47+
</Badge>
48+
</TableCell>
49+
<TableCell>{device.registrationDate}</TableCell>
50+
<TableCell>
51+
<Badge
52+
variant={
53+
device.deploymentStatus === "Deployed"
54+
? "default"
55+
: "secondary"
56+
}
57+
>
58+
{device.deploymentStatus}
59+
</Badge>
60+
</TableCell>
61+
</TableRow>
62+
))}
63+
</TableBody>
64+
</Table>
65+
</div>
66+
);
67+
}

0 commit comments

Comments
 (0)