{% extends "base.html" %} {% block title %}多实例管理 - Squid Manager{% endblock %} {% block content %}

在数据库中保存多个 Squid 实例。切换"当前活动实例"后,所有配置、日志、服务控制页面都会基于该实例的路径与服务名。
当前活动实例: {{ active_instance_name }} {% if active %}(ID #{{ active.id }}){% endif %}

{# -------- add new instance form (hidden by default) -------- #} {# -------- existing instances table -------- #}

📋 已配置实例 ({{ instances|length }})

{% if not instances %}

尚未配置任何实例。点击右上角"添加实例"开始。

{% else %}
{% for inst in instances %} {% set is_current = (active and active.id == inst.id) %} {% endfor %}
名称 描述 主机 配置文件 access.log 状态 操作
{% if inst.is_local %} 本地 {% else %} {{ inst.ssh_host or '?' }}:{{ inst.ssh_port }} ({{ inst.ssh_user or '?' }}) {% endif %} {{ inst.squid_conf_path }} {{ inst.access_log_path }} {% if is_current %} ★ 当前活动 {% elif inst.is_active %} 默认 {% else %} {% endif %} {% if not is_current %} {% endif %} 🔍 测试
{# hidden checkbox used by /instances/save to set the active row #} {% if not is_current %} {% endif %}
提示: 表格中可编辑名称/描述/路径。修改后点击"保存所有修改"。
{% endif %}

ℹ️ 说明

{% endblock %}