Coder Social home page Coder Social logo

jasata / utu-vm-site Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 4.0 9.23 MB

Simple web service for Turku University's Course Virtualization project. Students can download course-specific virtual machines and teachers can upload and manage them.

License: MIT License

CSS 7.70% HTML 20.24% JavaScript 37.39% Python 34.68%
virtual-machines lecturer ova education-platform educational-institutions

utu-vm-site's Issues

SHA1 cron job

Background task that looks for files without SHA1 checksum and calculate them.

Statistics

Probably requires a cron job to process Nginx logs.

Wanted statistics:
download counts for each image, over weeks (1 - 52/53). Count unfinished downloads separately.

DO NOT IMPLEMENT BEFORE UPLOAD SOLUTION HAS BEEN COMPLETED AND TESTED! Download might also be changed into HTML5 API implementation, and if so, then the statistics need to be maintained and recorded into a database.

Leave this until the download mechanism is truly fixed!

Upload mechanism

Find a way to use Flow.js or fork and modify it to suit our needs.

Requirements are:

  • transmission-fault tolerant upload (checksums for chunks)
  • support dran'n drop
  • support classical "open file" dialog
  • limit upload to one file at the time

Automatic purge of _columns from result sets

Implement automatic purge of columns that have a name beginning with '_' -character. These columns are considered "hidden" or meta-data, something that is not supposed to be delivered to the clients.

Publish / webform solution

Create API endpoint api/publish.

  • GET ?file=<identifier|name> (prepare for publish)
    • Test file integrity (for .OVA) ... do nothing for .IMG?
    • Extract manifest XML (for .OVA) ...do nothing for .IMG?
    • Insert extracted information to database (leave published datetime column empty to signify prepared, but not yet published file).
    • HTTP Response JSON containing all (viewable) table columns.
      Solve metadata issue...
    • Browser generates an editable form and allows user to modify data. User "Submit" initiates POST into the same endpoint
  • POST {"file": "identifier|name", ... } (commit publish)
    • Check each field for correctness, return errors accordingly.
    • Update row with new data (include value for published column!), return SQL errors if any.
    • Move file to proper location with other accessible images and .OVAs.
    • Return success to client, which confirms success to user, and closes the view on OK.

Lisence page for teachers

Note that this needs to come from the REST API so that it is controlled by the SSO authentication.

Teacher Help Content

Mostly document linking..

  • Delegate "Creating Virtual Machine Image" to create.html.
  • Delegate "Installing Course Specific Software" to create.html.
  • Evaluate the need for FAQ - one can always be added later, if needed.

Cleaner cron.job

Create daily cron job to clean out failed uploads. Use "last modified" on {UPLOAD_DIR} files for files that are modified over 24 hours ago (successfully uploaded are published and moved to an accessible directory and will not be located in {UPLOAD_DIR}).

Getting Started content creation/assembly

Content should incude:

  • "Right off the bat" -questions (limited to these)
    • Do I need this? (only if your course uses virtualization - check your Moodle or talk to your teacher, if you are unsure)
    • Is it a security / privacy risk?
    • Can I remove it when I don't use it anymore? (link to help page)
  • Brief intro (with visual aid/diagram)
    • What does it do? (fundamental basics )
    • Most basic vocabulary (just enough to manage with the install.html page)
  • Virtualization BIOS setting
    • Generic instructions
      -> proceed to (link to) install.html

Setup does not ensure /etc/nginx/sites-available having correct paths

Error message reveals that the path is incorrect - not what the instance/applicatioin.conf dictates:
[2020-09-13 12:15:10,843] ERROR in File: File '/var/www/downloads/FreeDOS 1.2.ova' does not exist!

api.File.download() class method needs to be reviewed and possibly fixed.

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.