-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unending spinning of dataset images #807
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -526,7 +526,9 @@ export default { | |
const baseRoute = this.$router.options.base || '/' | ||
if ('dataset_images' in biolucidaData) { | ||
items.push( | ||
...Array.from(biolucidaData.dataset_images, dataset_image => { | ||
...Array.from(biolucidaData.dataset_images.filter((obj, index) => { | ||
return index === biolucidaData.dataset_images.findIndex(o => obj.image_id === o.image_id); | ||
}), dataset_image => { | ||
let filePath = "" | ||
biolucida2DItems.forEach(biolucida2DItem => { | ||
if (pathOr("", ['biolucida','identifier'], biolucida2DItem) == dataset_image.image_id) { | ||
|
@@ -782,8 +784,9 @@ export default { | |
biolucida.getThumbnail(info.id).then( | ||
response => { | ||
let item = items.find(x => x.id === info.id) | ||
|
||
this.$set(item, 'thumbnail', 'data:image/png;base64,' + response.data) | ||
if (response.data) { | ||
this.$set(item, 'thumbnail', 'data:image/png;base64,' + response.data) | ||
} | ||
}, | ||
reason => { | ||
if ( | ||
|
@@ -808,6 +811,9 @@ export default { | |
const name = response.name | ||
if (name) { | ||
this.$set(item, 'title', name.substring(0, name.lastIndexOf('.'))) | ||
if (name.lastIndexOf('.') === -1) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is happening because we are removing the check for the title. I believe every image should have a title. If an image does not have one, we need to figure out why biolucida is not returning one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change here is because of the file name structure. The original code's default file name format should end with a suffix, e.g. |
||
this.$set(item, 'title', name) | ||
} | ||
} | ||
}, | ||
reason => { | ||
|
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.
why are we removing the check for the title? Images should have a title associated with them
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.
Due to the failed biolucida requests, the file name will be
undefined
. The main reason for removing the title check is to avoid unending spinning caused by this. This may cause some inconvenience for people who are doing the portal QC. I updated the existing biolucida testing which will run through all the datasets and help to generate a report of related issues. You will be able to find an example report in this ticket.