Update: Js 4 Log.html 80%
This commit is contained in:
@@ -210,7 +210,106 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block modals %}
|
||||
<!-- 日志详情模态框将在此处定义 -->
|
||||
<!-- [MODIFIED] 日志系统参数管理模态框 -->
|
||||
<div id="log-settings-modal" class="modal-overlay hidden">
|
||||
<div class="modal-panel max-w-2xl max-h-[90vh]">
|
||||
<!-- Header -->
|
||||
<div class="modal-header shrink-0">
|
||||
<h2 id="log-settings-modal-title" class="modal-title">日志系统参数管理</h2>
|
||||
<button data-modal-close="log-settings-modal" class="modal-close-btn">
|
||||
<i class="fas fa-times text-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Form Body -->
|
||||
<div class="modal-body flex-grow overflow-y-auto pr-4 -mr-4">
|
||||
<div class="space-y-6">
|
||||
|
||||
<!-- 1. 系统日志级别 (修改为单行) -->
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<label for="log-level-select" class="flex items-center modal-label font-semibold">
|
||||
<span>系统日志级别</span>
|
||||
<i class="fas fa-question-circle tooltip-icon" data-tooltip-text="设置后台服务的日志输出详细程度。DEBUG最详细,ERROR最精简。更改后实时生效。"></i>
|
||||
</label>
|
||||
<p class="modal-label-description">控制后台系统日志的输出级别。</p>
|
||||
</div>
|
||||
<select id="log-level-select" class="modal-input w-40">
|
||||
<option value="DEBUG">DEBUG (调试)</option>
|
||||
<option value="INFO">INFO (信息)</option>
|
||||
<option value="WARNING">WARNING (警告)</option>
|
||||
<option value="ERROR">ERROR (错误)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 2. 请求日志自动清理 (修改为单行和新组件) -->
|
||||
<div class="border-t border-border pt-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<label for="log-cleanup-enable" class="modal-label flex-grow flex items-center font-semibold">
|
||||
<span>开启请求日志自动清理</span>
|
||||
<i class="fas fa-question-circle tooltip-icon" data-tooltip-text="启用后,系统将按计划自动删除旧的请求日志,以节省存储空间。"></i>
|
||||
</label>
|
||||
<p class="modal-label-description">定期清理超时的请求日志记录。</p>
|
||||
</div>
|
||||
<div class="relative inline-block w-10 mr-2 align-middle select-none transition duration-200 ease-in">
|
||||
<input type="checkbox" name="log-cleanup-enable" id="log-cleanup-enable" class="toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer">
|
||||
<label for="log-cleanup-enable" class="toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 cursor-pointer"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Collapsible settings for cleanup -->
|
||||
<div id="log-cleanup-settings" class="mt-4 hidden">
|
||||
<div class="flex items-center justify-between">
|
||||
<label class="flex items-center modal-label">
|
||||
<span>日志保留天数</span>
|
||||
<i class="fas fa-question-circle tooltip-icon" data-tooltip-text="只保留最近 N 天的日志,早于此时间的日志将被删除。"></i>
|
||||
</label>
|
||||
<div id="retention-days-group" class="flex items-center space-x-2">
|
||||
<button type="button" data-days="1" class="modal-btn modal-btn-secondary px-3 py-1 text-sm">1天</button>
|
||||
<button type="button" data-days="7" class="modal-btn modal-btn-secondary px-3 py-1 text-sm">7天</button>
|
||||
<button type="button" data-days="30" class="modal-btn modal-btn-secondary px-3 py-1 text-sm">30天</button>
|
||||
<input type="number" id="log-cleanup-retention-days" class="modal-input w-28" placeholder="自定义天数">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- [NEW] 每日清理执行时间 -->
|
||||
<div class="flex items-center justify-between">
|
||||
<label class="flex items-center modal-label">
|
||||
<span>每日清理执行时间</span>
|
||||
<i class="fas fa-question-circle tooltip-icon" data-tooltip-text="自动清理任务在每天的这个时间点执行(基于服务器的UTC时间)。"></i>
|
||||
</label>
|
||||
<input type="time" id="log-cleanup-exec-time" class="modal-input w-28">
|
||||
</div>
|
||||
|
||||
<!-- 3. 日志备份 (待定) -->
|
||||
<div class="border-t border-border pt-6 opacity-50">
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<label for="log-backup-enable" class="modal-label flex-grow flex items-center font-semibold">
|
||||
<span>开启日志自动备份 (功能待定)</span>
|
||||
<i class="fas fa-question-circle tooltip-icon" data-tooltip-text="此功能正在开发中。启用后,系统可将日志备份到指定位置。"></i>
|
||||
</label>
|
||||
<p class="modal-label-description">将系统和请求日志备份到指定路径。</p>
|
||||
</div>
|
||||
<div class="relative inline-block w-10 mr-2 align-middle select-none transition duration-200 ease-in">
|
||||
<input type="checkbox" name="log-backup-enable" id="log-backup-enable" class="toggle-checkbox" disabled>
|
||||
<label for="log-backup-enable" class="toggle-label"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="modal-footer shrink-0">
|
||||
<button data-modal-close="log-settings-modal" class="modal-btn modal-btn-secondary">取消</button>
|
||||
<button id="log-settings-save-btn" class="modal-btn modal-btn-primary">保存设置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock modals %}
|
||||
|
||||
{% block page_scripts %}
|
||||
|
||||
Reference in New Issue
Block a user