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

EXTERNAL_TOOLS #60

Merged
merged 17 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
8 changes: 7 additions & 1 deletion openquakeplatform/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# Standalone flag to differentiate behaviors
STANDALONE = True

EXTERNAL_TOOLS = True if os.getenv('EXTERNAL_TOOLS', 'False') == 'True' else False

# If GEM_TIME_INVARIANT_OUTPUTS env variable is defined it means no
# time variant stuff inside output files
TIME_INVARIANT_OUTPUTS = ('GEM_TIME_INVARIANT_OUTPUTS' in os.environ)
Expand Down Expand Up @@ -100,8 +102,12 @@
STANDALONE_APPS = (
'openquakeplatform_ipt',
'openquakeplatform_taxtweb',
'openquakeplatform_taxonomy',
)
if not EXTERNAL_TOOLS:
STANDALONE_APPS += (
'openquakeplatform_taxonomy',
)


MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
Expand Down
6 changes: 0 additions & 6 deletions openquakeplatform/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
{% else %}
<link href="{{ STATIC_URL }}lib/css/assets.min.css" rel="stylesheet"/>
{% endif %}
{%if tools_only %}
<link href="{{ STATIC_URL }}css/cookie_consent.css" rel="stylesheet"/>
{% endif %}
{% block extra_head %}
{% endblock %}
{% endblock %}
Expand Down Expand Up @@ -82,8 +79,5 @@
color: black;
}
</style>
{%if tools_only %}
{% include "includes/cookie_bar.html" %}
{% endif %}
</body>
</html>
6 changes: 5 additions & 1 deletion openquakeplatform/templates/includes/extra-nav.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{%if oq_engine_version %}
{%if not tools_only %}
{%if not external_tools %}
<li class="engine"><a href="{% url 'index' %}">Engine</a></li>
{% endif %}
{% endif %}
{% for app in app_list %}
<li class="{{ app.class }}"><a href="{{ app.url }}">{{ app.title }}</a></li>
{% endfor %}
{% if external_tools %}
<li class="explore"><a href="https://taxonomy.openquake.org">Taxonomy</a></li>
{% endif %}

1 change: 1 addition & 0 deletions verifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ python manage.py loaddata ./fixtures/0001_cookie_consent_required_plus_hide_cook
python manage.py loaddata ./fixtures/0002_cookie_consent_analytics.json
python manage.py collectstatic
cd \$HOME
export EXTERNAL_TOOLS=\"True\"
oq webui start -s &> runserver.log &
server=\$!
echo \"\$server\" > /tmp/server.pid
Expand Down
Loading