Skip to content

Commit 2234485

Browse files
yeet gulp from build system (involves lots of chaos) (#445)
* Revert dependabot stuff (sorry tyler arfcomm) * webpack builds now * build css * update dockerfile * css with dockerfile in better way * include fonts * removed most of the icons * removed gulp stuff :)))) * updated css stuff and removed more gulp things * made dockerfile nicer * update node build action * trying to fix gh action * ugh more not working * removed action that wasn't working * bumped node and removed gulp * update node and webpack a little bit * webpack 4 * update lots of dependencies * update webpack and use cli * fix build errors for exception stuff * build scss with webpack * update some icons to be better * webpack does icons now * webpack copies images too :) * removed ball fall stuff (as far as i can tell it doesn't do anything) * gunicorn 22 * updated config.env.py to match env changes gonna crash out over env variables stuff I'm so bad at updating the prod one when I change local stuff * fixed styling issues with attendance * remove build-css * removed build*.js from dockerfile
1 parent 96529b8 commit 2234485

Some content is hidden

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

75 files changed

+4562
-17634
lines changed

.github/workflows/node-js.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
FROM docker.io/python:3.12-bookworm
1+
FROM node:25-bookworm-slim AS build-frontend
2+
3+
RUN mkdir /opt/conditional
4+
5+
WORKDIR /opt/conditional
6+
7+
RUN apt-get -yq update && \
8+
apt-get -yq install curl git
9+
10+
COPY package.json package-lock.json /opt/conditional/
11+
12+
RUN npm ci
13+
14+
COPY webpack.config.js /opt/conditional
15+
COPY frontend /opt/conditional/frontend
16+
17+
RUN npm run webpack
18+
19+
FROM docker.io/python:3.12-slim-bookworm
220
MAINTAINER Computer Science House <webmaster@csh.rit.edu>
321

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

15-
ENV NVM_DIR /usr/local/nvm
16-
ENV NODE_VERSION v10.24.1
17-
RUN mkdir -p $NVM_DIR
18-
19-
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
33+
ARG PORT=8080
34+
ENV PORT=${PORT}
35+
EXPOSE ${PORT}
2036

21-
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"
22-
23-
ADD . /opt/conditional
24-
25-
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm use --delete-prefix $NODE_VERSION && npm install && npm run production"
26-
27-
RUN rm -rf node_modules && \
28-
apt-get -yq clean all
37+
COPY . /opt/conditional
38+
COPY --from=build-frontend /opt/conditional/conditional/static /opt/conditional/conditional/static
2939

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

32-
CMD ["gunicorn", "conditional:app", "--bind=0.0.0.0:8080", "--access-logfile=-", "--timeout=256"]
42+
CMD ["sh", "-c", "gunicorn conditional:app --bind=0.0.0.0:${PORT} --access-logfile=- --timeout=256"]

conditional/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,9 @@
4040
app.config['LDAP_BIND_PW'],
4141
ro=app.config['LDAP_RO'])
4242

43-
client_metadata = ClientMetadata(
44-
client_id = app.config['OIDC_CLIENT_ID'],
45-
client_secret = app.config['OIDC_CLIENT_SECRET'],
46-
post_logout_redirect_uris = app.config['OIDC_POST_LOGOUT_REDIRECT_URIS'],
47-
)
48-
provider_config = ProviderConfiguration(issuer=app.config["OIDC_ISSUER"], client_metadata=client_metadata)
49-
43+
provider_config = ProviderConfiguration(
44+
app.config['OIDC_ISSUER'],
45+
client_metadata=ClientMetadata(**app.config['OIDC_CLIENT_CONFIG']))
5046
auth = OIDCAuthentication({'default': provider_config}, app)
5147

5248
app.secret_key = app.config["SECRET_KEY"]

conditional/templates/attendance_history.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h5>{{meeting["name"]}}</h5>
2323
</div><!--
2424
--><div class="col-xs-12 col-sm-2 vcenter text-center">
2525
<button type="button" class="btn btn-default navbar-btn" data-module="cmReview" data-modal="reviewMeeting" data-cid="{{meeting["id"]}}" data-meeting="cm">
26-
<span class="glyphicon glyphicon-eye-open attend-edit-icon"></span> Review
26+
<i class="bi bi-eye attend-edit-icon"></i> Review
2727
</button>
2828
</div>
2929
</div>
@@ -50,7 +50,7 @@ <h5>{{seminar["name"]}}</h5>
5050
</div><!--
5151
--><div class="col-xs-12 col-sm-2 vcenter text-center">
5252
<button type="button" class="btn btn-default navbar-btn" data-module="cmReview" data-modal="reviewMeeting" data-cid="{{seminar["id"]}}" data-meeting="ts">
53-
<span class="glyphicon glyphicon-eye-open attend-edit-icon"></span> Review
53+
<i class="bi bi-eye attend-edit-icon"></i> Review
5454
</button>
5555
</div>
5656
</div>
@@ -76,7 +76,7 @@ <h5>{{meeting["name"]}}</h5>
7676
</div><!--
7777
--><div class="col-xs-12 col-sm-2 vcenter text-center">
7878
<button type="button" class="btn btn-default navbar-btn" data-module="cmReview" data-modal="editMeeting" data-cid="{{meeting["id"]}}" data-meeting="{{meeting["type"]}}">
79-
<span class="glyphicon glyphicon-edit attend-edit-icon"></span> Edit
79+
<i class="bi bi-pencil-square attend-edit-icon"></i> Edit
8080
</button>
8181
</div>
8282
</div>

conditional/templates/co_op_management.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h3 class="panel-title">Co-Op Management</h3>
3030
</td>
3131
<td width=100px>
3232
<a href="#" data-module="coopDelete" data-uid="{{c[1]}}">
33-
<span class="glyphicon glyphicon-trash red align-center" style="width: 100%"></span>
33+
<i class="bi bi-trash3 red align-center" style="width: 100%"></i>
3434
</a>
3535
</td>
3636
</tr>

conditional/templates/conditional.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h3 class="panel-title">
1010
Conditionals
1111
{% if is_eval_director %}
1212
<button type="button" class="btn btn-primary btn-sm btn-conditional pull-right" data-toggle="modal" data-target="#createConditional">
13-
<span class="glyphicon glyphicon-plus"></span> Add
13+
<i class="bi bi-plus"></i> Add
1414
</button>
1515
{% endif %}
1616
</h3>
@@ -43,7 +43,7 @@ <h3 class="panel-title">
4343
<td data-module="conditionalActions" data-id="{{ c['id'] }}">
4444
<button role="button" class="btn btn-sm btn-success" data-action="pass">Pass</button>
4545
<button role="button" class="btn btn-sm btn-danger" data-action="fail">Fail</button>
46-
<button role="button" class="btn btn-sm btn-default" data-action="delete"><span class="glyphicon glyphicon-trash"></span> Delete</button>
46+
<button role="button" class="btn btn-sm btn-default" data-action="delete"><i class="bi bi-trash3"></bi> Delete</button>
4747
</td>
4848
{% endif %}
4949
</tr>

conditional/templates/dashboard.html

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ <h5 class="email">{{username}}@csh.rit.edu</h5>
4444
<div class="panel-heading">
4545
<h3 class="panel-title">Freshman Evaluations
4646
{% if freshman['status'] == "Passed" %}
47-
<span class="pull-right"><span class="glyphicon glyphicon-ok-sign green"></span> Passed</span>
47+
<span class="pull-right"><i class="bi bi-check-circle green"></i> Passed</span>
4848
{% elif freshman['status'] == "Pending" %}
49-
<span class="pull-right"><span class="glyphicon glyphicon-hourglass yellow"></span> Pending</span>
49+
<span class="pull-right"><i class="bi bi-hourglass yellow"></i> Pending</span>
5050
{% else %}
51-
<span class="pull-right"><span class="glyphicon glyphicon-remove-sign red"></span> Failed</span>
51+
<span class="pull-right"><i class="bi bi-x-circle red"></i> Failed</span>
5252
{% endif %}
5353
</h3>
5454
</div>
@@ -63,26 +63,26 @@ <h3 class="panel-title">Freshman Evaluations
6363
<td class="title">Signatures Missed</td>
6464
<td><span class="pull-right">
6565
{% if freshman['sig_missed'] == 0 %}
66-
<span class="glyphicon glyphicon-ok-sign green"></span> None {% else %}
67-
<span class="glyphicon glyphicon-remove-sign red"></span> {{freshman['sig_missed']}} {% endif %}
66+
<i class="bi bi-check-circle green"></i> None {% else %}
67+
<i class="bi bi-x-circle red"></i> {{freshman['sig_missed']}} {% endif %}
6868
</span>
6969
</td>
7070
</tr>
7171
<tr>
7272
<td class="title">Directorship Meetings</td>
7373
<td><span class="pull-right">
7474
{% if freshman['committee_meetings'] >= 6 %}
75-
<span class="glyphicon glyphicon-ok-sign green"></span> {% else %}
76-
<span class="glyphicon glyphicon-remove-sign red"></span> {% endif %} {{freshman['committee_meetings']}} / 6
75+
<i class="bi bi-check-circle green"></i> {% else %}
76+
<i class="bi bi-x-circle red"></i> {% endif %} {{freshman['committee_meetings']}} / 6
7777
</span>
7878
</td>
7979
</tr>
8080
<tr>
8181
<td class="title">House Meetings Missed</td>
8282
<td><span class="pull-right">
8383
{% if freshman['hm_missed'] == 0 %}
84-
<span class="glyphicon glyphicon-ok-sign green"></span> None {% else %}
85-
<span class="glyphicon glyphicon-remove-sign red"></span> {{ freshman['hm_missed'] }} {% endif %}
84+
<i class="bi bi-check-circle green"></i> None {% else %}
85+
<i class="bi bi-x-circle red"></i> {{ freshman['hm_missed'] }} {% endif %}
8686
</span>
8787
</td>
8888
</tr>
@@ -111,11 +111,11 @@ <h3 class="panel-title">Freshman Evaluations
111111
<div class="panel-heading">
112112
<h3 class="panel-title">Membership Evaluations
113113
{% if spring['status'] == "Passed" %}
114-
<span class="pull-right"><span class="glyphicon glyphicon-ok-sign green"></span> Passed</span>
114+
<span class="pull-right"><i class="bi bi-check-circle green"></i> Passed</span>
115115
{% elif spring['status'] == "Failed" %}
116-
<span class="pull-right"><span class="glyphicon glyphicon-remove-sign red"></span> Failed</span>
116+
<span class="pull-right"><i class="bi bi-x-circle red"></i> Failed</span>
117117
{% elif active %}
118-
<span class="pull-right"><span class="glyphicon glyphicon-hourglass yellow"></span> Pending</span>
118+
<span class="pull-right"><i class="bi bi-hourglass yellow"></i> Pending</span>
119119
{% endif %}
120120
</h3>
121121
</div>
@@ -141,16 +141,16 @@ <h3 class="panel-title">Membership Evaluations
141141
<td class="title">Directorship Meetings</td>
142142
<td><span class="pull-right">
143143
{% if spring['committee_meetings'] >= spring['req_meetings'] %}
144-
<span class="glyphicon glyphicon-ok-sign green"></span> {% else %}
145-
<span class="glyphicon glyphicon-remove-sign red"></span> {% endif %} {{ spring['committee_meetings'] }} / {{ spring['req_meetings'] }}</span>
144+
<i class="bi bi-check-circle green"></i> {% else %}
145+
<i class="bi bi-x-circle red"></i> {% endif %} {{ spring['committee_meetings'] }} / {{ spring['req_meetings'] }}</span>
146146
</td>
147147
</tr>
148148
<tr>
149149
<td class="title">House Meetings Missed</td>
150150
<td><span class="pull-right">
151151
{% if spring['hm_missed'] == 0 %}
152-
<span class="glyphicon glyphicon-ok-sign green"></span> None {% else %}
153-
<span><span class="glyphicon glyphicon-remove-sign red"></span> {{spring['hm_missed']}}</span>
152+
<i class="bi bi-check-circle green"></i> None {% else %}
153+
<i class="bi bi-x-circle red"></i> {{spring['hm_missed']}}</span>
154154
{% endif %}
155155
</span>
156156
</td>
@@ -160,9 +160,9 @@ <h3 class="panel-title">Membership Evaluations
160160
<td>
161161
<span class="pull-right">
162162
{% if spring['mp_status'] == "Passed" %}
163-
<span class="glyphicon glyphicon-ok-sign green"></span> Passed {% elif spring['mp_status'] == "Pending" %}
164-
<span class="glyphicon glyphicon-hourglass yellow"></span> Pending {% else %}
165-
<span class="glyphicon glyphicon-remove-sign red"></span> None {% endif %}
163+
<i class="bi bi-check-circle green"></i> Passed {% elif spring['mp_status'] == "Pending" %}
164+
<i class="bi bi-hourglass yellow"></i> Pending {% else %}
165+
<i class="bi bi-x-circle red"></i> None {% endif %}
166166
</span>
167167
</td>
168168
</tr>
@@ -193,9 +193,9 @@ <h3 class="panel-title">Conditionals</h3>
193193
<td>{{c['description']}}</td>
194194
<td>
195195
{% if c['status'] == "Passed" %}
196-
<span style="padding-left:15px; padding-top:15px;" class="glyphicon glyphicon-ok-sign green"></span> {% elif c['status'] == "Pending" %}
197-
<span class="glyphicon glyphicon-hourglass yellow"></span> <span class="mobile-hide">Pending</span> {% else %}
198-
<span class="glyphicon glyphicon-minus-sign red"></span> <span class="mobile-hide">Failed</span> {% endif %}
196+
<i style="padding-left:15px; padding-top:15px;" class="bi bi-check-circle green"></i> {% elif c['status'] == "Pending" %}
197+
<i class="bi bi-hourglass yellow"></i> <span class="mobile-hide">Pending</span> {% else %}
198+
<i class="bi bi-x-circle red"></i> <span class="mobile-hide">Failed</span> {% endif %}
199199
</td>
200200
</tr>
201201
{% endfor %}
@@ -235,7 +235,7 @@ <h3 class="panel-title">Member Statistics</h3>
235235

236236

237237
{% if major_projects_count == 0 and not active%}
238-
<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>
238+
<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>
239239
{% elif major_projects_count > 0 %}
240240
<div class="panel panel-default">
241241
<div class="panel-heading">
@@ -245,14 +245,17 @@ <h3 class="panel-title">Major Projects</h3>
245245
{% for p in major_projects %}
246246
<div class="mp-container">
247247
{% if p['status'] == "Passed" %}
248-
<div class="title"><span class="glyphicon glyphicon-ok-sign green"></span> {{p['name']}}</div>
248+
<div class="title"><i class="bi bi-check-circle green"></i> {{p['name']}}</div>
249249
{% elif p['status'] == "Pending" %}
250250
<div class="title">
251-
<span class="glyphicon glyphicon-hourglass yellow"></span> {{p['name']}}
252-
<button class="btn-xs btn-danger pull-right" data-module="majorProjectStatus" data-id="{{p['id']}}"><span class="glyphicon glyphicon-trash"></span> Delete</button>
251+
<i class="bi bi-hourglass yellow"></i> {{p['name']}}
252+
<button class="btn-xs btn-danger pull-right" data-module="majorProjectStatus" data-id="{{p['id']}}">
253+
<i class="bi bi-trash3"></i>
254+
Delete
255+
</button>
253256
</div>
254257
{% else %}
255-
<div class="title"><span class="glyphicon glyphicon-minus-sign red"></span> {{p['name']}}</div>
258+
<div class="title"><i class="bi bi-dash-circle red"></i> {{p['name']}}</div>
256259
{% endif %}
257260
<div class="mp-description">{{p['description']}}</div>
258261
</div>
@@ -317,7 +320,7 @@ <h3 class="panel-title">Housing Status</h3>
317320

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

346349
{% if cm_attendance_len == 0 and active%}
347-
<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>
350+
<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>
348351
{% elif cm_attendance_len > 0 %}
349352
<div class="panel panel-default">
350353
<div class="panel-heading">

conditional/templates/housing.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<h3 class="panel-title">Housing Queue
1212
{% if is_eval_director %}
1313
<button id="queueFilterToggle" type="button" class="btn btn-primary btn-sm btn-conditional pull-right">
14-
<span class="glyphicon glyphicon-filter"></span> Show Current Queue
14+
<i class="bi bi-filter"></i> Show Current Queue
1515
</button>
1616
{% endif %}
1717
</h3>
@@ -50,7 +50,7 @@ <h3 class="panel-title">Housing Queue
5050
<h3 class="panel-title">Current Room Numbers
5151
{% if is_eval_director %}
5252
<button type="button" class="btn btn-primary btn-sm btn-conditional pull-right" data-module="housingEdit" data-modal="editHousing" data-rmnumber="">
53-
<span class="glyphicon glyphicon-plus"></span> Add Room
53+
<i class="bi bi-plus"></i> Add Room
5454
</button>
5555
{% endif %}
5656
</h3>
@@ -80,7 +80,7 @@ <h3 class="room-number">{{room}}</h3></td>
8080
{% if is_eval_director %}
8181
<td>
8282
<button type="button" class="btn btn-default navbar-btn" data-module="housingEdit" data-modal="editHousing" data-rmnumber="{{room}}" id="rm-edit-btn">
83-
<span class="glyphicon glyphicon-edit attend-edit-icon"></span> Edit
83+
<i class="bi bi-pencil-square attend-edit-icon"></i> Edit
8484
</button>
8585
</td>
8686
{% endif %}

0 commit comments

Comments
 (0)