diff --git a/server/app/app.py b/server/app/app.py
index d082fb90..09b8d9d5 100644
--- a/server/app/app.py
+++ b/server/app/app.py
@@ -85,17 +85,16 @@ def static_redirect(dataset, therest):
return redirect(f"/static/{therest}", code=301)
-def favicon_redirect(dataset):
- """ redirect favicon to static dir """
- return redirect("/static/favicon.png", code=301)
-
-
def dataroot_index():
# FIXME with a splash screen that includes a listing of all the datasets.
- # or perhaps a login screen if this is a hosted environment
- data = "
Welcome to cellxgene
"
+ # or perhaps a login screen if this is a hosted environment,
+ # or have a configuration option to redirect to a user specified page.
# the following is just for demo purposes...
+ data = ''
+ data += 'Hosted Cellxgene'
+ data += '
Welcome to cellxgene
'
+
try:
config = current_app.app_config
locator = DataLocator(config.dataroot)
@@ -106,15 +105,16 @@ def dataroot_index():
if matrix_data_loader.etype != MatrixDataType.UNKNOWN:
datasets.append(fname)
- data += " Select one of these datasets... "
- data += "
"
+ data += ' Select one of these datasets... '
+ data += '
'
datasets.sort()
for dataset in datasets:
- data += f"
'
+ except Exception as e:
+ data += f' Unable to locate datasets from {config.dataroot}: {str(e)}'
+ data += ''
return make_response(data)
@@ -219,7 +219,6 @@ class Server:
self.app.register_blueprint(resources.blueprint)
self.app.add_url_rule("//", "dataset_index", dataset_index)
self.app.add_url_rule("//static/", "static_redirect", static_redirect)
- self.app.add_url_rule("//favicon.png", "favicon_redirect", favicon_redirect)
self.app.matrix_data_cache_manager = matrix_data_cache_manager
self.app.annotations = annotations
diff --git a/server/eb/.ebextensions/wsgi_app_group_global.config b/server/eb/.ebextensions/wsgi_app_group_global.config
index 0befb288..cf2ecc61 100644
--- a/server/eb/.ebextensions/wsgi_app_group_global.config
+++ b/server/eb/.ebextensions/wsgi_app_group_global.config
@@ -1,4 +1,4 @@
-# Configue WSGI so that it will work with numpy, scanpy, etc, which all use the
+# Configure WSGI so that it will work with numpy, scanpy, etc, which all use the
# Python SWIG, and therefore will deadlock on start. For more information, see
# https://modwsgi.readthedocs.io/en/develop/user-guides/application-issues.html#python-simplified-gil-state-api
files:
diff --git a/server/eb/Makefile b/server/eb/Makefile
index 8cb17c0d..edef6797 100644
--- a/server/eb/Makefile
+++ b/server/eb/Makefile
@@ -20,7 +20,9 @@ build: clean
cp app.py artifact.dir/application.py; \
cp ../requirements.txt artifact.dir; \
cp -r .ebextensions artifact.dir; \
- (cd artifact.dir; zip -r ../artifact.zip . --exclude server/test/\* server/eb/\* ); \
+ (cd artifact.dir; \
+ cp -r server/common/web/static static; \
+ zip -r ../artifact.zip . --exclude server/test/\* server/eb/\* ; ); \
if ! grep artifact.zip .elasticbeanstalk/config.yml ; then \
mkdir -p .elasticbeanstalk ; cat config_deploy.yaml >> .elasticbeanstalk/config.yml ; fi
diff --git a/server/eb/README.md b/server/eb/README.md
index 5c05e6e4..bf751280 100644
--- a/server/eb/README.md
+++ b/server/eb/README.md
@@ -70,5 +70,5 @@ There are many more options to these commands that may be important or necessary
7. Open the application in a browser
```
- eb open
+ eb open $EB_ENV
```
diff --git a/setup.cfg b/setup.cfg
index b6e433fb..b240487d 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,4 +1,4 @@
[flake8]
max-line-length = 120
ignore = E203, W503
-exclude = server/data_common/fbs/NetEncoding/,.git,__pycache__,venv,server/venv,old,build,dist,server/data_common/fbs/NetEncoding
+exclude = server/data_common/fbs/NetEncoding/,.git,__pycache__,venv,server/venv,old,build,dist,server/eb/artifact.dir/