Implement boxes management module with auto-numbered box creation
- Add boxes_crates database table with BIGINT IDs and 8-digit auto-numbered box_numbers - Implement boxes CRUD operations (add, edit, update, delete, delete_multiple) - Create boxes route handlers with POST actions for all operations - Add boxes.html template with 3-panel layout matching warehouse locations module - Implement barcode generation and printing with JsBarcode and QZ Tray integration - Add browser print fallback for when QZ Tray is not available - Simplify create box form to single button with auto-generation - Fix JavaScript null reference errors with proper element validation - Convert tuple data to dictionaries for Jinja2 template compatibility - Register boxes blueprint in Flask app initialization
This commit is contained in:
87
app/templates/modules/settings/view_log.html
Normal file
87
app/templates/modules/settings/view_log.html
Normal file
@@ -0,0 +1,87 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}View Log - Settings{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid py-4">
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<h1 class="mb-0">
|
||||
<i class="fas fa-file-alt"></i> {{ log_data.filename }}
|
||||
</h1>
|
||||
<p class="text-muted mb-0"><small>Size: {{ log_data.size_mb }} MB | Modified: {{ log_data.modified_at }}</small></p>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ url_for('settings.logs_explorer') }}" class="btn btn-secondary">
|
||||
<i class="fas fa-arrow-left"></i> Back
|
||||
</a>
|
||||
<a href="{{ url_for('settings.download_log', filename=log_data.filename) }}" class="btn btn-success">
|
||||
<i class="fas fa-download"></i> Download
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- File Info -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<p class="mb-0"><strong>File Size:</strong></p>
|
||||
<p class="text-muted">{{ log_data.size_mb }} MB</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="mb-0"><strong>Total Lines:</strong></p>
|
||||
<p class="text-muted">{{ log_data.total_lines|default(0) }}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="mb-0"><strong>Displayed Lines:</strong></p>
|
||||
<p class="text-muted">{{ log_data.displayed_lines|default(0) }}</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p class="mb-0"><strong>Last Modified:</strong></p>
|
||||
<p class="text-muted">{{ log_data.modified_at }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% if log_data.truncated %}
|
||||
<div class="alert alert-info mb-0">
|
||||
<i class="fas fa-info-circle"></i> Showing last {{ log_data.displayed_lines }} lines of {{ log_data.total_lines }} total lines.
|
||||
<a href="{{ url_for('settings.view_log', filename=log_data.filename, lines='') }}">View all lines</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Log Content -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header bg-light">
|
||||
<h5 class="mb-0"><i class="fas fa-align-left"></i> Log Content</h5>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<pre class="mb-0" style="background-color: #f8f9fa; padding: 15px; border-radius: 0 0 4px 4px; max-height: 600px; overflow-y: auto;">{{ log_data.content }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
pre {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
color: #333;
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user