96 lines
5.4 KiB
Django/Jinja
96 lines
5.4 KiB
Django/Jinja
<!-- General Configuration Tab -->
|
|
<div class="tab-pane active">
|
|
<div class="config-form">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5>General Configuration</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<!-- include flash messages template -->
|
|
{% include "partials/flash_messages.html.jinja" %}
|
|
|
|
<div class="row">
|
|
<!-- General Settings Column -->
|
|
<div class="col-md-6">
|
|
<form action="{{ url_for('config.update_general') }}" method="post">
|
|
<div class="form-section">
|
|
<h6>Scraper Volume</h6>
|
|
<p class="text-muted">Configure the total number of papers to scrape per day.</p>
|
|
|
|
<div class="mb-3">
|
|
<label for="totalVolume" class="form-label">Papers per day:</label>
|
|
<input type="number" class="form-control" id="totalVolume" name="total_volume"
|
|
min="1" max="{{ max_volume }}" value="{{ volume_config.volume }}" required>
|
|
<div class="form-text">Enter a value between 1 and {{ max_volume }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-section">
|
|
<h6>Download Path</h6>
|
|
<p class="text-muted">Base directory where scraped paper files will be stored.</p>
|
|
<div class="mb-3">
|
|
<label for="downloadPath" class="form-label">Download Directory:</label>
|
|
<input type="text" class="form-control" id="downloadPath" name="download_path"
|
|
value="{{ download_path_config.path }}" required>
|
|
<div class="form-text">Enter the full path to the download directory (e.g.,
|
|
/data/papers).
|
|
Ensure the directory exists and the application has write permissions.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-section">
|
|
<h6>System Settings</h6>
|
|
<p class="text-muted">Configure general system behavior.</p>
|
|
|
|
<div class="mb-3 form-check">
|
|
<input type="checkbox" class="form-check-input" id="enableNotifications" checked>
|
|
<label class="form-check-label" for="enableNotifications">
|
|
Enable email notifications
|
|
</label>
|
|
</div>
|
|
|
|
<div class="mb-3 form-check">
|
|
<input type="checkbox" class="form-check-input" id="enableLogging" checked>
|
|
<label class="form-check-label" for="enableLogging">
|
|
Enable detailed activity logging
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary">Save General Settings</button>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Scraper Module Column -->
|
|
<div class="col-md-6">
|
|
<form method="post" action="{{ url_for('config.update_scraper_module') }}">
|
|
<div class="form-section">
|
|
<h6>Scraper Module</h6>
|
|
<p class="text-muted">Select which scraper module to use for processing papers.</p>
|
|
|
|
<div class="mb-3">
|
|
<label for="scraper_module" class="form-label">Active Scraper Module:</label>
|
|
<select class="form-control" id="scraper_module" name="scraper_module">
|
|
{% for module in available_scraper_modules %}
|
|
<option value="{{ module }}" {% if module==current_scraper_module %} selected
|
|
{%endif %}>
|
|
{{ module }}
|
|
{% if scraper_details[module] %}
|
|
- {{ scraper_details[module].description[:50] }}...
|
|
{% endif %}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
<div class="form-text">
|
|
Current module: <strong>{{ current_scraper_module }}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Update Scraper Module</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |