Skip to content

Commit

Permalink
Merge pull request #477 from girder/uncache-associated-images
Browse files Browse the repository at this point in the history
Add a reference to updated time to avoid overcaching associated images.
  • Loading branch information
manthey authored Aug 26, 2020
2 parents 7311167 + dd23d5c commit 5e45bc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions girder/girder_large_image/web_client/templates/itemView.pug
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,16 @@ if Array.isArray(extra.images)
- imageList.push(likey);
else if largeImageMetadata.images.indexOf(ikey) >= 0 && imageList.indexOf(ikey) < 0
- imageList.push(ikey);
- var imageWidth = 400, imageHeight = 400;

if imageList.length
- var imageWidth = 400, imageHeight = 400;
.g-widget-metadata-header.auximage
i.icon-picture
| Associated Images
.g-widget-metadata-container.auximage
for ikey in imageList
- title = ikey.substr(0, 1).toUpperCase() + ikey.substr(1);
a.g-widget-auximage(href=`${imageUrl}${ikey}`, target="_blank", auximage=ikey)
a.g-widget-auximage(href=`${imageUrl}${ikey}?_=${updated}`, target="_blank", auximage=ikey)
.g-widget-auximage-title
| #{title}
.g-widget-auximage-image
img(src=`${imageUrl}${ikey}?width=${imageWidth}&height=${imageHeight}`)
img(src=`${imageUrl}${ikey}?width=${imageWidth}&height=${imageHeight}&_=${updated}`)
1 change: 1 addition & 0 deletions girder/girder_large_image/web_client/views/itemView.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ var ItemViewWidget = View.extend({
render: function () {
this.$el.html(itemViewWidget({
extra: this.extra,
updated: this.model.get('updated'),
largeImageMetadata: this.metadata,
yaml: yaml,
imageUrl: `${getApiRoot()}/item/${this.itemId}/tiles/images/`
Expand Down

0 comments on commit 5e45bc5

Please sign in to comment.