- Added 'Register ...' functionality to overviews. ==> No more separate menu items...
This commit is contained in:
@@ -13,7 +13,7 @@ backstory: >
|
|||||||
language the context provided to you is in. You are participating in a conversation, not writing e.g. an email. Do not
|
language the context provided to you is in. You are participating in a conversation, not writing e.g. an email. Do not
|
||||||
include a salutation or closing greeting in your answer.
|
include a salutation or closing greeting in your answer.
|
||||||
{custom_backstory}
|
{custom_backstory}
|
||||||
full_model_name: "mistral.mistral-large-latest"
|
full_model_name: "mistral.mistral-small-latest"
|
||||||
temperature: 0.3
|
temperature: 0.3
|
||||||
metadata:
|
metadata:
|
||||||
author: "Josako"
|
author: "Josako"
|
||||||
|
|||||||
@@ -9,11 +9,14 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form method="POST" action="{{ url_for('document_bp.handle_catalog_selection') }}">
|
<form method="POST" action="{{ url_for('document_bp.handle_catalog_selection') }}" id="catalogsForm">
|
||||||
{{ render_selectable_table(headers=["Catalog ID", "Name", "Type"], rows=rows, selectable=True, id="catalogsTable") }}
|
{{ render_selectable_table(headers=["Catalog ID", "Name", "Type"], rows=rows, selectable=True, id="catalogsTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="set_session_catalog" class="btn btn-primary">Set Session Catalog</button>
|
<div>
|
||||||
<button type="submit" name="action" value="edit_catalog" class="btn btn-primary">Edit Catalog</button>
|
<button type="submit" name="action" value="set_session_catalog" class="btn btn-primary" onclick="return validateTableSelection('catalogsForm')">Set Session Catalog</button>
|
||||||
|
<button type="submit" name="action" value="edit_catalog" class="btn btn-primary" onclick="return validateTableSelection('catalogsForm')">Edit Catalog</button>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="action" value="create_catalog" class="btn btn-success">Register Catalog</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
{{ render_collapsible_section('Filter', 'Filter Options', filter_form) }}
|
{{ render_collapsible_section('Filter', 'Filter Options', filter_form) }}
|
||||||
|
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3">
|
||||||
<form method="POST" action="{{ url_for('document_bp.handle_document_version_selection') }}">
|
<form method="POST" action="{{ url_for('document_bp.handle_document_version_selection') }}" id="documentVersionsForm">
|
||||||
<!-- Document Versions Table -->
|
<!-- Document Versions Table -->
|
||||||
{{ render_selectable_sortable_table(
|
{{ render_selectable_sortable_table(
|
||||||
headers=["ID", "File Type", "Processing", "Processing Start", "Processing Finish", "Processing Error"],
|
headers=["ID", "File Type", "Processing", "Processing Start", "Processing Finish", "Processing Error"],
|
||||||
@@ -34,9 +34,11 @@
|
|||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
sort_order=sort_order
|
sort_order=sort_order
|
||||||
) }}
|
) }}
|
||||||
<div class="form-group mt-4">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_document_version" class="btn btn-primary">Edit Document Version</button>
|
<div>
|
||||||
<button type="submit" name="action" value="process_document_version" class="btn btn-danger">Process Document Version</button>
|
<button type="submit" name="action" value="edit_document_version" class="btn btn-primary" onclick="return validateTableSelection('documentVersionsForm')">Edit Document Version</button>
|
||||||
|
<button type="submit" name="action" value="process_document_version" class="btn btn-danger" onclick="return validateTableSelection('documentVersionsForm')">Process Document Version</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
{{ render_collapsible_section('Filter', 'Filter Options', filter_form) }}
|
{{ render_collapsible_section('Filter', 'Filter Options', filter_form) }}
|
||||||
|
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3">
|
||||||
<form method="POST" action="{{ url_for('document_bp.handle_document_selection') }}">
|
<form method="POST" action="{{ url_for('document_bp.handle_document_selection') }}" id="documentsForm">
|
||||||
<!-- Documents Table -->
|
<!-- Documents Table -->
|
||||||
{{ render_selectable_sortable_table_with_dict_headers(
|
{{ render_selectable_sortable_table_with_dict_headers(
|
||||||
headers=[
|
headers=[
|
||||||
@@ -37,10 +37,12 @@
|
|||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
sort_order=sort_order
|
sort_order=sort_order
|
||||||
) }}
|
) }}
|
||||||
<div class="form-group mt-4">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_document" class="btn btn-primary">Edit Document</button>
|
<div>
|
||||||
<button type="submit" name="action" value="document_versions" class="btn btn-secondary">Show Document Versions</button>
|
<button type="submit" name="action" value="edit_document" class="btn btn-primary" onclick="return validateTableSelection('documentsForm')">Edit Document</button>
|
||||||
<button type="submit" name="action" value="refresh_document" class="btn btn-secondary">Refresh Document (new version)</button>
|
<button type="submit" name="action" value="document_versions" class="btn btn-secondary" onclick="return validateTableSelection('documentsForm')">Show Document Versions</button>
|
||||||
|
<button type="submit" name="action" value="refresh_document" class="btn btn-secondary" onclick="return validateTableSelection('documentsForm')">Refresh Document (new version)</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,10 +9,13 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form method="POST" action="{{ url_for('document_bp.handle_processor_selection') }}">
|
<form method="POST" action="{{ url_for('document_bp.handle_processor_selection') }}" id="processorsForm">
|
||||||
{{ render_selectable_table(headers=["Processor ID", "Name", "Type", "Catalog ID"], rows=rows, selectable=True, id="retrieversTable") }}
|
{{ render_selectable_table(headers=["Processor ID", "Name", "Type", "Catalog ID"], rows=rows, selectable=True, id="retrieversTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_processor" class="btn btn-primary">Edit Processor</button>
|
<div>
|
||||||
|
<button type="submit" name="action" value="edit_processor" class="btn btn-primary" onclick="return validateTableSelection('processorsForm')">Edit Processor</button>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="action" value="create_processor" class="btn btn-success">Register Processor</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,10 +9,13 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form method="POST" action="{{ url_for('document_bp.handle_retriever_selection') }}">
|
<form method="POST" action="{{ url_for('document_bp.handle_retriever_selection') }}" id="retrieversForm">
|
||||||
{{ render_selectable_table(headers=["Retriever ID", "Name", "Type", "Catalog ID"], rows=rows, selectable=True, id="retrieversTable") }}
|
{{ render_selectable_table(headers=["Retriever ID", "Name", "Type", "Catalog ID"], rows=rows, selectable=True, id="retrieversTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_retriever" class="btn btn-primary">Edit Retriever</button>
|
<div>
|
||||||
|
<button type="submit" name="action" value="edit_retriever" class="btn btn-primary" onclick="return validateTableSelection('retrieversForm')">Edit Retriever</button>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="action" value="create_retriever" class="btn btn-success">Register Retriever</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,11 +6,14 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<!-- License Tier Selection Form -->
|
<!-- License Tier Selection Form -->
|
||||||
<form method="POST" action="{{ url_for('entitlements_bp.handle_license_tier_selection') }}">
|
<form method="POST" action="{{ url_for('entitlements_bp.handle_license_tier_selection') }}" id="licenseTiersForm">
|
||||||
{{ render_selectable_table(headers=["ID", "Name", "Version", "Start Date", "End Date"], rows=rows, selectable=True, id="licenseTierTable") }}
|
{{ render_selectable_table(headers=["ID", "Name", "Version", "Start Date", "End Date"], rows=rows, selectable=True, id="licenseTierTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_license_tier" class="btn btn-primary">Edit License Tier</button>
|
<div>
|
||||||
<button type="submit" name="action" value="create_license_for_tenant" class="btn btn-secondary">Create License for Current Tenant</button>
|
<button type="submit" name="action" value="edit_license_tier" class="btn btn-primary" onclick="return validateTableSelection('licenseTiersForm')">Edit License Tier</button>
|
||||||
|
<button type="submit" name="action" value="create_license_for_tenant" class="btn btn-secondary" onclick="return validateTableSelection('licenseTiersForm')">Create License for Current Tenant</button>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="action" value="create_license_tier" class="btn btn-success">Register License Tier</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,12 @@
|
|||||||
{% block content_description %}View Licenses{% endblock %}
|
{% block content_description %}View Licenses{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="{{ url_for('entitlements_bp.handle_license_selection') }}" method="POST">
|
<form action="{{ url_for('entitlements_bp.handle_license_selection') }}" method="POST" id="licensesForm">
|
||||||
{{ render_selectable_table(headers=["License ID", "Name", "Start Date", "End Date", "Active"], rows=rows, selectable=True, id="licensesTable") }}
|
{{ render_selectable_table(headers=["License ID", "Name", "Start Date", "End Date", "Active"], rows=rows, selectable=True, id="licensesTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_license" class="btn btn-primary">Edit License</button>
|
<div>
|
||||||
|
<button type="submit" name="action" value="edit_license" class="btn btn-primary" onclick="return validateTableSelection('licensesForm')">Edit License</button>
|
||||||
|
</div>
|
||||||
<!-- Additional buttons can be added here for other actions -->
|
<!-- Additional buttons can be added here for other actions -->
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -9,10 +9,12 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form method="POST" action="{{ url_for('interaction_bp.handle_chat_session_selection') }}">
|
<form method="POST" action="{{ url_for('interaction_bp.handle_chat_session_selection') }}" id="chatSessionsForm">
|
||||||
{{ render_selectable_table(headers=["ID", "Session ID", "Session Start", "Session End"], rows=rows, selectable=True, id="documentsTable") }}
|
{{ render_selectable_table(headers=["ID", "Session ID", "Session Start", "Session End"], rows=rows, selectable=True, id="chatSessionsTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="view_chat_session" class="btn btn-primary">View Chat Session</button>
|
<div>
|
||||||
|
<button type="submit" name="action" value="view_chat_session" class="btn btn-primary" onclick="return validateTableSelection('chatSessionsForm')">View Chat Session</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,10 +9,13 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form method="POST" action="{{ url_for('interaction_bp.handle_specialist_selection') }}">
|
<form method="POST" action="{{ url_for('interaction_bp.handle_specialist_selection') }}" id="specialistsForm">
|
||||||
{{ render_selectable_table(headers=["Specialist ID", "Name", "Type"], rows=rows, selectable=True, id="specialistsTable") }}
|
{{ render_selectable_table(headers=["Specialist ID", "Name", "Type"], rows=rows, selectable=True, id="specialistsTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_specialist" class="btn btn-primary">Edit Specialist</button>
|
<div>
|
||||||
|
<button type="submit" name="action" value="edit_specialist" class="btn btn-primary" onclick="return validateTableSelection('specialistsForm')">Edit Specialist</button>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="action" value="create_specialist" class="btn btn-success">Register Specialist</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -159,8 +159,6 @@
|
|||||||
value="{{ row[0] }}"
|
value="{{ row[0] }}"
|
||||||
{% if is_component_selector %}
|
{% if is_component_selector %}
|
||||||
data-component-selector="true"
|
data-component-selector="true"
|
||||||
{% else %}
|
|
||||||
required
|
|
||||||
{% endif %}>
|
{% endif %}>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -69,46 +69,37 @@
|
|||||||
<ul class="navbar-nav navbar-nav-hover mx-auto">
|
<ul class="navbar-nav navbar-nav-hover mx-auto">
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
{{ dropdown('Tenant Configuration', 'source_environment', [
|
{{ dropdown('Tenant Configuration', 'source_environment', [
|
||||||
{'name': 'Tenant List', 'url': '/user/select_tenant', 'roles': ['Super User']},
|
{'name': 'Tenants', 'url': '/user/select_tenant', 'roles': ['Super User']},
|
||||||
{'name': 'Tenant Registration', 'url': '/user/tenant', 'roles': ['Super User']},
|
|
||||||
{'name': 'Tenant Overview', 'url': '/user/tenant_overview', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Tenant Overview', 'url': '/user/tenant_overview', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'Edit Tenant', 'url': '/user/tenant/' ~ session['tenant'].get('id'), 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Edit Tenant', 'url': '/user/tenant/' ~ session['tenant'].get('id'), 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'Tenant Domains', 'url': '/user/view_tenant_domains', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Tenant Domains', 'url': '/user/view_tenant_domains', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'Tenant Domain Registration', 'url': '/user/tenant_domain', 'roles': ['Super User', 'Tenant Admin']},
|
|
||||||
{'name': 'Tenant Projects', 'url': '/user/tenant_projects', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Tenant Projects', 'url': '/user/tenant_projects', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'Tenant Project Registration', 'url': '/user/tenant_project', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Users', 'url': '/user/view_users', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'User List', 'url': '/user/view_users', 'roles': ['Super User', 'Tenant Admin']},
|
|
||||||
{'name': 'User Registration', 'url': '/user/user', 'roles': ['Super User', 'Tenant Admin']},
|
|
||||||
]) }}
|
]) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
{{ dropdown('Document Mgmt', 'note_stack', [
|
{{ dropdown('Document Mgmt', 'note_stack', [
|
||||||
{'name': 'Add Catalog', 'url': '/document/catalog', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Catalogs', 'url': '/document/catalogs', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'All Catalogs', 'url': '/document/catalogs', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Processors', 'url': '/document/processors', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'Add Processor', 'url': '/document/processor', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Retrievers', 'url': '/document/retrievers', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'All Processors', 'url': '/document/processors', 'roles': ['Super User', 'Tenant Admin']},
|
|
||||||
{'name': 'Add Retriever', 'url': '/document/retriever', 'roles': ['Super User', 'Tenant Admin']},
|
|
||||||
{'name': 'All Retrievers', 'url': '/document/retrievers', 'roles': ['Super User', 'Tenant Admin']},
|
|
||||||
{'name': 'Add Document', 'url': '/document/add_document', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Add Document', 'url': '/document/add_document', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'Add URL', 'url': '/document/add_url', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Add URL', 'url': '/document/add_url', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'All Documents', 'url': '/document/documents', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Documents', 'url': '/document/documents', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'All Document Versions', 'url': '/document/document_versions_list', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Document Versions', 'url': '/document/document_versions_list', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'Library Operations', 'url': '/document/library_operations', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Library Operations', 'url': '/document/library_operations', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
]) }}
|
]) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
{{ dropdown('Interactions', 'hub', [
|
{{ dropdown('Interactions', 'hub', [
|
||||||
{'name': 'Add Specialist', 'url': '/interaction/specialist', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Specialists', 'url': '/interaction/specialists', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'All Specialists', 'url': '/interaction/specialists', 'roles': ['Super User', 'Tenant Admin']},
|
|
||||||
{'name': 'Chat Sessions', 'url': '/interaction/chat_sessions', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Chat Sessions', 'url': '/interaction/chat_sessions', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
]) }}
|
]) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
{{ dropdown('Administration', 'settings', [
|
{{ dropdown('Administration', 'settings', [
|
||||||
{'name': 'License Tier Registration', 'url': '/entitlements/license_tier', 'roles': ['Super User']},
|
{'name': 'License Tiers', 'url': '/entitlements/view_license_tiers', 'roles': ['Super User']},
|
||||||
{'name': 'All License Tiers', 'url': '/entitlements/view_license_tiers', 'roles': ['Super User']},
|
|
||||||
{'name': 'Trigger Actions', 'url': '/administration/trigger_actions', 'roles': ['Super User']},
|
{'name': 'Trigger Actions', 'url': '/administration/trigger_actions', 'roles': ['Super User']},
|
||||||
{'name': 'All Licenses', 'url': '/entitlements/view_licenses', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Licenses', 'url': '/entitlements/view_licenses', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
{'name': 'Usage', 'url': '/entitlements/view_usages', 'roles': ['Super User', 'Tenant Admin']},
|
{'name': 'Usage', 'url': '/entitlements/view_usages', 'roles': ['Super User', 'Tenant Admin']},
|
||||||
]) }}
|
]) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -145,8 +145,17 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<script>
|
||||||
|
function validateTableSelection(formId) {
|
||||||
|
const form = document.getElementById(formId);
|
||||||
|
const selectedRow = form.querySelector('input[name="selected_row"]:checked');
|
||||||
|
if (!selectedRow) {
|
||||||
|
alert('Please select a row first');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.json-editor-container {
|
.json-editor-container {
|
||||||
height: 400px;
|
height: 400px;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<button type="submit" name="action" value="select_tenant" class="btn btn-primary">Set Session Tenant</button>
|
<button type="submit" name="action" value="select_tenant" class="btn btn-primary">Set Session Tenant</button>
|
||||||
<button type="submit" name="action" value="edit_tenant" class="btn btn-secondary">Edit Tenant</button>
|
<button type="submit" name="action" value="edit_tenant" class="btn btn-secondary">Edit Tenant</button>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" name="action" value="new_tenant" class="btn btn-secondary">New Tenant</button>
|
<button type="submit" name="action" value="create_tenant" class="btn btn-success">Register Tenant</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,15 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form method="POST" action="{{ url_for("user_bp.handle_tenant_project_selection") }}">
|
<form method="POST" action="{{ url_for('user_bp.handle_tenant_project_selection') }}" id="tenantProjectsForm">
|
||||||
{{ render_selectable_table(headers=["Tenant Project ID", "Name", "API Clue", "Responsible", "Active"], rows=rows, selectable=True, id="catalogsTable") }}
|
{{ render_selectable_table(headers=["Tenant Project ID", "Name", "API Clue", "Responsible", "Active"], rows=rows, selectable=True, id="catalogsTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_tenant_project" class="btn btn-primary">Edit Tenant Project</button>
|
<div>
|
||||||
<button type="submit" name="action" value="invalidate_tenant_project" class="btn btn-primary">Invalidate Tenant Project</button>
|
<button type="submit" name="action" value="edit_tenant_project" class="btn btn-primary" onclick="return validateTableSelection('tenantProjectsForm')">Edit Tenant Project</button>
|
||||||
<button type="submit" name="action" value="delete_tenant_project" class="btn btn-danger">Delete Tenant Project</button>
|
<button type="submit" name="action" value="invalidate_tenant_project" class="btn btn-primary" onclick="return validateTableSelection('tenantProjectsForm')">Invalidate Tenant Project</button>
|
||||||
|
<button type="submit" name="action" value="delete_tenant_project" class="btn btn-danger" onclick="return validateTableSelection('tenantProjectsForm')">Delete Tenant Project</button>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="action" value="create_tenant_project" class="btn btn-success">Register Project</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,10 +7,14 @@
|
|||||||
{% block content_description %}Select the domain you'd like to action upon{% endblock %}
|
{% block content_description %}Select the domain you'd like to action upon{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="{{ url_for('user_bp.handle_tenant_domain_action') }}" method="POST">
|
<form action="{{ url_for('user_bp.handle_tenant_domain_action') }}" method="POST" id="tenantDomainsForm">
|
||||||
{{ render_selectable_table(headers=["ID", "Domain Name", "Valid To"], rows=rows, selectable=True, id="tenantDomainsTable") }}
|
{{ render_selectable_table(headers=["ID", "Domain Name", "Valid To"], rows=rows, selectable=True, id="tenantDomainsTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_tenant_domain" class="btn btn-primary">Edit Selected Domain</button>
|
<div>
|
||||||
|
<button type="submit" name="action" value="edit_tenant_domain" class="btn btn-primary" onclick="return validateTableSelection('tenantDomainsForm')">Edit Selected Domain</button>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="action" value="create_tenant_domain" class="btn btn-success">Register Domain</button>
|
||||||
|
|
||||||
<!-- Additional buttons can be added here for other actions -->
|
<!-- Additional buttons can be added here for other actions -->
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -21,30 +25,4 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{#<script>#}
|
|
||||||
{#$(document).ready(function() {#}
|
|
||||||
{# $('#tenantDomainsTable').DataTable({#}
|
|
||||||
{# 'columnDefs': [#}
|
|
||||||
{# {#}
|
|
||||||
{# 'targets': 0,#}
|
|
||||||
{# 'searchable': false,#}
|
|
||||||
{# 'orderable': false,#}
|
|
||||||
{# 'className': 'dt-body-center',#}
|
|
||||||
{# 'render': function (data, type, full, meta) {#}
|
|
||||||
{# return '<input type="radio" name="user_id" value="' + $('<div/>').text(data).html() + '">';#}
|
|
||||||
{# }#}
|
|
||||||
{# },#}
|
|
||||||
{# {#}
|
|
||||||
{# 'targets': 1,#}
|
|
||||||
{# 'orderable': true,#}
|
|
||||||
{# },#}
|
|
||||||
{# {#}
|
|
||||||
{# 'targets': 2,#}
|
|
||||||
{# 'orderable': true,#}
|
|
||||||
{# },#}
|
|
||||||
{# ],#}
|
|
||||||
{# 'order': [[1, 'asc']]#}
|
|
||||||
{# });#}
|
|
||||||
{#});#}
|
|
||||||
{#</script>#}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -7,13 +7,16 @@
|
|||||||
{% block content_description %}Select the user you'd like to action upon{% endblock %}
|
{% block content_description %}Select the user you'd like to action upon{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="{{ url_for('user_bp.handle_user_action') }}" method="POST">
|
<form action="{{ url_for('user_bp.handle_user_action') }}" method="POST" id="usersForm">
|
||||||
{{ render_selectable_table(headers=["User ID", "User Name", "Email"], rows=rows, selectable=True, id="usersTable") }}
|
{{ render_selectable_table(headers=["User ID", "User Name", "Email"], rows=rows, selectable=True, id="usersTable") }}
|
||||||
<div class="form-group mt-3">
|
<div class="form-group mt-3 d-flex justify-content-between">
|
||||||
<button type="submit" name="action" value="edit_user" class="btn btn-primary">Edit Selected User</button>
|
<div>
|
||||||
<button type="submit" name="action" value="resend_confirmation_email" class="btn btn-secondary">Resend Confirmation Email</button>
|
<button type="submit" name="action" value="edit_user" class="btn btn-primary" onclick="return validateTableSelection('usersForm')">Edit User</button>
|
||||||
<button type="submit" name="action" value="send_password_reset_email" class="btn btn-secondary">Send Password Reset Email</button>
|
<button type="submit" name="action" value="resend_confirmation_email" class="btn btn-secondary" onclick="return validateTableSelection('usersForm')">Resend Confirmation</button>
|
||||||
<button type="submit" name="action" value="reset_uniquifier" class="btn btn-secondary">Reset Uniquifier</button>
|
<button type="submit" name="action" value="send_password_reset_email" class="btn btn-secondary" onclick="return validateTableSelection('usersForm')">Password Reset</button>
|
||||||
|
<button type="submit" name="action" value="reset_uniquifier" class="btn btn-secondary" onclick="return validateTableSelection('usersForm')">Reset Uniquifier</button>
|
||||||
|
</div>
|
||||||
|
<button type="submit" name="action" value="create_user" class="btn btn-success">Register User</button>
|
||||||
<!-- Additional buttons can be added here for other actions -->
|
<!-- Additional buttons can be added here for other actions -->
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -22,36 +25,3 @@
|
|||||||
{% block content_footer %}
|
{% block content_footer %}
|
||||||
{{ render_pagination(pagination, 'user_bp.select_tenant') }}
|
{{ render_pagination(pagination, 'user_bp.select_tenant') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
|
||||||
{#<script>#}
|
|
||||||
{#$(document).ready(function() {#}
|
|
||||||
{# $('#usersTable').DataTable({#}
|
|
||||||
{# 'columnDefs': [#}
|
|
||||||
{# {#}
|
|
||||||
{# 'targets': 0,#}
|
|
||||||
{# 'searchable': false,#}
|
|
||||||
{# 'orderable': false,#}
|
|
||||||
{# 'className': 'dt-body-center',#}
|
|
||||||
{# 'render': function (data, type, full, meta) {#}
|
|
||||||
{# return '<input type="radio" name="user_id" value="' + $('<div/>').text(data).html() + '">';#}
|
|
||||||
{# }#}
|
|
||||||
{# },#}
|
|
||||||
{# {#}
|
|
||||||
{# 'targets': 1,#}
|
|
||||||
{# 'orderable': true,#}
|
|
||||||
{# },#}
|
|
||||||
{# {#}
|
|
||||||
{# 'targets': 2,#}
|
|
||||||
{# 'orderable': true,#}
|
|
||||||
{# },#}
|
|
||||||
{# {#}
|
|
||||||
{# 'targets': 3,#}
|
|
||||||
{# 'orderable': true,#}
|
|
||||||
{# }#}
|
|
||||||
{# ],#}
|
|
||||||
{# 'order': [[1, 'asc']]#}
|
|
||||||
{# });#}
|
|
||||||
{#});#}
|
|
||||||
{#</script>#}
|
|
||||||
{% endblock %}
|
|
||||||
@@ -101,9 +101,11 @@ def catalogs():
|
|||||||
@document_bp.route('/handle_catalog_selection', methods=['POST'])
|
@document_bp.route('/handle_catalog_selection', methods=['POST'])
|
||||||
@roles_accepted('Super User', 'Tenant Admin')
|
@roles_accepted('Super User', 'Tenant Admin')
|
||||||
def handle_catalog_selection():
|
def handle_catalog_selection():
|
||||||
|
action = request.form['action']
|
||||||
|
if action == 'create_catalog':
|
||||||
|
return redirect(prefixed_url_for('document_bp.catalog'))
|
||||||
catalog_identification = request.form.get('selected_row')
|
catalog_identification = request.form.get('selected_row')
|
||||||
catalog_id = ast.literal_eval(catalog_identification).get('value')
|
catalog_id = ast.literal_eval(catalog_identification).get('value')
|
||||||
action = request.form['action']
|
|
||||||
catalog = Catalog.query.get_or_404(catalog_id)
|
catalog = Catalog.query.get_or_404(catalog_id)
|
||||||
|
|
||||||
if action == 'set_session_catalog':
|
if action == 'set_session_catalog':
|
||||||
@@ -248,9 +250,11 @@ def processors():
|
|||||||
@document_bp.route('/handle_processor_selection', methods=['POST'])
|
@document_bp.route('/handle_processor_selection', methods=['POST'])
|
||||||
@roles_accepted('Super User', 'Tenant Admin')
|
@roles_accepted('Super User', 'Tenant Admin')
|
||||||
def handle_processor_selection():
|
def handle_processor_selection():
|
||||||
|
action = request.form['action']
|
||||||
|
if action == 'create_processor':
|
||||||
|
return redirect(prefixed_url_for('document_bp.processor'))
|
||||||
processor_identification = request.form.get('selected_row')
|
processor_identification = request.form.get('selected_row')
|
||||||
processor_id = ast.literal_eval(processor_identification).get('value')
|
processor_id = ast.literal_eval(processor_identification).get('value')
|
||||||
action = request.form['action']
|
|
||||||
|
|
||||||
if action == 'edit_processor':
|
if action == 'edit_processor':
|
||||||
return redirect(prefixed_url_for('document_bp.edit_processor', processor_id=processor_id))
|
return redirect(prefixed_url_for('document_bp.edit_processor', processor_id=processor_id))
|
||||||
@@ -359,9 +363,11 @@ def retrievers():
|
|||||||
@document_bp.route('/handle_retriever_selection', methods=['POST'])
|
@document_bp.route('/handle_retriever_selection', methods=['POST'])
|
||||||
@roles_accepted('Super User', 'Tenant Admin')
|
@roles_accepted('Super User', 'Tenant Admin')
|
||||||
def handle_retriever_selection():
|
def handle_retriever_selection():
|
||||||
|
action = request.form['action']
|
||||||
|
if action == 'create_retriever':
|
||||||
|
return redirect(prefixed_url_for('document_bp.retriever'))
|
||||||
retriever_identification = request.form.get('selected_row')
|
retriever_identification = request.form.get('selected_row')
|
||||||
retriever_id = ast.literal_eval(retriever_identification).get('value')
|
retriever_id = ast.literal_eval(retriever_identification).get('value')
|
||||||
action = request.form['action']
|
|
||||||
|
|
||||||
if action == 'edit_retriever':
|
if action == 'edit_retriever':
|
||||||
return redirect(prefixed_url_for('document_bp.edit_retriever', retriever_id=retriever_id))
|
return redirect(prefixed_url_for('document_bp.edit_retriever', retriever_id=retriever_id))
|
||||||
|
|||||||
@@ -70,12 +70,14 @@ def view_license_tiers():
|
|||||||
@entitlements_bp.route('/handle_license_tier_selection', methods=['POST'])
|
@entitlements_bp.route('/handle_license_tier_selection', methods=['POST'])
|
||||||
@roles_required('Super User')
|
@roles_required('Super User')
|
||||||
def handle_license_tier_selection():
|
def handle_license_tier_selection():
|
||||||
|
action = request.form['action']
|
||||||
|
if action == 'create_license_tier':
|
||||||
|
return redirect(prefixed_url_for('entitlements_bp.license_tier'))
|
||||||
|
|
||||||
license_tier_identification = request.form['selected_row']
|
license_tier_identification = request.form['selected_row']
|
||||||
license_tier_id = ast.literal_eval(license_tier_identification).get('value')
|
license_tier_id = ast.literal_eval(license_tier_identification).get('value')
|
||||||
the_license_tier = LicenseTier.query.get(license_tier_id)
|
the_license_tier = LicenseTier.query.get(license_tier_id)
|
||||||
|
|
||||||
action = request.form['action']
|
|
||||||
|
|
||||||
match action:
|
match action:
|
||||||
case 'edit_license_tier':
|
case 'edit_license_tier':
|
||||||
return redirect(prefixed_url_for('entitlements_bp.edit_license_tier',
|
return redirect(prefixed_url_for('entitlements_bp.edit_license_tier',
|
||||||
|
|||||||
@@ -294,9 +294,12 @@ def specialists():
|
|||||||
@interaction_bp.route('/handle_specialist_selection', methods=['POST'])
|
@interaction_bp.route('/handle_specialist_selection', methods=['POST'])
|
||||||
@roles_accepted('Super User', 'Tenant Admin')
|
@roles_accepted('Super User', 'Tenant Admin')
|
||||||
def handle_specialist_selection():
|
def handle_specialist_selection():
|
||||||
|
action = request.form.get('action')
|
||||||
|
if action == 'create_specialist':
|
||||||
|
return redirect(prefixed_url_for('interaction_bp.specialist'))
|
||||||
|
|
||||||
specialist_identification = request.form.get('selected_row')
|
specialist_identification = request.form.get('selected_row')
|
||||||
specialist_id = ast.literal_eval(specialist_identification).get('value')
|
specialist_id = ast.literal_eval(specialist_identification).get('value')
|
||||||
action = request.form.get('action')
|
|
||||||
|
|
||||||
if action == "edit_specialist":
|
if action == "edit_specialist":
|
||||||
return redirect(prefixed_url_for('interaction_bp.edit_specialist', specialist_id=specialist_id))
|
return redirect(prefixed_url_for('interaction_bp.edit_specialist', specialist_id=specialist_id))
|
||||||
|
|||||||
@@ -219,6 +219,10 @@ def select_tenant():
|
|||||||
@user_bp.route('/handle_tenant_selection', methods=['POST'])
|
@user_bp.route('/handle_tenant_selection', methods=['POST'])
|
||||||
@roles_required('Super User')
|
@roles_required('Super User')
|
||||||
def handle_tenant_selection():
|
def handle_tenant_selection():
|
||||||
|
action = request.form['action']
|
||||||
|
if action == 'create_tenant':
|
||||||
|
return redirect(prefixed_url_for('user_bp.tenant'))
|
||||||
|
|
||||||
tenant_identification = request.form['selected_row']
|
tenant_identification = request.form['selected_row']
|
||||||
tenant_id = ast.literal_eval(tenant_identification).get('value')
|
tenant_id = ast.literal_eval(tenant_identification).get('value')
|
||||||
the_tenant = Tenant.query.get(tenant_id)
|
the_tenant = Tenant.query.get(tenant_id)
|
||||||
@@ -231,8 +235,6 @@ def handle_tenant_selection():
|
|||||||
session.pop('catalog_id', None)
|
session.pop('catalog_id', None)
|
||||||
session.pop('catalog_name', None)
|
session.pop('catalog_name', None)
|
||||||
|
|
||||||
action = request.form['action']
|
|
||||||
|
|
||||||
match action:
|
match action:
|
||||||
case 'view_users':
|
case 'view_users':
|
||||||
return redirect(prefixed_url_for('user_bp.view_users', tenant_id=tenant_id))
|
return redirect(prefixed_url_for('user_bp.view_users', tenant_id=tenant_id))
|
||||||
@@ -269,10 +271,13 @@ def view_users():
|
|||||||
@user_bp.route('/handle_user_action', methods=['POST'])
|
@user_bp.route('/handle_user_action', methods=['POST'])
|
||||||
@roles_accepted('Super User', 'Tenant Admin')
|
@roles_accepted('Super User', 'Tenant Admin')
|
||||||
def handle_user_action():
|
def handle_user_action():
|
||||||
|
action = request.form['action']
|
||||||
|
if action == 'create_user':
|
||||||
|
return redirect(prefixed_url_for('user_bp.user'))
|
||||||
|
|
||||||
user_identification = request.form['selected_row']
|
user_identification = request.form['selected_row']
|
||||||
user_id = ast.literal_eval(user_identification).get('value')
|
user_id = ast.literal_eval(user_identification).get('value')
|
||||||
user = User.query.get_or_404(user_id)
|
user = User.query.get_or_404(user_id)
|
||||||
action = request.form['action']
|
|
||||||
|
|
||||||
if action == 'edit_user':
|
if action == 'edit_user':
|
||||||
return redirect(prefixed_url_for('user_bp.edit_user', user_id=user_id))
|
return redirect(prefixed_url_for('user_bp.edit_user', user_id=user_id))
|
||||||
@@ -311,9 +316,12 @@ def view_tenant_domains():
|
|||||||
@user_bp.route('/handle_tenant_domain_action', methods=['POST'])
|
@user_bp.route('/handle_tenant_domain_action', methods=['POST'])
|
||||||
@roles_accepted('Super User', 'Tenant Admin')
|
@roles_accepted('Super User', 'Tenant Admin')
|
||||||
def handle_tenant_domain_action():
|
def handle_tenant_domain_action():
|
||||||
|
action = request.form['action']
|
||||||
|
if action == 'create_tenant_domain':
|
||||||
|
return redirect(prefixed_url_for('user_bp.tenant_domain'))
|
||||||
|
|
||||||
tenant_domain_identification = request.form['selected_row']
|
tenant_domain_identification = request.form['selected_row']
|
||||||
tenant_domain_id = ast.literal_eval(tenant_domain_identification).get('value')
|
tenant_domain_id = ast.literal_eval(tenant_domain_identification).get('value')
|
||||||
action = request.form['action']
|
|
||||||
|
|
||||||
if action == 'edit_tenant_domain':
|
if action == 'edit_tenant_domain':
|
||||||
return redirect(prefixed_url_for('user_bp.edit_tenant_domain', tenant_domain_id=tenant_domain_id))
|
return redirect(prefixed_url_for('user_bp.edit_tenant_domain', tenant_domain_id=tenant_domain_id))
|
||||||
@@ -462,9 +470,11 @@ def tenant_projects():
|
|||||||
@user_bp.route('/handle_tenant_project_selection', methods=['POST'])
|
@user_bp.route('/handle_tenant_project_selection', methods=['POST'])
|
||||||
@roles_accepted('Super User', 'Tenant Admin')
|
@roles_accepted('Super User', 'Tenant Admin')
|
||||||
def handle_tenant_project_selection():
|
def handle_tenant_project_selection():
|
||||||
|
action = request.form.get('action')
|
||||||
|
if action == 'create_tenant_project':
|
||||||
|
return redirect(prefixed_url_for('user_bp.tenant_project'))
|
||||||
tenant_project_identification = request.form.get('selected_row')
|
tenant_project_identification = request.form.get('selected_row')
|
||||||
tenant_project_id = ast.literal_eval(tenant_project_identification).get('value')
|
tenant_project_id = ast.literal_eval(tenant_project_identification).get('value')
|
||||||
action = request.form.get('action')
|
|
||||||
tenant_project = TenantProject.query.get_or_404(tenant_project_id)
|
tenant_project = TenantProject.query.get_or_404(tenant_project_id)
|
||||||
|
|
||||||
if action == 'edit_tenant_project':
|
if action == 'edit_tenant_project':
|
||||||
|
|||||||
@@ -228,6 +228,12 @@ input[type="radio"] {
|
|||||||
color: var(--bs-white) !important;
|
color: var(--bs-white) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-success {
|
||||||
|
background-color: var(--bs-warning) !important;
|
||||||
|
border-color: var(--bs-warning) !important;
|
||||||
|
color: var(--bs-white) !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Adjust the form group margin */
|
/* Adjust the form group margin */
|
||||||
.form-group {
|
.form-group {
|
||||||
margin-top: 1.5rem; /* Adjust for better spacing */
|
margin-top: 1.5rem; /* Adjust for better spacing */
|
||||||
|
|||||||
Reference in New Issue
Block a user