stream-fusion-better/stream_fusion/static/admin/config_cache.html
LimeDrive 2a175242a7 feat(admin): add dynamic settings management system with new UI
Introduce a comprehensive settings management system that allows runtime
configuration through a new admin interface. The system includes:

- Database-backed settings with Redis caching for performance
- Settings registry defining types, defaults, and categories
- New admin UI with navigation cards and dedicated sub-pages for each category
  (general, cache, indexers, proxy, system, TMDB)
- Shared view logic for consistent GET/POST handling across sub-pages
- Automatic seeding of defaults and application of overrides at startup
- Validation and type coercion for setting values

The previous static configuration page has been replaced with a modular,
category-based interface that provides better organization and extensibility
for future configuration needs.
2026-04-02 13:09:53 +02:00

43 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% from "_config_macros.html" import render_field, save_button, save_feedback, save_script, config_breadcrumb %}
{% block title %}Cache & Scheduler — Configuration — StreamFusion Admin{% endblock %}
{% block page_title %}Configuration — Cache & Scheduler{% endblock %}
{% block extra_head %}
<style>
.cfg-card { border: 1px solid var(--bs-border-color); border-radius: 10px; background: var(--bs-secondary-bg); overflow: hidden; margin-bottom: 1.25rem; }
.cfg-card-header { padding: 13px 20px; border-bottom: 1px solid var(--bs-border-color); font-weight: 600; font-size: 0.875rem; display: flex; align-items: center; gap: 8px; }
.cfg-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; border-bottom: 1px solid var(--bs-border-color); gap: 12px; font-size: 0.83rem; min-height: 40px; }
.cfg-row:last-child { border-bottom: none; }
.cfg-label { color: var(--bs-secondary-color); flex-shrink: 0; }
.cfg-value { font-weight: 500; text-align: right; }
</style>
{% endblock %}
{% block content %}
{{ config_breadcrumb('Cache & Scheduler') }}
{{ save_feedback() }}
<form id="cfg-form" method="POST">
<div class="cfg-card">
<div class="cfg-card-header"><i class="bi bi-hdd-stack text-danger"></i> Cache Redis</div>
{% for defn in registry_sections.get('cache', []) %}
{{ render_field(defn, effective) }}
{% endfor %}
</div>
<div class="cfg-card">
<div class="cfg-card-header"><i class="bi bi-clock-history text-primary"></i> Planificateur de nettoyage</div>
{% for defn in registry_sections.get('scheduler', []) %}
{{ render_field(defn, effective) }}
{% endfor %}
</div>
{{ save_button(url_for('config_cache_reset')(request)) }}
</form>
{% endblock %}
{% block extra_scripts %}
{{ save_script('cfg-form', url_for('config_cache_post')(request), url_for('config_cache_reset')(request)) }}
{% endblock %}