uoft-tapp / tapp-cp Goto Github PK
View Code? Open in Web Editor NEWTA assignment and matching application (TAPP) & Contract Presentment helper (CP) at the Department of Computer Science, University of Toronto
TA assignment and matching application (TAPP) & Contract Presentment helper (CP) at the Department of Computer Science, University of Toronto
she was running firefox on windows..
PDF of contracts were previewing as blank in browser preview.
Lloyd thinks might be something to do with pdf "layers".
(Adobe acrobat shows and prints correctly, supporting Lloyd's theory.)
maybe rely on adobe client opening automatically on downloaded PDF?
This is a really weird one. No sense of whether it's front end or back end..
Basic issue is that when I apply a template for the second time the TA the template was applied to PREVIOUSLY seems to be set back to some empty default condition.
Okay, it's weird, so here's a detailed recipe for the simplest case I could find, namely applying one template to another. BTW, as will become clear below, only happens when you save the second template.
At time of writing HEAD of master was d24fed2
I started with a clean image. down -v all around.
iff --git a/app/javascript/cp/fetch.js b/app/javascript/cp/fetch.js
index 2a9b57d..1bf48ce 100644
--- a/app/javascript/cp/fetch.js
+++ b/app/javascript/cp/fetch.js
@@ -1274,7 +1274,7 @@ function fetchAuth() {
appState.setCurrentUserRoles(['cp_admin', 'hr_assistant', 'instructor']);
// default to cp_admin as selected user role
appState.selectUserRole('cp_admin');
- appState.setCurrentUserName('DEV');
+ appState.setCurrentUserName('zaleskim'); //HACK: fake shib authentication
} else {
// filter out roles not relevant to this application
let roles = resp.roles.filter(role =>
If you do not save t2 after applying t1, but instead cancel out then t1 survives. IT IS THE SAVE
Port of TAPP issue #175: uoft-tapp/tapp#175
The HLP courses appear in the JSON file exported from CHASS, but do not appear in the app after import.
For example, the following appears in the JSON, but I don't see the course anywhere in the app.
{ "course_id": "HLP101H1", "course_name": "Help Centre TA", "round_id": "110", "enrollment": "N/A", "n_positions": "6",
Would it be possible for @alynch to change the dates input fields in CHASS to date inputs, or something equivalent such that the dates are always in a consistent format?
Maybe. We can ask.
The JSON file has date/time fields of the form:
"last_updated": "2017-07-31 23:57:09"which is valid ISO_8601 format [1]. What format would you prefer?
[1] (a) The separator between date and time is normally 'T', but it's allowed to omit it by agreement between the parties. (b) We are not using a time zone designator.
Hi @alynch, the field in question sis the "dates" field in the courses. It is a text box in the application, and I filled it in (at least) two different ways.
Oh, sorry, my misunderstanding. Unfortunately the 'dates' field is a text field that departments use to indicate the duration of the appointment, and sometimes they use the field to add extra details. It would be quite a bit of work to convert it to two date fields (and a extra text field for extra info).
@alynch would it be possible to add helptext and/or formatting validation to the field to suggest and/or enforce that the data is entered in a fixed format - while still allowing additional text? For example:
<input type="text" placeholder="dd/mm/yy - dd/mm/yy" pattern="[0-9]{2}/[0-9]{2}/[0-9]{2} - [0-9]{2}/[0-9]{2}/[0-9]{2}.*" />
which would enforce the date format "dd/mm/yy - dd/mm/yy" but allow as much subsequent additional text as desired?
Create a development
branch off master
and apply appropriate restrictions to master
and development
(see https://github.com/uoft-tapp/tapp-cp/wiki/OurGitFlowProcess)
Port of TAPP issue #196: uoft-tapp/tapp#196
My reading of the docker-compose literature suggests that the port command in tapp/docker-compose.yml is what actually makes this work.
More suspicious yet when I notice that cp/Dockerfile expose port 3000 also -- but then cp/docker-compose.yml says 5000:5000 and that's where we appear to wind up listening.
My 2 cents: my read of things suggests that keeping
EXPOSE
directive in the Dockerfile, even if it's made slightly redundant by the use ofdocker-compose
, is a good practice, because it provides documentation of which port(s) an image is capable of publishing and DRYs up use of container in other setups (ie., Docker Swarm / Docker Cloud).
When assigning a course to an applicant through applicant modal, if you do not press confirm and close the modal, the unconfirmed course will show up on any applicant modal you open later until you either confirm or cancel the course.
Port of TAPP issue #186: uoft-tapp/tapp#186
We configured the docker daemon to have the docker0 interface use 192.168.152.0
instead of the default 172.17.0.0 (which collides with red.sandbox on dcs machines).This works when just the docker daemon is running:
tapp@doc:~/tapp$ netstat -ar
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default router.pub.sand 0.0.0.0 UG 0 0 0 ens160
localnet * 255.255.255.0 U 0 0 0 ens160
192.168.152.0 * 255.255.255.0 U 0 0 0 docker0Once we launch the tapp app, docker-compose spins up two more
network interfaces, (tapp_internal and tapp_external) and they are
allocated 172.17.0.0 and 172.18.0.0, which again collide:tapp@doc:~/tapp$ docker-compose up -d
Creating network "tapp_internal" with driver "bridge"
Creating network "tapp_external" with driver "bridge"
Creating tapp_postgres_1
Creating tapp_rails-apptapp@doc:~/tapp$ netstat -ar
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default router.pub.sand 0.0.0.0 UG 0 0 0 ens160
172.17.0.0 * 255.255.0.0 U 0 0 0 br-c489d67e84d7
172.18.0.0 * 255.255.0.0 U 0 0 0 br-3824b523e9aa
localnet * 255.255.255.0 U 0 0 0 ens160
192.168.152.0 * 255.255.255.0 U 0 0 0 docker0Unlike docker0, this isn't a docker install issue, it is specific to tapp because
if I bring up a generic docker container that serves web pages it doesn't
add additional interfaces and I can access the host from a red net machine.pocadmin@doc:~/mytest$ docker run -it --rm --name my-apache-app -p80:80 -v "$(pwd)":/usr/local/apache2/htdocs/ httpd:2.4
tapp@doc:~/tapp$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ae8beb922348 httpd:2.4 "httpd-foreground" 3 seconds ago Up 3 seconds 0.0.0.0:80->80/tcp my-apache-app
tapp@doc:~/tapp$ netstat -ar
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default router.pub.sand 0.0.0.0 UG 0 0 0 ens160
localnet * 255.255.255.0 U 0 0 0 ens160
192.168.152.0 * 255.255.255.0 U 0 0 0 docker0I assume this explains something about a solution
https://docs.docker.com/compose/compose-file/#external-1external
If set to true, specifies that this network has been created outside of Compose.
docker-compose up will not attempt to create it, and will raise an error if it doesn’t exist.lloyd
I have an idea (Peter Marbach made me think this).
Clue: we are trying to route non-routable IPs
Hence: don'tInstead, put the reverse proxy onto a separate VM -- hence it's routing won't be polluted by all of dockers fancy bridge network adapters.
Fixed on doc.pub.sandbox with:
# docker network create --driver=bridge --subnet=192.168.153.0/24 --ip-range=192.168.153.0/24 --gateway=192.168.153.254 frontend
# docker network create --driver=bridge --subnet=192.168.154.0/24 --ip-range=192.168.154.0/24 --gateway=192.168.154.254 backendChanged ~tapp/tapp/docker-compose.yml to have :
networks:
# Names of the networks will be prefixed with project name by docker
backend:
external: truefrontend:
external: trueRebuilt app, populated database from backup, now can reach
http://doc.pub.sandbox:3000/index.html/summary from a red subnet machine.I have a /etc/daemon/daemon.json file that I think does the
docker network create
at boot time... still testing.
I don't have the daemon.json file syntax right, but will fiddle with the network(s) to remove their ability to route for
In the Instructor Panel view,
Port of TAPP issue #157: uoft-tapp/tapp#157
currently, i wrote the comment in README file admonishing folks to create a daemon.json file on the host. How would one get it there from our repo?
for marina to create reports
Port of TAPP issue #173: uoft-tapp/tapp#173
on tapp.cs.toronto.edu and at least one (landy's?) dev machine.
https://tapp.cs.toronto.edu/shibtest/ requires utorid login
Moving data off of tapp to doc.pub.sandbox to keep it safe.
Port of CP issue #16: uoft-tapp/cp#16
I suspect that there is no need for an "internal" network for cp. It is only needed for rails to access postgress, and the "default" cp_default network would serve the same purpose.
I've attempted to draw a picture of what is going on:
In the Instructor Panel view,
When you go to 'Applicants by Course' tab and select 3 courses at the same time, the 'X' icons disappear. Especially for the vertical split view.
In TAPP, I have an application that is not locked. I export to JSON, get the popup message, and then I get a red popup that should contain an error message, but it is empty and the export does not succeed.
entered observing lisa's confusion..
Port of TAPP issue #188: uoft-tapp/tapp#188
We need to do this so that if tapp.cs reboots the app comes back up
... "Specifying a restart policy (e.g., restart: always) to avoid downtime"https://docs.docker.com/compose/production/
Using Compose in production
When you define your app with Compose in development, you can use this definition to run your application in different environments such as CI, staging, and production.
The easiest way to deploy an application is to run it on a single server, similar to how you would run your development environment. If you want to scale up your application, you can run Compose apps on a Swarm cluster.
Modify your Compose file for production
You’ll almost certainly want to make changes to your app configuration that are more appropriate to a live environment. These changes may include:
Removing any volume bindings for application code, so that code stays inside the container and can’t be changed from outside Binding to different ports on the host Setting environment variables differently (e.g., to decrease the verbosity of logging, or to enable email sending) Specifying a restart policy (e.g., restart: always) to avoid downtime Adding extra services (e.g., a log aggregator)
For this reason, you’ll probably want to define an additional Compose file, say production.yml, which specifies production-appropriate configuration. This configuration file only needs to include the changes you’d like to make from the original Compose file. The additional Compose file can be applied over the original docker-compose.yml to create a new configuration.
(Perhaps using Swagger?)
After that, it would probably be worth going through all of the front-end fetching functions and verifying that they handle error responses from the server correctly.
Port of TAPP issue #190: uoft-tapp/tapp#190
Firefox on Windows non-admin account can delete instructors,
but don't get the cursor to type in replacements. Firefox on Windows
admin account works fineInternet Explorer doesn't work as admin or non-admin
@lloyd-uot-cs Might this have been resolved subsequent to #174?
You're right! I did a git pull on my test machine and Firefox works now,
but Internet Explorer still has problems with the site...The IE debugger console says: Error SCRIPT5009: 'fetch' is undefined
File: app-8dacd81794b2a8e58520.js, Line: 1, Column: 109240Not really sure if that is what's wrong.
@lloyd-uot-cs Is there a way to set up a development/testing environment on my machine with IE? ...Is there even a point supporting IE now that it's being replaced with Edge?
Currently, the error message produced when an offer cannot be sent/nagged/processed/printed refers only to the offer number, which is not useful to the user.
and save us from the many manual steps needed to set up apache
Port of TAPP issue #164: uoft-tapp/tapp#164
Karen should be the one escalating this issue once she is a few hundred assignments into the process..
Console error message:
Uncaught TypeError: Cannot read property 'locked' of undefined
Port of TAPP issue #163: uoft-tapp/tapp#163
When the view is changed via the URL rather than through internal app links, the entire React app is rebuilt (including re-fetching all data from the db). We don't want this!
Port of TAPP issue #146: uoft-tapp/tapp#146
root URL doesn't work (no slash, no /index.html)
Before fixing this, need to have authentication in place.
Port of TAPP issue #176: uoft-tapp/tapp#176
(This is a longer term issue that won't be solved now)
Looking through the PhD students who indicated that they would accept the subsequent appointment guarantees, quite a few did not apply to TA.
Without opening a new round, they can't apply through CHASS, so there is the open question of how to get their application information.
To resolve this issue there will need to be some discussion of best approach and integration with CHASS.
We have a student whose last name is "D'Costa". When we load the json file it truncates his name to "D"
Port of TAPP issue #15: uoft-tapp/tapp#15
Completed research will provide information for choosing a frontend testing solution.
It would be nice to be able to add instructors to courses when the instructor is not already in the data base.
This means that we would need to get extra information (email utorid?) about the instructor.
In the Instructor Panel view,
To reproduce, in the top-right corner select 'instructor:zeleskim' to change URI to "localhost:3000/tapp/instructorPanel". Now notice the page cannot be reloaded (Instructor Panel view changes to Summary view).
I sent a couple of trial runs to current instructors, and they asked that the list be sorted by Family name and that it include the UTORid of the TAs.
Port of TAPP issue #162: uoft-tapp/tapp#162
The application of this would be:
- to have multiple application windows open simultaneously (eg. to be able to see multiple views simultaneously)
- to "pop out" the applicant modal (to be able to view the applicant view at the same time as other views, and to be able to see multiple applicant views simultaneously)
Port of TAPP issue #187: uoft-tapp/tapp#187
There may be a few places in the importer where a record fails to be imported, but no error message is generated. Even if the error message has to be unspecific, we need to know about anything that was not imported.
This was discovered but not fully addressed (I think?) in #175.
When instructors log in, show important information such as courses they are involved in with respect to DDAH forms.
Also think of use cases for instructors and test with plenty of TAs with different parameters (e.g. number of hours).
In the Instructor Panel view,
May be related to #29
In the TAPP view, there is a dropdown to select the round. It would be nice to have them sorted.
Right now the default environment includes the real admin's email addresses. This should be changed to fake addresses. We don't want to store our local information in the GitHub repo.
Port of CP Issue #19: uoft-tapp/cp#19
Specifically, we don't want to load all the offers when a student logs in
Port of TAPP issue #201: uoft-tapp/tapp#201
Should be able to use the following command from the root tapp directory:
for f in `grep [Ee]nrollment * -rl`; do sed -i 's/enrollment/enrolment/' $f sed -i 's/Enrollment/Enrolment/' $f done
We should also rename the files that use enrollment in their names.
Should be able to use the following command from the root tapp directory:for f in `find * -name '*[Ee]nrollment*'`; do mv $f `echo $f | sed 's/enrollment/enrolment/' | sed 's/Enrollment/Enrolment/'` done
Note: Will also need to do this replacement in
fetch.js
andappState.js
...specifically, TAPP's fetch.js
and appState.js
Historical view that shows past information for each TA, such as what courses they were involved in, etc.
Port of TAPP issue #158: uoft-tapp/tapp#158
stuff in /var/lib/docker/containers/*.log is very terse
Port of TAPP issue #207: uoft-tapp/tapp#207
Stashing this error message here.
I don't recall seeing it before, but it sounds like a sane sanity check since it is a production database I was destroying.
tapp@doc:~/tapp$ docker-compose run rails-app rake db:drop
rake aborted!
ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
If you are sure you want to continue, run the same command with the environment variable:
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
/srv/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.1/lib/active_record/tasks/database_tasks.rb:59:incheck_protected_environments!' /srv/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.1/lib/active_record/railties/databases.rake:11:in
block (2 levels) in <top (required)>'
/srv/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:drop => db:check_protected_environments
(See full trace by running task with --trace)
Comprehensive application form for new TAs.
Port of TAPP issue #166: uoft-tapp/tapp#166
We want the following features:
- fixed header (the table body scrolls but the header remains at the top)
- cell content wrapping and/or scrolling -> requires variable row heights or horizontal scrolling (respectively)
- customizable column widths
- styling (or the ability to style the table adequately ourselves)
https://techblog.commercetools.com/advanced-data-tables-in-react-dbe33f8345ab may be a starting point (although it is outdated).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.