Skip to content

Let a user delete their own images

Fixes #450 (closed)

Proposed implementation lan

  • Change type of Project.images from List OSTypes.Image to RDPP.RemoteDataPlusPlus HttpErrorWithBody (List OSTypes.Image)
  • On project overview: Images tile
    • What to show after each image name? Visibility? Date created? Size? Should probably be right-aligned too.
  • Images view (based on current images view, but by default show only images which belong to this project?)
  • Figure out why clicking on image on images view does nothing
    • This was bit tricky to figure out because of the catch-all in State.elm hiding the compiler message. Not ideal.
  • Change label of button on image card from Choose to Launch
  • Delete button next to each image (which the user can delete)
  • REST logic to delete an image
  • TODO: src/Page/InstanceSourcePicker.elm, line 63, Render RDPP images properly
  • Fix: 'Loading images...' spinner not showing on image list page (but does on InstanceSourcePicker page)
  • Hide the delete button on the Page.InstanceSourcePicker (parameterize Page.ImageList.init function with flag to show delete buttons)
  • Add heading/title to Page.ImageList view (don't show when a sub-page of Page.InstanceSourcePicker (see previous bullet point)

How to Test

  • On project overview, ensure there is a new tile called 'Images', and that it contains some images
    • The project's own images should be at the top of the tile
  • Click on the Images tile and ensure that you see the new images view
  • When you click to expand a PROTECTED image which does belong to your project, then you should see a 'Launch' button, as well as an INACTIVE delete button
  • When you click to expand an UNPROTECTED image which does belong to your project, then you should see a 'Launch' button, as well as the delete button
  • When you click on the delete button you should see a request for confirmation
  • When you click on the delete button again then the image should be deleted (confirm by refreshing page if you need to)
  • When you click to expand an image which does not belong to your project, then you should see a 'Launch' button, but not the delete button
  • When you click on a launch button on any of these images you should see an instance creation detail page
  • When you go through the usual instance creation process (from the 'Create' button in top right) you should not see any delete buttons in any of the image cards

Screenshots

01-exosphere-new-images-tile

02-exosphere-images-view-own-images

03-exosphere-images-view-other-images

04-exosphere-instance-source-own-and-other-images

QA Checklist

  • Any changes to 'widgets' in src/Style/Widgets/? If so:
    • Update src/Style/StyleGuide.elm showing example usage of that widget
  • Were any app flags created, modified, or removed? If so:
    • Update config.js and all files in environment-configs/, including docker-config.js
    • Update "Runtime configuration options" documentation in README.md

Post-Merge Checklist

  • Create follow-up issues for anything left over for another merge request
    • If any technical debt is introduced, assign these follow-up issues to the MR submitter
Edited by Julian Pistorius

Merge request reports