Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4eff058
Merge pull request #315 from ComputerScienceHouse/develop
devinmatte Mar 21, 2022
c9b6190
Merge version 3.5.5 (#317)
mxmeinhold Mar 21, 2022
9999a8e
Merge version 3.5.5-1 (#320)
mxmeinhold Mar 21, 2022
e4414ca
Merge version 3.5.6 (#343)
mxmeinhold Aug 23, 2022
013d429
Merge version 3.5.7
galenguyer Aug 25, 2022
5e67335
change packet sorting to percentage (#370)
Sam-Cordry Sep 5, 2024
7c56051
Merge pull request #376 from ComputerScienceHouse/develop
Sam-Cordry Jan 26, 2025
3a6eced
Update dependencies and improve development experience
tallen42 Aug 24, 2025
08cc65c
Merge pull request #383 from ComputerScienceHouse/develop
costowell Aug 24, 2025
e905a27
Merge pull request #385 from ComputerScienceHouse/develop
costowell Aug 30, 2025
a974f00
Update pfp-zoom.js (#395)
tallen42 Sep 4, 2025
cff4adc
FIX: docker build + running locally
BigSpaceships Aug 25, 2026
9c83646
FIX: update example env
BigSpaceships Aug 25, 2026
d4558ca
Active packets page basically done
pikachu0542 Aug 28, 2026
4f95cba
fixed navbar and packet view page
pikachu0542 Aug 28, 2026
8243741
yeet themeswitcher, fixed navbar
pikachu0542 Aug 28, 2026
e22ed53
sync freshmen button only accepts csv or txt files
pikachu0542 Aug 30, 2026
96d920f
fixed active packets page, signatures page, and admin freshmen page
pikachu0542 Aug 30, 2026
c65d23d
proper mobile responsiveness
pikachu0542 Sep 1, 2026
86424db
added margin on the sides of active packets table
pikachu0542 Sep 1, 2026
4ce3f08
navbar actually works on mobile now
pikachu0542 Sep 1, 2026
0e90ce2
vertical centered text in navbar logo
pikachu0542 Sep 1, 2026
12f47df
fixed issue of hamburger menu in nav being in diff places on diff pages
pikachu0542 Sep 2, 2026
db7f957
admin freshmen page should be done
pikachu0542 Sep 2, 2026
f83d357
replaced a couple incorrect classes, fixed vertical alignment of head…
pikachu0542 Sep 2, 2026
7eed39c
fixed the title row and button alignment
pikachu0542 Sep 2, 2026
a280e35
updated the admin packets page
pikachu0542 Sep 2, 2026
80a2b42
changed color of cancel button
pikachu0542 Sep 2, 2026
4072637
finished packet view and graphs pages
pikachu0542 Sep 3, 2026
c00f16b
fixed page titles
pikachu0542 Sep 3, 2026
99b00be
oops i forgot to commit this
pikachu0542 Sep 3, 2026
a59149c
small tweaks to ensure proper styling on intro member view
pikachu0542 Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
.env
.env.example
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PACKET_IP=0.0.0.0
PACKET_SERVER_NAME=localhost.localdomain:8000
PACKET_SERVER_NAME=localhost:8000
PACKET_DATABASE_URI=postgresql://postgres:mysecretpassword@postgres:5432/postgres
PACKET_OIDC_CLIENT_ID=develop
PACKET_OIDC_CLIENT_SECRET=
PACKET_LDAP_BIND_PASS=
PACKET_LDAP_BIND_DN=
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/python:3.9-slim-trixie
FROM docker.io/python:3.14-slim-trixie

RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
RUN apt-get -yq update && \
Expand Down Expand Up @@ -32,4 +32,4 @@ RUN gulp production && \
# Set version for apm
RUN echo "export DD_VERSION=\"$(python3 packet/git.py)\"" >> /tmp/version

CMD ["/bin/bash", "-c", "source /tmp/version && ddtrace-run gunicorn packet:app --bind=0.0.0.0:8080 --access-logfile=- --timeout=600"]
CMD ["/bin/bash", "-c", "source /tmp/version && gunicorn packet:app --bind=0.0.0.0:8080 --access-logfile=- --timeout=600"]
34 changes: 0 additions & 34 deletions Dockerfile.dev

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the second major iteration of packet on the web. The first version was
2. Build the dev environment with `docker compose build`
3. Start the dev environment with `docker compose up`
4. Run the database migrations with `docker exec -it packet-packet-1 flask db upgrade`
5. Go check out the app at http://localhost.localdomain:8000
5. Go check out the app at http://localhost:8080

> Useful Tip: use `docker compose up --watch` so that you don't need to rebuild the container every time you want to test a change

Expand Down
2 changes: 1 addition & 1 deletion config.env.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
OIDC_CLIENT_SECRET = environ.get("PACKET_OIDC_CLIENT_SECRET", "PLEASE_REPLACE_ME")

# SQLAlchemy config
SQLALCHEMY_DATABASE_URI = environ.get("PACKET_DATABASE_URI", "postgresql://postgres:mysecretpassword@localhost:5432/postgres")
SQLALCHEMY_DATABASE_URI = environ.get("PACKET_DATABASE_URI", "postgresql://postgres:mysecretpassword@postgres:5432/postgres")
SQLALCHEMY_TRACK_MODIFICATIONS = False

# LDAP config
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ services:
packet:
build:
context: .
dockerfile: ./Dockerfile.dev
env_file:
- path: ".env"
required: true
ports:
- "8000:8000"
- "8080:8080"
develop:
watch:
- action: sync+restart
Expand All @@ -23,14 +22,15 @@ services:
postgres:
condition: service_healthy
restart: true

postgres:
image: "docker.io/postgres:17"
image: docker.io/postgres
networks:
- packet-network-dev
environment:
POSTGRES_USER: "postgres"
POSTGRES_DB: "postgres"
POSTGRES_PASSWORD: "mysecretpassword"
POSTGRES_USER: postgres
POSTGRES_DATABASE: postgres
POSTGRES_PASSWORD: mysecretpassword
ports:
- "5432:5432"
healthcheck:
Expand Down
1 change: 1 addition & 0 deletions frontend/scss/partials/_base.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@use "sass:meta";
body {
padding-top: 40px;
background-color: #eee;
}

.main {
Expand Down
26 changes: 21 additions & 5 deletions frontend/scss/partials/_global.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
$csh-pink: #b0197e;

.navbar-fixed-bottom,
.navbar-fixed-top {
z-index: 900;
}

.sub-header {
border-bottom: 1px solid #eee;
padding-bottom: 10px;
Expand Down Expand Up @@ -110,3 +105,24 @@ tr {
select.form-control:not([size]):not([multiple]) {
height: calc(3rem + 2px);
}

.bg-signed td {
background-color: #4caf505e !important;
box-shadow: none !important;
}

.invert-color {
filter: invert(100%);
}

.underline-only-hover {
text-decoration: none;
}

.underline-only-hover:hover {
text-decoration: underline;
}

.text-bg-grey {
background-color: var(--bs-gray-500);
}
4 changes: 2 additions & 2 deletions gulpfile.js/tasks/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const minify = require('gulp-minify');

gulp.task('js:minify', (done) => {
gulp.src([
'packet/static/js/*.js',
'!packet/static/js/*.min.js'
'packet/static/js/**/*.js',
'!packet/static/js/**/*.min.js'
])
.pipe(minify({
ext: {
Expand Down
3 changes: 2 additions & 1 deletion packet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
# Initialize the extensions
db = SQLAlchemy(app)
migrate = Migrate(app, db)
app.logger.info('SQLAlchemy pointed at ' + repr(db.engine.url))
with app.app_context():
app.logger.info('SQLAlchemy pointed at ' + repr(db.engine.url))

APP_CONFIG = ProviderConfiguration(issuer=app.config['OIDC_ISSUER'],
client_metadata=ClientMetadata(app.config['OIDC_CLIENT_ID'],
Expand Down
89 changes: 89 additions & 0 deletions packet/static/js/admin/freshmen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
$(document).ready(function () {

// let openPacketsTable = $('#open_packets_table');
// openPacketsTable.DataTable({
// "searching": true,
// "order": [],
// "scrollX": false,
// "paging": true,
// "info": false,
// "columnDefs": [
// {
// "targets": 0,
// "max-width": "50%",
// },
// {
// "type": "num-fmt",
// "targets": 1,
// "visible": true,
// "max-width": "15%",
// }
// ]
// });

$('#all_freshmen_table').dataTable({
"searching": true,
"order": [],
"scrollX": false,
"paging": true,
"info": false,
});

// $("#create-packets").click(() => {
// makePackets();
// });

$("#sync-freshmen").click(() => {
syncFreshmen();
})

// $("#sync-ldap").click(() => {
// syncLdap();
// })

});

let syncFreshmen = () => {
let freshmen = [];
let fileUpload = document.getElementById("currentFroshFile");
let regex = /^([a-zA-Z0-9\s_\\.\-:])+(.csv|.txt)$/;
if (regex.test(fileUpload.value.toLowerCase())) {
if (typeof (FileReader) != "undefined") {
let reader = new FileReader();
reader.onload = (e) => {
let rows = e.target.result.split("\n");
for (let i = 0; i < rows.length; i++) {
let cells = rows[i].split(",");
if (cells.length > 1) {
freshmen.push({
rit_username: cells[3],
name: cells[0],
onfloor: cells[1]
});
}
}
if (freshmen.length >= 1) {
$("#sync-freshmen").append("&nbsp;<span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>");
$("#sync-freshmen").attr('disabled', true);
fetch('/api/v1/freshmen',
{
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(freshmen)
}
).then(response => {
if (response.status < 300) {
$('#sync-freshmen-modal').modal('hide');
location.reload();
} else {
alert("There was an error syncing freshmen")
}
})
}
}
reader.readAsText(fileUpload.files[0]);
}
}
}
109 changes: 54 additions & 55 deletions packet/static/js/admin.js → packet/static/js/admin/packets.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,21 @@ $(document).ready(function () {
]
});

let allFreshmenTable = $('#all_freshmen_table');
allFreshmenTable.DataTable({
"searching": true,
"order": [],
"scrollX": false,
"paging": true,
"info": false,
});
// $('#all_freshmen_table').dataTable({
// "searching": true,
// "order": [],
// "scrollX": false,
// "paging": true,
// "info": false,
// });

$("#create-packets").click(() => {
makePackets();
});

$("#sync-freshmen").click(() => {
syncFreshmen();
})
// $("#sync-freshmen").click(() => {
// syncFreshmen();
// })

$("#sync-ldap").click(() => {
syncLdap();
Expand Down Expand Up @@ -93,50 +92,50 @@ let makePackets = () => {
}


let syncFreshmen = () => {
let freshmen = [];
let fileUpload = document.getElementById("currentFroshFile");
let regex = /^([a-zA-Z0-9\s_\\.\-:])+(.csv|.txt)$/;
if (regex.test(fileUpload.value.toLowerCase())) {
if (typeof (FileReader) != "undefined") {
let reader = new FileReader();
reader.onload = (e) => {
let rows = e.target.result.split("\n");
for (let i = 0; i < rows.length; i++) {
let cells = rows[i].split(",");
if (cells.length > 1) {
freshmen.push({
rit_username: cells[3],
name: cells[0],
onfloor: cells[1]
});
}
}
if (freshmen.length >= 1) {
$("#sync-freshmen").append("&nbsp;<span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>");
$("#sync-freshmen").attr('disabled', true);
fetch('/api/v1/freshmen',
{
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(freshmen)
}
).then(response => {
if (response.status < 300) {
$('#sync-freshmen-modal').modal('hide');
location.reload();
} else {
alert("There was an error syncing freshmen")
}
})
}
}
reader.readAsText(fileUpload.files[0]);
}
}
}
// let syncFreshmen = () => {
// let freshmen = [];
// let fileUpload = document.getElementById("currentFroshFile");
// let regex = /^([a-zA-Z0-9\s_\\.\-:])+(.csv|.txt)$/;
// if (regex.test(fileUpload.value.toLowerCase())) {
// if (typeof (FileReader) != "undefined") {
// let reader = new FileReader();
// reader.onload = (e) => {
// let rows = e.target.result.split("\n");
// for (let i = 0; i < rows.length; i++) {
// let cells = rows[i].split(",");
// if (cells.length > 1) {
// freshmen.push({
// rit_username: cells[3],
// name: cells[0],
// onfloor: cells[1]
// });
// }
// }
// if (freshmen.length >= 1) {
// $("#sync-freshmen").append("&nbsp;<span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>");
// $("#sync-freshmen").attr('disabled', true);
// fetch('/api/v1/freshmen',
// {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json'
// },
// body: JSON.stringify(freshmen)
// }
// ).then(response => {
// if (response.status < 300) {
// $('#sync-freshmen-modal').modal('hide');
// location.reload();
// } else {
// alert("There was an error syncing freshmen")
// }
// })
// }
// }
// reader.readAsText(fileUpload.files[0]);
// }
// }
// }

let syncLdap = () => {
$("#sync-ldap").append("&nbsp;<span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>");
Expand Down
Loading