Changes for eveai_chat_client:

- Session Defaults Header clickable
- Document Processing View - show 'Finished Processing' iso 'Processing' to have more logical visual indicators
- TRAICIE_SELECTION_SPECIALIST now no longer shows question to start selection procedure at initialisation.
- Error Messages for adding documents in 'alert'
- Correction of error in Template variable replacement, resulting in missing template variable value
This commit is contained in:
Josako
2025-07-28 22:56:37 +02:00
parent 5e81595622
commit dabf97c96e
5 changed files with 85 additions and 11 deletions

View File

@@ -395,11 +395,11 @@ def add_document():
return redirect(prefixed_url_for('document_bp.documents_processing'))
except EveAIException as e:
flash(str(e), 'error')
flash(str(e), 'danger')
current_app.logger.error(f"Error adding document: {str(e)}")
except Exception as e:
current_app.logger.error(f'Error adding document: {str(e)}')
flash('An error occurred while adding the document.', 'error')
flash('An error occurred while adding the document.', 'danger')
return render_template('document/add_document.html', form=form)
@@ -501,7 +501,7 @@ def handle_document_selection():
try:
doc_id = ast.literal_eval(document_identification).get('value')
except (ValueError, AttributeError):
flash('Invalid document selection.', 'error')
flash('Invalid document selection.', 'danger')
return redirect(prefixed_url_for('document_bp.documents'))
action = request.form['action']

View File

@@ -272,7 +272,7 @@ def get_documents_processing_list_view(catalog_id):
data.append({
'id': doc.id,
'name': doc.name,
'processing': doc.processing,
'processing_finished': not doc.processing,
'processing_started_at': doc.processing_started_at.strftime('%Y-%m-%d %H:%M:%S') if doc.processing_started_at else '',
'processing_finished_at': doc.processing_finished_at.strftime('%Y-%m-%d %H:%M:%S') if doc.processing_finished_at else '',
'processing_error': doc.processing_error,
@@ -282,7 +282,7 @@ def get_documents_processing_list_view(catalog_id):
columns = [
{'title': 'ID', 'field': 'id', 'width': 80},
{'title': 'Name', 'field': 'name'},
{'title': 'Processing', 'field': 'processing', 'formatter': 'tickCross'},
{'title': 'Finished Processing', 'field': 'processing_finished', 'formatter': 'tickCross'},
{'title': 'Start', 'field': 'processing_started_at'},
{'title': 'Finish', 'field': 'processing_finished_at'},
{'title': 'Error', 'field': 'processing_error'},