mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-08 04:18:13 +08:00
added unit test
This commit is contained in:
@@ -8,10 +8,11 @@
|
||||
# the specific language governing permissions and limitations under the License.
|
||||
|
||||
from cellxgene_gateway import env
|
||||
from json import loads
|
||||
|
||||
def get_extra_scripts():
|
||||
# can be array of script tags to inject on every page, e.g. for google analytics could be
|
||||
# ['https://www.googletagmanager.com/gtag/js?id=UA-123456-2',
|
||||
# f"{env.gateway_protocol}://{env.gateway_host}/static/js/google_ua.js"]
|
||||
# where google_ua.js is a script you add to the static/js folder prior to deployment.
|
||||
return [] if env.extra_scripts is None else [p.strip() for p in env.extra_scripts.split(",") if len(p.strip()) > 0]
|
||||
return [] if env.extra_scripts is None else loads(env.extra_scripts)
|
||||
|
||||
Reference in New Issue
Block a user