Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link href="/{{ webapp_ctx }}/images/{{ displayName }}/favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<script>
{# used for webpack. remove this when this can be set at build time. #}
window.__asset_path_remove_me_please__ = "/{{ webapp_ctx }}/bundles/";

{# used by EbrcWebsiteCommon to initialize wdk #}
window.__SITE_CONFIG__ = {
{% block siteConfig %}
Expand Down Expand Up @@ -57,8 +54,8 @@
</script>
{%- endif %}{%- endif %}
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="/{{ webapp_ctx }}/bundles/site-client.bundle.css"/>
<script charset="utf8" src="/{{ webapp_ctx }}/bundles/site-client.bundle.js" ></script>
<link rel="stylesheet" type="text/css" href="{{ webapp_host_uri }}/{{ webapp_bundle_type_segment }}/site-client.bundle.css"/>
<script charset="utf8" src="{{ webapp_host_uri }}/{{ webapp_bundle_type_segment }}/site-client.bundle.js"></script>
</head>
{% set bodyClassName = 'vpdb-Body' if project != 'ClinEpiDB' and project != 'AllClinEpiDB' and project != 'MicrobiomeDB' else 'wdk-Body' %}
<body class="{{ bodyClassName }}">
Expand All @@ -77,7 +74,7 @@
room: '{{ room }}/community'
};
document.addEventListener(
'gitter-sidecar-instance-started',
'gitter-sidecar-instance-started',
function gitterSidecarHack() {
const gitterBtn = document.querySelector('.gitter-open-chat-button');
const gitterAside = document.querySelector('.gitter-chat-embed');
Expand All @@ -87,17 +84,17 @@
document.querySelector('.gitter-chat-embed-loading-wrapper').style.display = 'none';

gitterBtn.addEventListener(
'click',
'click',
function openGitterInNewTab(e) {
e.stopPropagation();
e.preventDefault();
window.open('https://app.gitter.im/#/room/#VEuPathDB-genomic_community:gitter.im', "VEuPathDBGitterForum");
},
},
true
);

gitterAside.addEventListener(
'gitter-chat-toggle',
'gitter-chat-toggle',
function keepGitterBtnVisible() {
// we want the chat button to remain visible when clicked
gitterBtn.classList.remove('is-collapsed');
Expand Down
6 changes: 5 additions & 1 deletion Model/lib/conifer/roles/conifer/vars/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ webapp_ctx: =c= Tomcat webapp context name, e.g. toxo.qa
_webapp_ctx: '{{ webapp_ctx|prod_prom_ctx(hostname) }}'
product: '{{ project }}' # product: ClinEpiDB vs. project/model: ClinEpiDB or Gates

# Client Container Config
webapp_host_uri: =c= URI (URL or path) under which the client code container is exposed (if it is a path, it MUST begin with /) TODO SET ME HERE WHEN THE CONTAINER IS DEPLOYED!!!!
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this is always "https://{{hostname}}/client-bundle-service", no? Or did we decide to appoint a URL e.g. veupathdb.org and then deal with the CORS issues? (with "client-bundle-service" being a stub name TBD later). You do need to put that extra string in somewhere (i.e. the apache mapping name, like "eda" or "site-search"). Should decide what it will be for the client code service.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right now it is this way so that it can be configured to be either a relative path:

webapp_host_uri: /client-bundle-service

or a remote URL for testing with locally hosted client code:

webapp_host_uri: https://f84e-2600-4040-70fa-ee00-9cb2-1473-b230-a66f.ngrok-free.app

If this is undesirable it can be changed when we get the thing deployed, but we will be cutting off our ability to localhost client code to run on a dev server.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to keep this in place.

Also, it might be nice to use a single host for all sites, since users will reap the benefits of caching once across all sites. However, I'm not sure if CORS will become an issue (I think not, but would have to look more closely). We can play with that once the thing is deployed.

webapp_bundle_type_segment: =c= Site "type" path segment e.g. [clinepi|genomics|mbio|ortho]

# short convenience names for most common user-defined vars
accountDb_connectionUrl: =c= e.g. jdbc:oracle:oci:@acctDbS
accountDb_login: =c= username for account database
Expand Down Expand Up @@ -167,7 +171,7 @@ modelprop:
GOOGLE_ANALYTICS_ID:
FACEBOOK_URL:
YOUTUBE_URL:
REDDIT_URL:
REDDIT_URL:
SITE_SEARCH_SERVICE_URL:

eda:
Expand Down