Skip to content

Commit 82a9dd1

Browse files
committed
Checking whether this passes the format checker
1 parent 04a8339 commit 82a9dd1

Some content is hidden

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

41 files changed

+1908
-1655
lines changed

.github/workflows/check.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
21
name: Check
32

43
on:
54
push:
65
branches:
7-
- '**'
8-
- '!main'
6+
- "**"
7+
- "!main"
98

109
jobs:
1110
check:
@@ -17,7 +16,7 @@ jobs:
1716

1817
- uses: actions/setup-node@v3
1918
with:
20-
node-version-file: '.node-version'
19+
node-version-file: ".node-version"
2120

2221
- name: Install Node dependencies
2322
run: npm ci

.github/workflows/publish.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ name: Publish Site
55

66
on:
77
push:
8-
branches: [ main ]
8+
branches: [main]
99

1010
jobs:
1111
build:
1212
name: Publish Site
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
17-
18-
- uses: actions/setup-node@v3
19-
with:
20-
node-version-file: '.node-version'
21-
22-
- name: Install Node dependencies
23-
run: npm ci
24-
25-
- name: Build
26-
run: npm run build
27-
28-
- name: Publish website
29-
uses: alex-page/[email protected]
30-
with:
31-
repo-token: ${{ secrets.GH_PAT }}
32-
site-directory: 'build'
16+
- uses: actions/checkout@v3
17+
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version-file: ".node-version"
21+
22+
- name: Install Node dependencies
23+
run: npm ci
24+
25+
- name: Build
26+
run: npm run build
27+
28+
- name: Publish website
29+
uses: alex-page/[email protected]
30+
with:
31+
repo-token: ${{ secrets.GH_PAT }}
32+
site-directory: "build"

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ Visualizations of coverage and performance analysis for Community Cellular Netwo
55
Now hosted on https://coverage.seattlecommunitynetwork.org/
66

77
# Issues
8-
- Chart doesn't show tooltips.
8+
9+
- Chart doesn't show tooltips.
910

1011
# TODOs
12+
1113
- Make the chart more informative
1214
- Hover on a line should show the exact data and which sites are they from
1315
- Admin Panel
@@ -16,4 +18,5 @@ Now hosted on https://coverage.seattlecommunitynetwork.org/
1618
- Better compatibility with local development
1719

1820
# Maybe
21+
1922
- More map information

README.old.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# cnn-coverage-vis
2+
23
Visualizations of coverage and performance analysis for Community Cellular Networks.

package-lock.json

+930-685
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@
2626
"fontsource-roboto": "^4.0.0",
2727
"jsonwebtoken": "^8.5.1",
2828
"leaflet": "^1.7.1",
29-
"node-canvas": "^2.7.0",
29+
"leaflet-geosearch": "^3.7.0",
3030
"prettier": "^2.5.1",
3131
"qrcode.react": "^1.0.1",
3232
"react": "^17.0.2",
3333
"react-dom": "^17.0.2",
34-
"leaflet-geosearch": "^3.7.0",
3534
"react-multi-select-component": "^4.1.14",
3635
"react-router": "^6.2.1",
3736
"react-router-dom": "^6.2.1",
@@ -67,6 +66,7 @@
6766
},
6867
"devDependencies": {
6968
"@types/cors": "^2.8.12",
70-
"@types/qrcode.react": "^1.0.2"
69+
"@types/qrcode.react": "^1.0.2",
70+
"canvas": "^2.11.2"
7171
}
72-
}
72+
}

prettierrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"bracketSpacing": true,
77
"arrowParens": "avoid",
88
"trailingComma": "all"
9-
}
9+
}

public/index.html

+61-51
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
4-
<head>
5-
<meta charset="utf-8" />
6-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
7-
<meta name="viewport" content="width=device-width, initial-scale=1" />
8-
<meta name="theme-color" content="#000000" />
9-
<meta name="description" content="Web site created using create-react-app" />
10-
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
11-
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
12-
crossorigin="" />
13-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
14-
<!--
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link
13+
rel="stylesheet"
14+
href="https://unpkg.com/[email protected]/dist/leaflet.css"
15+
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
16+
crossorigin=""
17+
/>
18+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
19+
<!--
1520
manifest.json provides metadata used when your web app is installed on a
1621
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
1722
-->
18-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
19-
<!--
23+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
24+
<!--
2025
Notice the use of %PUBLIC_URL% in the tags above.
2126
It will be replaced with the URL of the `public` folder during the build.
2227
Only files inside the `public` folder can be referenced from the HTML.
@@ -25,42 +30,48 @@
2530
work correctly both with client-side routing and a non-root public URL.
2631
Learn how to configure a non-root public URL by running `npm run build`.
2732
-->
28-
<title>Performance Evaluation</title>
29-
<script type="text/javascript">
30-
// Single Page Apps for GitHub Pages
31-
// https://github.com/rafrex/spa-github-pages
32-
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License
33-
// ----------------------------------------------------------------------
34-
// This script checks to see if a redirect is present in the query string
35-
// and converts it back into the correct url and adds it to the
36-
// browser's history using window.history.replaceState(...),
37-
// which won't cause the browser to attempt to load the new url.
38-
// When the single page app is loaded further down in this file,
39-
// the correct url will be waiting in the browser's history for
40-
// the single page app to route accordingly.
41-
(function (l) {
42-
if (l.search) {
43-
var q = {};
44-
l.search.slice(1).split('&').forEach(function (v) {
45-
var a = v.split('=');
46-
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&');
47-
});
48-
if (q.p !== undefined) {
49-
window.history.replaceState(null, null,
50-
l.pathname.slice(0, -1) + (q.p || '') +
51-
(q.q ? ('?' + q.q) : '') +
52-
l.hash
53-
);
33+
<title>Performance Evaluation</title>
34+
<script type="text/javascript">
35+
// Single Page Apps for GitHub Pages
36+
// https://github.com/rafrex/spa-github-pages
37+
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License
38+
// ----------------------------------------------------------------------
39+
// This script checks to see if a redirect is present in the query string
40+
// and converts it back into the correct url and adds it to the
41+
// browser's history using window.history.replaceState(...),
42+
// which won't cause the browser to attempt to load the new url.
43+
// When the single page app is loaded further down in this file,
44+
// the correct url will be waiting in the browser's history for
45+
// the single page app to route accordingly.
46+
(function (l) {
47+
if (l.search) {
48+
var q = {};
49+
l.search
50+
.slice(1)
51+
.split("&")
52+
.forEach(function (v) {
53+
var a = v.split("=");
54+
q[a[0]] = a.slice(1).join("=").replace(/~and~/g, "&");
55+
});
56+
if (q.p !== undefined) {
57+
window.history.replaceState(
58+
null,
59+
null,
60+
l.pathname.slice(0, -1) +
61+
(q.p || "") +
62+
(q.q ? "?" + q.q : "") +
63+
l.hash
64+
);
65+
}
5466
}
55-
}
56-
}(window.location))
57-
</script>
58-
</head>
67+
})(window.location);
68+
</script>
69+
</head>
5970

60-
<body>
61-
<noscript>You need to enable JavaScript to run this app.</noscript>
62-
<div id="root"></div>
63-
<!--
71+
<body>
72+
<noscript>You need to enable JavaScript to run this app.</noscript>
73+
<div id="root"></div>
74+
<!--
6475
This HTML file is a template.
6576
If you open it directly in the browser, you will see an empty page.
6677
@@ -70,6 +81,5 @@
7081
To begin the development, run `npm start` or `yarn start`.
7182
To create a production bundle, use `npm run build` or `yarn build`.
7283
-->
73-
</body>
74-
75-
</html>
84+
</body>
85+
</html>

src/Footer.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import Typography from '@mui/material/Typography';
2-
import Link from '@mui/material/Link';
1+
import Typography from "@mui/material/Typography";
2+
import Link from "@mui/material/Link";
33
function Copyright(props: any) {
44
return (
55
<Typography
6-
variant='body2'
7-
color='text.secondary'
8-
align='center'
6+
variant="body2"
7+
color="text.secondary"
8+
align="center"
99
{...props}
1010
>
11-
{'Copyright © '}
12-
<Link color='inherit' href='https://ictd.cs.washington.edu/'>
11+
{"Copyright © "}
12+
<Link color="inherit" href="https://ictd.cs.washington.edu/">
1313
ICTD
14-
</Link>{' '}
14+
</Link>{" "}
1515
{new Date().getFullYear()}
16-
{'.'}
16+
{"."}
1717
</Typography>
1818
);
1919
}

src/ListItems.tsx

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
import ListItem from '@mui/material/ListItem';
2-
import ListItemIcon from '@mui/material/ListItemIcon';
3-
import ListItemText from '@mui/material/ListItemText';
4-
import ListSubheader from '@mui/material/ListSubheader';
5-
import EditLocationAltIcon from '@mui/icons-material/EditLocationAlt';
6-
import ManageAccountsIcon from '@mui/icons-material/ManageAccounts';
7-
import SyncIcon from '@mui/icons-material/Sync';
8-
import HomeIcon from '@mui/icons-material/Home';
9-
import AdminPanelSettingsIcon from '@mui/icons-material/AdminPanelSettings';
1+
import ListItem from "@mui/material/ListItem";
2+
import ListItemIcon from "@mui/material/ListItemIcon";
3+
import ListItemText from "@mui/material/ListItemText";
4+
import ListSubheader from "@mui/material/ListSubheader";
5+
import EditLocationAltIcon from "@mui/icons-material/EditLocationAlt";
6+
import ManageAccountsIcon from "@mui/icons-material/ManageAccounts";
7+
import SyncIcon from "@mui/icons-material/Sync";
8+
import HomeIcon from "@mui/icons-material/Home";
9+
import AdminPanelSettingsIcon from "@mui/icons-material/AdminPanelSettings";
1010

1111
export const mainListItems = (
1212
<div>
1313
<ListSubheader inset>Admin Panel</ListSubheader>
14-
<ListItem button onClick={() => window.open('/admin/users', '_self')}>
14+
<ListItem button onClick={() => window.open("/admin/users", "_self")}>
1515
<ListItemIcon>
1616
<ManageAccountsIcon />
1717
</ListItemIcon>
18-
<ListItemText primary='Manage users' />
18+
<ListItemText primary="Manage users" />
1919
</ListItem>
20-
<ListItem button onClick={() => window.open('/admin/edit-site', '_self')}>
20+
<ListItem button onClick={() => window.open("/admin/edit-site", "_self")}>
2121
<ListItemIcon>
2222
<EditLocationAltIcon />
2323
</ListItemIcon>
24-
<ListItemText primary='Edit Site Information' />
24+
<ListItemText primary="Edit Site Information" />
2525
</ListItem>
26-
<ListItem button onClick={() => window.open('/admin/edit-data', '_self')}>
26+
<ListItem button onClick={() => window.open("/admin/edit-data", "_self")}>
2727
<ListItemIcon>
2828
<SyncIcon />
2929
</ListItemIcon>
30-
<ListItemText primary='Update Data' />
30+
<ListItemText primary="Update Data" />
3131
</ListItem>
3232
</div>
3333
);
3434

3535
export const secondaryListItems = (
3636
<div>
3737
<ListSubheader inset>User Panel</ListSubheader>
38-
<ListItem button onClick={() => window.open('/')}>
38+
<ListItem button onClick={() => window.open("/")}>
3939
<ListItemIcon>
4040
<HomeIcon />
4141
</ListItemIcon>
42-
<ListItemText primary='Visualization' />
42+
<ListItemText primary="Visualization" />
4343
</ListItem>
4444
</div>
4545
);
4646

4747
export const homeListItems = (
4848
<div>
49-
<ListItem button onClick={() => window.open('login')}>
49+
<ListItem button onClick={() => window.open("login")}>
5050
<ListItemIcon>
5151
<AdminPanelSettingsIcon />
5252
</ListItemIcon>
53-
<ListItemText primary='Admin Panel' />
53+
<ListItemText primary="Admin Panel" />
5454
</ListItem>
5555
</div>
5656
);

src/Loading.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React from "react";
22

33
interface LoadingProps {
44
loading: boolean;
@@ -10,16 +10,16 @@ interface LoadingProps {
1010
const Loading = (props: LoadingProps) => {
1111
return (
1212
<img
13-
src='/loading.gif'
13+
src="/loading.gif"
1414
style={{
15-
position: 'absolute',
15+
position: "absolute",
1616
left: props.left - props.size / 2,
1717
top: props.top - props.size / 2,
1818
height: props.size,
1919
opacity: 0.5,
20-
display: props.loading ? 'inline' : 'none',
20+
display: props.loading ? "inline" : "none",
2121
}}
22-
alt='source: https://tenor.com/view/loading-buffering-spinning-waiting-gif-17313179'
22+
alt="source: https://tenor.com/view/loading-buffering-spinning-waiting-gif-17313179"
2323
/>
2424
);
2525
};

0 commit comments

Comments
 (0)