- Add view to show release notes
- Update release notes for 2.3.1-alfa
This commit is contained in:
@@ -120,6 +120,7 @@
|
|||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
{{ dropdown(current_user.user_name, 'person', [
|
{{ dropdown(current_user.user_name, 'person', [
|
||||||
{'name': 'Session Defaults', 'url': '/session_defaults', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Session Defaults', 'url': '/session_defaults', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
|
{'name': 'Release Notes', 'url': '/release_notes', 'roles': ['Super User', 'Partner Admin', 'Tenant Admin']},
|
||||||
{'name': 'Logout', 'url': '/logout'}
|
{'name': 'Logout', 'url': '/logout'}
|
||||||
]) }}
|
]) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -133,4 +134,4 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
from flask import request, render_template, Blueprint, session, current_app, jsonify, flash, redirect
|
from flask import request, render_template, Blueprint, session, current_app, jsonify, flash, redirect, url_for
|
||||||
from flask_security import roles_required, roles_accepted
|
from flask_security import roles_required, roles_accepted
|
||||||
from flask_wtf.csrf import generate_csrf
|
from flask_wtf.csrf import generate_csrf
|
||||||
|
import os
|
||||||
|
import requests
|
||||||
|
|
||||||
from common.models.document import Catalog
|
from common.models.document import Catalog
|
||||||
from common.models.user import Tenant
|
from common.models.user import Tenant
|
||||||
@@ -101,3 +103,29 @@ def check_csrf():
|
|||||||
'session_data': dict(session)
|
'session_data': dict(session)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@basic_bp.route('/release_notes', methods=['GET'])
|
||||||
|
@roles_accepted('Super User', 'Partner Admin', 'Tenant Admin')
|
||||||
|
def release_notes():
|
||||||
|
"""Display the CHANGELOG.md file."""
|
||||||
|
try:
|
||||||
|
# Construct the URL to the CHANGELOG.md file in the static directory
|
||||||
|
static_url = url_for('static', filename='docs/CHANGELOG.md', _external=True)
|
||||||
|
|
||||||
|
# Make a request to get the content of the CHANGELOG.md file
|
||||||
|
response = requests.get(static_url)
|
||||||
|
response.raise_for_status() # Raise an exception for HTTP errors
|
||||||
|
|
||||||
|
# Get the content of the response
|
||||||
|
markdown_content = response.text
|
||||||
|
|
||||||
|
return render_template(
|
||||||
|
'basic/view_markdown.html',
|
||||||
|
title='Release Notes',
|
||||||
|
description='EveAI Release Notes and Change History',
|
||||||
|
markdown_content=markdown_content
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
current_app.logger.error(f"Error displaying release notes: {str(e)}")
|
||||||
|
flash(f'Error displaying release notes: {str(e)}', 'danger')
|
||||||
|
return redirect(prefixed_url_for('basic_bp.index'))
|
||||||
|
|||||||
Reference in New Issue
Block a user