1. 26 Sep, 2018 1 commit
    • BAIRE Anthony's avatar
      Allow importing a webapp from a legacy allgo instance · 51f51d9c
      BAIRE Anthony authored
      This adds two views:
      - WebappImport for importing the webapp (but without the versions).
        The import is allowed if the requesting user has the same email
        as the owner of the imported app. The webapp is created with
        imported=True, which enables the WebappVersionImport view
      - WebappVersionImport for requisting the import of webapp version.
        This only creates the WebappVersion entry with state=IMPORT
        (the actual import is performed by the controller)
      A version may be imported multiple times. In that case, the newly
      imported version overwrite the local version with the same number.
      This features requires:
      - that the rails server implements !138
      - that the docker daemon hosting the sandboxes is configured with
        credentials for pulling from the legacy registry
  2. 20 Sep, 2018 2 commits
  3. 19 Sep, 2018 3 commits
  4. 18 Sep, 2018 4 commits
  5. 17 Sep, 2018 3 commits
    • BAIRE Anthony's avatar
      remove WebappVersion.url · ade74d2d
      BAIRE Anthony authored
      (was not used at all)
    • BAIRE Anthony's avatar
      fix integrity issue · 914e9efc
      BAIRE Anthony authored
      because django sets a foreign key constraint on sandbox_version_id
      we may have issues if it refers to a version we want to delete
    • BAIRE Anthony's avatar
      derive docker tags names from WebappVersion.id · b7b30d3e
      BAIRE Anthony authored
      With this change docker images are no longer
      named as: <Webapp.docker_name>:<WebappVersion.number>
      but       <Webapp.docker_name>:id</WebappVersion.id>
      This is only for storage, for the user we still present the image as
      There are multiple reasons to do that:
      - this simplifies the controller design, because docker images are no
        longer replaced (once an image is committed with tag, 'id<SOMETHING>'
        it won't be modified anymore) -> thus it is no longer necessary to
        track the image state carefully (when pushing/pulling from/to the
      - this prevent reusing dangling images from a removed webapp (because we
        now have a strong guarantee that the image tags are unique)
      - this will avoid nasty race conditions when we implement direct 'push'
        to the registry (because we then assign the new image id before the
        manifest is actually pushed, if a push and commit are done in the same
        time we will keep the latest one, i.e. with the highest id)
      - this will make easy to implement image recovery: we can keep removed
        images in the registry for some time (eg: 1 month) before they are
        really deleted
      Note: the REPLACED state is no longer transient (since we now keep the
      replaced images in the db and since we may still have remaining
      job/sandboxes using them). Maybe we can rename it as DELETED when we
      implement #265.
  6. 12 Sep, 2018 2 commits
  7. 10 Sep, 2018 1 commit
  8. 06 Sep, 2018 2 commits
  9. 20 Aug, 2018 1 commit
    • BERJON Matthieu's avatar
      Updating the tag views · 9f60450c
      BERJON Matthieu authored
      I updated the tag views by importing the `Tag` model provided by the
      Taggit plugin, deleted the `WebappTag` model and `TagForm` form that are
      I updated the `WebappUpdate` view to follow the recommendation given by
      the Taggit plugin documentation. The `TagList` now uses directly the
      `Tag` model and send both the tag fields and a count of each tag
      I removed the `TagAdd` list that is obsolete. I updated the
      `TagWebappList` that returns simply a list of all `Webapp`objects for a
      given tag.
      Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
  10. 16 Aug, 2018 1 commit
  11. 08 Aug, 2018 1 commit
  12. 07 Aug, 2018 7 commits
  13. 01 Aug, 2018 6 commits
    • BAIRE Anthony's avatar
      check user permission in the sandbox panel · c6d282fd
      BAIRE Anthony authored
    • BAIRE Anthony's avatar
      fix redirect to the same page · 1fc178d5
      BAIRE Anthony authored
      (chromium does support empty "Location:" header)
    • BAIRE Anthony's avatar
      add flash messages · 2a11b390
      BAIRE Anthony authored
    • BAIRE Anthony's avatar
      implement version selection & validation in the sandbox panel · b5bad170
      BAIRE Anthony authored
      - form reformatted as a grid (using class form-row)
      - when replacing a version
        - select the version used for starting the current sandbox
        - initialise the "changelog" field with the previous changelog
          of the version being replaced
      - when creating a new version
        - initialise the "changelog" field with an empty value
        - raise an error if the entered version already exists
          (prevents accidental overwriting by the user)
      - report commit result in a flash message
    • BERJON Matthieu's avatar
      Bug fix: reverse on webapp creation redirection · c29bffe4
      BERJON Matthieu authored and BAIRE Anthony's avatar BAIRE Anthony committed
      The redirection for a successful webapp creation was wrong and created
      an error. I fixed it by giving te right handle (i.e
      Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
    • BAIRE Anthony's avatar
      refactor the sandbox management panel · 9bf09947
      BAIRE Anthony authored
      - all sandbox actions a made from the same endpoint, so i renamed it as
        WebappSandboxPanel. It is an endpoint that accept GET and POST methods
      - GET is rendered using TemplateView (nothing magic)
      - POST is has an ad-hoc implementation that handles sandbox
        actions (start, commit, rollback, retry, abort)
      - all POST actions are followed with an HTTP redirect (to make a GET)
        so that actions are repeated if the user refresh his browser window
      - I changed the initial status of newly created webapps to IDLE because
        power users who upload their docker image do not need to start a
      It is not finished, there are many FIXMEs/TODOs but it is working.
  14. 31 Jul, 2018 6 commits