Git Product home page Git Product logo

observatory-new's People

Contributors

4very avatar bernep avatar brianmejia avatar dependabot-preview[bot] avatar dmccrevan avatar dowdsean avatar jadewang96 avatar olivialundelius avatar rushsteve1 avatar samuelburnham avatar williamylhe avatar xtreme765 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

observatory-new's Issues

Dockerfile

We should have a Dockerfile to build the project to make deployment simple.

Normalize naming

Some variable and struct fields have inconsistent naming and should be corrected into one version.

Reorganize

Currently there are a number of very large files with little structure to them. They should be broken up into separate modules for each task.

Attendance Improvements

After discussions and #7 we have decided to go forward with the existing model for attendance codes. So for that we now need to implement:

  • Attendance code expiration
  • Random or semi-random validation
  • Audit logging as part of #64

This issue closes and supersedes #7.

Unique Emails

Describe the bug
If you try to sign up with an email that is already taken it causes an error and crashes the server.

Related to #5

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Sign Up'
  2. Try to sign up with an email that there is already an account for
  3. Page errors and server crashes

Expected behavior
Prompts the user with an error and doesn't crash the server

External Projects

Having a method to list external projects on the website and show people who have worked on them and scrape their commits would be useful and help promote contribution to larger projects.

This should be a simple matter of adding a toggle to a project marking it as "external"

Crash on navigating to Dashboard

Describe the bug
Crash whenever I navigate to dashboard

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.25/src/backtrace/libunwind.rs:97
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.25/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:197
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   7: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   8: rust_begin_unwind
             at src/libstd/panicking.rs:308
   9: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  10: core::panicking::panic
             at src/libcore/panicking.rs:49
  11: core::option::Option<T>::unwrap
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/libcore/macros.rs:12
  12: observatory::users::handlers::user_commits_count::{{closure}}
             at src/users/handlers.rs:231
  13: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/libcore/ops/function.rs:279
  14: core::option::Option<T>::map
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/libcore/option.rs:416
  15: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::next
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/libcore/iter/adapters/mod.rs:570
  16: <core::iter::adapters::flatten::FlattenCompat<I,U> as core::iter::traits::iterator::Iterator>::next
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/libcore/iter/adapters/flatten.rs:219
  17: <core::iter::adapters::flatten::Flatten<I> as core::iter::traits::iterator::Iterator>::next
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/libcore/iter/adapters/flatten.rs:144
  18: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/liballoc/vec.rs:1883
  19: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/liballoc/vec.rs:1796
  20: core::iter::traits::iterator::Iterator::collect
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/libcore/iter/traits/iterator.rs:1466
  21: observatory::users::handlers::user_commits_count
             at src/users/handlers.rs:229
  22: observatory::users::handlers::grade_summary
             at src/users/handlers.rs:222
  23: observatory::handlers::dashboard
             at src/handlers.rs:52
  24: observatory::handlers::rocket_route_fn_dashboard
             at src/handlers.rs:48
  25: core::ops::function::Fn::call
             at /rustc/3ade426ede7bca4a74bc641a12f2e7fe2cc20c47/src/libcore/ops/function.rs:69
  26: <F as rocket::handler::Handler>::handle
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.1/src/handler.rs:177
  27: rocket::rocket::Rocket::route
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.1/src/rocket.rs:293
  28: rocket::rocket::Rocket::route_and_process
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.1/src/rocket.rs:242
  29: rocket::rocket::Rocket::dispatch
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.1/src/rocket.rs:217
  30: <rocket::rocket::Rocket as hyper::server::Handler>::handle
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.1/src/rocket.rs:82
  31: hyper::server::Worker<H>::keep_alive_loop
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.10.16/src/server/mod.rs:340
  32: hyper::server::Worker<H>::handle_connection
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.10.16/src/server/mod.rs:282
  33: hyper::server::handle::{{closure}}
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.10.16/src/server/mod.rs:242
  34: hyper::server::listener::spawn_with::{{closure}}
             at /home/avery/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.10.16/src/server/listener.rs:50
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

News and Automated Slides

Create some kind of news feed and then a separate “summary” page that can also automatically generate a reveal.js presentation of the weekly presentation mentors give since that presentation is very formulaic.

Also an RSS version of the news feed would be nice.

Redirect attendance to Dashboard

Submitting a valid attendance code redirects you to main page, should probably redirect to dashboard so users can view the attendance recently submitted.

Last links extend to entire table

Describe the bug
tag extends to encompass entire table sometimes on users, projects, groups, etc. Happens often in Edge, but also occurs in other chrome-based browsers.

Footer does not move correctly

Describe the bug
When the page is full height the footer does not move down properly. It can often end up on top of other elements blocking them.

To Reproduce
Steps to reproduce the behavior:

  1. Go to /signup or other pages
  2. Fill out the form
  3. Attempt to click the button
  4. Cannot click it since the footer is in the way

Expected behavior
The footer should be pushed down lower and remain out of the way. I believe the footer is not being pushed off the screen when it should be.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: All
  • Browser: Chrome, partly Firefox

Additional context
This is a more severe problem on low-resolutiond devices or when the page is zoomed in.

Mattermost OAuth2

Is your feature request related to a problem? Please describe.
This stems out of the enchantment #53, since we are planning on using Mattermost as a way of authenticating the user and reseting their password. It seems only natural that we use the OAuth2 capabilities.

[Discuss] Wiki Integration

We might want to have a built in or in some way integrated wiki as a knowledge base for members to reference and also to easily see who knows about the topic so that they can contact them.

From a technical standpoint a simple wiki would be easy to add. But more advanced features might warrant using an external solution.

Project Proposals

Add a field to the database for a link to the project's proposal document.

Or build in project proposals to Observatory.

Automatically create database

Since Diesel will not create the tables by itself (for some reason, further info needed) it would probably be best to run diesel migration run in a build.rs file or figure out some other solution so that we do not need to run migrations every time.

[Discuss] Centralized Login

With the possible addition of a Wiki RCOS is now hosting a growing number of services for it's members. Keeping track of various logins and whos-who on each platform is a challenge and it might be a good idea to look into some more centralized authentication ideas.

Possible solutions are:

  • RPI Central Authentication System (CAS)
    • Pros: Integrated into RPI, everyone has one
    • Cons: Difficult to integrate with, alumni and outside contributors cannot use
  • OAuth client ie sign-in with GitHub/etc.
    • Pros: Fairly standardized, easy to do
    • Cons: Ties us into external platforms
  • OAuth server ie sign-in with Observatory
    • Pros: part of our infrastructure, can be used going forward
    • More difficult to integrate, must be maintained by us

ICS Calendar

Autogenerating an ICS or similar calendar so that people can add it as a calendar to their phones would be really useful.

Retrieve password function

Is your feature request related to a problem? Please describe.
If the user forgets the password when he/she sign in the system

Describe the solution you'd like
Add a simple function resets the password to a fixed code(sent to the user email), allowing the user to log in temporarily and changing the password.
Describe alternatives you've considered
More complex: send the temporary reset link to registered email and allow the user to change the password within 24 hours.

Submitting same attendance code

Describe the bug
Members can submit the same attendance code multiple times.
Pictured is attendance of a user who has submitted a large group attendance code 4 times, a different large group attendance code 2 times, and a small group attendance that they are not part of 1 time.
EDIT: counting of total attendances which are possible for the student to have gone to is CORRECT, only issue with allowing attendances to be logged which they shouldn't be able to submit
image

Expected behavior
Should get error message stating that attendance code was already submitted.

No collision detection for git usernames

Describe the bug
Whenever you try to sign up with a github handle that is already in the database, the website will crash.

To Reproduce
Steps to reproduce the behavior:

  1. Go to sign up
  2. Fill in with the github handle that is already in the database
  3. Profit

Expected behavior
There should be a pop up that says "Error: That github handle is already in use".

[Discuss] Built-in Status Updates

We might want to have status updates be built into Observatory itself. Similar to the old blog functionality but on a per-user not per-group basis and with some additional things like privacy controls.

Audit Logging

When certain actions are taken we should log to some kind of audit log so that we can check it and make sure no bad actors are happening.

Describe the solution you'd like
Log important events to a log file or a table in the database.

Automated Testing

As of right now there are no Unit or Integration tests of any kind. This should probably be fixed to ensure that the application doesn't suddenly break for us. It would also allow for better CI/CD practices down the line.

Project and User tags

Both projects and users should be able to list out tags of related technologies so that you can sort and search by them.

Database Migrations

Currently there have been changes to the database that are not setup as correct migrations, so will not apply correctly to the existing database. We should setup the migrations right and make sure they are in the future as well.

JSON API

A few pages already have JSON versions but this should be expanded out to more pages. It allows room for future integrations and ideas without much effort now.

User attendance and performance summary

On both the user's dashboard and on the user's page in the mentor/admin view there needs to be some kind of summary of the user's performance and attendance for grading purposes.

Way of Communicating with the Users

Is your feature request related to a problem? Please describe.
It is related to the problem that there is currently no way to communicate with users.

Describe the solution you'd like
A clear defined line of communication that is easy for admin to send messages though.

Describe alternatives you've considered
Email or Mattermost are the two that we've talked about using so far. Email would be a little more difficult but could possibly be more stable in the long run.

Server Crashing under Load

Describe the bug
Under a moderate load the server crashes with the following bug. I believe it is due to the Database being overwhelmed

To Reproduce
Steps to reproduce the behavior:

  1. Start the server
  2. Have multiple users try to use it at once
  3. Pages begin being unresponsive
  4. Error below is in logs

Additional context

Warning: Responding with 401 Unauthorized catcher.
thread '<unnamed>' panicked at 'Failed to get events: DatabaseError(__Unknown, "database is locked")', src/libcore/result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread '<unnamed>' panicked at 'Expected a successful outcome!', /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.2/src/outcome.rs:162:18
thread '<unnamed>' panicked at 'Expected a successful outcome!', /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.2/src/outcome.rs:162:18
thread '<unnamed>' panicked at 'Expected a successful outcome!', /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.4.2/src/outcome.rs:162:18
Error: Failed to write response: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }.

Members can log attendance from groups they are not in

Describe the bug
Able to log attendance using a code that was not generated for a group which that member is part of.

To Reproduce
Steps to reproduce the behavior:

  1. Create new group and generate attendance code
  2. Create new member
  3. Attempt to log new group's attendance with new member without adding member to group

Expected behavior
Should give error message similar to the invalid code error, stating that user is not in that code's group.

Add user when there are no eligible users

Describe the bug
You get a 422 error if you try to add a user to a group where there are no users eligible to be added.

To Reproduce
Steps to reproduce the behavior:

  1. Go to "Groups"
  2. Add all current users via the "Add User" button
  3. When all users are in the group click "Add User" again
  4. The drop down list should be empty, click "Add"
  5. See error

Expected behavior
The "add button" user should be grayed out if there are no eligible members to be added to the group.

Screenshots
https://i.imgur.com/bnRc9Uu.png

Add Same User to group

Describe the bug
You can add the same user multiple times to the same project.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new project
  2. Go to project page
  3. Click add user
  4. Select a user already in the group from the drop down menu
  5. Click Add

Expected behavior
The member should not show up on the drop down menu whenever you want to add a new user to the group.

Members able to view group meeting codes

Describe the bug
Members can access mentor/admin group control panel through dashboard link.

To Reproduce
Steps to reproduce the behavior:

  1. Create new member
  2. Go to dashboard
  3. Large group link is clickable and directs to mentor/admin group page, which includes past attendance meeting codes

Expected behavior
Should either be prevented from viewing group pages entirely or shown less information

Improve Documentation

As of right now documentation is fairly sparse. I intend to begin improving it after the code is mostly complete to avoid having to redo portions.

Form error handling

Currently when a form has some invalid data it does not report any kind of error. This is very problematic on pages like the login where a bad email causes a 500 error.

In the handler code the functions that return Redirect should instead return a Result indicating their status.

[Discuss] Attendance Code Validation

On the current https://rcos.io users have a random chance to need to be validated by a mentor. This is intended to stop people from putting in attendance codes when they are not there, but in reality I believe that it only serves to annoy mentors and coordinators and does little to stop people from skipping meetings.

That said I think we need a new system for making sure that people attend the meetings that they are supposed to and am asking for any ideas that you might have regarding it.

Visual improvements

A number of pages are rather ugly at the moment and could use some sprucing up:

  • User page
  • Project page
  • Event page
  • Group page

This is mostly HTML and CSS so is a good first issue.

Postgres DB backend

Currently we use just an SQLite backend. However it might be a good idea to add Postgres support so that we can integrate into a larger deployment easily.

Edit and Delete

All the various database objects need pages where they can be edited and deleted this includes

  • Calendar events
  • Projects
  • Users
  • Groups
  • News stories

New Project button directs to a current project (Chrome)

Describe the bug
After joining in an existing project, click the New Project button will direct to the existing project.

To Reproduce
Steps to reproduce the behavior:

  1. Go to an existing project and click join
  2. After successfully joining, return to Projects page
  3. Click New Project

Expected behavior
Direct to the page creating a new project

Desktop (please complete the following information):

  • OS: [Window 10 Pro]
  • Browser [Chrome] This problem does not appear on Firefox
  • Version [73.0.3683.103 (Official Build) (64-bit)]

Additional context
Add any other context about the problem here.

Viewing specific meeting attendance links to 404

Describe the bug
Clicking on a specific meeting attendance directs to /h/1 404 error.

Expected behavior
Should exist a page in which meeting details are visible.
Possible page features:
See all students who attended that day, have a link to the day's slides.

User role and former/external flag

Show the user's role in RCOS on their page.

Add a flag to users that marks them as a former member or as someone who is not a member but is related to RCOS.

Sitemap

Is your feature request related to a problem? Please describe.
There is currently no good way for non-graphical browsers to get around the site easily. This is important for accessibility among other things.

Describe the solution you'd like
Create a sitemap to all the major pages of the site in plain html and add a hidden link to it in base.html

Additional context
This is a Good First Issue since it is just basic HTML.

Date picker breaks on Chromium browsers

Describe the bug
The expected date format from the system does not coincide with the forced date format in Chromium browsers.

To Reproduce
Steps to reproduce the behavior (On Chromium browser):

  1. Go to calendar
  2. Click "New Event"
  3. Try to fill out an event

Expected behavior
The forced date format should be consistent across all browser types.

Screenshots
https://i.imgur.com/EDmQrUs.png

Date input parsing

The date input needs to be able to take all the various forms of dates that can be produced.

Additionally we should have a fallback date picker on necessary platforms.

Related to:
#29
#26
#14

Calendar not visible on Microsoft Edge

Describe the bug
Calendar not visible at all for Edge users, console error:
SCRIPT1028: SCRIPT1028: Expected identifier, string or number calendar (105,17)

Container Crashes on Restart

Describe the bug
When the server is running in production mode and is restart it complains about the config file being invalid. I presume this has to do with the partial generation of the config.

To Reproduce
Steps to reproduce the behavior:

  1. Start the server in production mode
  2. Restart the server, still in production mode
  3. Server has crashed with following error

Expected behavior
Server gracefully restarts when the container restarts it.

Additional context

Error: config file failed to parse due to invalid TOML
    => unexpected character found: `/` at line 6
    => in /home/observatory/Rocket.toml
    => at line 6, column 39

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.