- Created a new eveai_chat plugin to support the new dynamic possibilities of the Specialists. Currently only supports standard Rag retrievers (i.e. no extra arguments).

This commit is contained in:
Josako
2024-11-27 12:26:49 +01:00
parent 07d89d204f
commit 98cb4e4f2f
13 changed files with 462 additions and 405 deletions

View File

@@ -204,12 +204,11 @@ def edit_license(license_id):
flash('License updated successfully.', 'success')
return redirect(
prefixed_url_for('entitlements_bp.edit_license', license_tier_id=license_id))
prefixed_url_for('entitlements_bp.edit_license', license_id=license_id))
else:
form_validation_failed(request, form)
return render_template('entitlements/license.html', form=form, license_tier_id=license_tier.id,
ext_disabled_fields=disabled_fields)
return render_template('entitlements/license.html', form=form, ext_disabled_fields=disabled_fields)
@entitlements_bp.route('/view_usages')
@@ -258,13 +257,14 @@ def view_licenses():
# Query licenses for the tenant, with ordering and active status
query = (
License.query.filter_by(tenant_id=tenant_id)
License.query
.join(LicenseTier) # Join with LicenseTier
.filter(License.tenant_id == tenant_id)
.add_columns(
License.id,
License.start_date,
License.end_date,
License.license_tier,
License.license_tier.name.label('license_tier_name'),
LicenseTier.name.label('license_tier_name'), # Access name through LicenseTier
((License.start_date <= current_date) &
(or_(License.end_date.is_(None), License.end_date >= current_date))).label('active')
)
@@ -276,7 +276,7 @@ def view_licenses():
# prepare table data
rows = prepare_table_for_macro(lics, [('id', ''), ('license_tier_name', ''), ('start_date', ''), ('end_date', ''),
('active', ''),])
('active', '')])
# Render the licenses in a template
return render_template('entitlements/view_licenses.html', rows=rows, pagination=pagination)
@@ -287,8 +287,10 @@ def view_licenses():
def handle_license_selection():
license_identification = request.form['selected_row']
license_id = ast.literal_eval(license_identification).get('value')
the_license = LicenseUsage.query.get_or_404(license_id)
the_license = License.query.get_or_404(license_id)
action = request.form['action']
pass # Currently, no actions are defined
match action:
case 'edit_license':
return redirect(prefixed_url_for('entitlements_bp.edit_license', license_id=license_id))