Skip to content
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
28 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
587d488
gunicorn 22
BigSpaceships Nov 10, 2025
bae74a5
updated config.env.py to match env changes
BigSpaceships Nov 10, 2025
15f9df3
fixed styling issues with attendance
BigSpaceships Nov 10, 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 /opt/conditional
COPY frontend /opt/conditional/frontend

RUN npm run build

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"]
41 changes: 41 additions & 0 deletions build-css.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const { exec } = require('child_process');
const path = require('path');

// 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/css",
"./node_modules/datatables.net-bs/css",
"./node_modules/bootstrap-material-datetimepicker/css",
"./node_modules/selectize-scss/src",
"./node_modules/load-awesome/css",
"./node_modules/reveal.js/css",
"./node_modules",
".",
]

const loadPathCommands = loadPaths.map((string) => "-I " + string);

const loadPathString = loadPathCommands.join(" ");

function compileFile(file) {
// you can use the node package but it doesn't like the version of node we're using for this rn fix later tm
const cmd = "sass " + loadPathString + " " + "frontend/stylesheets/" + file + ".scss" + " conditional/static/css/" + file + ".css";

exec(cmd, (error, stdout, stderr) => {
console.log(`stdout: ${stdout}`);
console.error(`stderr: ${stderr}`);
if (error) {
console.error(`exec error: ${error}`);
throw error;
}
})
}

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

compileFile("app")

compileFile("presentations")

76 changes: 76 additions & 0 deletions build-webpack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
var webpack = require("webpack")
var path = require('path');

var jsSrc = path.resolve('./frontend/javascript');
var jsDest = path.resolve('./conditional/static/js');
var publicPath = 'static/js';

var babelQuery = {
"presets": ["@babel/preset-env"],
"plugins": []
}

var webpackConfig = {
context: jsSrc,
entry: ["./app.js"],
output: {
path: path.normalize(jsDest),
filename: '[name].js',
publicPath: publicPath
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
],
resolve: {
modules: [
path.join(__dirname, "frontend/javascript"),
path.join(__dirname, "frontend/node_modules"),
],
},
mode: 'production',
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
query: babelQuery
}
},
{
test: require.resolve("jquery"),
use: {
loader: 'expose-loader'
}
},
{
test: /bootstrap-material-datetimepicker/,
use: {
loader: 'imports?moment'
}
},
{
test: /bootstrap-sweetalert.*$/,
use: {
loader: 'babel-loader',
query: {
query: babelQuery
}
}
},
]
},
optimization: {
emitOnErrors: true,
}
};

webpack(webpackConfig, (err, stats) => {
console.log("Done!")
console.log(err, stats)
});
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
Loading