#31 Show directory tree of possible images #85
Conversation
Hi @WGierke . One thing that passed on my mind when I initially started working on the issue was - whether the directory structure will be fixed or it will be dynamic.
Do we want to grab all the files and directories under the sub directories as well? For instances, LIDC-IDRI data does not follow this structure. Nor the test images directory. If we move to another data source (or DICOM image server which is planned for production) the structure might be different. But, if that is not the case, next step will be very easy. What do you think about the issue? I think @lamby can help us by guiding on this. :) |
7e2b283
to
708b3fe
Compare
interface/frontend/open_image.html
Outdated
}, | ||
fetchAvailableImages: function() { | ||
var vm = this; | ||
this.$http.get('/api/images/available').then( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% url … %}
here? :)
this.directoriesDict = response.body; | ||
}, | ||
function() { | ||
// error callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you file a new issue (referencing this one) regarding investigating a global error handler? Like, some kind of drop-down that will pop up on any error so we aren't having to implement it each time...
Thanks @lamby , I added appropriate url tags and filed a new issue. What do you think of rahit's question - are we expecting that the API returns a directory structure deeper than two levels? That would most likely require us to render the file tree recursively. To resolve #31 so far I assumed that the tree should always look like the one in the picture of #31 (so only have two levels). |
7d8f139
to
0ed2f28
Compare
For now, lets go with no. MVP! |
@lamby That sounds nice :) Are there any more remarks? |
24c3408
to
8c9a8bc
Compare
@WGierke No further comments here, am just seeing "This branch cannot be rebased due to conflicts". If you can fix that up I'll get it "live" :) |
6a2c9ef
to
db4520e
Compare
@lamby Thanks, I squashed the commits. Hopefully, merging should work now :) |
@WGierke Oh dear I'm seeing conflicts with the base branch now. Also by "squash", please don't squash unrelated commits - it's always a bad smell when you see the word "and" in a commit message; feel free to split those bits out. |
d55028a
to
a477f6b
Compare
@lamby Thanks, I'll stick to that in the future. The conflicts should now be resolved. |
@WGierke Alas still seeing "This branch cannot be rebased due to conflicts" :) ^ |
daaee61
to
d35a4a8
Compare
@lamby conflicts are resolved again. I'm not fooling you - after merging other pull requests into the master this branch just gets conflicts again :) |
d35a4a8
to
e2ddaa5
Compare
Merged.. @WGierke Did you make that ticket re a global eror handler...? |
A file tree is rendered using Vue.js that should show the images the user can select from the local disk.
Description
I based this PR on rahit's work in #81 that adds a new endpoint to fetch images from. The changes render a file tree at the index page that visualizes the response from that new endpoint, assuming the endpoint would return the files in a certain structure.
Reference to official issue
This should address #31 .
Motivation and Context
It already adds some functionality in the front-end to render the structure of the available images. This is already done in Vue.js instead of using the Django template language.
How Has This Been Tested?
ImageAvailableApiView.get()
is currently not implemented, yet. So currently, the tree only has a lonely root:However, assuming the view would return the following response
the picture referenced in issue #31 would be rendered:
CLA