Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions omeroweb/webclient/controller/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,20 @@ def obj_id(self):
obj = self._get_object()
return obj is not None and obj.id or None

def external_info(self):
obj = self._get_object()
if obj is None:
return None
extinfo = obj.getDetails().getExternalInfo()
if extinfo is None:
return None
return {
"id": extinfo.id,
"lsid": extinfo.lsid,
"entityType": extinfo.entityType,
"entityId": extinfo.entityId,
}

def getWellSampleImage(self):
"""Returns Image if Well is not None

Expand Down
2 changes: 1 addition & 1 deletion omeroweb/webclient/static/webclient/css/dusty.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ button::-moz-focus-inner {
.btn_hierarchy {background: url('../../webgateway/img/iconmonstr-sitemap-6-icon-16.png') center center no-repeat;}
.btn_link {background: url('../../webgateway/img/icon_link.png')center center no-repeat;}

.btn_fspath, .btn_link, .btn_add, .btn_hierarchy {
.btn_fspath, .btn_link, .btn_add, .btn_hierarchy, .btn_extinfo {
float:right;
position: relative;
margin-left: 5px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@
});

{% endif %}

$("#show_ext_info").on("click", function() {
var $panel = $("#externalInfo");
$panel.toggle();
});

});
</script>
Expand Down Expand Up @@ -348,7 +353,7 @@
</li>
{% endwith %}
{% endif %}
{% endif %}
{% endif %} <!-- endif image -->
</ul>
</div>

Expand All @@ -375,7 +380,21 @@
{% include "webclient/annotations/includes/figure_scripts_menu.html" %}
{% endif %}
{% endif %}


<!-- External Info -->
{% with extinfo=manager.external_info %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An Image with an associated ExternalInfo object is not necessarily an OME-Zarr dataset. You will want to filter ExternalInfo objects of the correct namespace.

Also should this be called OME-Zarr rather than just Zarr as the group is expected to adhere to the multiscales metadata conventions of the OME-Zarr specification?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By namespace do you mean entityType or entityId?

"Should be called OME-Zarr" where? In the UI Zarr button? I just think that OME-Zarr for this button would be a bit verbose, given the limited space for the toolbar.
But I'll certainly put "OME-Zarr Info" instead of "Zarr Info" in the panel below.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I meant entityType/entityId. OME-Zarr info would be a good starting point

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, now we only show Zarr button if the entityType and entityId indicate it's a "zarr" externalInfo.

{% block extinfo_button %}
{% if extinfo %}
<button id="show_ext_info" class="btn silver btn_extinfo" title="External Info" >
<span style="margin: 3px 2px 1px 2px; background: transparent; box-shadow: none; font-size: 11px; padding: 0px;">
{% block extinfo_button_title %}
Ext&nbsp;Info
{% endblock extinfo_button_title %}
</span>
</button>
{% endif %}
{% endblock extinfo_button %}
{% endwith %}


<div style="position: absolute; left: 0">
Expand Down Expand Up @@ -424,3 +443,31 @@
<input type="text" size="30">
<img title="Close" src="{% static 'webgateway/img/close.gif' %}" />
</div>

<!-- This is hidden initially -->
<div id="externalInfo" style="display: none; margin-top: 15px; font-size: 13px;">
{% with extinfo=manager.external_info %}
{% block extinfo %}
{% if extinfo %}
<div style="background: white; padding: 7px; border: 1px solid rgb(221, 221, 221); overflow: auto; border-radius: 4px;">
<h3>External Info</h3>
<div style="margin: 8px 0; word-wrap: break-word"><strong>
{% block extinfo_lsid %}
{{ extinfo.lsid }}
{% endblock extinfo_lsid %}
</strong></div>
<details>
<summary>Details</summary>
{% block extinfo_details %}
<ul style="margin: 5px">
<li>externalInfo ID: <strong>{{ extinfo.id }}</strong></li>
<li>entityType: <strong>{{ extinfo.entityType }}</strong></li>
<li>entityId: <strong>{{ extinfo.entityId }}</strong></li>
</ul>
{% endblock extinfo_details %}
</details>
</div>
{% endif %}
{% endblock extinfo %}
{% endwith %}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@
return;
}
$("#toolbar_info_panel").show();
$panel_title.html("Loading...");
$panel_title.html("&nbsp");
$panel_div.empty();
if (original_file_paths_url) {
$panel_title.html("Loading...");
$.getJSON(original_file_paths_url,
function(data) {
var repo = data.repo,
Expand Down Expand Up @@ -498,7 +499,7 @@

{% if manager.image %}

{% with image=manager.image canDownload=manager.image.canDownload %}
{% with obj=manager.image image=manager.image canDownload=manager.image.canDownload %}
{% include "webclient/annotations/includes/toolbar.html" %}
{% endwith %}

Expand Down Expand Up @@ -536,7 +537,9 @@ <h1 class="can-collapse defclose" data-name="details">
{% else %}
{% if manager.dataset %}

{% include "webclient/annotations/includes/toolbar.html" %}
{% with obj=manager.dataset %}
{% include "webclient/annotations/includes/toolbar.html" %}
{% endwith %}

<!-- Dataset Name, ID, Owner -->
{% with obj=manager.dataset nameText=manager.dataset.name %}
Expand All @@ -563,7 +566,9 @@ <h1 class="can-collapse defclose" data-name="details">
{% else %}
{% if manager.project %}

{% include "webclient/annotations/includes/toolbar.html" %}
{% with obj=manager.project %}
{% include "webclient/annotations/includes/toolbar.html" %}
{% endwith %}

<!-- Project Name, ID, Owner -->
{% with obj=manager.project nameText=manager.project.name %}
Expand Down Expand Up @@ -592,7 +597,7 @@ <h1 class="can-collapse defclose" data-name="details">
{% endif %}

{% if manager.well %}
{% with image=manager.getWellSampleImage %}
{% with obj=manager.well image=manager.getWellSampleImage %}
{% include "webclient/annotations/includes/toolbar.html" %}
{% endwith %}

Expand All @@ -604,7 +609,9 @@ <h1 class="can-collapse defclose" data-name="details">
{% else %}
{% if manager.acquisition %}

{% include "webclient/annotations/includes/toolbar.html" %}
{% with obj=manager.acquisition %}
{% include "webclient/annotations/includes/toolbar.html" %}
{% endwith %}

<!-- Acquisition Name -->
{% with obj=manager.acquisition nameText=manager.acquisition.name %}
Expand Down Expand Up @@ -640,7 +647,9 @@ <h1 class="can-collapse defclose" data-name="details">
{% else %}
{% if manager.plate %}

{% include "webclient/annotations/includes/toolbar.html" %}
{% with obj=manager.plate %}
{% include "webclient/annotations/includes/toolbar.html" %}
{% endwith %}

<!-- Plate Name, ID, Owner -->
{% with obj=manager.plate nameText=manager.plate.name %}
Expand Down Expand Up @@ -674,7 +683,9 @@ <h1 class="can-collapse defclose" data-name="details">
{% else %}
{% if manager.screen %}

{% include "webclient/annotations/includes/toolbar.html" %}
{% with obj=manager.screen %}
{% include "webclient/annotations/includes/toolbar.html" %}
{% endwith %}

<!-- Screen Name, ID, Owner -->
{% with obj=manager.screen nameText=manager.screen.name %}
Expand Down Expand Up @@ -733,7 +744,9 @@ <h1 class="can-collapse defclose" data-name="details">
<div id="general_tab" class="right_tab_inner" >

<!-- Toolbar at the top -->
{% include "webclient/annotations/includes/toolbar.html" %}
{% with obj=manager.tag %}
{% include "webclient/annotations/includes/toolbar.html" %}
{% endwith %}


<!-- Tag TextValue, ID, Owner -->
Expand Down
Loading