1. 17 Sep, 2019 1 commit
  2. 16 Sep, 2019 1 commit
    • LETORT Sebastien's avatar
      Several fixes after code review. · 7aa839c4
      LETORT Sebastien authored
      query_webapps_for_user doesn't have the only_published_version param anymore.
      comment explains the filtering with 'webapp__published'.
      debug log comment are removed.
      WebappVersion in error state are show to the user.
      WebappVersionList.get_queryset return query_set and not values.
      no more mention of atomic transaction.
      WebappVersionList.post: var name correction.
  3. 22 Jul, 2019 2 commits
  4. 23 May, 2019 1 commit
  5. 23 Oct, 2018 1 commit
    • BAIRE Anthony's avatar
      fix privacy issues in TagList and TagWebappList · aedd3283
      BAIRE Anthony authored
      webapp lists should never display apps not visible by the request.user
      TagWebappList did not implement such a filter. I added the
      query_webapps_for_user() helper and use it for TagWebappList, TagList
      and WebappList (the list returned by this function is the superset of
      webapps that these views are allowed to display).
  6. 27 Sep, 2018 1 commit
  7. 21 Sep, 2018 1 commit
  8. 18 Sep, 2018 2 commits
  9. 08 Aug, 2018 1 commit
  10. 31 Jul, 2018 2 commits
  11. 05 Jul, 2018 1 commit
  12. 03 Jul, 2018 5 commits
    • BAIRE Anthony's avatar
      rename 'file_obj' as 'uploaded_file' · 2ef76595
      BAIRE Anthony authored
      'file_obj' is misleading, because it has a meaning in python
      also i fixed the doc, because the actual param is not a dict
    • BAIRE Anthony's avatar
      ensure the job dir is always created, even if no files are uploaded · 494f3bc9
      BAIRE Anthony authored
      (because the controller requires it to store the results)
      (note: i used the name 'filepath' instead of 'endpoint' because it
       is less misleading: the variable containes the path of the file
       in the local filesystem whereas 'endpoint' would rather refer to
       the path in the http request)
    • BAIRE Anthony's avatar
      sanitise filenames submitted by the user · 5cc6b01d
      BAIRE Anthony authored
      This is to fix a vulnerability. The user submitting the job
      **must not** be able to write a file outside the job dir
      (for example by submitting a file named "../../something")
    • BAIRE Anthony's avatar
      do not create job dirs in mode 0777 · deaae0f7
      BAIRE Anthony authored
      Two points
      - it is not guaranteed to work properly in production because the
        gunicorn server is multithreaded (the umask may not be correctly
        restored if two jobs are created in the same time)
      - it is actually not needed. In production, the datastore is a nfs
        volume exported with the 'all_squash' option (which makes all file
        accesses from the jobs made with the same uid as django).
    • BAIRE Anthony's avatar
      allow using network prefixes in ALLGO_ALLOWED_IP_ADMIN · 40c2945a
      BAIRE Anthony authored
      Rationale: in development the ip address of the local machine is not
      easily predictible because when docker creates virtual networks it
      assigns the ip prefixes/addres dynamically by default (and i do not want
      to configure static addresses because of it may interefere and cause
      nasty side-effects if using docker for other projects on the same
      Now in development we allow admin actions from (which means
      all ip addresses)
      Note: I used the IPy package (whose purpose is to handle ranges of
      IP addresses)
  13. 27 Jun, 2018 2 commits
    • BAIRE Anthony's avatar
      Use the redis db to trigger controller actions · 01dd48e6
      BAIRE Anthony authored
      This commit removes the old notification channel (socket listening
      on port 4567), and uses the redis channel 'notify:controller' instead.
      The django job creation views are updated accordingly.
    • BAIRE Anthony's avatar
      Stream job logs and job state updates to the user · 1bb4acf4
      BAIRE Anthony authored
      This commit makes several changes.
      In the controller:
      - duplicates the logs produced by the jobs. Initially they were only
        stored into allgo.log, now they are also forwarded to the container
        output (using the 'tee' command) so that the controller can read
      - add a log_task that reads the logs from docker and feeds them into
        the redis db key "log:job:<ID>" (this is implemented with aiohttp
        in order to be fully asynchronous)
      - store the job state in a new redis key "state:job:<ID>"
      - send notification to the redis pubsub 'notify:aio' channel when
        the job state has changed or when new logs are available
      In the allgo.aio frontend:
      - implement the /aio/jobs/<ID>/events endpoints which streams all
        job events & logs to the client (using json formatted messages)
      In django:
      - refactor the JobDetail view and template to update the page
        dynamically for job updates (state/logs)
          - allgo.log is read only when the job is already terminated.
            Otherwise the page uses the /aio/jobs/<ID>/events channel
            to stream the logs
          - the state icon is patched on the page when the state changes,
            except for the DONE state which triggers a full page reload
            (because there are other parts to be updated)
  14. 19 Jun, 2018 1 commit
    • BERJON Matthieu's avatar
      Reading of Redis logs for a specific job · 96741268
      BERJON Matthieu authored
      I added a helper function to extract the job logs for a specific job in the Redis database.
      The function is a copy of another part of the code not merged yet in the master branch.
      I updated the view accordingly, added a proper docstring and moved the class in the module to keep the code ordered.
      I updated as well the template to display the data.
  15. 05 Jun, 2018 1 commit
  16. 15 May, 2018 1 commit
    • BERJON Matthieu's avatar
      Update of the Job management system · 85ad5ac8
      BERJON Matthieu authored
      I fully updated the job management by updating or creating the following
      - job submission
      - job list
      - job detail
      - job deletion
      I updated the job form in order to:
      - add a field to manage the upload of multiple files
      - get better error messages
      I wrote a small function to upload any type of files into the data
      store. This function requires a job ID in order to work properly and
      create a folder according to this number and store data inside it.
      I added two specific routes to see a job details and delete one.
      I added a detail view that display information related to a given job.
      This view list as well any files stored for this job if any have been
      uploaded in the datastore.
      The job created had been updated in order to display a success message
      one created. Save the job data into the database and upload any given
      file in the data store.
      I added links that lead to both the webapp page and job details. I added
      as well the display of any messages that could be given for specific
      actions (delete a job, job creation, ...)
      I added as well some javascript to display tooltips on specific links
      (deletion in this case)
      I added few more things in the job submission template such as the
      input to upload multiple files at one time. I added as well the
      management of error messages.
      I added two templates to display job details and to delete a specific
      Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
  17. 02 May, 2018 1 commit
  18. 25 Apr, 2018 1 commit