Skip to content
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

Idr prototype #25

Merged
merged 110 commits into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
f6a4a6f
first prototype of idr UI, showed at first meeting
will-moore Apr 25, 2019
9c79fa2
Don't show Key:Value in study for current filter key
will-moore Apr 25, 2019
2639639
Add /study_thumbnail/project/1 for study thumbnail
will-moore Apr 25, 2019
ac70010
Show thumbnail for each study
will-moore Apr 25, 2019
4bbc43c
CSS layout tweaks
will-moore Apr 25, 2019
682e40b
study_thumbnail don't pick empty Well
will-moore Apr 25, 2019
4be721f
Each study links to idr.openmicroscopy.org/webclient/?show...
will-moore Apr 25, 2019
d3d9e48
CSS tweak of studies layout
will-moore Apr 26, 2019
9e2db9a
Link to e.g. mapr/gene/?value=CDC10&show=project-1 when filtering by …
will-moore Apr 26, 2019
1f27cd5
Study links open in new tab
will-moore Apr 26, 2019
483de92
support /cells and /tissues pages
will-moore Apr 26, 2019
90b3541
Use hard-coded thumb ID for each study
will-moore Apr 29, 2019
79944c6
Add auto-complete for Study Key-Values. Hard-code Keys for <select>
will-moore Apr 29, 2019
7b77323
Add docstring about setting omero.web.mapr.config
will-moore Apr 29, 2019
b8b7dd3
Add idr/categories/ page to list interesting studies
will-moore Apr 29, 2019
a21a6f2
Fix title on categories/ page
will-moore Apr 29, 2019
b1d5566
placeholder improvement
will-moore Apr 30, 2019
6727045
Move filter input to top, replace Search field
will-moore Apr 30, 2019
5a6bb0b
Categories specified by study key-value queries
will-moore Apr 30, 2019
b9ddfee
Search page for filtering
will-moore Apr 30, 2019
44b6c6f
flake8 fixes
will-moore Apr 30, 2019
800929e
Don't use local mapr config. Temp hard-coded
will-moore Apr 30, 2019
00eeebb
Use http://idr... for annotations to avoid CORS error
will-moore May 1, 2019
4159f3b
Show text overlaying images for each study
will-moore May 1, 2019
ea48e4d
Use render_image instead of render_thumbnail for each study
will-moore May 1, 2019
402505f
Show study authors on hover
will-moore May 1, 2019
47229b4
Remove @login_required from search page
will-moore May 1, 2019
5239f22
Workaround CORS caching issue when loading annotations
will-moore May 1, 2019
4a4e634
Fix 'None' in Welcome title
will-moore May 1, 2019
6437026
More CORS cache-busting workarounds. Open-viewer link
will-moore May 1, 2019
779f045
Move js from index.html to index.js
will-moore May 1, 2019
b22806d
Move js to util.js and model.js
will-moore May 2, 2019
27a41d8
Search.html js to search.js and other cleanup + fixes
will-moore May 2, 2019
eed40ce
Improve JS and CSS code reuse
will-moore May 2, 2019
ea38cec
BASE_URL set in gallery_settings
will-moore May 2, 2019
74ce81e
studies.css and removed IDR-specific links from header and footer
will-moore May 2, 2019
f1932be
Move category_queries to gallery_settings config
will-moore May 3, 2019
c86174e
Move studyHtml() and template into index.html where used
will-moore May 3, 2019
06e1674
Fix issues with auto-complete. Case insensitive. Sort by best match
will-moore May 4, 2019
dbba286
Hide filter count message when showing no results
will-moore May 4, 2019
6c29362
Pass config values to search.html global variables same as index.html
will-moore May 4, 2019
56fe3aa
Fix css for auto-complete dialog
will-moore May 5, 2019
09329e9
flake8 fixes
will-moore May 5, 2019
cf9fff5
Show MAPR results with child images based on mapr queries
will-moore May 6, 2019
0d07579
Don't show 'Organism' option in 'Image Attributes'
will-moore May 6, 2019
31b9de2
Improve auto-complete for Key-Value pairs. Show on key-change
will-moore May 7, 2019
ee33d77
Show scrollbars on categories on Mac
will-moore May 7, 2019
9c5aeb9
config super_categories and urls to them
will-moore May 7, 2019
5bdb076
Don't hard-code THUMB_IDS. Load via AJAX
will-moore May 8, 2019
6767b06
Add /gallery/study_image/project/1/ to get image_id
will-moore May 8, 2019
1ad4738
flake8 fixes
will-moore May 9, 2019
c223f76
flake8 fixes
will-moore May 9, 2019
3b1f262
Header links to /gallery/ home page
will-moore May 9, 2019
ed84cfa
Use GALLERY_INDEX as base for urls
will-moore May 9, 2019
344a19a
SUPER_CATEGORY is a simple query. Filter all studies on load
will-moore May 9, 2019
290b7b1
Move FILTER_KEYS from constants.js to gallery_settings
will-moore May 9, 2019
17b3cff
Add FILTER_MAPR_KEYS config to gallery_settings
will-moore May 9, 2019
9504828
Revert to loadImageId via JSON api for index.html
will-moore May 9, 2019
05b1709
Handle duplicate Keys in Key-Value auto-complete
will-moore May 10, 2019
e1e2126
Fix load image for Big images and SPW with empty Wells
will-moore May 10, 2019
102c7e5
Show all Studies at /search/ with no filter
will-moore May 10, 2019
a2b13e9
Show 'Most Recent' studies on home page
will-moore May 10, 2019
1d6b583
Don't show 'empty' categories
will-moore May 10, 2019
f621163
Update Category labels
will-moore May 10, 2019
f5a6fb7
Show auto-complete on focus()
will-moore May 10, 2019
fc88cde
Allow to filter by Name (idr number)
will-moore May 10, 2019
1122c0f
Link to static css on idr
will-moore May 13, 2019
aec3b72
Filter studies by cells / tissue at search page
will-moore May 13, 2019
3c0b79a
Update cells and tissue query to return Frances' list of studies
will-moore May 13, 2019
a7654d6
Fix whiteshace and lowerCase bugs in filtering by query
will-moore May 13, 2019
c75ecce
flake8 fix
will-moore May 13, 2019
5a16de0
Remove old commented-out urls
will-moore May 13, 2019
d8853ab
Fix comment
will-moore May 13, 2019
e376a3f
Move title 'IDR' to gallery_settings
will-moore May 13, 2019
e1c3bcd
Add 'Licence' to FILTER_KEYS config in gallery_settings
will-moore May 14, 2019
3e1df85
Handle search?query=Key:Val:ue Only split on first :
will-moore May 14, 2019
d780015
flake8 fix
will-moore May 14, 2019
e39be56
Add browser history to search page
will-moore May 14, 2019
cd0a551
Handle 'Enter' for partial filter without picking auto-complete
will-moore May 14, 2019
f208fbe
Renamed /idr/ directory to /categories/
will-moore May 14, 2019
bd16ba4
Remove unuse static foundation css & js
will-moore May 14, 2019
bc6faa6
Remove unused font-awesome.min.css
will-moore May 14, 2019
d1eb0b3
Add links to Cells & Tissue to header
will-moore May 15, 2019
b2f19af
Use 'cell' not 'cells'
will-moore May 15, 2019
750e774
Show 'Cell - IDR' title on search page
will-moore May 15, 2019
e8246ba
Add 'title' to super_categories. e.g. 'Welcome to Tissue - IDR'
will-moore May 15, 2019
9f6758e
Add to gallery_settings doc string
will-moore May 15, 2019
e15cd7b
Load top-level MAPR matches with empty auto-complete
will-moore May 15, 2019
30b2fef
Use host for CORS cache-bust. Allows caching for each host
will-moore May 15, 2019
7d06819
Remove group, experimenter, page from MAPR requests
will-moore May 15, 2019
5d39c46
Don't fail if studies have no map-annotations or description
will-moore May 16, 2019
d9d33ab
Remove &_ = random() cache buster from urls
will-moore May 16, 2019
732dffb
Revert "Remove &_ = random() cache buster from urls"
will-moore May 16, 2019
9de4d85
Show e.g. 'Try Cell-IDR' if filter matches nothing
will-moore May 16, 2019
253d089
use window.location.host for all CACHE_BUSTER
will-moore May 16, 2019
b616216
Show spinner while loading OMERO.mapr auto-complete items
will-moore May 16, 2019
c63a802
Don't handle mapr auto-complete for empty input
will-moore May 17, 2019
d7d1814
Use foundation.min.js from idr
will-moore May 17, 2019
b4c4b0c
Empty search filter - show NO studies instead of ALL
will-moore May 17, 2019
18972af
Handle Projects with no Datasets in loadImage()
will-moore May 17, 2019
856ea54
Use Thumbnails for categories and search
will-moore May 18, 2019
234db1b
Update cell/tissue queries to use 'Sample Type:cell/tissue'
will-moore May 20, 2019
9c6266a
Switch FIRST/LAST sort order for query
will-moore May 20, 2019
0aab5e8
Remove setting values from gallery_settings.py
will-moore May 20, 2019
5473f0a
Support /api/projects/:id/images/ with omero-marshal
will-moore May 21, 2019
cf70231
flake8 fix
will-moore May 21, 2019
04500d1
Add TITLE_KEY to lookup Study Title from Key:Value
will-moore May 21, 2019
b7b7be3
Batch loading of thumbnails
will-moore May 21, 2019
d755d62
flake8 fixes
will-moore May 21, 2019
883065f
Batch load thumbs on search page too
will-moore May 21, 2019
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
57 changes: 57 additions & 0 deletions omero_gallery/gallery_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (C) 2019 University of Dundee & Open Microscopy Environment.
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""Settings for the OMERO.gallery app."""

import sys
from omeroweb.settings import process_custom_settings, report_settings
import json

# load settings
GALLERY_SETTINGS_MAPPING = {

"omero.web.gallery.base_url":
["BASE_URL",
'https://idr.openmicroscopy.org', # TODO: - should be None
str,
("Base URL to use for JSON AJAX requests."
"This allows data to be loaded from another OMERO server."
"The default behaviour is to use the current server.")],

"omero.web.gallery.category_queries":
["CATEGORY_QUERIES",
('['
'{"label": "Time-lapse", "query": "Study Type:time OR Study Type:5D'
' OR Study Type:3D-tracking"},'
'{"label": "Light sheet", "query": "Study Type:light sheet"},'
'{"label": "Protein localization", "query": "Study Type:protein'
' localization"},'
'{"label": "Histology", "query": "Study Type:histology"},'
'{"label": "Yeast", "query": "Organism:Saccharomyces cerevisiae OR'
' Organism:Schizosaccharomyces pombe"},'
'{"label": "Human Cell Screen", "query": "Organism:Homo sapiens AND'
' Study Type:high content screen"}'
']'), # TODO: - should be []
json.loads,
("")],

}

process_custom_settings(sys.modules[__name__], 'GALLERY_SETTINGS_MAPPING')
report_settings(sys.modules[__name__])
4 changes: 4 additions & 0 deletions omero_gallery/static/gallery/3rdparty/font-awesome.min.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions omero_gallery/static/gallery/idr/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const THUMB_IDS = {'project-701': 5025553, 'project-504': 4495405, 'project-754': 5514116, 'project-753': 5514054, 'project-752': 5514379,
'project-552': 4007821, 'project-505': 4991000, 'project-503': 4496813, 'project-405': 3509516, 'project-502': 4007804,
'project-501': 3899001, 'project-402': 3429220, 'project-404': 3430746, 'project-401': 3490890, 'project-353': 3414088,
'project-352': 3414075, 'project-351': 3414020, 'screen-1654': 3002517, 'screen-1653': 2959817, 'screen-1901': 3261920,
'screen-2001': 3414101, 'screen-1952': 1895788, 'project-201': 3125701, 'screen-1651': 2868079, 'project-151': 2858200,
'screen-1652': 2892586, 'screen-1801': 3126552, 'screen-1751': 3191232, 'project-301': 3261651, 'screen-1851': 3260452,
'project-52': 1885617, 'screen-2051': 4996332, 'project-51': 1884807, 'screen-1204': 1874776, 'screen-1203': 1851808,
'project-101': 1919065, 'screen-1151': 1674502, 'screen-1251': 2042278, 'screen-1201': 1816624, 'screen-1302': 2858452,
'screen-1101': 1483352, 'screen-1202': 1811248, 'screen-1603': 2857882, 'screen-1251': 2042278, 'screen-1602': 2958952,
'screen-1601': 2857796, 'screen-1551': 2855969, 'screen-1501': 2849751, 'screen-1351': 1921252, 'screen-803': 1313418,
'screen-251': 171248, 'screen-206': 106450, 'screen-154': 35446, 'screen-201': 95412, 'screen-253': 352577,
'screen-751': 928389, 'screen-597': 933573, 'screen-202': 692151, 'screen-51': 13852, 'screen-102':179694, 'screen-3': 1463}

const FILTER_KEYS = ["Imaging Method", "Organism", "Publication Authors", "Publication Title",
"Screen Technology Type", "Screen Type", "Study Type"]

// We hard-code filtering, but could use e.g. Tags on Studies to specify Cells/Tissue
let TISSUE_STUDIES = ['idr0018', 'idr0032', 'idr0042', 'idr0043', 'idr0054'];
201 changes: 201 additions & 0 deletions omero_gallery/static/gallery/idr/idr.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
code {
background-color: transparent;
border: none;
color: #1a237e;
font-family: Courier, serif;
font-weight: normal;
padding: 0.125rem 0.3125rem 0.0625rem;
width: 200px;
}

.highlight {
background-color: #e8eaf6;
border-radius: 3px;
overflow-x: scroll;
padding: 1rem;
}

.bold {
color: #37474F;
font-weight: bold;
}

body {
background-color: #f4f5f9;
color: #455a64;
font-family: 'Open Sans', sans-serif;
}

h1,h2,h3,h4,h5,h6 {
color: #1976d2;
font-family: 'Nunito', sans-serif;
font-weight: bold;
}

h1 {
font-size: 1.5rem; }

h2 {
font-size: 1.25rem; }

h3 {
font-size: 1.0625em; }

h4 {
font-size: 1.0312rem;
margin-top: 4rem;
}

h5 {
font-size: 1rem; }

h6 {
font-size: 0.875rem; }

hr {
border-style: dashed;
}

a.button {
background-color: #ff9800;
font-weight: bold;
}

a.button:hover {
background-color: #ffc107;
}

a {
color: #3949ab;
font-weight: bold;
}

.logo { max-width: 150px; }
.logo.centered { margin: 20px auto; }
.logo.sidebar { margin: 20px 0 20px 15px; }

.menu.documentation {
background: transparent none repeat scroll 0 0;
margin-top: 0.5rem;
padding-bottom: 1rem;
padding-top: 1rem;
}

.content {
background-color: #fff;
border-left: 1px solid #cfd8dc;
margin-bottom: -50px;
padding-bottom: 50px;
}

.marketing-hero {
background-color: #e8eaf6;
background-image: url('../img/bg/11001_Well_A07_Field_1.jpg');
background-position: top left;
padding: 80px 10px 80px;
}

.marketing-hero h1, .marketing-hero h2, .marketing-hero p {
color: #fff;
}

.marketing-hero h1 {
font-size: 2rem;
margin-bottom: 20px;
}

.marketing-hero p > a {
border-bottom: 1px dashed #fefefe;
color: #fefefe;
}

.marketing-hero p > a:hover {
border-bottom: none;
color: #fff;
}

#page-anchor {
font-size: .8rem;
margin-top: 50px;
text-align: center;
}

.callout.secondary {
background-color: #fff;
border: 1px solid #cfd8dc;
color: #90a4ae;
}

.centered {
margin: auto;
}

/* ---------- main navigation ----------*/
.logo {
display: inline;
width: 120px;
}

.logo-hero {
margin-bottom: 30px;
width: 160px;
}

.top-bar {
background-color: #263238;
border-bottom: 1px solid #000;
}

.top-bar ul {
background-color: #263238;
}

.top-bar ul li {
vertical-align: middle;
}

.nav-secondary, .nav-secondary ul {
background-color: #37474f;
border-bottom: 1px solid #000;
font-size: 0.875em;
height: 36px;
}

.nav-secondary > .top-bar-right > .menu > li > a {
color: #eceff1;
}

.nav-secondary > .top-bar-right > .menu > li > a:hover {
color: #fff;
}

.nav-secondary > .top-bar-right > .menu > li > a i {
vertical-align: top;
}

#main-menu .is-dropdown-submenu {
border-color: #000;
}
#main-menu a {
color: #eceff1;
font-family: 'Montserrat', Helvetica, Roboto, Arial, sans-serif;
font-size: 0.8125rem;
text-transform: uppercase;
}

#main-menu a:hover {
color: #fff;
}

#main-menu .dropdown.menu > li.is-dropdown-submenu-parent > a::after {
border-color: #eceff1 transparent transparent;
}

#version-number {
margin-right: 5px;
width: 50px;
}
.version-number {
font-size: 11px;
font-weight: bold;
}
Loading