Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
96feaf4
Revert dependabot stuff (sorry tyler arfcomm)
BigSpaceships Oct 24, 2025
fc3e043
webpack builds now
BigSpaceships Oct 24, 2025
a5ad2ef
build css
BigSpaceships Oct 27, 2025
d3adbcc
update dockerfile
BigSpaceships Oct 27, 2025
bc4192c
css with dockerfile in better way
BigSpaceships Oct 29, 2025
e0aa735
include fonts
BigSpaceships Oct 29, 2025
886b095
removed most of the icons
BigSpaceships Nov 3, 2025
9435402
removed gulp stuff :))))
BigSpaceships Nov 3, 2025
fb634a6
updated css stuff and removed more gulp things
BigSpaceships Nov 3, 2025
18b47c5
made dockerfile nicer
BigSpaceships Nov 3, 2025
ae4250a
update node build action
BigSpaceships Nov 3, 2025
c106ed3
trying to fix gh action
BigSpaceships Nov 3, 2025
58279ec
ugh more not working
BigSpaceships Nov 3, 2025
62b9b51
removed action that wasn't working
BigSpaceships Nov 4, 2025
21426b4
bumped node and removed gulp
BigSpaceships Nov 4, 2025
eb64671
update node and webpack a little bit
BigSpaceships Nov 4, 2025
d35ebbf
webpack 4
BigSpaceships Nov 4, 2025
da3d641
update lots of dependencies
BigSpaceships Nov 4, 2025
d5ef6a9
update webpack and use cli
BigSpaceships Nov 4, 2025
2970831
fix build errors for exception stuff
BigSpaceships Nov 5, 2025
55bdc46
build scss with webpack
BigSpaceships Nov 5, 2025
f5ba609
update some icons to be better
BigSpaceships Nov 8, 2025
4289817
webpack does icons now
BigSpaceships Nov 8, 2025
2591d09
webpack copies images too :)
BigSpaceships Nov 8, 2025
6ec09cc
removed ball fall stuff (as far as i can tell it doesn't do anything)
BigSpaceships Nov 8, 2025
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
27 changes: 0 additions & 27 deletions .github/workflows/node-js.yml

This file was deleted.

40 changes: 25 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
FROM docker.io/python:3.12-bookworm
FROM node:25-bookworm-slim AS build-frontend

RUN mkdir /opt/conditional

WORKDIR /opt/conditional

RUN apt-get -yq update && \
apt-get -yq install curl git

COPY package.json package-lock.json /opt/conditional/

RUN npm ci

COPY build*.js webpack.config.js /opt/conditional
COPY frontend /opt/conditional/frontend

RUN npm run webpack

FROM docker.io/python:3.12-slim-bookworm
MAINTAINER Computer Science House <[email protected]>

RUN mkdir /opt/conditional
Expand All @@ -12,21 +30,13 @@ RUN apt-get -yq update && \
pip install -r requirements.txt && \
apt-get -yq clean all

ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION v10.24.1
RUN mkdir -p $NVM_DIR

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
ARG PORT=8080
ENV PORT=${PORT}
EXPOSE ${PORT}

RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"

ADD . /opt/conditional

RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm use --delete-prefix $NODE_VERSION && npm install && npm run production"

RUN rm -rf node_modules && \
apt-get -yq clean all
COPY . /opt/conditional
COPY --from=build-frontend /opt/conditional/conditional/static /opt/conditional/conditional/static

RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

CMD ["gunicorn", "conditional:app", "--bind=0.0.0.0:8080", "--access-logfile=-", "--timeout=256"]
CMD ["sh", "-c", "gunicorn conditional:app --bind=0.0.0.0:${PORT} --access-logfile=- --timeout=256"]
36 changes: 36 additions & 0 deletions build-css.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const { exec } = require('child_process');
const path = require('path');
const sass = require('sass');
const fs = require('node:fs');

// yes I know this is awkward. I want to actually use the node libraries but that gets SUBSTANTIALLY easier when node and all the dependinces are updated
// So after I can update node and stuff I'll change this to do it in a sane way, probably in webpack

const loadPaths = [
"./node_modules/csh-material-bootstrap/dist",
"./node_modules/csh-material-bootstrap/dist/css",
"./node_modules/datatables.net-bs/css",
"./node_modules/bootstrap-material-datetimepicker/css",
"./node_modules/load-awesome/css",
"./node_modules/reveal.js/css",
"./node_modules",
".",
]

function compileFile(file) {
const result = sass.compile("frontend/stylesheets/" + file + ".scss", {
loadPaths: loadPaths,
importers: [
new sass.NodePackageImporter()
],
})

fs.writeFileSync("conditional/static/css/" + file + ".css", result.css);
}

exec("mkdir -p " + path.resolve("conditional/static/css"))

compileFile("app")

compileFile("presentations")

10 changes: 3 additions & 7 deletions conditional/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,9 @@
app.config['LDAP_BIND_PW'],
ro=app.config['LDAP_RO'])

client_metadata = ClientMetadata(
client_id = app.config['OIDC_CLIENT_ID'],
client_secret = app.config['OIDC_CLIENT_SECRET'],
post_logout_redirect_uris = app.config['OIDC_POST_LOGOUT_REDIRECT_URIS'],
)
provider_config = ProviderConfiguration(issuer=app.config["OIDC_ISSUER"], client_metadata=client_metadata)

provider_config = ProviderConfiguration(
app.config['OIDC_ISSUER'],
client_metadata=ClientMetadata(**app.config['OIDC_CLIENT_CONFIG']))
auth = OIDCAuthentication({'default': provider_config}, app)

app.secret_key = app.config["SECRET_KEY"]
Expand Down
6 changes: 3 additions & 3 deletions conditional/templates/attendance_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h5>{{meeting["name"]}}</h5>
</div><!--
--><div class="col-xs-12 col-sm-2 vcenter text-center">
<button type="button" class="btn btn-default navbar-btn" data-module="cmReview" data-modal="reviewMeeting" data-cid="{{meeting["id"]}}" data-meeting="cm">
<span class="glyphicon glyphicon-eye-open attend-edit-icon"></span> Review
<i class="bi bi-eye attend-edit-icon"></i> Review
</button>
</div>
</div>
Expand All @@ -50,7 +50,7 @@ <h5>{{seminar["name"]}}</h5>
</div><!--
--><div class="col-xs-12 col-sm-2 vcenter text-center">
<button type="button" class="btn btn-default navbar-btn" data-module="cmReview" data-modal="reviewMeeting" data-cid="{{seminar["id"]}}" data-meeting="ts">
<span class="glyphicon glyphicon-eye-open attend-edit-icon"></span> Review
<i class="bi bi-eye attend-edit-icon"></i> Review
</button>
</div>
</div>
Expand All @@ -76,7 +76,7 @@ <h5>{{meeting["name"]}}</h5>
</div><!--
--><div class="col-xs-12 col-sm-2 vcenter text-center">
<button type="button" class="btn btn-default navbar-btn" data-module="cmReview" data-modal="editMeeting" data-cid="{{meeting["id"]}}" data-meeting="{{meeting["type"]}}">
<span class="glyphicon glyphicon-edit attend-edit-icon"></span> Edit
<i class="bi bi-pencil-square attend-edit-icon"></i> Edit
</button>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion conditional/templates/co_op_management.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h3 class="panel-title">Co-Op Management</h3>
</td>
<td width=100px>
<a href="#" data-module="coopDelete" data-uid="{{c[1]}}">
<span class="glyphicon glyphicon-trash red align-center" style="width: 100%"></span>
<i class="bi bi-trash3 red align-center" style="width: 100%"></i>
</a>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions conditional/templates/conditional.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3 class="panel-title">
Conditionals
{% if is_eval_director %}
<button type="button" class="btn btn-primary btn-sm btn-conditional pull-right" data-toggle="modal" data-target="#createConditional">
<span class="glyphicon glyphicon-plus"></span> Add
<i class="bi bi-plus"></i> Add
</button>
{% endif %}
</h3>
Expand Down Expand Up @@ -43,7 +43,7 @@ <h3 class="panel-title">
<td data-module="conditionalActions" data-id="{{ c['id'] }}">
<button role="button" class="btn btn-sm btn-success" data-action="pass">Pass</button>
<button role="button" class="btn btn-sm btn-danger" data-action="fail">Fail</button>
<button role="button" class="btn btn-sm btn-default" data-action="delete"><span class="glyphicon glyphicon-trash"></span> Delete</button>
<button role="button" class="btn btn-sm btn-default" data-action="delete"><i class="bi bi-trash3"></bi> Delete</button>
</td>
{% endif %}
</tr>
Expand Down
61 changes: 32 additions & 29 deletions conditional/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ <h5 class="email">{{username}}@csh.rit.edu</h5>
<div class="panel-heading">
<h3 class="panel-title">Freshman Evaluations
{% if freshman['status'] == "Passed" %}
<span class="pull-right"><span class="glyphicon glyphicon-ok-sign green"></span> Passed</span>
<span class="pull-right"><i class="bi bi-check-circle green"></i> Passed</span>
{% elif freshman['status'] == "Pending" %}
<span class="pull-right"><span class="glyphicon glyphicon-hourglass yellow"></span> Pending</span>
<span class="pull-right"><i class="bi bi-hourglass yellow"></i> Pending</span>
{% else %}
<span class="pull-right"><span class="glyphicon glyphicon-remove-sign red"></span> Failed</span>
<span class="pull-right"><i class="bi bi-x-circle red"></i> Failed</span>
{% endif %}
</h3>
</div>
Expand All @@ -63,26 +63,26 @@ <h3 class="panel-title">Freshman Evaluations
<td class="title">Signatures Missed</td>
<td><span class="pull-right">
{% if freshman['sig_missed'] == 0 %}
<span class="glyphicon glyphicon-ok-sign green"></span> None {% else %}
<span class="glyphicon glyphicon-remove-sign red"></span> {{freshman['sig_missed']}} {% endif %}
<i class="bi bi-check-circle green"></i> None {% else %}
<i class="bi bi-x-circle red"></i> {{freshman['sig_missed']}} {% endif %}
</span>
</td>
</tr>
<tr>
<td class="title">Directorship Meetings</td>
<td><span class="pull-right">
{% if freshman['committee_meetings'] >= 6 %}
<span class="glyphicon glyphicon-ok-sign green"></span> {% else %}
<span class="glyphicon glyphicon-remove-sign red"></span> {% endif %} {{freshman['committee_meetings']}} / 6
<i class="bi bi-check-circle green"></i> {% else %}
<i class="bi bi-x-circle red"></i> {% endif %} {{freshman['committee_meetings']}} / 6
</span>
</td>
</tr>
<tr>
<td class="title">House Meetings Missed</td>
<td><span class="pull-right">
{% if freshman['hm_missed'] == 0 %}
<span class="glyphicon glyphicon-ok-sign green"></span> None {% else %}
<span class="glyphicon glyphicon-remove-sign red"></span> {{ freshman['hm_missed'] }} {% endif %}
<i class="bi bi-check-circle green"></i> None {% else %}
<i class="bi bi-x-circle red"></i> {{ freshman['hm_missed'] }} {% endif %}
</span>
</td>
</tr>
Expand Down Expand Up @@ -111,11 +111,11 @@ <h3 class="panel-title">Freshman Evaluations
<div class="panel-heading">
<h3 class="panel-title">Membership Evaluations
{% if spring['status'] == "Passed" %}
<span class="pull-right"><span class="glyphicon glyphicon-ok-sign green"></span> Passed</span>
<span class="pull-right"><i class="bi bi-check-circle green"></i> Passed</span>
{% elif spring['status'] == "Failed" %}
<span class="pull-right"><span class="glyphicon glyphicon-remove-sign red"></span> Failed</span>
<span class="pull-right"><i class="bi bi-x-circle red"></i> Failed</span>
{% elif active %}
<span class="pull-right"><span class="glyphicon glyphicon-hourglass yellow"></span> Pending</span>
<span class="pull-right"><i class="bi bi-hourglass yellow"></i> Pending</span>
{% endif %}
</h3>
</div>
Expand All @@ -141,16 +141,16 @@ <h3 class="panel-title">Membership Evaluations
<td class="title">Directorship Meetings</td>
<td><span class="pull-right">
{% if spring['committee_meetings'] >= spring['req_meetings'] %}
<span class="glyphicon glyphicon-ok-sign green"></span> {% else %}
<span class="glyphicon glyphicon-remove-sign red"></span> {% endif %} {{ spring['committee_meetings'] }} / {{ spring['req_meetings'] }}</span>
<i class="bi bi-check-circle green"></i> {% else %}
<i class="bi bi-x-circle red"></i> {% endif %} {{ spring['committee_meetings'] }} / {{ spring['req_meetings'] }}</span>
</td>
</tr>
<tr>
<td class="title">House Meetings Missed</td>
<td><span class="pull-right">
{% if spring['hm_missed'] == 0 %}
<span class="glyphicon glyphicon-ok-sign green"></span> None {% else %}
<span><span class="glyphicon glyphicon-remove-sign red"></span> {{spring['hm_missed']}}</span>
<i class="bi bi-check-circle green"></i> None {% else %}
<i class="bi bi-x-circle red"></i> {{spring['hm_missed']}}</span>
{% endif %}
</span>
</td>
Expand All @@ -160,9 +160,9 @@ <h3 class="panel-title">Membership Evaluations
<td>
<span class="pull-right">
{% if spring['mp_status'] == "Passed" %}
<span class="glyphicon glyphicon-ok-sign green"></span> Passed {% elif spring['mp_status'] == "Pending" %}
<span class="glyphicon glyphicon-hourglass yellow"></span> Pending {% else %}
<span class="glyphicon glyphicon-remove-sign red"></span> None {% endif %}
<i class="bi bi-check-circle green"></i> Passed {% elif spring['mp_status'] == "Pending" %}
<i class="bi bi-hourglass yellow"></i> Pending {% else %}
<i class="bi bi-x-circle red"></i> None {% endif %}
</span>
</td>
</tr>
Expand Down Expand Up @@ -193,9 +193,9 @@ <h3 class="panel-title">Conditionals</h3>
<td>{{c['description']}}</td>
<td>
{% if c['status'] == "Passed" %}
<span style="padding-left:15px; padding-top:15px;" class="glyphicon glyphicon-ok-sign green"></span> {% elif c['status'] == "Pending" %}
<span class="glyphicon glyphicon-hourglass yellow"></span> <span class="mobile-hide">Pending</span> {% else %}
<span class="glyphicon glyphicon-minus-sign red"></span> <span class="mobile-hide">Failed</span> {% endif %}
<i style="padding-left:15px; padding-top:15px;" class="bi bi-check-circle green"></i> {% elif c['status'] == "Pending" %}
<i class="bi bi-hourglass yellow"></i> <span class="mobile-hide">Pending</span> {% else %}
<i class="bi bi-x-circle red"></i> <span class="mobile-hide">Failed</span> {% endif %}
</td>
</tr>
{% endfor %}
Expand Down Expand Up @@ -235,7 +235,7 @@ <h3 class="panel-title">Member Statistics</h3>


{% if major_projects_count == 0 and not active%}
<div class="alert alert-warning" role="alert"> <span class="glyphicon glyphicon-exclamation-sign white" style="padding-right:5px"> </span> You have no major projects.</div>
<div class="alert alert-warning" role="alert"> <i class="bi bi-exclamation-circle white" style="padding-right:5px"> </i> You have no major projects.</div>
{% elif major_projects_count > 0 %}
<div class="panel panel-default">
<div class="panel-heading">
Expand All @@ -245,14 +245,17 @@ <h3 class="panel-title">Major Projects</h3>
{% for p in major_projects %}
<div class="mp-container">
{% if p['status'] == "Passed" %}
<div class="title"><span class="glyphicon glyphicon-ok-sign green"></span> {{p['name']}}</div>
<div class="title"><i class="bi bi-check-circle green"></i> {{p['name']}}</div>
{% elif p['status'] == "Pending" %}
<div class="title">
<span class="glyphicon glyphicon-hourglass yellow"></span> {{p['name']}}
<button class="btn-xs btn-danger pull-right" data-module="majorProjectStatus" data-id="{{p['id']}}"><span class="glyphicon glyphicon-trash"></span> Delete</button>
<i class="bi bi-hourglass yellow"></i> {{p['name']}}
<button class="btn-xs btn-danger pull-right" data-module="majorProjectStatus" data-id="{{p['id']}}">
<i class="bi bi-trash3"></i>
Delete
</button>
</div>
{% else %}
<div class="title"><span class="glyphicon glyphicon-minus-sign red"></span> {{p['name']}}</div>
<div class="title"><i class="bi bi-dash-circle red"></i> {{p['name']}}</div>
{% endif %}
<div class="mp-description">{{p['description']}}</div>
</div>
Expand Down Expand Up @@ -317,7 +320,7 @@ <h3 class="panel-title">Housing Status</h3>

{% if hm_attendance_len == 0 and active%}
<div class="alert alert-success">
<span class="glyphicon glyphicon-ok-sign white" style="padding-right:5px"> </span> You haven't missed any house meetings.
<i class="bi bi-check-circlce white" style="padding-right:5px"> </i> You haven't missed any house meetings.
</div>
{% elif hm_attendance_len > 0 %}
<div class="panel panel-default">
Expand All @@ -344,7 +347,7 @@ <h3 class="panel-title">Missed House Meetings</h3>
{% endif %}

{% if cm_attendance_len == 0 and active%}
<div class="alert alert-warning"><span class="glyphicon glyphicon-exclamation-sign white" style="padding-right:5px"></span> You have not attended any directorship meetings.</div>
<div class="alert alert-warning"><i class="bi bi-exclamation-circle white" style="padding-right:5px"></i>You have not attended any directorship meetings.</div>
{% elif cm_attendance_len > 0 %}
<div class="panel panel-default">
<div class="panel-heading">
Expand Down
Loading