Skip to content

Commit 861cc3d

Browse files
authored
Merge pull request #63 from CESNET/develop
This PR bumps the project version to 1.1.3, removes debugging prints from the admin update routine, and adds a configurable footer menu to the default template. Remove debug print statements in update_set_org Introduce a new inject_footer_menu context processor and render footer_menu in the base layout Bump application version to 1.1.3 and update CHANGELOG
2 parents 56b08b3 + f4f53ba commit 861cc3d

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The REST API is documented using Swagger (OpenAPI). After installing and running
5959

6060

6161
## Change Log
62+
- 1.1.3 - introduced configurable footer menu for links in bottom of the default template
6263
- 1.1.2 - minor security updates (removed unused JS files), setup.py now reads dependencies from requirements.txt
6364
- 1.1.1 - Machine API Key rewrited.
6465
- API keys for machines are now tied to one of the existing users. If there is a need to have API access for machine, first create service user, and set the access rights. Then create machine key as Admin and assign it to this user.

flowapp/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.1.2"
1+
__version__ = "1.1.3"

flowapp/templates/layouts/default.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,22 @@
9494
</li>
9595
</ul>
9696
</nav>
97-
<p class="position-fixed bottom-0 end-0 form-text p-2 me-2">ExaFS {{ session['app_version'] }}</p>
97+
<footer class="bg-light text-muted mt-5 pt-4 border-top">
98+
<div class="container">
99+
<div class="row justify-content-between align-items-center">
100+
<div class="col-md-auto mb-2 mb-md-0">
101+
<nav class="nav">
102+
{% for item in footer_menu %}
103+
<a class="nav-link px-2" href="{{ url_for(item.url) }}">{{ item.name }}</a>
104+
{% endfor %}
105+
</nav>
106+
</div>
107+
<div class="col-md-auto text-end small">
108+
ExaFS {{ session['app_version'] }}
109+
</div>
110+
</div>
111+
</div>
112+
</footer>
98113

99114
<script type="text/javascript" src="/static/js/ip_context.js"></script>
100115
<script type="text/javascript" src="/static/js/enable_tooltips.js"></script>

flowapp/utils/app_factory.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ def inject_dashboard():
108108
"""Inject dashboard config to templates."""
109109
return {"dashboard": app.config.get("DASHBOARD")}
110110

111+
@app.context_processor
112+
def inject_footer_menu():
113+
"""Inject main menu config to templates."""
114+
return {"footer_menu": app.config.get("FOOTER_MENU", [])}
115+
111116
return app
112117

113118

flowapp/views/admin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ def update_set_org():
672672
user_with_multiple_orgs = {}
673673
for model in models:
674674
data_records = model.query.filter(model.org_id == 0).all()
675-
print(f"Found {len(data_records)} records with org_id NULL in {model.__name__}")
676675
# Loop through each flowspec record and update org_id based on the user's organization
677676
updated = 0
678677
for row in data_records:
@@ -683,7 +682,6 @@ def update_set_org():
683682
row.org_id = user_org.id
684683
updated += 1
685684
else:
686-
print(f"User {row.user.email} has multiple organizations")
687685
user_with_multiple_orgs[row.user.email] = [org.name for org in orgs]
688686
# Commit the changes
689687
try:

0 commit comments

Comments
 (0)