- Specialist Tuning now in a separate editor

- typeBadge formatter completed
This commit is contained in:
Josako
2025-11-24 15:54:47 +01:00
parent 95c8282eb8
commit 3815399a7e
10 changed files with 1132 additions and 378 deletions

View File

@@ -282,26 +282,44 @@ def edit_specialist(specialist_id):
else:
form_validation_failed(request, form)
# Build combined components list view config for embedding
from eveai_app.views.list_views.interaction_list_views import get_specialist_components_list_view
components_config = get_specialist_components_list_view(specialist)
return render_template('interaction/edit_specialist.html',
form=form,
specialist_id=specialist_id,
components_title=components_config.get('title'),
components_data=components_config.get('data'),
components_columns=components_config.get('columns'),
components_actions=components_config.get('actions'),
components_initial_sort=components_config.get('initial_sort'),
components_table_id=components_config.get('table_id'),
components_table_height=components_config.get('table_height'),
components_description=components_config.get('description'),
components_index=components_config.get('index'),
prefixed_url_for=prefixed_url_for,
svg_path=svg_path, )
@interaction_bp.route('/tune_specialist/<int:specialist_id>', methods=['GET'])
@roles_accepted('Super User', 'Partner Admin', 'Tenant Admin')
def tune_specialist(specialist_id):
"""Standalone tuning view voor het beheren van agents, tasks en tools van een specialist.
Deze view biedt dezelfde component-editor functionaliteit die voorheen in de
Components-tab van ``edit_specialist`` zat, maar dan als aparte pagina.
"""
specialist = Specialist.query.get_or_404(specialist_id)
# Gebruikt dezelfde gecombineerde componenten-configuratie als de voormalige tab
from eveai_app.views.list_views.interaction_list_views import get_specialist_components_list_view
components_config = get_specialist_components_list_view(specialist)
return render_template(
'interaction/tune_specialist.html',
specialist=specialist,
specialist_id=specialist_id,
components_title=components_config.get('title'),
components_data=components_config.get('data'),
components_columns=components_config.get('columns'),
components_actions=components_config.get('actions'),
components_initial_sort=components_config.get('initial_sort'),
components_table_id=components_config.get('table_id'),
components_table_height=components_config.get('table_height'),
components_description=components_config.get('description'),
components_index=components_config.get('index'),
prefixed_url_for=prefixed_url_for,
)
@interaction_bp.route('/specialists', methods=['GET', 'POST'])
@roles_accepted('Super User', 'Partner Admin', 'Tenant Admin')
def specialists():
@@ -323,6 +341,8 @@ def handle_specialist_selection():
if action == "edit_specialist":
return redirect(prefixed_url_for('interaction_bp.edit_specialist', specialist_id=specialist_id, for_redirect=True))
elif action == "tune_specialist":
return redirect(prefixed_url_for('interaction_bp.tune_specialist', specialist_id=specialist_id, for_redirect=True))
elif action == "execute_specialist":
return redirect(prefixed_url_for('interaction_bp.execute_specialist', specialist_id=specialist_id, for_redirect=True))

View File

@@ -38,6 +38,7 @@ def get_specialists_list_view():
# Action definitions
actions = [
{'value': 'edit_specialist', 'text': 'Edit Specialist', 'class': 'btn-primary', 'requiresSelection': True},
{'value': 'tune_specialist', 'text': 'Tune Specialist', 'class': 'btn-secondary', 'requiresSelection': True},
{'value': 'execute_specialist', 'text': 'Execute Specialist', 'class': 'btn-primary', 'requiresSelection': True},
{'value': 'create_specialist', 'text': 'Register Specialist', 'class': 'btn-success', 'position': 'right', 'requiresSelection': False}
]