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

master: Reconcile differences that have arisen between master and production #778

Closed
wants to merge 2 commits into from
Closed
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
106 changes: 55 additions & 51 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,52 +1,56 @@
-i https://pypi.org/simple
anyjson>=0.3.3
atomicwrites>=1.2.1
attrs>=18.2.0
certifi>=2019.6.16
chardet>=3.0.4
coverage>=4.5.3
coveralls>=1.8.1
django-debug-toolbar>=2.0
django-redis-cache>=2.0.0
django-reversion>=3.0.4
django-user-agents>=0.4.0
django>=2.2.6
docopt>=0.6.2
feedparser>=5.2.1
geojson>=1.3.5
idna>=2.8
isodate>=0.6.0
jsonfield>=2.0.2
lxml>=4.3.4
more-itertools>=4.3.0
mysolr>=0.8.3
numpy>=1.16.4
pandas>=0.22.0
pathlib2>=2.3.2
pillow>=6.2.0
pluggy>=0.8.0
psycopg2>=2.7.5
py>=1.7.0
pyparsing>=2.1.1
pyproj>=2.2.1
pytest-django>=3.4.3
pytest>=3.9.3
python-dateutil>=2.5.3
python-memcached>=1.59
pytz>=2016.4
pyyaml>=5.1.1
rdflib-jsonld>=0.4.0
rdflib>=4.2.1
redis>=3.2.1
requests>=2.22.0
roman>=2.0.0
scipy>=1.3.0
shapely>=1.5.15
six>=1.10.0
sqlparse>=0.3.0
titlecase>=0.9.0
ua-parser>=0.8.0
unidecode>=0.4.19
urllib3>=1.25.3
user-agents>=2.0
uwsgi>=2.0.17.1
anyjson==0.3.3
atomicwrites==1.3.0
attrs==19.3.0
certifi==2019.11.28
chardet==3.0.4
coverage==5.0.3
coveralls==1.10.0
django-debug-toolbar==2.1
django-redis-cache==2.1.0
django-reversion==3.0.5
django-user-agents==0.4.0
django==2.2.9
docopt==0.6.2
feedparser==5.2.1
geojson==2.5.0
idna==2.8
importlib-metadata==1.4.0 ; python_version < '3.8'
isodate==0.6.0
jsonfield==2.0.2
lxml==4.4.2
more-itertools==8.1.0
mysolr==0.8.3
numpy==1.18.1
packaging==20.1
pandas==0.25.3
pathlib2==2.3.5
pillow==7.0.0
pluggy==0.13.1
psycopg2==2.8.4
py==1.8.1
pyparsing==2.4.6
pyproj==2.4.2.post1
pytest-django==3.8.0
pytest==5.3.4
python-dateutil==2.8.1
python-memcached==1.59
pytz==2019.3
pyyaml==5.3
rdflib-jsonld==0.4.0
rdflib==4.2.2
redis==3.3.11
requests==2.22.0
roman==3.2
scipy==1.4.1
shapely==1.6.4.post2
six==1.14.0
sqlparse==0.3.0
titlecase==0.12.0
ua-parser==0.8.0
unidecode==1.1.1
urllib3==1.25.8
user-agents==2.0
uwsgi==2.0.18
wcwidth==0.1.8
zipp==2.0.1
21 changes: 13 additions & 8 deletions static/oc/js/image-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,25 @@ function wait(ms){
function proxyLoadMerrittImages(attempt) {
// Checks to see if images load, if not
var proxy_param = "?merritt-proxy=";
if (attempt == 1 ){
var check_start = "https://merritt.cdlib.org";
}
else{
var check_start = "/entities/proxy/";
}
var proxy_start = "/entities/proxy/";
var check_start = "https://merritt.cdlib.org";

var images = document.images;
for (var i=0; i < images.length; i++) {
var image = images[i];
var src = image.src;
if (!imgLoaded(image) && src.startsWith(check_start)){
if (!imgLoaded(image) && (
src.startsWith(check_start)
|| src.startsWith(proxy_start)
)
){
if(attempt > 1){
console.log("Still bad: " + src);
}

// Wait 350 milliseconds so OC doesn't reject the request.
wait(350);
if(check_start != "/entities/proxy/"){
if(src.startsWith(check_start)){
src = "/entities/proxy/" + encodeURI(src);
}
else{
Expand Down