-
<%:Start%>
-
<%:Stop%>
-
<%:Restart%>
+<%
+if container_running then
+ local port = util.trim(util.exec("/usr/libexec/istorec/hermes.sh port"))
+ if port == "" then
+ port = "8787"
+ end
+-%>
+
-
-
+<% end %>
diff --git a/luci-app-hermes/luasrc/view/hermes/terminal.htm b/luci-app-hermes/luasrc/view/hermes/terminal.htm
deleted file mode 100644
index 99e16d49a..000000000
--- a/luci-app-hermes/luasrc/view/hermes/terminal.htm
+++ /dev/null
@@ -1,62 +0,0 @@
-<%#
- luci-app-hermes — Config Terminal (18.06 compat)
--%>
-<%+header%>
-<%
-local uci = require "luci.model.uci".cursor()
-local pty_port = uci:get("hermes", "main", "pty_port") or "3001"
-%>
-
-
-
-
⌨️ <%:Config Terminal%>
-
<%:Interactive terminal for Hermes Agent configuration — AI models, health check, and system management.%>
-
-
-
-
⏳ <%:Connecting to config terminal...%>
-
-
-
-<%+footer%>
diff --git a/luci-app-hermes/po/zh-cn/hermes.po b/luci-app-hermes/po/zh-cn/hermes.po
new file mode 100644
index 000000000..2fbe0b8a4
--- /dev/null
+++ b/luci-app-hermes/po/zh-cn/hermes.po
@@ -0,0 +1,44 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8"
+
+msgid "Official website:"
+msgstr "官方网站:"
+
+msgid "Hermes"
+msgstr "Hermes 消息服务"
+
+msgid "The self-improving AI agent that runs on your server. Layered memory that accumulates across sessions, a cron scheduler that fires while you're offline, and a skills system that saves reusable procedures automatically."
+msgstr "运行在您的服务器上的自我改进型人工智能代理。它采用跨会话累积的分层内存、在您离线时运行的定时任务调度程序,以及自动保存可重用程序的技能系统。"
+
+msgid "Port"
+msgstr "端口"
+
+msgid "Data path"
+msgstr "数据路径"
+
+msgid "Workspace path"
+msgstr "工作目录路径"
+
+msgid "Service Status"
+msgstr "服务状态"
+
+msgid "Hermes status:"
+msgstr "Hermes 状态信息如下:"
+
+msgid "Setup"
+msgstr "安装配置"
+
+msgid "The following parameters will only take effect during installation or upgrade:"
+msgstr "以下参数只在安装或者升级时才会生效:"
+
+msgid "Status"
+msgstr "状态"
+
+msgid "Hermes is running"
+msgstr "Hermes 运行中"
+
+msgid "Hermes is not running"
+msgstr "Hermes 未运行"
+
+msgid "Open Hermes"
+msgstr "打开 Hermes"
diff --git a/luci-app-hermes/po/zh_Hans b/luci-app-hermes/po/zh_Hans
new file mode 120000
index 000000000..41451e4a1
--- /dev/null
+++ b/luci-app-hermes/po/zh_Hans
@@ -0,0 +1 @@
+zh-cn
\ No newline at end of file
diff --git a/luci-app-hermes/po/zh_Hans/hermes.po b/luci-app-hermes/po/zh_Hans/hermes.po
deleted file mode 100644
index 607c599d6..000000000
--- a/luci-app-hermes/po/zh_Hans/hermes.po
+++ /dev/null
@@ -1,257 +0,0 @@
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: luci-app-hermes\n"
-"Language: zh_Hans\n"
-
-msgid "Active Model"
-msgstr "活跃模型"
-
-msgid "All Interfaces"
-msgstr "所有接口"
-
-msgid "API Endpoint"
-msgstr "API 端点"
-
-msgid "API Key"
-msgstr "API 密钥"
-
-msgid "API Settings"
-msgstr "API 设置"
-
-msgid "Already up to date"
-msgstr "已是最新版本"
-
-msgid "Basic Settings"
-msgstr "基本设置"
-
-msgid "Cancel"
-msgstr "取消"
-
-msgid "Check Update"
-msgstr "检查更新"
-
-msgid "Checking..."
-msgstr "检查中..."
-
-msgid "Complete"
-msgstr "完成"
-
-msgid "Config PTY"
-msgstr "配置终端"
-
-msgid "Config Terminal"
-msgstr "配置终端"
-
-msgid "Config terminal is not running."
-msgstr "配置终端未运行。"
-
-msgid "Confirm Uninstall"
-msgstr "确认卸载"
-
-msgid "Connecting..."
-msgstr "正在连接..."
-
-msgid "Connecting to config terminal..."
-msgstr "正在连接配置终端..."
-
-msgid "Default: 3000"
-msgstr "默认: 3000"
-
-msgid "Default: 3001"
-msgstr "默认: 3001"
-
-msgid "Disabled"
-msgstr "已禁用"
-
-msgid "Enable Service"
-msgstr "启用服务"
-
-msgid "Environment uninstalled successfully"
-msgstr "环境已成功卸载"
-
-msgid "Error: "
-msgstr "错误:"
-
-msgid "Executing: "
-msgstr "正在执行:"
-
-msgid "Failed"
-msgstr "失败"
-
-msgid "Failed to check status"
-msgstr "检查状态失败"
-
-msgid "Gateway Port"
-msgstr "网关端口"
-
-msgid "Gateway is not running. Please start the service first."
-msgstr "网关未运行。请先启动服务。"
-
-msgid "Hermes"
-msgstr "Hermes"
-
-msgid "Hermes Agent"
-msgstr "Hermes Agent"
-
-msgid "Hermes Agent Web UI — configure AI models and interact with the AI agent."
-msgstr "Hermes Agent Web UI — 配置 AI 模型并与 AI 代理交互。"
-
-msgid "Install"
-msgstr "安装"
-
-msgid "Install Environment"
-msgstr "安装环境"
-
-msgid "Installation failed. Check the log above for details."
-msgstr "安装失败,请查看上方日志了解详情。"
-
-msgid "Installation successful!"
-msgstr "安装成功!"
-
-msgid "Installing..."
-msgstr "安装中..."
-
-msgid "Interactive terminal for Hermes Agent configuration — AI models, health check, and system management."
-msgstr "Hermes Agent 交互式终端 — AI 模型配置、健康检查和系统管理。"
-
-msgid "Listen Interface"
-msgstr "监听接口"
-
-msgid "Log"
-msgstr "日志"
-
-msgid "Memory"
-msgstr "内存"
-
-msgid "Model"
-msgstr "模型"
-
-msgid "More"
-msgstr "更多"
-
-msgid "Not installed"
-msgstr "未安装"
-
-msgid "Overview"
-msgstr "概览"
-
-msgid "PID"
-msgstr "进程号"
-
-msgid "Plugin"
-msgstr "插件"
-
-msgid "Please start the Hermes service first."
-msgstr "请先启动 Hermes 服务。"
-
-msgid "Please start the service first."
-msgstr "请先启动服务。"
-
-msgid "Python"
-msgstr "Python"
-
-msgid "Python AI Agent Gateway for OpenWrt"
-msgstr "OpenWrt 路由器 Python AI 代理网关"
-
-msgid "Python-based AI Agent Gateway for OpenWrt routers."
-msgstr "基于 Python 的 OpenWrt 路由器 AI 代理网关。"
-
-msgid "PTY Port"
-msgstr "终端端口"
-
-msgid "Refresh"
-msgstr "刷新"
-
-msgid "Refresh the page to see updated status."
-msgstr "刷新页面查看最新状态。"
-
-msgid "Requires internet connection and sufficient disk space (~100MB)."
-msgstr "需要互联网连接和足够的磁盘空间(约100MB)。"
-
-msgid "Reset"
-msgstr "重置"
-
-msgid "Restart"
-msgstr "重启"
-
-msgid "Running"
-msgstr "运行中"
-
-msgid "Save & Apply"
-msgstr "保存并应用"
-
-msgid "Service Control"
-msgstr "服务控制"
-
-msgid "Service Status"
-msgstr "服务状态"
-
-msgid "Settings"
-msgstr "设置"
-
-msgid "Settings saved successfully"
-msgstr "设置已保存"
-
-msgid "Start"
-msgstr "启动"
-
-msgid "Starting"
-msgstr "启动中"
-
-msgid "Starting installation"
-msgstr "开始安装"
-
-msgid "Stop"
-msgstr "停止"
-
-msgid "Stopped"
-msgstr "已停止"
-
-msgid "System Information"
-msgstr "系统信息"
-
-msgid "This action cannot be undone."
-msgstr "此操作不可撤销。"
-
-msgid "This will remove Python, Hermes Agent, and all related data."
-msgstr "这将移除 Python、Hermes Agent 和所有相关数据。"
-
-msgid "This will install Python 3 and Hermes Agent via pip."
-msgstr "这将通过 pip 安装 Python 3 和 Hermes Agent。"
-
-msgid "Uninstall"
-msgstr "卸载"
-
-msgid "Uninstalling..."
-msgstr "正在卸载..."
-
-msgid "Unknown"
-msgstr "未知"
-
-msgid "Update Available"
-msgstr "有可用更新"
-
-msgid "Upgrade"
-msgstr "升级"
-
-msgid "Upgrade complete"
-msgstr "升级完成"
-
-msgid "Upgrade successful!"
-msgstr "升级成功!"
-
-msgid "Upgrading to "
-msgstr "正在升级到 "
-
-msgid "Upgrading..."
-msgstr "升级中..."
-
-msgid "Uptime"
-msgstr "运行时间"
-
-msgid "Web Console"
-msgstr "Web 控制台"
-
-msgid "Web console is not available."
-msgstr "Web 控制台不可用。"
diff --git a/luci-app-hermes/root/etc/config/hermes b/luci-app-hermes/root/etc/config/hermes
index 87a14ad2b..3472a9aad 100644
--- a/luci-app-hermes/root/etc/config/hermes
+++ b/luci-app-hermes/root/etc/config/hermes
@@ -1,10 +1,4 @@
-config hermes 'main'
- option enabled '0'
- option port '3000'
- option bind 'lan'
- option api_endpoint ''
- option api_key ''
- option model ''
- option pty_port '3001'
- option token ''
- option pty_token ''
+config main
+ option 'port' '8787'
+ option 'data_path' ''
+ option 'workspace_path' ''
diff --git a/luci-app-hermes/root/etc/init.d/hermes b/luci-app-hermes/root/etc/init.d/hermes
deleted file mode 100755
index 21110aef6..000000000
--- a/luci-app-hermes/root/etc/init.d/hermes
+++ /dev/null
@@ -1,419 +0,0 @@
-#!/bin/sh /etc/rc.common
-# luci-app-hermes — procd init script
-
-USE_PROCD=1
-START=99
-STOP=10
-
-EXTRA_COMMANDS="setup status_service restart_gateway"
-EXTRA_HELP=" setup Install Python and Hermes Agent
- status_service Show service status
- restart_gateway Restart only Gateway instance (does not affect Web PTY)"
-
-HERMES_BASE="/opt/hermes"
-HERMES_VENV="${HERMES_BASE}/venv"
-HERMES_DATA="${HERMES_BASE}/data"
-HERMES_CONFIG="${HERMES_DATA}/config.yaml"
-HERMES_BIN="${HERMES_VENV}/bin/hermes"
-PYTHON_BIN="${HERMES_VENV}/bin/python3"
-
-# ── OverlayFS compatibility fix ──
-# Docker bind mount (/overlay/upper/opt/docker) makes /opt unwritable
-# Solution: bind mount upper layer /opt to merged view /opt
-_hermes_fix_opt() {
- mkdir -p /opt/hermes/.probe 2>/dev/null && { rmdir /opt/hermes/.probe 2>/dev/null; return 0; }
- if [ -d /overlay/upper/opt ]; then
- mkdir -p /overlay/upper/opt/hermes 2>/dev/null
- mount --bind /overlay/upper/opt /opt 2>/dev/null && return 0
- fi
- return 1
-}
-_hermes_fix_opt
-
-# ── Port listening check ──
-_ensure_port_free() {
- local p="$1"
- local i=0 max_wait=3
-
- # Check if port is already in use
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep -q ":${p} " || return 0
- else
- netstat -tulnp 2>/dev/null | grep -q ":${p} " || return 0
- fi
-
- # Port is occupied, try to clean up
- for hermes_pid in $(pgrep -f "hermes.*gateway" 2>/dev/null); do
- kill "$hermes_pid" 2>/dev/null
- done
-
- while [ $i -lt $max_wait ]; do
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep -q ":${p} " || return 0
- else
- netstat -tulnp 2>/dev/null | grep -q ":${p} " || return 0
- fi
- sleep 1
- i=$((i + 1))
- done
-
- # Last resort: SIGKILL
- local port_pid=""
- if command -v ss >/dev/null 2>&1; then
- port_pid=$(ss -tulnp 2>/dev/null | grep ":${p} " | sed -n 's/.*pid=\([0-9]*\).*/\1/p' | head -1)
- else
- port_pid=$(netstat -tulnp 2>/dev/null | grep ":${p} " | sed -n 's|.* \([0-9]*\)/.*|\1|p' | head -1)
- fi
- [ -n "$port_pid" ] && kill -9 "$port_pid" 2>/dev/null && sleep 1
- return 0
-}
-
-port_listening() {
- local p="$1"
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep -q ":${p} "
- else
- netstat -tulnp 2>/dev/null | grep -q ":${p} "
- fi
-}
-
-sync_uci_to_yaml() {
- # Sync UCI config to /root/.hermes/config.yaml
- local port bind api_endpoint api_key model
- port=$(uci -q get hermes.main.port || echo "3000")
- bind=$(uci -q get hermes.main.bind || echo "lan")
- api_endpoint=$(uci -q get hermes.main.api_endpoint || echo "https://api.boos.lat/v1")
- api_key=$(uci -q get hermes.main.api_key || echo "")
- model=$(uci -q get hermes.main.model || echo "opus4.6")
-
- # Map UCI bind to listen address
- local listen_host="127.0.0.1"
- case "$bind" in
- lan) listen_host="0.0.0.0" ;;
- loopback) listen_host="127.0.0.1" ;;
- all) listen_host="0.0.0.0" ;;
- *) listen_host="0.0.0.0" ;;
- esac
-
- # Ensure config directory exists
- mkdir -p /root/.hermes 2>/dev/null
- mkdir -p "$(dirname "$HERMES_CONFIG")" 2>/dev/null
-
- # Generate token if not set
- local token
- token=$(uci -q get hermes.main.token || echo "")
- if [ -z "$token" ]; then
- token=$(head -c 24 /dev/urandom | hexdump -e '24/1 "%02x"' 2>/dev/null || openssl rand -hex 24 2>/dev/null || echo "hermes_$(date +%s)")
- uci set hermes.main.token="$token"
- uci commit hermes 2>/dev/null
- fi
-
- # Write config.yaml using shell (no Python dependency at this point)
- cat > /root/.hermes/config.yaml << YAMLEOF
-# Hermes Agent configuration — auto-generated by luci-app-hermes
-# UCI sync: $(date '+%Y-%m-%d %H:%M:%S')
-
-gateway:
- port: ${port}
- bind: ${listen_host}
- auth:
- mode: token
- token: ${token}
-
-api:
- endpoint: "${api_endpoint}"
- key: "${api_key}"
-
-model:
- primary: "${model}"
-
-tools:
- profile: coding
-
-update:
- checkOnStart: false
-YAMLEOF
-
- # Also sync to HERMES_DATA if different
- if [ -n "$HERMES_CONFIG" ] && [ "$HERMES_CONFIG" != "/root/.hermes/config.yaml" ]; then
- mkdir -p "$(dirname "$HERMES_CONFIG")" 2>/dev/null
- cp /root/.hermes/config.yaml "$HERMES_CONFIG" 2>/dev/null || true
- fi
-
- chmod 600 /root/.hermes/config.yaml 2>/dev/null || true
-}
-
-start_service() {
- local enabled port bind pty_port api_endpoint api_key model
- config_load hermes
- config_get enabled main enabled "0"
- config_get port main port "3000"
- config_get bind main bind "lan"
- config_get pty_port main pty_port "3001"
- config_get api_endpoint main api_endpoint "https://api.boos.lat/v1"
- config_get api_key main api_key ""
- config_get model main model "opus4.6"
-
- [ "$enabled" = "1" ] || {
- echo "hermes is disabled. Set enabled to 1 in /etc/config/hermes"
- return 0
- }
-
- # Check Python
- if [ ! -x "$PYTHON_BIN" ]; then
- echo "Python not found: $PYTHON_BIN"
- echo "Please run: hermes-env setup"
- return 1
- fi
-
- # Check hermes binary
- if [ ! -x "$HERMES_BIN" ]; then
- echo "Hermes not installed. Please run: hermes-env setup"
- return 1
- fi
-
- # Sync UCI to config.yaml
- sync_uci_to_yaml
-
- # Ensure gateway port is not occupied by stale processes
- _ensure_port_free "$port"
-
- # Calculate memory limit based on system RAM
- local mem_limit=""
- local total_kb
- total_kb=$(awk '/MemTotal/{print $2}' /proc/meminfo 2>/dev/null || echo "0")
- if [ "$total_kb" -ge 3000000 ] 2>/dev/null; then
- mem_limit="512m"
- elif [ "$total_kb" -ge 1500000 ] 2>/dev/null; then
- mem_limit="256m"
- elif [ "$total_kb" -ge 700000 ] 2>/dev/null; then
- mem_limit="128m"
- else
- mem_limit="64m"
- fi
-
- # Start Hermes Gateway (main service, foreground)
- procd_open_instance "gateway"
- procd_set_param command "$HERMES_BIN" gateway run \
- --port "$port" --bind "$bind"
- procd_set_param env \
- HOME="/root" \
- HERMES_HOME="/root/.hermes" \
- HERMES_CONFIG="/root/.hermes/config.yaml" \
- PATH="${HERMES_VENV}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
- PYTHONPATH="${HERMES_VENV}/lib/python3*/site-packages" \
- HERMES_API_ENDPOINT="$api_endpoint" \
- HERMES_API_KEY="$api_key" \
- HERMES_MODEL="$model"
- procd_set_param respawn 3600 10 5
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_set_param pidfile /var/run/hermes.pid
- procd_close_instance
-
- # Start Web PTY config terminal (auxiliary service)
- local pty_token
- pty_token=$(uci -q get hermes.main.pty_token || echo "")
- if [ -z "$pty_token" ]; then
- pty_token=$(head -c 16 /dev/urandom | hexdump -e '16/1 "%02x"' 2>/dev/null || openssl rand -hex 16 2>/dev/null || echo "pty_$(date +%s)")
- uci set hermes.main.pty_token="$pty_token"
- uci commit hermes 2>/dev/null
- fi
-
- procd_open_instance "pty"
- procd_set_param command "$PYTHON_BIN" /usr/share/hermes/web-pty.py
- procd_set_param env \
- HERMES_PTY_PORT="$pty_port" \
- HERMES_PTY_TOKEN="$pty_token" \
- HERMES_VENV="$HERMES_VENV" \
- HERMES_DATA="$HERMES_DATA" \
- HOME="/root" \
- PATH="${HERMES_VENV}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- procd_set_param respawn 3600 5 5
- procd_set_param stdout 1
- procd_set_param stderr 1
- procd_set_param pidfile /var/run/hermes-pty.pid
- procd_close_instance
-}
-
-_ensure_port_free() {
- local p="$1"
- local i=0 max_wait=3
-
- # Check if port is already in use
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep -q ":${p} " || return 0
- else
- netstat -tulnp 2>/dev/null | grep -q ":${p} " || return 0
- fi
-
- # Port is occupied, try to clean up
- for hermes_pid in $(pgrep -f "hermes.*gateway" 2>/dev/null); do
- kill "$hermes_pid" 2>/dev/null
- done
-
- while [ $i -lt $max_wait ]; do
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep -q ":${p} " || return 0
- else
- netstat -tulnp 2>/dev/null | grep -q ":${p} " || return 0
- fi
- sleep 1
- i=$((i + 1))
- done
-
- # Last resort: SIGKILL
- local port_pid=""
- if command -v ss >/dev/null 2>&1; then
- port_pid=$(ss -tulnp 2>/dev/null | grep ":${p} " | sed -n 's/.*pid=\([0-9]*\).*/\1/p' | head -1)
- else
- port_pid=$(netstat -tulnp 2>/dev/null | grep ":${p} " | sed -n 's|.* \([0-9]*\)/.*|\1|p' | head -1)
- fi
- [ -n "$port_pid" ] && kill -9 "$port_pid" 2>/dev/null && sleep 1
- return 0
-}
-
-stop_service() {
- local port
- port=$(uci -q get hermes.main.port || echo "3000")
-
- # Get all related PIDs
- local gw_pids=""
- gw_pids=$(pgrep -f "hermes.*gateway" 2>/dev/null)
- gw_pids="$gw_pids $(pgrep -f "hermes.*gateway.*run" 2>/dev/null)"
-
- # Send SIGTERM to all processes
- for pid in $gw_pids; do
- [ -n "$pid" ] && kill "$pid" 2>/dev/null
- done
-
- # Wait for port to be released
- local wait_count=0
- local max_wait=4
- while [ $wait_count -lt $max_wait ]; do
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep -q ":${port} " || break
- else
- netstat -tulnp 2>/dev/null | grep -q ":${port} " || break
- fi
- sleep 1
- wait_count=$((wait_count + 1))
- done
-
- # Force kill if still running
- if [ $wait_count -ge $max_wait ]; then
- local port_pid=""
- if command -v ss >/dev/null 2>&1; then
- port_pid=$(ss -tulnp 2>/dev/null | grep ":${port} " | sed -n 's/.*pid=\([0-9]*\).*/\1/p' | head -1)
- else
- port_pid=$(netstat -tulnp 2>/dev/null | grep ":${port} " | sed -n 's|.* \([0-9]*\)/.*|\1|p' | head -1)
- fi
- if [ -n "$port_pid" ]; then
- kill -9 "$port_pid" 2>/dev/null
- sleep 1
- fi
- fi
-}
-
-service_triggers() {
- procd_add_reload_trigger "hermes"
-}
-
-reload_service() {
- stop
- sleep 1
- start
-}
-
-setup() {
- echo "Calling hermes-env setup..."
- /usr/bin/hermes-env setup
-}
-
-restart_gateway() {
- # Restart only the Gateway process, does not affect PTY
- local port
- port=$(uci -q get hermes.main.port || echo "3000")
-
- # Get gateway PID
- local port_pid="" gw_pid=""
- if command -v ss >/dev/null 2>&1; then
- port_pid=$(ss -tulnp 2>/dev/null | grep ":${port} " | sed -n 's/.*pid=\([0-9]*\).*/\1/p' | head -1)
- else
- port_pid=$(netstat -tulnp 2>/dev/null | grep ":${port} " | sed -n 's|.* \([0-9]*\)/.*|\1|p' | head -1)
- fi
- gw_pid=$(ubus call service list '{"name":"hermes"}' 2>/dev/null | \
- jsonfilter -e '$.hermes.instances.gateway.pid' 2>/dev/null) || true
-
- # Send SIGTERM
- [ -n "$port_pid" ] && kill "$port_pid" 2>/dev/null
- [ -n "$gw_pid" ] && kill -0 "$gw_pid" 2>/dev/null && kill "$gw_pid" 2>/dev/null
-
- # Kill any remaining hermes gateway processes
- for pid in $(pgrep -f "hermes.*gateway" 2>/dev/null) $(pgrep -f "hermes.*gateway.*run" 2>/dev/null); do
- kill "$pid" 2>/dev/null
- done
-
- # Wait for port to be released
- local wait_count=0
- while [ $wait_count -lt 3 ]; do
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep -q ":${port} " || break
- else
- netstat -tulnp 2>/dev/null | grep -q ":${port} " || break
- fi
- sleep 1
- wait_count=$((wait_count + 1))
- done
-
- # Force kill if still running
- if [ $wait_count -ge 3 ]; then
- [ -n "$port_pid" ] && kill -9 "$port_pid" 2>/dev/null
- sleep 1
- fi
-
- # If no procd gateway, restart the service
- if [ -z "$gw_pid" ]; then
- /etc/init.d/hermes start >/dev/null 2>&1
- fi
-}
-
-status_service() {
- local port pty_port
- port=$(uci -q get hermes.main.port || echo "3000")
- pty_port=$(uci -q get hermes.main.pty_port || echo "3001")
-
- echo "=== Hermes Agent Service Status ==="
-
- # Python
- if [ -x "$PYTHON_BIN" ]; then
- echo "Python: $($PYTHON_BIN --version 2>/dev/null)"
- else
- echo "Python: Not installed"
- fi
-
- # Hermes Agent
- if [ -x "$HERMES_BIN" ]; then
- echo "Hermes: $($HERMES_BIN --version 2>/dev/null | head -1)"
- else
- echo "Hermes: Not installed"
- fi
-
- # Gateway
- if port_listening "$port"; then
- echo "Gateway: ✅ Running (:$port)"
- else
- echo "Gateway: ⏹ Stopped"
- fi
-
- # PTY
- if port_listening "$pty_port"; then
- echo "Config PTY: ✅ Running (:$pty_port)"
- else
- echo "Config PTY: ⏹ Stopped"
- fi
-
- # Config
- echo "Config: $HERMES_CONFIG"
- echo "Data Dir: $HERMES_DATA"
-}
diff --git a/luci-app-hermes/root/etc/uci-defaults/99-hermes b/luci-app-hermes/root/etc/uci-defaults/99-hermes
deleted file mode 100755
index 8f4b60c6b..000000000
--- a/luci-app-hermes/root/etc/uci-defaults/99-hermes
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-# luci-app-hermes — First-boot setup (uci-defaults)
-# This runs once after package installation
-
-# Set default values if not already set
-uci -q set hermes.main.enabled='0' 2>/dev/null
-uci -q set hermes.main.port='3000' 2>/dev/null
-uci -q set hermes.main.bind='lan' 2>/dev/null
-uci -q set hermes.main.api_endpoint='https://api.boos.lat/v1' 2>/dev/null
-uci -q set hermes.main.api_key='' 2>/dev/null
-uci -q set hermes.main.model='opus4.6' 2>/dev/null
-uci -q set hermes.main.pty_port='3001' 2>/dev/null
-
-# Generate auth token if not set
-token=$(uci -q get hermes.main.token || echo "")
-if [ -z "$token" ]; then
- token=$(head -c 24 /dev/urandom | hexdump -e '24/1 "%02x"' 2>/dev/null || openssl rand -hex 24 2>/dev/null || echo "hermes_$(date +%s)")
- uci -q set hermes.main.token="$token"
-fi
-
-# Generate PTY token if not set
-pty_token=$(uci -q get hermes.main.pty_token || echo "")
-if [ -z "$pty_token" ]; then
- pty_token=$(head -c 16 /dev/urandom | hexdump -e '16/1 "%02x"' 2>/dev/null || openssl rand -hex 16 2>/dev/null || echo "pty_$(date +%s)")
- uci -q set hermes.main.pty_token="$pty_token"
-fi
-
-uci -q commit hermes 2>/dev/null
-
-# Create required directories
-mkdir -p /root/.hermes 2>/dev/null
-mkdir -p /opt/hermes/data 2>/dev/null
-
-exit 0
diff --git a/luci-app-hermes/root/usr/bin/hermes-env b/luci-app-hermes/root/usr/bin/hermes-env
deleted file mode 100755
index 4b1f141c0..000000000
--- a/luci-app-hermes/root/usr/bin/hermes-env
+++ /dev/null
@@ -1,447 +0,0 @@
-#!/bin/sh
-# ============================================================================
-# hermes-env — Hermes Agent environment installation management script
-# Usage: hermes-env setup | check | upgrade
-# Environment variables: HERMES_VERSION — specify version to install
-# ============================================================================
-
-# ── Version and path constants ─────────────────────────────────────────────
-HERMES_BASE="/opt/hermes"
-HERMES_VENV="${HERMES_BASE}/venv"
-HERMES_DATA="${HERMES_BASE}/data"
-HERMES_BIN="${HERMES_VENV}/bin/hermes"
-PYTHON_BIN="${HERMES_VENV}/bin/python3"
-HERMES_CONFIG="/root/.hermes/config.yaml"
-
-# PyPI mirrors
-HERMES_PYPI_CN="https://mirrors.aliyun.com/pypi/simple/"
-HERMES_PYPI_OFFICIAL="https://pypi.org/simple/"
-HERMES_PYPI_TSINGHUA="https://pypi.tuna.tsinghua.edu.cn/simple/"
-
-# Default API endpoint
-HERMES_DEFAULT_API="https://api.boos.lat/v1"
-HERMES_DEFAULT_MODEL="opus4.6"
-
-export PATH="${HERMES_VENV}/bin:$PATH"
-
-# ── Logging tools ──────────────────────────────────────────────────────────
-log_ok() { echo " [✓] $*"; }
-log_warn() { echo " [!] $*"; }
-log_err() { echo " [✗] $*"; }
-log_step() { echo ""; echo "=== $* ==="; }
-
-# ── OverlayFS fix (iStoreOS Docker /opt conflict) ─────────────────────────
-_fix_opt() {
- mkdir -p /opt/hermes/.probe 2>/dev/null && { rmdir /opt/hermes/.probe 2>/dev/null; return 0; }
- [ -d /overlay/upper/opt ] && mkdir -p /overlay/upper/opt/hermes 2>/dev/null && \
- mount --bind /overlay/upper/opt /opt 2>/dev/null && return 0
- return 1
-}
-_fix_opt
-
-# ── Basic tools ────────────────────────────────────────────────────────────
-ensure_dir() { [ -d "$1" ] && return 0; mkdir -p "$1" 2>/dev/null || { log_err "Cannot create directory: $1"; return 1; }; }
-
-# Check available disk space
-_df_avail() {
- local p="$1"
- while [ -n "$p" ] && [ "$p" != "/" ]; do
- [ -e "$p" ] && break
- p="${p%/*}"
- done
- [ -z "$p" ] && p="/"
- df -m "$p" 2>/dev/null | tail -1 | awk '{print $(NF-2)}'
-}
-
-check_space() {
- local path="$1" need_mb="$2" label="$3"
- local avail
- avail=$(_df_avail "$path")
- [ -z "$avail" ] && return 0
- if [ "$avail" -lt "$need_mb" ]; then
- log_warn "${label} available space insufficient: ${avail}MB < ${need_mb}MB recommended"
- else
- log_ok "${label} available space: ${avail}MB"
- fi
-}
-
-# Download: wget first, curl fallback
-_download() {
- local url="$1" out="$2"
- if command -v wget >/dev/null 2>&1; then
- wget -q --no-check-certificate -O "$out" "$url" 2>/dev/null
- elif command -v curl >/dev/null 2>&1; then
- curl -fsSL --connect-timeout 15 --max-time 120 -o "$out" "$url" 2>/dev/null
- else
- log_err "No download tool available (wget/curl)"; return 1
- fi
-}
-
-# Try multiple mirrors, return first success
-_download_first() {
- local out="$1"; shift
- for url in "$@"; do
- [ -z "$url" ] && continue
- if _download "$url" "$out"; then
- local sz; sz=$(wc -c < "$out" 2>/dev/null || echo 0)
- [ "$sz" -gt 1000 ] && return 0
- fi
- rm -f "$out"
- done
- return 1
-}
-
-# ── Architecture detection ─────────────────────────────────────────────────
-detect_arch() {
- case "$(uname -m)" in
- x86_64) echo "x86_64" ;;
- aarch64) echo "aarch64" ;;
- armv7l) echo "armv7l" ;;
- armv6l) echo "armv6l" ;;
- *) log_err "Unsupported architecture: $(uname -m)"; exit 1 ;;
- esac
-}
-
-detect_libc() {
- [ -f /etc/openwrt_release ] && echo "musl" && return
- for f in /lib/ld-musl-*.so.1; do [ -f "$f" ] && echo "musl" && return; done
- echo "glibc"
-}
-
-# ── Install Python 3 ──────────────────────────────────────────────────────
-install_python() {
- # Check if system python3 is available
- if command -v python3 >/dev/null 2>&1; then
- local ver
- ver=$(python3 --version 2>/dev/null | awk '{print $2}')
- log_ok "System Python3 v${ver} found"
- # Check if it's recent enough (3.8+)
- local major minor
- major=$(echo "$ver" | cut -d. -f1)
- minor=$(echo "$ver" | cut -d. -f2)
- if [ "$major" -ge 3 ] && [ "$minor" -ge 8 ] 2>/dev/null; then
- log_ok "Python3 v${ver} meets requirements (>= 3.8)"
- return 0
- fi
- log_warn "Python3 v${ver} is too old, need >= 3.8"
- fi
-
- log_step "Installing Python 3"
-
- # Try opkg first
- opkg update >/dev/null 2>&1 || true
- opkg install python3 python3-pip python3-venv 2>/dev/null | tail -5 || true
-
- if command -v python3 >/dev/null 2>&1; then
- log_ok "Python3 installed via opkg: $(python3 --version 2>/dev/null)"
- return 0
- fi
-
- # Fallback: try to install minimal python3
- opkg install python3-base python3-light 2>/dev/null | tail -5 || true
-
- if command -v python3 >/dev/null 2>&1; then
- log_ok "Python3 (minimal) installed: $(python3 --version 2>/dev/null)"
- # Also need pip
- opkg install python3-pip 2>/dev/null || true
- return 0
- fi
-
- log_err "Python3 installation failed"
- log_err "Please install manually: opkg install python3 python3-pip python3-venv"
- return 1
-}
-
-# ── Create virtual environment ─────────────────────────────────────────────
-create_venv() {
- log_step "Creating Python virtual environment"
-
- ensure_dir "$HERMES_BASE" || exit 1
-
- # Remove old venv if exists
- if [ -d "$HERMES_VENV" ]; then
- log_warn "Removing old virtual environment..."
- rm -rf "$HERMES_VENV"
- fi
-
- # Create venv using system python3
- local sys_python
- sys_python=$(command -v python3 2>/dev/null)
- if [ -z "$sys_python" ]; then
- log_err "python3 not found in PATH"
- return 1
- fi
-
- "$sys_python" -m venv "$HERMES_VENV" 2>/dev/null
- if [ ! -x "$PYTHON_BIN" ]; then
- # Try without -m venv (older python)
- log_warn "python3 -m venv failed, trying virtualenv..."
- pip3 install virtualenv 2>/dev/null || true
- "$sys_python" -m virtualenv "$HERMES_VENV" 2>/dev/null
- fi
-
- if [ ! -x "$PYTHON_BIN" ]; then
- log_err "Failed to create virtual environment"
- return 1
- fi
-
- log_ok "Virtual environment created at $HERMES_VENV"
-
- # Upgrade pip
- log_ok "Upgrading pip..."
- "$PYTHON_BIN" -m pip install --upgrade pip 2>/dev/null | tail -2 || true
-
- log_ok "Python: $("$PYTHON_BIN" --version 2>/dev/null)"
-}
-
-# ── Install Hermes Agent ───────────────────────────────────────────────────
-install_hermes() {
- log_step "Installing Hermes Agent"
-
- # Check if already installed
- if [ -x "$HERMES_BIN" ]; then
- local cur
- cur=$("$HERMES_BIN" --version 2>/dev/null | head -1 | tr -d '[:space:]')
- log_ok "Hermes Agent v${cur} already installed"
- echo " To reinstall: hermes-env setup --force"
- return 0
- fi
-
- ensure_dir "$HERMES_VENV" || return 1
-
- # Try PyPI mirrors in order
- local install_ok=false
-
- for mirror in "$HERMES_PYPI_CN" "$HERMES_PYPI_TSINGHUA" "$HERMES_PYPI_OFFICIAL"; do
- log_warn "Trying: ${mirror}"
- if "$PYTHON_BIN" -m pip install hermes-agent \
- -i "$mirror" \
- --trusted-host "$(echo "$mirror" | sed 's|https://||;s|/.*||')" \
- 2>&1 | tail -10; then
- install_ok=true
- break
- fi
- done
-
- if [ "$install_ok" = "false" ] || [ ! -x "$HERMES_BIN" ]; then
- # Try without mirror flags
- log_warn "Mirror install failed, trying default PyPI..."
- "$PYTHON_BIN" -m pip install hermes-agent 2>&1 | tail -10 || true
- [ -x "$HERMES_BIN" ] && install_ok=true
- fi
-
- if [ "$install_ok" = "false" ]; then
- log_err "Hermes Agent installation failed"
- log_err "Please check network connection and try again"
- return 1
- fi
-
- log_ok "Hermes Agent installed: $("$HERMES_BIN" --version 2>/dev/null | head -1)"
-}
-
-# ── Initialize Hermes configuration ────────────────────────────────────────
-init_hermes() {
- log_step "Initializing Hermes configuration"
-
- mkdir -p /root/.hermes 2>/dev/null
-
- # Generate auth token
- local token
- token=$(uci -q get hermes.main.token 2>/dev/null || echo "")
- if [ -z "$token" ]; then
- token=$(head -c 24 /dev/urandom | hexdump -e '24/1 "%02x"' 2>/dev/null || openssl rand -hex 24 2>/dev/null || echo "hermes_$(date +%s)")
- uci set hermes.main.token="$token" 2>/dev/null || true
- uci commit hermes 2>/dev/null || true
- fi
-
- # Generate PTY token
- local pty_token
- pty_token=$(uci -q get hermes.main.pty_token 2>/dev/null || echo "")
- if [ -z "$pty_token" ]; then
- pty_token=$(head -c 16 /dev/urandom | hexdump -e '16/1 "%02x"' 2>/dev/null || openssl rand -hex 16 2>/dev/null || echo "pty_$(date +%s)")
- uci set hermes.main.pty_token="$pty_token" 2>/dev/null || true
- uci commit hermes 2>/dev/null || true
- fi
-
- # Write default config.yaml
- local port bind api_endpoint api_key model
- port=$(uci -q get hermes.main.port || echo "3000")
- bind=$(uci -q get hermes.main.bind || echo "lan")
- api_endpoint=$(uci -q get hermes.main.api_endpoint || echo "$HERMES_DEFAULT_API")
- api_key=$(uci -q get hermes.main.api_key || echo "")
- model=$(uci -q get hermes.main.model || echo "$HERMES_DEFAULT_MODEL")
-
- local listen_host="0.0.0.0"
- [ "$bind" = "loopback" ] && listen_host="127.0.0.1"
-
- cat > /root/.hermes/config.yaml << YAMLEOF
-# Hermes Agent configuration
-# Initialized by luci-app-hermes on $(date '+%Y-%m-%d %H:%M:%S')
-
-gateway:
- port: ${port}
- bind: ${listen_host}
- auth:
- mode: token
- token: ${token}
-
-api:
- endpoint: "${api_endpoint}"
- key: "${api_key}"
-
-model:
- primary: "${model}"
-
-tools:
- profile: coding
-
-update:
- checkOnStart: false
-YAMLEOF
-
- chmod 600 /root/.hermes/config.yaml 2>/dev/null || true
- log_ok "Configuration written to /root/.hermes/config.yaml"
-}
-
-# ── Command: setup ─────────────────────────────────────────────────────────
-cmd_setup() {
- check_space /opt 100 "Install directory (/opt)"
- check_space /tmp 100 "Temp directory (/tmp)"
-
- # Already installed?
- if [ -x "$HERMES_BIN" ]; then
- echo "╔══════════════════════════════════════════════════════════════╗"
- echo "║ [!] Hermes Agent already installed ║"
- echo "║ To reinstall, run: hermes-env setup --force ║"
- echo "╚══════════════════════════════════════════════════════════════╝"
- echo " Hermes: $("$HERMES_BIN" --version 2>/dev/null | head -1)"
- exit 0
- fi
-
- echo "╔══════════════════════════════════════════════════════════════╗"
- echo "║ Hermes Agent Environment Setup ║"
- echo "╚══════════════════════════════════════════════════════════════╝"
- echo " Architecture: $(uname -m)"
- echo " Libc: $(detect_libc)"
- echo ""
-
- install_python || exit 1
- create_venv || exit 1
- install_hermes || exit 1
- init_hermes || exit 1
-
- echo ""
- echo "╔══════════════════════════════════════════════════════════════╗"
- echo "║ Setup Complete! ║"
- echo "╚══════════════════════════════════════════════════════════════╝"
- echo " Hermes: $("$HERMES_BIN" --version 2>/dev/null | head -1)"
- echo " Python: $("$PYTHON_BIN" --version 2>/dev/null)"
- echo " Config: /root/.hermes/config.yaml"
- echo ""
- echo " Next steps:"
- echo " 1. Edit /etc/config/hermes to set your API key"
- echo " 2. Run: /etc/init.d/hermes enable"
- echo " 3. Run: /etc/init.d/hermes start"
- echo ""
- echo " Or use the LuCI web interface to configure and start."
-}
-
-# ── Command: check ─────────────────────────────────────────────────────────
-cmd_check() {
- echo "=== Hermes Environment Check ==="
-
- if [ -x "$PYTHON_BIN" ]; then
- echo "Python: $("$PYTHON_BIN" --version 2>/dev/null)"
- else
- echo "Python: Not installed (virtual env)"
- fi
-
- if command -v python3 >/dev/null 2>&1; then
- echo "System Py: $(python3 --version 2>/dev/null)"
- else
- echo "System Py: Not found"
- fi
-
- if [ -x "$HERMES_BIN" ]; then
- echo "Hermes: $("$HERMES_BIN" --version 2>/dev/null | head -1)"
- else
- echo "Hermes: Not installed"
- fi
-
- echo "VENV: $HERMES_VENV"
- echo "Config: $HERMES_CONFIG"
-
- if [ -f "$HERMES_CONFIG" ]; then
- echo "Config OK: Yes"
- else
- echo "Config OK: No (will be created on start)"
- fi
-}
-
-# ── Command: upgrade ───────────────────────────────────────────────────────
-cmd_upgrade() {
- if [ ! -x "$HERMES_BIN" ]; then
- log_err "Hermes Agent not installed. Run: hermes-env setup"
- exit 1
- fi
-
- log_step "Upgrading Hermes Agent"
-
- local upgrade_ok=false
-
- for mirror in "$HERMES_PYPI_CN" "$HERMES_PYPI_TSINGHUA" "$HERMES_PYPI_OFFICIAL"; do
- log_warn "Trying: ${mirror}"
- if "$PYTHON_BIN" -m pip install --upgrade hermes-agent \
- -i "$mirror" \
- --trusted-host "$(echo "$mirror" | sed 's|https://||;s|/.*||')" \
- 2>&1 | tail -10; then
- upgrade_ok=true
- break
- fi
- done
-
- if [ "$upgrade_ok" = "false" ]; then
- log_warn "Mirror install failed, trying default PyPI..."
- "$PYTHON_BIN" -m pip install --upgrade hermes-agent 2>&1 | tail -10 || true
- [ -x "$HERMES_BIN" ] && upgrade_ok=true
- fi
-
- if [ "$upgrade_ok" = "true" ] && [ -x "$HERMES_BIN" ]; then
- log_ok "Hermes upgraded: $("$HERMES_BIN" --version 2>/dev/null | head -1)"
- else
- log_err "Upgrade failed"
- exit 1
- fi
-}
-
-# ── Command: uninstall ─────────────────────────────────────────────────────
-cmd_uninstall() {
- log_step "Uninstalling Hermes Agent"
-
- /etc/init.d/hermes stop 2>/dev/null || true
- /etc/init.d/hermes disable 2>/dev/null || true
- uci set hermes.main.enabled=0 2>/dev/null || true
- uci commit hermes 2>/dev/null || true
-
- [ -d "$HERMES_BASE" ] && { rm -rf "$HERMES_BASE" 2>/dev/null || true; }
- [ -d "/root/.hermes" ] && { rm -rf "/root/.hermes" 2>/dev/null || true; }
-
- log_ok "Hermes Agent uninstalled"
-}
-
-# ── Main entry ─────────────────────────────────────────────────────────────
-case "${1:-setup}" in
- setup) cmd_setup ;;
- check) cmd_check ;;
- upgrade) cmd_upgrade ;;
- uninstall) cmd_uninstall ;;
- *)
- echo "Usage: hermes-env {setup|check|upgrade|uninstall}"
- echo ""
- echo " setup Install Python + Hermes Agent (default)"
- echo " check Check installation status"
- echo " upgrade Upgrade Hermes Agent to latest version"
- echo " uninstall Remove all Hermes files"
- exit 1
- ;;
-esac
diff --git a/luci-app-hermes/root/usr/libexec/istorec/hermes.sh b/luci-app-hermes/root/usr/libexec/istorec/hermes.sh
new file mode 100755
index 000000000..775a611a3
--- /dev/null
+++ b/luci-app-hermes/root/usr/libexec/istorec/hermes.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+ACTION=${1}
+shift 1
+
+do_install() {
+ local port=$(uci get hermes.@main[0].port 2>/dev/null | tr -d '\n\r')
+ local data=$(uci get hermes.@main[0].data_path 2>/dev/null | tr -d '\n\r')
+ local workspace=$(uci get hermes.@main[0].workspace_path 2>/dev/null | tr -d '\n\r')
+
+ local image_name="linkease/hermes:latest"
+ echo "docker pull ${image_name}"
+ docker pull ${image_name}
+ docker rm -f hermes
+
+ [ -z "$port" ] && port=8787
+
+ local cmd="docker run --restart=unless-stopped -d"
+
+ [ -n "$data" ] && cmd="$cmd -v \"$data:/data/.hermes\""
+ [ -n "$workspace" ] && cmd="$cmd -v \"$workspace:/workspace\""
+
+ cmd="$cmd -p $port:8787"
+
+ local tz=$(uci get system.@system[0].zonename 2>/dev/null | sed 's/ /_/g')
+ [ -z "$tz" ] || cmd="$cmd -e TZ=$tz"
+
+ cmd="$cmd --name hermes \"$image_name\""
+
+ echo "$cmd"
+ eval "$cmd"
+}
+
+usage() {
+ echo "usage: $0 sub-command"
+ echo "where sub-command is one of:"
+ echo " install Install the hermes"
+ echo " upgrade Upgrade the hermes"
+ echo " rm/start/stop/restart Remove/Start/Stop/Restart the hermes"
+ echo " status Hermes status"
+ echo " port Hermes port"
+}
+
+case ${ACTION} in
+ "install")
+ do_install
+ ;;
+ "upgrade")
+ do_install
+ ;;
+ "rm")
+ docker rm -f hermes
+ ;;
+ "start" | "stop" | "restart")
+ docker ${ACTION} hermes
+ ;;
+ "status")
+ docker ps --all -f 'name=^/hermes$' --format '{{.State}}'
+ ;;
+ "port")
+ docker ps --all -f 'name=^/hermes$' --format '{{.Ports}}' | grep -om1 '0.0.0.0:[0-9]*->8787/tcp' | sed 's/0.0.0.0:\([0-9]*\)->.*/\1/'
+ ;;
+ *)
+ usage
+ exit 1
+ ;;
+esac
diff --git a/luci-app-hermes/root/usr/share/hermes/luci-helper b/luci-app-hermes/root/usr/share/hermes/luci-helper
deleted file mode 100755
index 28b103099..000000000
--- a/luci-app-hermes/root/usr/share/hermes/luci-helper
+++ /dev/null
@@ -1,210 +0,0 @@
-#!/bin/sh
-# luci-app-hermes — Backend helper for JS view
-# Called via ubus file.exec from the LuCI frontend
-
-. /lib/functions.sh 2>/dev/null || true
-
-HERMES_VENV="/opt/hermes/venv"
-HERMES_BIN="${HERMES_VENV}/bin/hermes"
-HERMES_DATA="/opt/hermes/data"
-HERMES_CONFIG="/root/.hermes/config.yaml"
-
-# ── JSON helper: escape string for JSON output ──
-json_esc() {
- printf '%s' "$1" | sed 's/\\/\\\\/g;s/"/\\"/g;s/\t/\\t/g' | tr '\n' ' '
-}
-
-# ── Port listening check (ss or netstat) ──
-port_listening() {
- local p="$1"
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep -q ":${p} "
- else
- netstat -tulnp 2>/dev/null | grep -q ":${p} "
- fi
-}
-
-pid_by_port() {
- local p="$1"
- if command -v ss >/dev/null 2>&1; then
- ss -tulnp 2>/dev/null | grep ":${p} " | sed -n 's/.*pid=\([0-9]*\).*/\1/p' | head -1
- else
- netstat -tulnp 2>/dev/null | grep ":${p} " | sed -n 's|.* \([0-9]*\)/.*|\1|p' | head -1
- fi
-}
-
-case "$1" in
-
-# ═══════════════════════════════════════════
-# STATUS — gather all status info as JSON
-# ═══════════════════════════════════════════
-status)
- enabled=$(uci -q get hermes.main.enabled || echo "0")
- port=$(uci -q get hermes.main.port || echo "3000")
- pty_port=$(uci -q get hermes.main.pty_port || echo "3001")
-
- # Validate ports
- case "$port" in *[!0-9]*) port="3000" ;; esac
- case "$pty_port" in *[!0-9]*) pty_port="3001" ;; esac
-
- # Gateway check
- gw_running=false
- gw_starting=false
- port_listening "$port" && gw_running=true
- if [ "$gw_running" = "false" ] && [ "$enabled" = "1" ]; then
- pgrep -f 'hermes.*gateway' >/dev/null 2>&1 && gw_starting=true
- fi
-
- # PTY check
- pty_running=false
- port_listening "$pty_port" && pty_running=true
-
- # Python version
- python_ver=""
- if [ -x "${HERMES_VENV}/bin/python3" ]; then
- python_ver=$("${HERMES_VENV}/bin/python3" --version 2>/dev/null | tr -d '[:space:]')
- elif command -v python3 >/dev/null 2>&1; then
- python_ver=$(python3 --version 2>/dev/null | tr -d '[:space:]')
- fi
-
- # Hermes version
- hermes_ver=""
- if [ -x "$HERMES_BIN" ]; then
- hermes_ver=$("$HERMES_BIN" --version 2>/dev/null | head -1 | tr -d '[:space:]')
- fi
-
- # Plugin version
- plugin_ver=""
- [ -f "/usr/share/hermes/VERSION" ] && plugin_ver=$(cat /usr/share/hermes/VERSION 2>/dev/null | tr -d '[:space:]')
-
- # PID, memory, uptime
- pid="" mem_kb=0 uptime_str=""
- if [ "$gw_running" = "true" ]; then
- pid=$(pid_by_port "$port")
- if [ -n "$pid" ] && [ -d "/proc/$pid" ]; then
- mem_kb=$(awk '/VmRSS/{print $2}' "/proc/$pid/status" 2>/dev/null)
- [ -z "$mem_kb" ] && mem_kb=0
- # Calculate uptime from /proc/$pid directory mtime
- start_ts=$(date -r "/proc/$pid" +%s 2>/dev/null)
- if [ -n "$start_ts" ]; then
- now=$(date +%s)
- diff=$((now - start_ts))
- h=$((diff / 3600)) m=$(((diff % 3600) / 60)) s=$((diff % 60))
- if [ $h -gt 0 ]; then uptime_str="${h}h ${m}m"
- elif [ $m -gt 0 ]; then uptime_str="${m}m ${s}s"
- else uptime_str="${s}s"; fi
- fi
- fi
- fi
-
- # Active model (from config.yaml)
- active_model=""
- if [ -f "$HERMES_CONFIG" ]; then
- active_model=$(sed -n 's/.*primary: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/p' "$HERMES_CONFIG" 2>/dev/null | head -1)
- fi
-
- cat <
/tmp/hermes-setup.log
- : > /tmp/hermes-setup.exit
- : > /tmp/hermes-setup.pid
-
- ( /usr/bin/hermes-env setup > /tmp/hermes-setup.log 2>&1
- RC=$?
- echo $RC > /tmp/hermes-setup.exit
- if [ $RC -eq 0 ]; then
- uci set hermes.main.enabled=1
- uci commit hermes
- /etc/init.d/hermes enable 2>/dev/null
- sleep 1
- /etc/init.d/hermes start >> /tmp/hermes-setup.log 2>&1
- fi
- ) &
- echo $! > /tmp/hermes-setup.pid
-
- echo '{"status":"ok","message":"setup started"}'
- ;;
-
-# ═══════════════════════════════════════════
-# SETUP_LOG — poll setup progress
-# ═══════════════════════════════════════════
-setup_log)
- log=""
- [ -f /tmp/hermes-setup.log ] && log=$(cat /tmp/hermes-setup.log 2>/dev/null)
-
- running=false
- if [ -f /tmp/hermes-setup.pid ]; then
- pid=$(cat /tmp/hermes-setup.pid 2>/dev/null | tr -d '[:space:]')
- [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null && running=true
- fi
-
- exit_code=-1
- if [ "$running" = "false" ] && [ -f /tmp/hermes-setup.exit ]; then
- exit_code=$(cat /tmp/hermes-setup.exit 2>/dev/null | tr -d '[:space:]')
- [ -z "$exit_code" ] && exit_code=-1
- fi
-
- state="idle"
- if [ "$running" = "true" ]; then state="running"
- elif [ "$exit_code" = "0" ]; then state="success"
- elif [ "$exit_code" -gt 0 ] 2>/dev/null; then state="failed"
- fi
-
- # Escape log for JSON
- log_escaped=$(printf '%s' "$log" | sed 's/\\/\\\\/g;s/"/\\"/g;s/\t/\\t/g' | tr '\n' '\\' | sed 's/\\/\\n/g')
-
- printf '{"state":"%s","exit_code":%s,"log":"%s"}\n' "$state" "${exit_code}" "$log_escaped"
- ;;
-
-# ═══════════════════════════════════════════
-# GET_TOKEN — return gateway and PTY tokens
-# ═══════════════════════════════════════════
-get_token)
- token=$(uci -q get hermes.main.token || echo "")
- pty_token=$(uci -q get hermes.main.pty_token || echo "")
- printf '{"token":"%s","pty_token":"%s"}\n' "$token" "$pty_token"
- ;;
-
-# ═══════════════════════════════════════════
-# UNINSTALL — remove environment
-# ═══════════════════════════════════════════
-uninstall)
- /etc/init.d/hermes stop >/dev/null 2>&1
- /etc/init.d/hermes disable 2>/dev/null
- uci set hermes.main.enabled=0
- uci commit hermes 2>/dev/null
- [ -d /opt/hermes ] && { find /opt/hermes -delete 2>/dev/null || true; }
- [ -d /root/.hermes ] && { find /root/.hermes -delete 2>/dev/null || true; }
- : > /tmp/hermes-setup.log 2>/dev/null
- : > /tmp/hermes-setup.pid 2>/dev/null
- : > /tmp/hermes-setup.exit 2>/dev/null
- echo '{"status":"ok","message":"uninstalled"}'
- ;;
-
-*)
- echo '{"status":"error","message":"unknown command"}'
- ;;
-esac
diff --git a/luci-app-hermes/root/usr/share/hermes/ui/index.html b/luci-app-hermes/root/usr/share/hermes/ui/index.html
deleted file mode 100644
index a3b60d662..000000000
--- a/luci-app-hermes/root/usr/share/hermes/ui/index.html
+++ /dev/null
@@ -1,278 +0,0 @@
-
-
-
-
-
-Hermes Agent Terminal
-
-
-
-
-
- 🤖 Hermes Agent Terminal
- ● Connecting...
- 🔄 Restart
-
-
-
-
-
🤖 Hermes Agent Terminal
-
Connecting to terminal...
-
-
-
-
-
-
-
⚡ Connection Lost
-
Terminal session ended or connection interrupted
-
🔄 Restart
-
-
-
-
-
-
-
-
-
-
diff --git a/luci-app-hermes/root/usr/share/hermes/web-pty.py b/luci-app-hermes/root/usr/share/hermes/web-pty.py
deleted file mode 100755
index 1612ae8c5..000000000
--- a/luci-app-hermes/root/usr/share/hermes/web-pty.py
+++ /dev/null
@@ -1,549 +0,0 @@
-#!/usr/bin/env python3
-"""
-luci-app-hermes — Web PTY Server (Python implementation)
-Provides WebSocket-based terminal access for Hermes Agent configuration.
-Replaces the Node.js web-pty.js from luci-app-openclaw.
-"""
-
-import http.server
-import socketserver
-import json
-import os
-import sys
-import signal
-import struct
-import hashlib
-import base64
-import subprocess
-import threading
-import time
-import select
-import pty
-import fcntl
-import termios
-import urllib.parse
-
-# ── Configuration ──
-PORT = int(os.environ.get('HERMES_PTY_PORT', '3001'))
-HOST = os.environ.get('HERMES_PTY_HOST', '0.0.0.0')
-AUTH_TOKEN = os.environ.get('HERMES_PTY_TOKEN', '')
-HERMES_VENV = os.environ.get('HERMES_VENV', '/opt/hermes/venv')
-HERMES_DATA = os.environ.get('HERMES_DATA', '/opt/hermes/data')
-MAX_SESSIONS = int(os.environ.get('HERMES_MAX_SESSIONS', '5'))
-UI_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'ui')
-
-# Load token from UCI if not set via env
-if not AUTH_TOKEN:
- try:
- result = subprocess.run(
- ['uci', '-q', 'get', 'hermes.main.pty_token'],
- capture_output=True, text=True, timeout=3
- )
- AUTH_TOKEN = result.stdout.strip()
- except Exception:
- pass
-
-# ── WebSocket helpers (RFC 6455) ──
-
-def decode_ws_frame(data):
- """Decode a WebSocket frame. Returns (opcode, payload, total_consumed) or None."""
- if len(data) < 2:
- return None
- opcode = data[0] & 0x0f
- masked = bool(data[1] & 0x80)
- payload_len = data[1] & 0x7f
- offset = 2
-
- if payload_len == 126:
- if len(data) < 4:
- return None
- payload_len = struct.unpack('>H', data[2:4])[0]
- offset = 4
- elif payload_len == 127:
- if len(data) < 10:
- return None
- payload_len = struct.unpack('>Q', data[2:10])[0]
- offset = 10
-
- mask = None
- if masked:
- if len(data) < offset + 4:
- return None
- mask = data[offset:offset + 4]
- offset += 4
-
- if len(data) < offset + payload_len:
- return None
-
- payload = bytearray(data[offset:offset + payload_len])
- if mask:
- for i in range(len(payload)):
- payload[i] ^= mask[i & 3]
-
- return (opcode, bytes(payload), offset + payload_len)
-
-
-def encode_ws_frame(data, opcode=0x01):
- """Encode data into a WebSocket frame."""
- if isinstance(data, str):
- payload = data.encode('utf-8')
- else:
- payload = data
- length = len(payload)
-
- if length < 126:
- header = struct.pack('>BB', 0x80 | opcode, length)
- elif length < 65536:
- header = struct.pack('>BBH', 0x80 | opcode, 126, length)
- else:
- header = struct.pack('>BBQ', 0x80 | opcode, 127, length)
-
- return header + payload
-
-
-# ── PTY Session ──
-
-active_sessions = 0
-
-
-class PtySession:
- def __init__(self, request_handler):
- global active_sessions
- self.handler = request_handler
- self.proc = None
- self.cols = 80
- self.rows = 24
- self.alive = True
- self.buffer = b''
- self._spawn_fail_count = 0
- self._MAX_SPAWN_RETRIES = 5
- self._ping_timer = None
- self._pong_received = True
-
- active_sessions += 1
- print(f"[hermes-pty] Session created (active: {active_sessions}/{MAX_SESSIONS})", flush=True)
-
- self._spawn_pty()
-
- def _spawn_pty(self):
- """Spawn the shell process with a PTY."""
- env = os.environ.copy()
- env.update({
- 'TERM': 'xterm-256color',
- 'COLUMNS': str(self.cols),
- 'LINES': str(self.rows),
- 'COLORTERM': 'truecolor',
- 'LANG': 'en_US.UTF-8',
- 'HERMES_VENV': HERMES_VENV,
- 'HERMES_DATA': HERMES_DATA,
- 'HOME': '/root',
- 'PATH': f"{HERMES_VENV}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
- })
-
- try:
- # Create PTY
- master_fd, slave_fd = pty.openpty()
-
- # Set terminal size
- winsize = struct.pack('HHHH', self.rows, self.cols, 0, 0)
- fcntl.ioctl(slave_fd, termios.TIOCSWINSZ, winsize)
-
- # Spawn shell
- self.proc = subprocess.Popen(
- ['/bin/sh', '-l'],
- stdin=slave_fd,
- stdout=slave_fd,
- stderr=slave_fd,
- env=env,
- preexec_fn=os.setsid,
- )
- os.close(slave_fd)
- self.master_fd = master_fd
- self._spawn_fail_count = 0
-
- # Set master_fd to non-blocking
- flags = fcntl.fcntl(master_fd, fcntl.F_GETFL)
- fcntl.fcntl(master_fd, fcntl.F_SETFL, flags | os.O_NONBLOCK)
-
- # Start reader thread
- self._reader_thread = threading.Thread(target=self._read_pty, daemon=True)
- self._reader_thread.start()
-
- print(f"[hermes-pty] Shell spawned (PID: {self.proc.pid})", flush=True)
-
- except Exception as e:
- print(f"[hermes-pty] Failed to spawn shell: {e}", flush=True)
- self._cleanup()
-
- def _read_pty(self):
- """Read from PTY and send to WebSocket."""
- while self.alive and self.proc and self.proc.poll() is None:
- try:
- r, _, _ = select.select([self.master_fd], [], [], 0.1)
- if r:
- data = os.read(self.master_fd, 4096)
- if data:
- self._send_to_client(data)
- except (OSError, IOError):
- break
- except Exception as e:
- if self.alive:
- print(f"[hermes-pty] Read error: {e}", flush=True)
- break
-
- if self.alive:
- print(f"[hermes-pty] Shell exited", flush=True)
- self._spawn_fail_count += 1
- if self._spawn_fail_count > self._MAX_SPAWN_RETRIES:
- print(f"[hermes-pty] Shell failed {self._spawn_fail_count} times, stopping", flush=True)
- self._send_to_client(b'\r\n\x1b[31mShell failed to start after multiple attempts.\x1b[0m\r\n')
- return
-
- # Auto-restart
- self._send_to_client(b'\r\n\x1b[33mShell exited, restarting...\x1b[0m\r\n')
- time.sleep(1)
- if self.alive:
- self._spawn_pty()
-
- def _send_to_client(self, data):
- """Send data to WebSocket client."""
- if not self.alive:
- return
- try:
- frame = encode_ws_frame(data, 0x01)
- self.handler.request.sendall(frame)
- except Exception:
- pass
-
- def handle_message(self, text):
- """Handle incoming WebSocket text message."""
- try:
- msg = json.loads(text)
- msg_type = msg.get('type', '')
-
- if msg_type == 'stdin':
- data = msg.get('data', '')
- # Clean bracketed paste escape sequences
- data = data.replace('\x1b[?2004l', '').replace('\x1b[?2004h', '')
- data = data.replace('\x1b[200~', '').replace('\x1b[201~', '')
- if self.proc and self.proc.poll() is None:
- os.write(self.master_fd, data.encode('utf-8'))
-
- elif msg_type == 'resize':
- self.cols = msg.get('cols', 80)
- self.rows = msg.get('rows', 24)
- if self.master_fd:
- winsize = struct.pack('HHHH', self.rows, self.cols, 0, 0)
- try:
- fcntl.ioctl(self.master_fd, termios.TIOCSWINSZ, winsize)
- except Exception:
- pass
-
- elif msg_type == 'ping':
- self._send_to_client(json.dumps({'type': 'pong'}))
-
- except json.JSONDecodeError:
- # Plain text, send directly to PTY
- if self.proc and self.proc.poll() is None:
- os.write(self.master_fd, text.encode('utf-8'))
-
- def handle_binary(self, data):
- """Handle incoming binary WebSocket data."""
- if self.proc and self.proc.poll() is None:
- os.write(self.master_fd, data)
-
- def _cleanup(self):
- """Clean up session resources."""
- if not self.alive:
- return
- self.alive = False
-
- global active_sessions
- active_sessions = max(0, active_sessions - 1)
- print(f"[hermes-pty] Session ended (active: {active_sessions}/{MAX_SESSIONS})", flush=True)
-
- if self.proc and self.proc.poll() is None:
- try:
- os.kill(-self.proc.pid, signal.SIGTERM)
- except Exception:
- pass
- try:
- self.proc.terminate()
- except Exception:
- pass
-
- try:
- if hasattr(self, 'master_fd'):
- os.close(self.master_fd)
- except Exception:
- pass
-
- def __del__(self):
- self._cleanup()
-
-
-# ── WebSocket Upgrade Handler ──
-
-class WebSocketHandler(http.server.BaseHTTPRequestHandler):
- """HTTP + WebSocket upgrade handler."""
-
- sessions = []
-
- def log_message(self, format, *args):
- """Override to add prefix."""
- print(f"[hermes-pty] {args[0] if args else format}", flush=True)
-
- def do_OPTIONS(self):
- self.send_response(204)
- self.send_header('Access-Control-Allow-Origin', '*')
- self.send_header('Access-Control-Allow-Methods', 'GET, OPTIONS')
- self.send_header('Access-Control-Allow-Headers', '*')
- self.end_headers()
-
- def do_GET(self):
- path = urllib.parse.urlparse(self.path).path
-
- if path == '/health':
- self.send_response(200)
- self.send_header('Content-Type', 'application/json')
- self.send_header('Access-Control-Allow-Origin', '*')
- self.end_headers()
- self.wfile.write(json.dumps({
- 'status': 'ok',
- 'port': PORT,
- 'uptime': time.time()
- }).encode())
- return
-
- # Serve static files from UI_DIR
- if path == '/' or path == '':
- path = '/index.html'
-
- # Security: prevent directory traversal
- full_path = os.path.normpath(os.path.join(UI_DIR, path.lstrip('/')))
- if not full_path.startswith(UI_DIR):
- self.send_response(403)
- self.end_headers()
- return
-
- try:
- with open(full_path, 'rb') as f:
- data = f.read()
-
- # Determine content type
- ext = os.path.splitext(full_path)[1]
- content_types = {
- '.html': 'text/html; charset=utf-8',
- '.css': 'text/css',
- '.js': 'application/javascript',
- '.png': 'image/png',
- '.svg': 'image/svg+xml',
- '.json': 'application/json',
- }
- ct = content_types.get(ext, 'application/octet-stream')
-
- self.send_response(200)
- self.send_header('Content-Type', ct)
- self.send_header('Cache-Control', 'no-cache' if ext == '.html' else 'max-age=3600')
- self.send_header('Access-Control-Allow-Origin', '*')
- self.send_header('X-Frame-Options', 'ALLOWALL')
- self.send_header('Content-Security-Policy',
- "default-src * 'unsafe-inline' 'unsafe-eval' data: blob: ws: wss:; frame-ancestors *")
- self.end_headers()
- self.wfile.write(data)
-
- except FileNotFoundError:
- # Fallback to index.html for SPA routing
- try:
- with open(os.path.join(UI_DIR, 'index.html'), 'rb') as f:
- data = f.read()
- self.send_response(200)
- self.send_header('Content-Type', 'text/html; charset=utf-8')
- self.send_header('Access-Control-Allow-Origin', '*')
- self.end_headers()
- self.wfile.write(data)
- except FileNotFoundError:
- self.send_response(404)
- self.end_headers()
-
- def do_GET_ws(self):
- """Handle WebSocket upgrade for GET requests to /ws."""
- self._do_websocket_upgrade()
-
- def _do_websocket_upgrade(self):
- """Perform WebSocket handshake and start PTY session."""
- # Authenticate
- parsed = urllib.parse.urlparse(self.path)
- params = urllib.parse.parse_qs(parsed.query)
- client_token = params.get('token', [''])[0]
-
- if AUTH_TOKEN and client_token != AUTH_TOKEN:
- print(f"[hermes-pty] Auth failed from {self.client_address[0]}", flush=True)
- self.send_error(403, 'Forbidden')
- return
-
- # Check session limit
- if active_sessions >= MAX_SESSIONS:
- print(f"[hermes-pty] Max sessions reached ({active_sessions}/{MAX_SESSIONS})", flush=True)
- self.send_error(503, 'Service Unavailable')
- return
-
- # WebSocket handshake
- key = self.headers.get('Sec-WebSocket-Key', '')
- if not key:
- self.send_error(400, 'Missing Sec-WebSocket-Key')
- return
-
- accept = base64.b64encode(
- hashlib.sha1((key + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11').encode()).digest()
- ).decode()
-
- response = (
- 'HTTP/1.1 101 Switching Protocols\r\n'
- 'Upgrade: websocket\r\n'
- 'Connection: Upgrade\r\n'
- f'Sec-WebSocket-Accept: {accept}\r\n'
- '\r\n'
- )
- self.wfile.write(response.encode())
- self.wfile.flush()
-
- # Create PTY session
- session = PtySession(self)
- self.__class__.sessions.append(session)
-
- # Read WebSocket frames
- buffer = b''
- while session.alive:
- try:
- self.request.setblocking(True)
- self.request.settimeout(1.0)
- data = self.request.recv(4096)
- if not data:
- break
- buffer += data
-
- while len(buffer) > 0:
- result = decode_ws_frame(buffer)
- if result is None:
- break
- opcode, payload, consumed = result
- buffer = buffer[consumed:]
-
- if opcode == 0x01: # Text
- session.handle_message(payload.decode('utf-8', errors='replace'))
- elif opcode == 0x02: # Binary
- session.handle_binary(payload)
- elif opcode == 0x08: # Close
- print("[hermes-pty] WS close frame received", flush=True)
- session._cleanup()
- return
- elif opcode == 0x09: # Ping
- self.request.sendall(encode_ws_frame(payload, 0x0a))
- elif opcode == 0x0a: # Pong
- session._pong_received = True
-
- except socket.timeout:
- continue
- except (ConnectionResetError, BrokenPipeError, OSError):
- break
- except Exception as e:
- if session.alive:
- print(f"[hermes-pty] Read error: {e}", flush=True)
- break
-
- session._cleanup()
-
- def do_GET(self):
- parsed = urllib.parse.urlparse(self.path)
- path = parsed.path
-
- if path == '/ws' or path.startswith('/ws?'):
- self._do_websocket_upgrade()
- else:
- # Serve static files
- if path == '/' or path == '':
- path = '/index.html'
-
- full_path = os.path.normpath(os.path.join(UI_DIR, path.lstrip('/')))
- if not full_path.startswith(UI_DIR):
- self.send_response(403)
- self.end_headers()
- return
-
- try:
- with open(full_path, 'rb') as f:
- data = f.read()
-
- ext = os.path.splitext(full_path)[1]
- content_types = {
- '.html': 'text/html; charset=utf-8',
- '.css': 'text/css',
- '.js': 'application/javascript',
- '.png': 'image/png',
- '.svg': 'image/svg+xml',
- '.json': 'application/json',
- }
- ct = content_types.get(ext, 'application/octet-stream')
-
- self.send_response(200)
- self.send_header('Content-Type', ct)
- self.send_header('Cache-Control', 'no-cache' if ext == '.html' else 'max-age=3600')
- self.send_header('Access-Control-Allow-Origin', '*')
- self.end_headers()
- self.wfile.write(data)
-
- except FileNotFoundError:
- try:
- with open(os.path.join(UI_DIR, 'index.html'), 'rb') as f:
- data = f.read()
- self.send_response(200)
- self.send_header('Content-Type', 'text/html; charset=utf-8')
- self.send_header('Access-Control-Allow-Origin', '*')
- self.end_headers()
- self.wfile.write(data)
- except FileNotFoundError:
- self.send_response(404)
- self.end_headers()
-
-
-# ── Main ──
-
-if __name__ == '__main__':
- import socket
-
- socketserver.TCPServer.allow_reuse_address = True
-
- class ReusableTCPServer(socketserver.TCPServer):
- allow_reuse_address = True
-
- def handle_request_noblock(self):
- try:
- request, client_address = self.get_request()
- except OSError:
- return
- if self.verify_request(request, client_address):
- try:
- self.process_request(request, client_address)
- except Exception:
- self.handle_error(request, client_address)
- self.shutdown_request(request)
- else:
- self.shutdown_request(request)
-
- server = ReusableTCPServer((HOST, PORT), WebSocketHandler)
- print(f"[hermes-pty] HTTP listening on {HOST}:{PORT}", flush=True)
- print(f"[hermes-pty] UI directory: {UI_DIR}", flush=True)
-
- def shutdown(signum, frame):
- print("[hermes-pty] Shutdown", flush=True)
- server.shutdown()
- sys.exit(0)
-
- signal.signal(signal.SIGTERM, shutdown)
- signal.signal(signal.SIGINT, shutdown)
-
- try:
- server.serve_forever()
- except KeyboardInterrupt:
- shutdown(None, None)
diff --git a/luci-app-hermes/root/usr/share/luci/menu.d/luci-app-hermes.json b/luci-app-hermes/root/usr/share/luci/menu.d/luci-app-hermes.json
deleted file mode 100644
index a46042e18..000000000
--- a/luci-app-hermes/root/usr/share/luci/menu.d/luci-app-hermes.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "admin/services/hermes": {
- "title": "Hermes Agent",
- "order": 90,
- "action": {
- "type": "view",
- "path": "hermes"
- },
- "depends": {
- "acl": ["luci-app-hermes"],
- "uci": { "hermes": true }
- }
- }
-}
diff --git a/luci-app-hermes/root/usr/share/rpcd/acl.d/luci-app-hermes.json b/luci-app-hermes/root/usr/share/rpcd/acl.d/luci-app-hermes.json
index 4533012cb..a07cd290d 100644
--- a/luci-app-hermes/root/usr/share/rpcd/acl.d/luci-app-hermes.json
+++ b/luci-app-hermes/root/usr/share/rpcd/acl.d/luci-app-hermes.json
@@ -1,29 +1,11 @@
{
"luci-app-hermes": {
- "description": "Grant access for luci-app-hermes",
+ "description": "Grant UCI access for luci-app-hermes",
"read": {
- "uci": ["hermes"],
- "ubus": {
- "service": ["list"],
- "file": ["exec", "read", "stat"]
- },
- "file": {
- "/usr/share/hermes/luci-helper": ["exec"],
- "/etc/init.d/hermes": ["exec"],
- "/usr/share/hermes/VERSION": ["read"],
- "/tmp/hermes-setup.log": ["read"],
- "/tmp/hermes-setup.exit": ["read"]
- }
+ "uci": [ "hermes" ]
},
"write": {
- "uci": ["hermes"],
- "ubus": {
- "file": ["exec", "write"]
- },
- "file": {
- "/usr/share/hermes/luci-helper": ["exec"],
- "/etc/init.d/hermes": ["exec"]
- }
+ "uci": [ "hermes" ]
}
}
}
diff --git a/luci-app-hermes/scripts/install.sh b/luci-app-hermes/scripts/install.sh
deleted file mode 100755
index 91efaf6a8..000000000
--- a/luci-app-hermes/scripts/install.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-# =============================================================================
-# Hermes Agent LuCI 插件一键安装脚本
-# 用法: sh -c "$(wget -qO- https://cdn.jsdelivr.net/gh/Boos4721/luci-app-hermes@main/scripts/install.sh)"
-# =============================================================================
-set -e
-
-REPO="Boos4721/luci-app-hermes"
-GITHUB_RELEASE="https://github.com/${REPO}/releases/latest/download"
-
-_ok() { echo " [✓] $*"; }
-_warn() { echo " [!] $*"; }
-_err() { echo " [✗] $*"; echo ""; exit 1; }
-
-_download() {
- local url="$1" out="$2"
- if command -v wget >/dev/null 2>&1; then
- wget -q --no-check-certificate -O "$out" "$url" 2>/dev/null
- elif command -v curl >/dev/null 2>&1; then
- curl -fsSL --connect-timeout 15 -o "$out" "$url" 2>/dev/null
- else
- _err "未找到 wget 或 curl"
- fi
-}
-
-echo ""
-echo "╔══════════════════════════════════════════════════════════════╗"
-echo "║ Hermes Agent LuCI 插件一键安装 ║"
-echo "╚══════════════════════════════════════════════════════════════╝"
-echo ""
-
-# ── 检查环境 ──
-[ -f /etc/openwrt_release ] || _err "仅支持 OpenWrt / ImmortalWrt 系统"
-command -v opkg >/dev/null 2>&1 || _err "未找到 opkg,仅支持 OpenWrt 系统"
-
-ARCH=$(uname -m)
-DISTRIB=$(grep -o 'DISTRIB_DESCRIPTION="[^"]*"' /etc/openwrt_release 2>/dev/null | cut -d'"' -f2 || echo "OpenWrt")
-_ok "系统: ${DISTRIB}"
-_ok "架构: ${ARCH}"
-echo ""
-
-# ── 下载 ipk ──
-IPK="/tmp/luci-app-hermes_$$.ipk"
-_warn "正在下载 luci-app-hermes..."
-
-# 主源:GitHub Releases
-if ! _download "${GITHUB_RELEASE}/luci-app-hermes_all.ipk" "${IPK}"; then
- _warn "GitHub 下载失败,尝试备用源..."
- _download "https://github.com/${REPO}/releases/latest/download/luci-app-hermes_all.ipk" "${IPK}" || \
- _err "下载失败,请检查网络连接后重试"
-fi
-
-SIZE=$(wc -c < "${IPK}" 2>/dev/null || echo 0)
-[ "${SIZE}" -gt 5000 ] || _err "下载文件无效 (${SIZE} 字节),请稍后重试"
-_ok "下载完成 ($(du -sh "${IPK}" 2>/dev/null | cut -f1))"
-
-# ── 安装 ──
-_warn "正在安装..."
-opkg update >/dev/null 2>&1 || true
-
-if ! opkg install --force-reinstall "${IPK}" 2>&1; then
- _warn "首次安装失败,尝试强制安装..."
- opkg install --force-reinstall --force-depends "${IPK}" || \
- _err "安装失败,请查看上方错误信息"
-fi
-
-rm -f "${IPK}"
-rm -f /tmp/luci-indexcache 2>/dev/null || true
-rm -rf /tmp/luci-modulecache 2>/dev/null || true
-
-echo ""
-echo "╔══════════════════════════════════════════════════════════════╗"
-echo "║ [OK] 安装完成! ║"
-echo "║ ║"
-echo "║ → LuCI → 服务 → Hermes Agent ║"
-echo "║ → 点击「更多」→「安装环境」完成 Python + Hermes 安装 ║"
-echo "╚══════════════════════════════════════════════════════════════╝"
-echo ""
diff --git a/luci-app-podman/.editorconfig b/luci-app-podman/.editorconfig
deleted file mode 100644
index 6a9ee691d..000000000
--- a/luci-app-podman/.editorconfig
+++ /dev/null
@@ -1,43 +0,0 @@
-root = true
-
-[*]
-end_of_line = lf
-charset = utf-8
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-# JavaScript
-[*.js]
-indent_style = tab
-indent_size = 4
-max_line_length = 110
-
-# YAML
-[*.{yml,yaml}]
-indent_style = space
-indent_size = 2
-max_line_length = 110
-
-# Markdown
-[*.md]
-indent_style = space
-indent_size = 2
-trim_trailing_whitespace = false
-max_line_length = 110
-
-# POT translation templates
-[*.pot]
-indent_style = space
-indent_size = 2
-
-# Makefile
-[Makefile]
-indent_style = tab
-indent_size = 4
-
-# Shell scripts (.sh and .podman)
-[*.{sh,podman}]
-indent_style = tab
-indent_size = 4
-end_of_line = lf
-max_line_length = 110
diff --git a/luci-app-podman/.gitignore b/luci-app-podman/.gitignore
deleted file mode 100644
index 554de31ee..000000000
--- a/luci-app-podman/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-docs/swagger-latest.yaml
-.claude
-CLAUDE.md
-.DS_Store
-*.bak
-*-cleaned.pot
-.mcp.json
diff --git a/luci-app-podman/.jsbeautifyrc b/luci-app-podman/.jsbeautifyrc
deleted file mode 100644
index 58217af01..000000000
--- a/luci-app-podman/.jsbeautifyrc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "indent_with_tabs": true,
- "editorconfig": true,
- "space_after_anon_function": true,
- "jslint_happy": true,
- "wrap_line_length": 110
-}
diff --git a/luci-app-podman/.scripts/check-translations.sh b/luci-app-podman/.scripts/check-translations.sh
deleted file mode 100755
index 8e51b5d11..000000000
--- a/luci-app-podman/.scripts/check-translations.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-RED='\033[0;31m'
-GREEN='\033[0;32m'
-BLUE='\033[0;34m'
-BOLD='\033[1m'
-NC='\033[0m'
-
-PO_FILE="$1"
-JS_DIR="$2"
-
-if [[ -z "$PO_FILE" || -z "$JS_DIR" ]]; then
- echo -e "${BOLD}Usage:${NC} $0 "
- exit 1
-fi
-
-TEMP_DEFINED=$(mktemp)
-TEMP_USED=$(mktemp)
-
-echo -e "${BLUE}Read PO-File: $PO_FILE${NC}"
-grep '^\s*msgid "' "$PO_FILE" | sed 's/^\s*msgid "//;s/"$//' | grep -v '^$' | sort -u > "$TEMP_DEFINED"
-
-COUNT_DEFINED=$(wc -l < "$TEMP_DEFINED" | xargs)
-echo " -> $COUNT_DEFINED IDs found."
-
-echo -e "${BLUE}Search JS-Files recursive in: $JS_DIR${NC}"
-
-grep -r -h -o -E "_\(['\"][^'\"]+['\"]\)" "$JS_DIR" --include="*.js" > "$TEMP_USED"
-
-sed -i '' -E "s/^_\(['\"]//;s/['\"]\)$//" "$TEMP_USED"
-
-sort -u "$TEMP_USED" -o "$TEMP_USED"
-
-COUNT_USED=$(wc -l < "$TEMP_USED" | xargs)
-echo " -> $COUNT_USED used Strings found."
-
-echo "---------------------------------------------------"
-
-echo -e "${BOLD}Not used Message IDs (in PO, not in Code):${NC}"
-comm -23 "$TEMP_DEFINED" "$TEMP_USED" > "unused_ids.txt"
-if [[ -s "unused_ids.txt" ]]; then
- cat "unused_ids.txt"
-else
- echo -e "${GREEN}None. all clean!${NC}"
-fi
-
-echo "---------------------------------------------------"
-
-echo -e "${BOLD}Not defined Message IDs (in Code, missing in PO):${NC}"
-comm -13 "$TEMP_DEFINED" "$TEMP_USED" > "missing_ids.txt"
-if [[ -s "missing_ids.txt" ]]; then
- cat "missing_ids.txt"
-else
- echo -e "${GREEN}None. All here!${NC}"
-fi
-
-# Aufräumen
-rm "$TEMP_DEFINED" "$TEMP_USED" "unused_ids.txt" "missing_ids.txt" 2>/dev/null
diff --git a/luci-app-podman/.scripts/update-pot.sh b/luci-app-podman/.scripts/update-pot.sh
deleted file mode 100755
index d0f1f8832..000000000
--- a/luci-app-podman/.scripts/update-pot.sh
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/bash
-#
-# POT File Updater for LuCI App Podman
-# Regenerates the POT file from JavaScript source code
-# Supports both singular _('...') and plural N_(n, '...', '...') forms
-#
-
-set -e
-
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
-POT_FILE="$PROJECT_ROOT/po/templates/podman.pot"
-HTDOCS_DIR="$PROJECT_ROOT/htdocs"
-
-# Colors for output
-GREEN='\033[0;32m'
-YELLOW='\033[0;33m'
-NC='\033[0m' # No Color
-
-# Temp files
-PLURAL_PAIRS=$(mktemp)
-PLURAL_SKIP=$(mktemp)
-CODE_STRINGS=$(mktemp)
-FILTERED_STRINGS=$(mktemp)
-
-# Cleanup on exit
-trap "rm -f $PLURAL_PAIRS $PLURAL_SKIP $CODE_STRINGS $FILTERED_STRINGS" EXIT
-
-echo "POT File Updater for LuCI App Podman"
-echo "====================================="
-echo ""
-
-# Step 1: Extract plural forms N_(count, 'singular', 'plural')
-echo "Extracting plural forms..."
-
-find "$HTDOCS_DIR" -name "*.js" -exec cat {} \; | \
- perl -0777 -ne "while (/N_\s*\([^,]+,\s*'([^']+)'\s*,\s*'([^']+)'\s*\)/gs) { print \"\$1|\$2\n\"; }" | \
- sort -u > "$PLURAL_PAIRS"
-
-PLURAL_COUNT=$(wc -l < "$PLURAL_PAIRS" | tr -d ' ')
-# Handle empty file (wc returns 1 for empty file with no newline)
-if [ ! -s "$PLURAL_PAIRS" ]; then
- PLURAL_COUNT=0
-fi
-echo "Found $PLURAL_COUNT plural form(s)"
-
-# Step 2: Build skip list (both singular and plural strings from N_() calls)
-# These should not appear as standalone msgid entries
-cat "$PLURAL_PAIRS" | while IFS='|' read -r singular plural; do
- echo "$singular"
- echo "$plural"
-done | sort -u > "$PLURAL_SKIP"
-
-# Step 3: Extract all singular strings _('...')
-echo "Extracting singular strings..."
-
-find "$HTDOCS_DIR" -name "*.js" -exec cat {} \; | \
- perl -0777 -ne "while (/(? "$CODE_STRINGS"
-
-TOTAL_SINGULAR=$(wc -l < "$CODE_STRINGS" | tr -d ' ')
-
-# Step 4: Filter out strings that are covered by plural forms
-if [ -s "$PLURAL_SKIP" ]; then
- grep -vxFf "$PLURAL_SKIP" "$CODE_STRINGS" > "$FILTERED_STRINGS" || true
-else
- cp "$CODE_STRINGS" "$FILTERED_STRINGS"
-fi
-
-FILTERED_COUNT=$(wc -l < "$FILTERED_STRINGS" | tr -d ' ')
-SKIPPED=$((TOTAL_SINGULAR - FILTERED_COUNT))
-
-if [ $SKIPPED -gt 0 ]; then
- echo -e "${YELLOW}Skipped $SKIPPED string(s) covered by plural forms${NC}"
-fi
-echo "Found $FILTERED_COUNT unique singular string(s)"
-
-# Step 5: Generate POT file
-echo ""
-echo "Generating POT file..."
-
-# Write header
-cat > "$POT_FILE" << 'EOF'
-msgid ""
-msgstr "Content-Type: text/plain; charset=UTF-8"
-
-EOF
-
-# Write plural entries
-if [ -s "$PLURAL_PAIRS" ]; then
- while IFS='|' read -r singular plural; do
- echo "msgid \"$singular\""
- echo "msgid_plural \"$plural\""
- echo "msgstr[0] \"\""
- echo "msgstr[1] \"\""
- echo ""
- done < "$PLURAL_PAIRS" >> "$POT_FILE"
-fi
-
-# Write singular entries
-while IFS= read -r line; do
- # Skip empty lines
- [ -z "$line" ] && continue
- echo "msgid \"$line\""
- echo "msgstr \"\""
- echo ""
-done < "$FILTERED_STRINGS" >> "$POT_FILE"
-
-TOTAL_ENTRIES=$((PLURAL_COUNT + FILTERED_COUNT))
-
-echo ""
-echo -e "${GREEN}POT file updated successfully!${NC}"
-echo "Location: $POT_FILE"
-echo "Entries: $TOTAL_ENTRIES ($PLURAL_COUNT plural, $FILTERED_COUNT singular)"
-echo ""
-echo "Note: Remember to update translation files (po/*/podman.po) with new strings."
diff --git a/luci-app-podman/LICENSE b/luci-app-podman/LICENSE
deleted file mode 100644
index 7be6caebd..000000000
--- a/luci-app-podman/LICENSE
+++ /dev/null
@@ -1,176 +0,0 @@
-Apache License
-Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
diff --git a/luci-app-podman/Makefile b/luci-app-podman/Makefile
deleted file mode 100644
index edd5b7e8a..000000000
--- a/luci-app-podman/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-PKG_NAME := luci-app-podman
-PKG_VERSION := 2.3.4
-PKG_RELEASE := 1
-PKG_URL := https://github.com/Zerogiven-OpenWRT-Packages/luci-app-podman
-PKG_MAINTAINER := Christopher Söllinger
-PKG_LICENSE := Apache-2.0
-PKG_LICENSE_FILES := LICENSE
-
-PKG_BUILD_DEPENDS := podman
-
-LUCI_TITLE := LuCI Podman Application
-LUCI_DESCRIPTION := LuCI Support for podman
-LUCI_DEPENDS := +luci-base +rpcd +rpcd-mod-ucode +ucode-mod-socket +ucode-mod-struct +ucode-mod-uloop +ucode-mod-fs +ucode-mod-html +ucode-mod-uci +liblucihttp-ucode +coreutils-timeout
-LUCI_PKGARCH := all
-
-include $(TOPDIR)/feeds/luci/luci.mk
-
-# call BuildPackage - OpenWrt buildroot signature
diff --git a/luci-app-podman/README.md b/luci-app-podman/README.md
deleted file mode 100644
index 632fafe1a..000000000
--- a/luci-app-podman/README.md
+++ /dev/null
@@ -1,161 +0,0 @@
-[](https://openwrt.org/)
-[](https://openwrt.org/)
-[](https://github.com/Zerogiven-OpenWRT-Packages/luci-app-podman/releases)
-[](https://github.com/Zerogiven-OpenWRT-Packages/luci-app-podman/releases)
-[](https://github.com/Zerogiven-OpenWRT-Packages/luci-app-podman/issues)
-
-# LuCI App Podman
-
-Modern and feature rich LuCI web interface for managing Podman on OpenWrt. Some ideas which may come in one of the next version(s) can you find in the [todo's](./docs/TODO.md) file. Also feel free to open a ticket or send me a mail if you have suggestions, ideas or problems 🙂
-
-
-
-Navigation
-
-- [Features](#features)
-- [Screenshots](#screenshots)
-- [Requirements](#requirements)
-- [Installation](#installation)
-- [Usage](#usage)
-- [Container Auto-Update](#container-auto-update)
-- [Container Auto-Start](#container-auto-start)
-- [Configuration](#configuration)
-- [Credits](#credits)
-
-
-
-## Features
-
-- **Container Management**: Start, stop, restart, create, remove containers
-- **Live Streaming**: Real-time logs, stats, and process list streamed directly via a dedicated ucode controller
-- **Container Auto-Update**: Check for image updates and recreate containers with latest images (see [Auto-Update](#container-auto-update))
-- **Auto-start Support**: Automatic init script generation for containers with restart policies
-- **Image Management**: Pull, remove, inspect images with streaming progress
-- **Volume Management**: Create, delete, export/import volumes with tar backups
-- **Network Management**: Bridge, macvlan, ipvlan with VLAN support and optional OpenWrt integration (auto-creates bridge devices, network interfaces, dnsmasq exclusion, and shared `podman` firewall zone with DNS access rules)
-- **Pod Management**: Create pods with shared namespaces, lifecycle actions (start/stop/restart/pause/unpause), and add containers to existing pods directly from the create form
-- **Secret Management**: Encrypted storage for sensitive data
-- **System Overview**: Resource usage, system-wide cleanup
-- **Multilingual**: de, es, fr, nl, ru, zh_Hans, zh_Hant
-
-## Screenshots
-
-| Overview | Container List | Container Info |
-|---|---|---|
-|  |  |  |
-
-| Live Logs | Image List | Network Create |
-|---|---|---|
-|  |  |  |
-
-## Requirements
-
-- OpenWrt 25.12 / 24.10
-- Dependencies:
- - `podman`
- - `luci-base`
- - `rpcd`
- - `rpcd-mod-ucode`
- - `ucode-mod-socket / -struct / -uloop / -fs / -html / -uci`
- - `liblucihttp-ucode`
- - `coreutils-timeout`
-- Sufficient storage for images/containers
-
-## Installation
-
-### From Package Feed
-
-You can setup this package feed to install and update it with apk/opkg:
-
-[https://github.com/Zerogiven-OpenWRT-Packages/package-feed](https://github.com/Zerogiven-OpenWRT-Packages/package-feed)
-
-### From Package
-
-**OpenWrt 25.12** (apk):
-```bash
-wget https://github.com/Zerogiven-OpenWRT-Packages/luci-app-podman/releases/download/v2.3.4/luci-app-podman_2.3.4-r1_all.apk
-apk update && apk add --allow-untrusted luci-app-podman_2.3.4-r1_all.apk
-```
-
-**OpenWrt 24.10** (opkg):
-```bash
-wget https://github.com/Zerogiven-OpenWRT-Packages/luci-app-podman/releases/download/v2.3.4/luci-app-podman_2.3.4-r1_all.ipk
-opkg update && opkg install luci-app-podman_2.3.4-r1_all.ipk
-```
-
-### From Source
-
-```bash
-git clone https://github.com/Zerogiven-OpenWRT-Packages/luci-app-podman.git package/luci-app-podman
-make menuconfig # Navigate to: LuCI → Applications → luci-app-podman,Utilities → podman
-make package/luci-app-podman/compile V=s
-```
-
-## Usage
-
-Access via **Podman** in LuCI, or directly at:
-
-```
-http://your-router-ip/cgi-bin/luci/admin/podman
-```
-
-If encountering socket errors:
-
-```bash
-/etc/init.d/podman start
-/etc/init.d/podman enable
-```
-
-## Container Auto-Start
-
-You can generate a startup script which respects the restart policy set in the container.
-
-> [!TIP]
-> If you want save startup scripts during an upgrade you have to config your `/etc/sysupgrade.conf` with `/etc/init.d/podman-container-*`.
-> ```bash
-> echo "/etc/init.d/podman-container-*" >> /etc/sysupgrade.conf
-> ```
-
-## Container Auto-Update
-
-The auto-update feature checks for newer container images and recreates containers with the updated images while preserving all configuration.
-
-### Setup
-
-To enable auto-update for a container, add the label when creating it:
-
-```bash
-podman run -d --name mycontainer \
- --label io.containers.autoupdate=registry \
- nginx:latest
-```
-
-Or add via the LuCI interface in the container creation form under "Labels".
-
-### How to Update
-
-1. Go to **Podman → Overview**
-2. Click **"Check for Updates"** in the System Maintenance section
-3. The system compares image digests without pulling (no bandwidth used until update)
-4. Select which containers to update
-5. Click **"Update Selected"** to pull new images and recreate containers
-
-Container names and init scripts are preserved - no manual reconfiguration needed.
-
-## Configuration
-
-The app stores its settings in `/etc/config/luci-podman`:
-
-| Option | Default | Description |
-|--------|---------|-------------|
-| `init_start_priority` | `99` | procd start priority for container init scripts (max 99: procd sorts rc.d symlinks as strings, so 100+ breaks ordering) |
-| `socket_path` | `/run/podman/podman.sock` | Path to the Podman API socket |
-
-## Credits
-
-Inspired by:
-
-- [openwrt-podman](https://github.com/breeze303/openwrt-podman/) - Podman on OpenWrt
-- [openwrt/luci-app-dockerman](https://github.com/openwrt/luci/tree/master/applications/luci-app-dockerman) - Docker LuCI design patterns
-- [lisaac/luci-app-dockerman](https://github.com/lisaac/luci-app-dockerman) - Docker LuCI design patterns
-- [OpenWrt Podman Guide](https://openwrt.org/docs/guide-user/virtualization/podman) - Official documentation
diff --git a/luci-app-podman/docs/TODO.md b/luci-app-podman/docs/TODO.md
deleted file mode 100644
index 336eeb504..000000000
--- a/luci-app-podman/docs/TODO.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# ToDo's / Known issues
-
-## Common
-
-- Optimize Mobile View (4)
-- Checkout new table filters for 25.12 and backwards compatibility (4)
-- Sortable table (3)
-- Check for duplicated code (2)
-
-## Overview
-
-- Configuration Tab (2)
-
-### Prune
-
-- Long running prune fails after 50s (1)
-
-### Auto Update
-
-- If re-create container fails, it would be nice if user could re-create the container. Some Ideas: (2)
- 1. Show cli command
- 2. Show spec data and make it possible to import
-
-## Container
-
-- Checkpoints export/import (3)
-
-### Add
-
-- Missing restartRetries (3)
-- Missing health check settings (2)
-- Fill form from cli command (3)
-- Timezone field (3)
-
-### List
-
-### Details
-
-- Re-create container with new image (4)
-- Add missing restartRetries (3)
-- Healthcheck tab with form and manual health check action (2)
-- Init.d priority editable. Maybe directly in the file. (3)
-- Add some more informations (3)
- - devices
-- Attach to a container (ttyd) (3)
-- Add devices show/add/remove (3)
-- Add advanced update tab. Pure JSON which gets sent to update endpoint (2)
-- Timezone field (3)
-
-## Pods
-
-- Think how to handle restart policy (2)
-
-### List
-
-- Replace table from container modal with one from jsapi (2)
-
-### Details
-
-- In containers tab add create/remove/refresh button (2)
-
-## Volumes
-
-### List
-
-- Big exports which takes more than 50s are failing (2)
-
-## Networks
-
-### Details
-
-- Create detail page (2)
-- Update network (2)
-- Disconnect container (2)
-
-## Secrets
-
-### Add
-
-### List
diff --git a/luci-app-podman/docs/explicitly-excluded-features.md b/luci-app-podman/docs/explicitly-excluded-features.md
deleted file mode 100644
index 5921b41a2..000000000
--- a/luci-app-podman/docs/explicitly-excluded-features.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# 🚫 Explicitly Excluded Features
-
-The following features were considered but explicitly excluded:
-
-## Prune Operations
-- ❌ Container Prune - Already available via System Prune in Overview
-- ❌ Image Prune - Already available via System Prune in Overview
-- ❌ Network Prune - Already available via System Prune in Overview
-- ❌ Volume Prune - Already available via System Prune in Overview
-- ❌ Pod Prune - Already available via System Prune in Overview
-
-**Reason:** Global system prune in overview.js handles all cleanup operations
-
-## Image Management
-- ❌ Image Tag - Not needed for typical use cases
-- ❌ Image History - Not needed for typical use cases
-
-**Reason:** Low value for typical OpenWrt/embedded use cases
-
-## Advanced Features
-- ❌ Container Exec - Too complex, SSH/CLI available
-- ❌ Container Archive (Copy Files) - Too complex UI
-- ❌ Container Checkpoint/Restore - May not work on OpenWrt (needs CRIU)
-- ❌ Image Build - Too complex, build elsewhere and pull
-- ❌ Generate Systemd Units - OpenWrt doesn't use systemd
-- ❌ Manifest Management - Too niche
-- ❌ System Events (Real-time Updates) - Events disabled on system (`events_logger = "none"`)
diff --git a/luci-app-podman/docs/screenshots/container-health.png b/luci-app-podman/docs/screenshots/container-health.png
deleted file mode 100644
index 1abb80a69..000000000
Binary files a/luci-app-podman/docs/screenshots/container-health.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/container-info.png b/luci-app-podman/docs/screenshots/container-info.png
deleted file mode 100644
index ec0795e4b..000000000
Binary files a/luci-app-podman/docs/screenshots/container-info.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/container-list.png b/luci-app-podman/docs/screenshots/container-list.png
deleted file mode 100644
index f81382c69..000000000
Binary files a/luci-app-podman/docs/screenshots/container-list.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/container-log.png b/luci-app-podman/docs/screenshots/container-log.png
deleted file mode 100644
index 802a4502e..000000000
Binary files a/luci-app-podman/docs/screenshots/container-log.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/container-resource.png b/luci-app-podman/docs/screenshots/container-resource.png
deleted file mode 100644
index 6774f0317..000000000
Binary files a/luci-app-podman/docs/screenshots/container-resource.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/container-stats.png b/luci-app-podman/docs/screenshots/container-stats.png
deleted file mode 100644
index a20ad0623..000000000
Binary files a/luci-app-podman/docs/screenshots/container-stats.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/image-list.png b/luci-app-podman/docs/screenshots/image-list.png
deleted file mode 100644
index 4bf6f08bc..000000000
Binary files a/luci-app-podman/docs/screenshots/image-list.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/network-create.png b/luci-app-podman/docs/screenshots/network-create.png
deleted file mode 100644
index 86b94f4a4..000000000
Binary files a/luci-app-podman/docs/screenshots/network-create.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/network-setup-openwrt-integration.png b/luci-app-podman/docs/screenshots/network-setup-openwrt-integration.png
deleted file mode 100644
index e46b8dff6..000000000
Binary files a/luci-app-podman/docs/screenshots/network-setup-openwrt-integration.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/overview.png b/luci-app-podman/docs/screenshots/overview.png
deleted file mode 100644
index 32b8d59a0..000000000
Binary files a/luci-app-podman/docs/screenshots/overview.png and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/screenshots.gif b/luci-app-podman/docs/screenshots/screenshots.gif
deleted file mode 100644
index b6618375e..000000000
Binary files a/luci-app-podman/docs/screenshots/screenshots.gif and /dev/null differ
diff --git a/luci-app-podman/docs/screenshots/volume-inspect.png b/luci-app-podman/docs/screenshots/volume-inspect.png
deleted file mode 100644
index 9d1bc4650..000000000
Binary files a/luci-app-podman/docs/screenshots/volume-inspect.png and /dev/null differ
diff --git a/luci-app-podman/docs/testing-manual.md b/luci-app-podman/docs/testing-manual.md
deleted file mode 100644
index fde4fd99d..000000000
--- a/luci-app-podman/docs/testing-manual.md
+++ /dev/null
@@ -1,365 +0,0 @@
-# Manual UI Testing Plan
-
-1. xx
-
-## 0. Authentication
-
-- [x] **0.1** Navigate to `http:///cgi-bin/luci` → Redirected to login page
-- [x] **0.2** Submit correct credentials → Redirected to LuCI dashboard
-- [x] **0.3** Navigate to `/admin/podman` → Overview page loads without re-auth
-- [x] **0.4** Open browser Console tab → No JS errors
-
----
-
-## 1. Overview (`/admin/podman`)
-
-- [x] **1.1** Load overview → Page loads; all counters visible (0 is fine)
-- [x] **1.2** Podman version string visible → Not empty, not "undefined"
-- [ ] **1.3** System status indicator visible → Shows running (socket available)
-- [x] **1.4** Note all current counts → Baseline for comparison after later steps
-
-### 1a. Auto-update modal - live progress
-
-Prereq: at least one container with label `io.containers.autoupdate=registry`.
-
-- [ ] **1.5** Click "Check for Updates" → Spinner per container → "Apply Updates" modal lists candidates
-- [ ] **1.6** Tick a container with an actually-newer image upstream → Click Update → Modal switches to log view with `Update image: 1/N - ` header, spinner running, Close button **disabled**
-- [ ] **1.7** Log shows `Pulling [`, then live `Trying to pull...`, `Copying blob ...` lines - progress lines with CR overwrite the previous line (no flood of "Copying blob X 50%, 51%, 52%, ...")
-- [ ] **1.8** After pull, log shows stage markers: `→ Stopping container`, `→ Removing container`, `→ Creating container`, `→ Starting container`, `→ Reinstating init script`, `✓ Updated to ]`
-- [ ] **1.9** Multi-container update: each container delimited by `━━ ━━`; previous container's log remains visible above current one
-- [ ] **1.10** After loop ends, counter shows `Done.`, spinner stops, Close button **enabled**
-- [ ] **1.11** Click Close → modal dismisses → summary alert appears (`Containers updated successfully` for full success, list of failures otherwise)
-- [ ] **1.12** Pull failure (rename the container's image to a non-existent registry before running, or change tag to bogus): log shows `✗ `, run continues to next container, summary marks failed
-- [ ] **1.13** Mid-flight failure (SSH `podman run -d --name alpine sleep 3600` between Stop and Create, or simulate by other means): log shows `✗ Create failed: ...` for that container, summary marks failed
-- [ ] **1.14** Old-image cleanup: after successful update of one container, log shows `━━ Cleaning up old images... ━━` then either `✓ Removed old image ` or `! Old image could not be removed - still in use by another container`
-- [ ] **1.15** Modal scroll: when log overflows visible area, content auto-scrolls to bottom on append; scroll up manually → new lines append at bottom but viewport stays where the user put it (sticky-scroll)
-- [ ] **1.16** Long pull crossing uhttpd `script_timeout` (~55s): server-side connection rotates transparently (auto-reconnect in `Model._stream`); log keeps growing, no spurious error
-
----
-
-## 2. Images (`/admin/podman/images`)
-
-- [x] **2.1** Load images list → Page loads (may be empty)
-- [x] **2.2** Click "Pull Image" → Form/modal appears with name input
-- [x] **2.3** Submit empty form → Validation error, no request sent
-- [x] **2.4** Pull nonexistent image (e.g. `this-does-not-exist:fake`) → Error notification shown, list unchanged
-- [x] **2.5** Pull `alpine:latest` → Progress indicator → success notification → `alpine` appears in list
-- [ ] **2.6** Pull `alpine:latest` again (already exists) → Graceful result (no crash, may show "already up to date")
-- [x] **2.7** Click inspect on `alpine` → Modal opens with JSON image data
-- [x] **2.8** Return to overview → Image count incremented by 1
-
----
-
-## 3. Containers (`/admin/podman/containers`)
-
-*Requires `alpine:latest` from step 2.5.*
-
-### 3a. Create
-
-- [x] **3.1** Load containers list → Page loads (may be empty)
-- [x] **3.2** Click "Create Container" → Form modal opens
-- [x] **3.3** Submit empty form → Validation errors on required fields
-- [x] **3.4** Fill name: `test-alpine`, image: `alpine:latest`, no other changes → Submit → Container created; `test-alpine` visible in list
-- [x] **3.5** Return to overview → Container count incremented
-
-### 3b. List operations
-
-- [x] **3.6** Verify `test-alpine` row shows correct Name, Image, State
-- [x] **3.7** Select `test-alpine` checkbox → Only that row selected
-- [x] **3.8** Click top "select all" checkbox → All rows selected
-- [x] **3.9** Click top checkbox again → All deselected
-
-### 3c. Start / Stop / Restart
-
-- [x] **3.10** If container is stopped: select → Start → State changes to `Running`; success notification
-- [x] **3.11** Select running container → Stop → State changes to `Exited`; success notification
-- [x] **3.12** Select stopped container → Restart → State changes to `Running`
-
-### 3d. Detail view - Info tab
-
-- [x] **3.13** Click `test-alpine` name link → Navigates to container detail page
-- [x] **3.14** Name, image, state displayed → Matches list view
-- [x] **3.15** Edit container name to `test-alpine-renamed` → Save → Name updated; notification shown
-- [x] **3.16** Change restart policy to `always` → Save → Policy updated; success notification
-- [x] **3.17** Init script auto-generated → Auto-start indicator shows enabled
-- [x] **3.18** Click "Show Init Script" → Modal with script content; script references `test-alpine-renamed`
-- [x] **3.19** Toggle init script disabled → Indicator changes
-- [x] **3.20** Toggle init script enabled again → Indicator reverts
-- [x] **3.21** Change restart policy to `no` → Save → Init script removed/disabled
-- [x] **3.22** Navigate back to list → Name shown as `test-alpine-renamed`
-
-### 3e. Detail view - Resources tab
-
-- [x] **3.23** Click Resources tab → Tab activates; current limits shown
-- [ ] **3.24** Set CPU limit to `0.5` → Save → After page reload, Resources tab is active (tab persistence)
-- [x] **3.25** Set Memory limit to `64m` → Save → Value persisted
-- [x] **3.26** Enter invalid CPU value (e.g. `abc`) → Save → Validation error; no save
-
-### 3f. Detail view - Stats tab
-
-- [x] **3.27** Start container (if stopped)
-- [x] **3.28** Click Stats tab → CPU%, Memory, Net I/O data appears
-- [x] **3.29** Stop container; click Stats tab → Graceful empty/zero state, no JS crash
-
-### 3g. Detail view - Logs tab
-
-- [x] **3.30** Click Logs tab → Log output area visible (may be empty for alpine)
-- [x] **3.31** Change line count to `50` → Apply → Fetches last 50 lines
-- [ ] **3.32** Enable live streaming toggle → Toggle activates
-- [x] **3.33** Disable live streaming → Streaming stops, toggle off
-- [x] **3.34** Click Clear → Log area clears
-
-### 3h. Detail view - Processes tab
-
-- [x] **3.35** Start container; click Processes tab → Process table appears
-- [x] **3.36** Stop container; click Processes tab → Graceful empty/error state, no JS crash
-
-### 3i. Network management (on detail page)
-
-- [x] **3.37** Note current networks attached → Baseline
-- [x] **3.38** Disconnect default network → Network removed from list
-- [x] **3.39** Reconnect the network → Network added back
-- [x] **3.40** Connect a network with valid static IP → Network added with IP shown
-- [x] **3.41** Connect a network with invalid IP → Validation error
-
-### 3j. Pause / Unpause
-
-- [ ] **3.42** List view: select a running container → click ⏸⏸ Pause → state changes to `paused`; success notification
-- [ ] **3.43** List view: same paused container selected → click ▶ Start → state changes back to `running` (Start polymorphically unpauses paused containers)
-- [ ] **3.44** Detail view: container is running → ▶ Start is highlighted as active, ⏸⏸ Pause is clickable
-- [ ] **3.45** Detail view: click Pause → reload → state is `paused`, ⏸⏸ Pause is now highlighted, ▶ Start is clickable
-- [ ] **3.46** Detail view: click Start while paused → reload → state is `running`, ▶ Start highlighted again
-- [ ] **3.47** Detail view: streams (stats / logs / processes) stop before pause fires (no reconnect storm in DevTools Network panel)
-- [ ] **3.48** Multi-select on list: mix of running + paused → click ▶ Start → running stays running, paused becomes running (per-container dispatch)
-
----
-
-## 4. Volumes (`/admin/podman/volumes`)
-
-- [x] **4.1** Load volumes list → Page loads (may be empty)
-- [x] **4.2** Click "Create Volume" → Form appears
-- [x] **4.3** Submit empty form → Name will be generated
-- [x] **4.4** Create volume named `test-vol` → Appears in list with name, driver, created date
-- [x] **4.5** Click inspect on `test-vol` → JSON modal shows volume data
-- [x] **4.6** Return to overview → Volume count incremented
-- [x] **4.7** Select `test-vol` → Delete → Confirmation modal → confirm → removed from list
-- [ ] **4.8** Create volume `test-vol-prune` and leave it → Used in prune test (step 8.2)
-
----
-
-## 5. Networks (`/admin/podman/networks`)
-
-- [x] **5.1** Load networks list → Default `podman` network visible
-- [x] **5.2** Note OpenWrt column for default network → Status icon shown
-- [x] **5.3** Click "Create Network" → Form opens
-- [x] **5.4** Submit empty form → Validation error
-- [x] **5.5** Create `test_net`, subnet `10.220.0.0/24`, gateway `10.220.0.1`, OpenWrt integration checked → Network created; OpenWrt column shows `✓`
-- [x] **5.6** Verify UCI config created → SSH: `uci show network.test_net` returns values
-- [x] **5.7** Create `test_net_b` with no subnet, integration unchecked → Network created; OpenWrt column shows `-`
-- [x] **5.8** If any network shows `X` (incomplete integration): click it → setup → icon changes to `✓`
-- [x] **5.9** Return to overview → Network count incremented
-- [x] **5.10** Select `test_net` → Delete → Confirmation mentions OpenWrt cleanup → confirm → network removed; UCI config removed
-- [x] **5.11** Select `test_net_bare` → Delete → Removed cleanly (no UCI to clean up)
-
----
-
-## 6. Secrets (`/admin/podman/secrets`)
-
-- [x] **6.1** Load secrets list → Page loads (may be empty)
-- [x] **6.2** Click "Create Secret" → Form with name + value fields
-- [x] **6.3** Submit empty form → Validation error
-- [x] **6.4** Create secret name `test-secret`, value `hunter2` → Appears in list; value NOT shown anywhere
-- [x] **6.5** Click inspect on `test-secret` → Modal shows metadata; `SecretData` field hidden
-- [x] **6.6** Delete `test-secret` → Removed from list
-
----
-
-## 7. Pods (`/admin/podman/pods`)
-
-*Requires `alpine:latest` from step 2.5. If a user-defined network exists from section 5, note its name as ``.*
-
-### 7a. List view
-
-- [x] **7.1** Load pods list → Page loads with empty/populated table; no "Work in progress…" stub
-- [x] **7.2** Toolbar visible → Create / Delete / Reload / ▶ / ■ / ⟳ / ⏸ / ⏵ buttons present
-- [x] **7.3** Click Reload with empty list → No error, indicator appears briefly
-
-### 7b. Create - minimal
-
-- [x] **7.4** Click "Create" → Pod form modal opens with default fields populated
-- [x] **7.5** Submit empty form → No validation error (name auto-generates); pod appears with generated name
-- [x] **7.6** Create pod name `pod-min`, all other defaults → Modal closes, success notification, `pod-min` row appears
-- [x] **7.7** Verify SSH `podman pod inspect pod-min` → Pod exists with one infra container
-- [x] **7.8** Containers column shows `1 ▸` for `pod-min`
-
-### 7c. Create - full options
-
-- [x] **7.9** Open Create form → Name `pod-full`, Hostname `pod-full-host`, Shared Namespaces `cgroup,ipc,net,uts`, Infra ON, Network ``, DNS Servers `1.1.1.1` and `9.9.9.9`, DNS Search `lan`, CPU Limit `1.0`, CPU Set `0-1`, Memory `256m`, Labels `app=demo\nenv=test` → Submit
-- [x] **7.10** SSH `podman pod inspect pod-full | jq '.Hostname'` → `pod-full-host`
-- [x] **7.11** SSH `podman pod inspect pod-full | jq '.InfraConfig.NetworkOptions'` → contains DNS server + search entries
-- [x] **7.12** SSH `podman pod inspect pod-full | jq '.Labels'` → `app: demo`, `env: test`
-- [x] **7.13** Networks column for `pod-full` → shows ``
-
-### 7d. Status badges
-
-- [x] **7.14** New pod → Status badge `Created` (gray)
-- [x] **7.15** After Start → Badge `Running` (green)
-- [x] **7.16** After Pause → Badge `Paused` (orange)
-- [x] **7.17** After Stop → Badge `Exited` or `Stopped` (red)
-
-### 7e. Lifecycle - single select
-
-- [x] **7.18** Tick `pod-min`, click ▶ Start → Loading "Starting pod: 1/1", refresh shows `Running`
-- [x] **7.19** Click ■ Stop → Status `Exited`/`Stopped`
-- [x] **7.20** Click ⟳ Restart → Status `Running`
-- [x] **7.21** Click ⏸ Pause → Status `Paused`
-- [x] **7.22** Click ⏵ Unpause → Status `Running`
-
-### 7f. Lifecycle - multi-select
-
-- [ ] **7.23** Create `pod-a` and `pod-b` (defaults), select both → ▶ Start
-- [ ] **7.24** Loading modal shows "Starting pod: 1/2" then "2/2"
-- [ ] **7.25** Both pods end up `Running`
-- [ ] **7.26** No JS console errors during multi-action
-
-### 7g. Detail page navigation (from list)
-
-- [ ] **7.27** Click pod **Name** in list → Navigates to `/admin/podman/pod/` (no more inspect modal)
-- [ ] **7.28** Browser back button → Returns to pods list with state preserved
-
-### 7h. Containers expand modal
-
-- [x] **7.29** SSH `podman run -d --pod pod-min --name pod-min-c1 alpine sleep 3600` → container created in pod
-- [x] **7.30** Reload pods list → `pod-min` Containers column shows `2 ▸`
-- [x] **7.31** Click `2 ▸` link → Modal "Containers in pod pod-min" opens with 2 rows (infra + new)
-- [x] **7.32** Each row shows Name, truncated ID, Status badge, Restarts count
-- [x] **7.33** Click container ID link in modal → Navigates to `/admin/podman/container/` detail view
-
-### 7i. Pod removal
-
-- [ ] **7.34** Stop `pod-min` first → Status `Exited`
-- [ ] **7.35** Tick `pod-min` → Delete → Confirm
-- [ ] **7.36** SSH `podman pod ls` → `pod-min` gone
-- [ ] **7.37** SSH `podman ps -a` → `pod-min-c1` also gone (cascade delete via force)
-
-### 7j. Container form integration
-
-- [x] **7.38** Navigate **Podman → Containers → Create** → Form shows new **Pod** ListValue (after Image) with "(none)" + existing pod names
-- [x] **7.39** Select Pod = `pod-full` → Network, Hostname, Port Mappings, Expose Ports fields hide
-- [x] **7.40** Select Pod = "(none)" → Hidden fields reappear
-- [x] **7.41** Create container with Pod `pod-full`, Image `alpine:latest`, Command `sleep 3600`, Start ON → Success
-- [x] **7.42** SSH `podman ps --filter pod=pod-full` → New container listed
-- [x] **7.43** Pods list `pod-full` Containers column → count incremented
-
-### 7k. Edge cases
-
-- [ ] **7.44** Create pod with name `Bad Name!` → Validation error (uciname constraint)
-- [ ] **7.45** Toggle "Create Infra Container" OFF → Network/DNS/Infra Image fields hide
-- [ ] **7.46** Submit pod with Infra OFF → Pod created without infra container; SSH `podman pod inspect` confirms
-- [ ] **7.47** Try Stop on already-stopped pod → No JS error (graceful handling of API 304/409)
-- [ ] **7.48** Try Pause on stopped pod → Error notification, no JS crash
-
-### 7l. Regression - non-pod container create
-
-- [ ] **7.49** Create container with Pod = "(none)", port mapping `8080:80`, network ``, hostname `freebee` → Success
-- [ ] **7.50** SSH inspect → port mapping, network and hostname present (confirms `if (!data.pod)` guards don't break the non-pod path)
-
-### 7m. Cleanup
-
-- [ ] **7.51** SSH `podman pod rm -f pod-full pod-a pod-b` → All test pods removed
-- [ ] **7.52** SSH `podman ps -a` → No leftover test containers
-- [ ] **7.53** Reload pods list → Empty/clean state
-
-### 7n. Detail page - load & header (`/admin/podman/pod/`)
-
-- [ ] **7.54** Direct URL `/admin/podman/pod/` → Detail page loads, no console errors
-- [ ] **7.55** Header shows pod name and back-arrow button → back button returns to pods list
-- [ ] **7.56** Lifecycle buttons visible: ▶ Start, ■ Stop, ⟳ Restart, ⏸ Pause, ⏵ Unpause, 🗑 Delete
-- [ ] **7.57** "Active" highlight reflects current state: Running pod → ▶ highlighted, Paused pod → ⏸ highlighted, Exited pod → ■ highlighted (semantic: button describes current state, not "available action")
-- [ ] **7.58** Tabs visible: Info, Stats, Processes, Inspect
-
-### 7o. Detail page - Info tab
-
-- [ ] **7.59** Basic Information section: Name, ID (full 64-char), Status badge, Created date populated
-- [ ] **7.60** Configuration section: Hostname, Cgroup parent, Exit policy, Restart policy, Shared namespaces (comma-joined), Infra container (clickable link to `/admin/podman/container/`)
-- [ ] **7.61** Resources section: CPU period (µs), CPU quota (µs or "Unlimited"), CPU shares, CPU set, Memory limit (formatted bytes or "Unlimited"). Description note "Resources are set at pod creation and cannot be edited here." present
-- [ ] **7.62** Network section: Networks, Static IPv4, Static MAC, DNS servers, DNS search, DNS options, Extra hosts, Host network (Yes/No)
-- [ ] **7.63** Containers section: table with Name, truncated ID (clickable → container detail), Status badge - one row per container including infra
-- [ ] **7.64** Labels section: only rendered if pod has labels; otherwise omitted
-- [ ] **7.65** All empty fields show `-` placeholder
-
-### 7p. Detail page - Stats tab (pod running)
-
-- [ ] **7.66** Switch to Stats tab → Table with headers: Container, CID, CPU %, Memory, Memory %, Net I/O, Block I/O, PIDs
-- [ ] **7.67** Rows update live (humanized strings from `PodStatsReport`: e.g. "75.5%", "12mb / 24mb")
-- [ ] **7.68** Container name column resolves from pod's containers map (not the pod-name value the API returns)
-- [ ] **7.69** Switch to another tab → Stream stops (verify in DevTools Network: stream connection closes)
-- [ ] **7.70** Switch back to Stats → Stream restarts
-- [ ] **7.71** Pod is stopped → Stats tab shows "Pod is not running" warning, no stream attempt
-
-### 7q. Detail page - Processes tab (pod running)
-
-- [ ] **7.72** Switch to Processes tab → Table with columns Podman's `pod top` returns (USER, PID, ..., CMD) plus a CONTAINER column (native to pod top)
-- [ ] **7.73** Rows update live as processes change
-- [ ] **7.74** Switch away → Stream stops
-- [ ] **7.75** Pod is stopped → Shows "Pod is not running" warning
-
-### 7r. Detail page - Inspect tab
-
-- [ ] **7.76** Switch to Inspect tab → Renders full raw JSON of `podman pod inspect`
-- [ ] **7.77** Same content as old list-view inspect modal (sanity check no fields are lost)
-
-### 7s. Detail page - lifecycle actions
-
-- [ ] **7.78** Running pod → click ⏸ Pause → confirmation/loading → reload → status `Paused`, ⏸ now highlighted as active
-- [ ] **7.79** Paused pod → click ⏵ Unpause → reload → status `Running`
-- [ ] **7.80** Running pod → click ■ Stop → reload → status `Exited`, ■ highlighted
-- [ ] **7.81** Stopped pod → click ▶ Start → reload → status `Running`
-- [ ] **7.82** Click ⟳ Restart → reload → status briefly cycles to Running
-- [ ] **7.83** Click 🗑 Delete → confirm dialog → confirm → redirects to `/admin/podman/pods`, pod gone
-- [ ] **7.84** Before Stop/Pause/Restart, verify in DevTools Network: stats/processes streams close BEFORE the action fires (no reconnect storm)
-
-### 7t. Detail page - edge cases
-
-- [ ] **7.85** Pod with no containers (rare - infra-less or just created): Containers section shows "No containers in this pod"
-- [ ] **7.86** Pod with no labels: Labels section is absent (not just empty)
-- [ ] **7.87** Pod with `RestartPolicy` unset: Configuration shows `-`
-- [ ] **7.88** Pod with `memory_limit: 0` or unset: Resources shows "Unlimited"
-- [ ] **7.89** Pod with `cpu_quota: -1`: Resources shows "Unlimited"
-- [ ] **7.90** Invalid pod ID in URL → Redirects to pods list (no crash)
-- [ ] **7.91** Refresh page while stats stream active → No duplicate streams (Network panel shows single connection)
-
----
-
-## 8. Modals
-
-### Prune Modal
-
-- [x] **8.1** Open prune modal → Options shown: containers, images, volumes, networks
-- [ ] **8.2** Select only "Volumes" → Prune → Only unused volumes pruned (e.g. `test-vol-prune` from step 4.8); containers/images untouched
-- [ ] **8.3** Select "Containers" → Prune → Only stopped/exited containers removed
-
-### Auto-Update Modal
-
-- [x] **8.4** Open auto-update modal → Container list shown with current digest info
-- [x] **8.5** Click "Check for Updates" → Digest comparison runs; up-to-date containers marked
-- [x] **8.6** If outdated container detected → Update → Pulls new image, recreates container
-
----
-
-## 9. Error Handling
-
-- [ ] **9.1** Stop Podman socket (`/etc/init.d/podman stop`), load any list view → Clear RPC error message; no JS crash, no blank page
-- [x] **9.2** Navigate to `/admin/podman/container/nonexistent-id` → Graceful error, not a blank page
-- [ ] **9.3** Start Podman again (`/etc/init.d/podman start`); reload → Normal operation resumes
-- [x] **9.4** Trigger two operations quickly in succession → No race-condition crash or duplicate requests
-
----
-
-## 10. Cleanup Verification
-
-- [x] **10.1** Delete any remaining test containers (e.g. `test-alpine-renamed`)
-- [x] **10.2** Delete `alpine` image
-- [x] **10.3** Containers list → Empty (or back to pre-test state)
-- [x] **10.4** Images list → Empty (or back to pre-test state)
-- [x] **10.5** Overview counters → Match baseline from step 1.4
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/TableSelectSection.js b/luci-app-podman/htdocs/luci-static/resources/podman/TableSelectSection.js
deleted file mode 100644
index 9e8580998..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/TableSelectSection.js
+++ /dev/null
@@ -1,326 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require dom';
-'require form';
-'require ui';
-'require podman.form as podmanForm';
-'require podman.ui as podmanUI';
-'require podman.utils as podmanUtil';
-
-const FormTableSelectSection = form.TableSection.extend({
- __name__: 'Podman.Form.TableSelectSection',
-
- checkboxColumn: null,
- view: null,
- toolbarExtraButtons: [],
- modalCreateBtnText: null,
- modalCreateTitle: null,
- handleRefreshCb: null,
-
- render() {
- if (!this.checkboxColumn) {
- this.checkboxColumn = this.option(
- podmanForm.field.SelectDummyValue,
- this.selectKey,
- new ui.Checkbox(0, { hiddenname: 'all' }).render()
- );
- this.checkboxColumn.width = 30;
-
- podmanUtil.moveArrayItem(this.children, this.children.length - 1, 0);
- }
-
- return this.super('render', []);
- },
-
- renderContents(cfgsections, nodes) {
- const config_name = this.uciconfig ?? this.map.config;
- const max_cols = this.children.length;
-
- if (this.footer === true) {
- this.footer = [
- `${_('Total')} ${nodes.length}`,
- ];
- }
-
- const sectionEl = E('div', {
- id: 'cbi-%s-%s'.format(config_name, this.sectiontype),
- class: 'cbi-section cbi-tblsection',
- });
-
- const tableEl = E('table', { class: 'table cbi-section-table cbi-section-table-select' });
- const theadEl = E('thead', { class: 'thead cbi-section-thead' });
- const tbodyEl = E('tbody', { class: 'tbody cbi-section-tbody' });
- const tfootEl = E('tfoot', { class: 'tfoot cbi-section-tfoot' });
-
- if (this.description != null && this.description !== '') {
- sectionEl.appendChild(E('div', { class: 'cbi-section-descr' }, this.description));
- }
-
- sectionEl.appendChild(E('div', { class: 'cbi-section-actions' }, this.renderToolbar()));
-
- theadEl.appendChild(this.renderHeaderRows(false));
-
- if (theadEl.hasChildNodes())
- tableEl.appendChild(theadEl);
-
- for (let i = 0; i < nodes.length; i++) {
- const trEl = E('tr', {
- id: 'cbi-%s-%s'.format(config_name, cfgsections[i]),
- class: 'tr cbi-section-table-row',
- 'data-sid': cfgsections[i],
- 'data-section-id': cfgsections[i]
- });
-
- for (let j = 0; j < max_cols && nodes[i].firstChild; j++) {
- trEl.appendChild(nodes[i].firstChild);
- }
-
- tbodyEl.appendChild(trEl);
- }
-
- if (nodes.length === 0)
- tbodyEl.appendChild(E('tr', { class: 'tr cbi-section-table-row' },
- E('td', { class: 'td text-center', colspan: max_cols }, this.renderSectionPlaceholder())));
-
- tableEl.appendChild(tbodyEl);
-
- tfootEl.appendChild(this.renderFooterRows(false));
-
- if (tfootEl.hasChildNodes()) {
- tableEl.appendChild(tfootEl);
- }
-
- this.registerCheckboxEvents(theadEl, tableEl);
-
- sectionEl.appendChild(tableEl);
-
- dom.bindClassInstance(sectionEl, this);
-
- return sectionEl;
- },
-
- renderToolbar() {
- return E('div', { class: 'list-toolbar mb-sm d-flex justify-center gap-xs' }, this.getToolbarButtons());
- },
-
- getToolbarButtons() {
- const buttons = [];
-
- if (this.handleCreate) {
- buttons.push(this.getCreateButton());
- }
- if (this.handleRemove) {
- buttons.push(this.getRemoveButton());
- }
-
- if (this.handleRefresh) {
- buttons.push(this.getReloadButton());
- }
-
- if (this.toolbarExtraButtons.length > 0) {
- buttons.push(...this.toolbarExtraButtons);
- }
-
- return buttons;
- },
-
- getCreateButton() {
- return new podmanUI.ButtonNew(_('Create'), {
- click: ui.createHandlerFn(this, 'handleCreate'),
- type: 'add',
- }).render();
- },
-
- getRemoveButton() {
- return new podmanUI.ButtonNew(_('Delete'), {
- click: ui.createHandlerFn(this, 'handleRemove'),
- type: 'remove',
- }).render();
- },
-
- getReloadButton() {
- return new podmanUI.ButtonNew(_('Reload'), {
- click: ui.createHandlerFn(this, 'handleRefresh'),
- type: 'apply',
- }).render();
- },
-
- async handleCreate() {
- const createForm = new this.createForm.init();
- const formElement = await createForm.render();
- const title = this.modalCreateTitle || _('Create %s').format(this.view.titleSingle || '').trim();
-
- const modal = new podmanUI.Modal(title, [ formElement ]);
- modal.getButtons = () => [
- modal.getCloseButton(),
- new podmanUI.ButtonNew(this.modalCreateBtnText || _('Create'), {
- click: () => {
- createForm.handleCreate().then(() => this.handleRefresh());
- },
- type: 'positive',
- }).render(),
- ];
- modal.render();
- },
-
- async handleRemove() {
- const selected = this.getSelectedData();
-
- if (selected.length === 0) {
- return this.showNoneSelectedWarning();
- }
-
- this.view.confirm([
- E('p', {}, _('Are you sure to delete the records?')),
- ], async () => {
- let i = 1;
- for (const item of selected) {
- this.view.loading(_('Deleting records: %d/%d').format(i, selected.length));
-
- await item.remove();
-
- i++;
- }
-
- ui.hideModal();
- this.handleRefresh();
- });
- },
-
- async handleRefresh() {
- const indicatorId = 'podman-refresh-' + this.sectiontype;
- ui.showIndicator(indicatorId, _('Refreshing %s...').format(this.sectiontype));
-
- const data = await this.view.load();
-
- if (this.footer) {
- const count = Array.isArray(data) ? data.length : 0;
- this.footer = [`${_('Total')} ${count}`];
- }
-
- const obj = {};
- obj[this.sectiontype] = data;
-
- this.map.data.__init__(obj);
-
- this.map.root
- .querySelector('input[type="hidden"][name="all"] ~ input[type=checkbox]').checked = false;
-
- await this.map.save(null, false);
- await this.map.load();
- await this.map.reset();
-
- if (this.handleRefreshCb) await this.handleRefreshCb();
-
- ui.hideIndicator(indicatorId);
- },
-
- handleInspect(item, hiddenFields) {
- this.view.loading(_('Fetching information...'));
-
- item.inspect().then((data) => {
- ui.hideModal();
- this.showInspectModal(data, hiddenFields);
- });
- },
-
- showInspectModal(data, hiddenFields) {
- const displayData = JSON.parse(JSON.stringify(data));
-
- if (hiddenFields && hiddenFields.length > 0) {
- hiddenFields.forEach((field) => {
- if (displayData[field]) {
- displayData[field] = '***HIDDEN***';
- }
- });
- }
-
- const content = [
- new podmanUI.JsonArea(displayData).render(),
- ];
-
- if (hiddenFields && hiddenFields.length > 0) {
- content.unshift(E('p', { class: 'mb-sm text-error' }, [
- E('strong', {}, _('Security Notice:')), ' ', _('Sensitive data is hidden for security reasons.')
- ]));
- }
-
- const modal = new podmanUI.Modal('', content);
- modal.handleSubmit = undefined;
- modal.render();
- },
-
- showNoneSelectedWarning() {
- this.view.warning(_('No %s selected').format(this.sectiontype));
- },
-
- registerCheckboxEvents(theadEl, tableEl) {
- const checkboxSelectAll = theadEl.querySelector('input[name="all"] + input[type="checkbox"]');
- const rows = tableEl.querySelectorAll('tbody tr');
- let lastClickedIndex = -1;
-
- if (!checkboxSelectAll) {
- return;
- }
-
- checkboxSelectAll.addEventListener('click', (event) => {
- const checked = event.target.checked;
- tableEl.querySelectorAll('tbody tr input[type="checkbox"]').forEach((checkbox) => {
- checkbox.checked = checked;
- });
- });
-
- rows.forEach((row, index) => {
- const checkbox = row.querySelector('input[type=checkbox]');
-
- if (!checkbox) {
- return;
- }
-
- row.addEventListener('click', (ev) => {
- const clickedInteractiveElement = ev.target.closest('button, a, input, .cbi-tooltip-container');
-
- // If the click was inside an interactive element, ignore it and exit.
- if (clickedInteractiveElement) {
- return;
- }
-
- checkbox.click();
- });
-
- checkbox.addEventListener('click', (ev) => {
- // Handle shift+click for range selection
- if (ev.shiftKey && lastClickedIndex !== -1 &&
- lastClickedIndex !== index) {
- const start = Math.min(lastClickedIndex, index);
- const end = Math.max(lastClickedIndex, index);
- const targetState = checkbox.checked;
-
- // Select/deselect all checkboxes in range
- for (let i = start; i <= end; i++) {
- rows[i].querySelector('input[type=checkbox]').checked = targetState;
- }
- }
-
- // Update last clicked index
- lastClickedIndex = index;
- });
- });
- },
-
- getSelectedCheckboxes() {
- return this.map.root.querySelectorAll('tbody tr input[type=checkbox]:checked');
- },
-
- getSelectedData() {
- return [...this.getSelectedCheckboxes()].map((checkbox) => {
- const sectionId = checkbox.previousSibling.name;
- return this.map.data.data[sectionId];
- });
- }
-});
-
-return baseclass.extend({
- TableSelectSection: FormTableSelectSection
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/constants.js b/luci-app-podman/htdocs/luci-static/resources/podman/constants.js
deleted file mode 100644
index 663fad09b..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/constants.js
+++ /dev/null
@@ -1,22 +0,0 @@
-'use strict';
-
-'require baseclass';
-
-const NOTIFICATION_TIMEOUT = 2000;
-
-const ICON = {
- START: '►',
- STOP: '◼',
- RESTART: '↻',
- PAUSE: '❚❚',
- CLEAR_LOG: '🗑️',
- INIT_ENABLED: '✓',
- INIT_MISSING: '⚠',
- INIT_DISABLED: '⏼',
- BACK: '🔙',
-};
-
-return baseclass.extend({
- NOTIFICATION_TIMEOUT,
- ICON,
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form.js b/luci-app-podman/htdocs/luci-static/resources/podman/form.js
deleted file mode 100644
index 6e56e2ae9..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form.js
+++ /dev/null
@@ -1,156 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require ui';
-'require form';
-
-'require podman.ui as podmanUI';
-'require podman.utils as podmanUtil';
-
-const FormMemoryValue = form.Value.extend({
- placeholder: '512m, 1g, -1',
- validate(_section_id, value) {
- if (!value) return true;
- if (value === '-1' || value === '0') return true;
- if (!/^\d+(?:\.\d+)?\s*[kmg]b?$/i.test(value)) {
- return _('Expecting: %s').format(_('512m, 1g, or -1 for unlimited'));
- }
- return true;
- },
-});
-
-/**
- *
- */
-const FormDummyValue = form.DummyValue.extend({
- __name__: 'Podman.Form.DummyValue',
-
- cfgformatter: (cfg, _data) => cfg,
- cfgdatavalue: (_data) => '',
- cfgtt: (_cfg, _data) => '',
-
- cfgvalue(section_id, set_value) {
- if (section_id == null)
- L.error('TypeError', 'Section ID required');
-
- const data = this.map.data.data[section_id];
- const dataValue = this.cfgdatavalue(data);
-
- if (dataValue) {
- return this._renderValue(dataValue, data);
- }
-
- if (arguments.length === 2 && set_value) {
- this.data ??= {};
- this.data[section_id] = set_value;
- }
-
- return this._renderValue(this.data?.[section_id], data);
- },
-
- _renderValue(value, data) {
- const tooltip = this.cfgtt(value, data);
- const formatted = this.cfgformatter(value, data);
- return tooltip ? new podmanUI.Tooltip(formatted, tooltip).render() : formatted;
- },
-});
-
-/**
- *
- */
-const FormSelectDummyValue = form.DummyValue.extend({
- __name__: 'Podman.Form.SelectDummyValue',
-
- cfgvalue(sectionId) {
- return new ui.Checkbox(0, { hiddenname: sectionId }).render();
- }
-});
-
-/**
- *
- */
-const FormLinkDummyValue = FormDummyValue.extend({
- __name__: 'Podman.Form.LinkDummyValue',
-
- url: '#',
- click: undefined,
-
- cfgformatter(cfg, model) {
- return E('a', {
- class: 'text-bold',
- href: this.url,
- click: (ev) => {
- if (typeof this.click === 'function') {
- ev.preventDefault();
- this.click(cfg, model);
- }
- }
- }, cfg);
- }
-});
-
-/**
- *
- */
-const FormDateDummyValue = FormDummyValue.extend({
- __name__: 'Podman.Form.DateDummyValue',
- cfgformatter: podmanUtil.format.date,
-});
-
-/**
- *
- */
-const FormTimestampDummyValue = FormDateDummyValue.extend({
- __name__: 'Podman.Form.TimestampDummyValue',
- cfgformatter: (value) => podmanUtil.format.date(parseInt(value)),
-});
-
-/**
- *
- */
-const FormByteDummyValue = FormDummyValue.extend({
- __name__: 'Podman.Form.ByteDummyValue',
- cfgformatter: podmanUtil.format.bytes,
-});
-
-const FormEditableField = baseclass.extend({
- __name__: 'Podman.Form.EditableField',
- name: null,
- formField: null,
-
- __init__(name, formField, onSubmit) {
- this.name = name;
- this.formField = formField;
- if (onSubmit) {
- this.onSubmit = onSubmit;
- }
- },
-
- render() {
- return E('div', { class: `editable-field editable-field-${this.name}` }, [
- this.formField,
- new podmanUI.Button(
- _('Update'),
- () => this.onSubmit(document.querySelector(`.editable-field-${this.name} [name="${this.name}"]`).value),
- 'apply'
- ).render()
- ]);
- },
-
- onSubmit(_value) {}
-});
-
-return baseclass.extend({
- __name__: 'Podman.Form',
-
- EditableField: FormEditableField,
- field: {
- MemoryValue: FormMemoryValue,
- DummyValue: FormDummyValue,
- ByteDummyValue: FormByteDummyValue,
- DateDummyValue: FormDateDummyValue,
- LinkDummyValue: FormLinkDummyValue,
- SelectDummyValue: FormSelectDummyValue,
- TimestampDummyValue: FormTimestampDummyValue,
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form/container.js b/luci-app-podman/htdocs/luci-static/resources/podman/form/container.js
deleted file mode 100644
index b5ab6bd66..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form/container.js
+++ /dev/null
@@ -1,355 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require form';
-
-'require podman.form as podmanForm';
-'require podman.utils as podmanUtil';
-'require podman.rpc as podmanRPC';
-'require podman.view as podmanView';
-'require podman.model.Container as Container';
-
-/**
- * Create podman container
- */
-const PodmanFormContainer = podmanView.form.extend({
- __name__: 'Podman.Form.Container',
-
- makeData() {
- return {
- container: {
- name: '',
- image: '',
- pod: '',
- command: null,
- ports: null,
- env: null,
- volumes: null,
- network: 'bridge',
- restart: 'no',
- privileged: '0',
- tty: '0',
- remove: '0',
- autoupdate: '0',
- start: '0',
- workdir: null,
- hostname: null,
- user: null,
- groups: null,
- expose: null,
- labels: null,
- cpus: null,
- memory: null,
- }
- };
- },
-
- async createForm() {
- const [images, networks, pods] = await Promise.all([
- podmanRPC.images.list(),
- podmanRPC.networks.list(),
- podmanRPC.pods.list()
- ]);
-
- let field;
- field = this.section.option(form.Value, 'name', _('Container Name'));
- field.placeholder = 'my-container';
- field.optional = true;
- field.datatype = 'maxlength(253)';
- field.description = _('Leave empty to auto-generate');
-
- field = this.section.option(form.ListValue, 'image', _('Image'));
- field.value('', _('-- Select %s --').format(_('Image')));
- images.forEach((img) => {
- img.getRepoTags().forEach((tag) => {
- if (tag !== ':') {
- field.value(tag, tag);
- }
- });
- });
- field.rmempty = false;
- field.optional = false;
- field.validate = (_section_id, value) => {
- if (!value) {
- return _('Expecting: %s').format(_('non-empty value'));
- }
- return true;
- };
- field.description = _('Container image to use');
-
- field = this.section.option(form.ListValue, 'pod', _('Pod'));
- field.value('', _('(none)'));
- pods.forEach((pod) => {
- const name = pod.getName();
- if (name && name !== _('Unknown')) {
- field.value(name, name);
- }
- });
- field.description = _(
- 'Add the container to an existing pod. Network, hostname and port mappings come from the pod\'s infra container.'
- );
-
- field = this.section.option(form.Value, 'command', _('Command'));
- field.placeholder = '/bin/sh';
- field.optional = true;
- field.description = _('Command to run (space-separated)');
-
- field = this.section.option(form.TextValue, 'ports', _('Port Mappings'));
- field.depends('pod', '');
- field.placeholder = '8080:80\n8443:443';
- field.rows = 3;
- field.optional = true;
- field.description = _('One per line, format: host:container[/protocol]');
-
- field = this.section.option(form.Value, 'expose', _('Expose Ports'));
- field.depends('pod', '');
- field.placeholder = '6052, 8080/udp';
- field.optional = true;
- field.description = _('Comma-separated ports to expose (e.g., 6052, 8080/udp)');
-
- field = this.section.option(form.TextValue, 'env', _('Environment Variables'));
- field.placeholder = 'VAR1=value1\nVAR2=value2';
- field.rows = 4;
- field.optional = true;
- field.description = _('One per line, format: key=value');
-
- field = this.section.option(form.TextValue, 'volumes', _('Volumes'));
- field.placeholder = '/host/path:/container/path:ro\nvolume-name:/data';
- field.rows = 4;
- field.optional = true;
- field.description = _(
- 'One per line. Format: source:destination[:options]. Options: ro, rw, Z, z');
-
- field = this.section.option(form.ListValue, 'network', _('Network'));
- field.depends('pod', '');
- field.value('bridge', 'bridge (default)');
- field.value('host', 'host');
- field.value('none', 'none');
- networks.forEach((net) => {
- const name = net.getName();
- if (name && name !== 'bridge' && name !== 'host' && name !== 'none') {
- field.value(name, name);
- }
- });
- field.rmempty = false;
- field.description = _(
- 'Select network for the new container. User-created networks provide better isolation and DNS resolution between containers.'
- );
-
- field = this.section.option(form.ListValue, 'restart', _('Restart Policy'));
- field.value('no', _('No'));
- field.value('always', _('Always'));
- field.value('on-failure', _('On Failure'));
- field.value('unless-stopped', _('Unless Stopped'));
-
- field = this.section.option(form.Flag, 'privileged', _('Privileged Mode'));
-
- field = this.section.option(form.Flag, 'tty', _('Allocate TTY (-t)'));
-
- field = this.section.option(form.Flag, 'remove', _('Auto Remove (--rm)'));
-
- field = this.section.option(form.Flag, 'autoupdate', _('Auto-Update'));
- field.description = _(
- 'Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry'
- );
-
- field = this.section.option(form.Flag, 'start', _('Start after creation'));
- field.description = _('Automatically start the container after it is created');
-
- field = this.section.option(form.Value, 'workdir', _('Working Directory'));
- field.placeholder = '/app';
- field.optional = true;
-
- field = this.section.option(form.Value, 'hostname', _('Hostname'));
- field.depends('pod', '');
- field.placeholder = 'container-host';
- field.optional = true;
- field.datatype = 'hostname';
-
- field = this.section.option(form.Value, 'user', _('User'));
- field.placeholder = '1000:1000';
- field.optional = true;
- field.description = _('User and group to run as (UID:GID)');
-
- field = this.section.option(form.Value, 'groups', _('Supplementary Groups'));
- field.placeholder = '500,1000';
- field.optional = true;
- field.description = _('Comma-separated list of supplementary group IDs');
-
- field = this.section.option(form.TextValue, 'labels', _('Labels'));
- field.placeholder = 'key1=value1\nkey2=value2';
- field.rows = 3;
- field.optional = true;
- field.description = _('One per line, format: key=value');
-
- field = this.section.option(form.Value, 'cpus', _('CPU Limit'));
- field.placeholder = '1.0';
- field.optional = true;
- field.datatype = 'ufloat';
- field.description = _('Number of CPUs (e.g., 0.5, 1.0, 2.0)');
-
- field = this.section.option(podmanForm.field.MemoryValue, 'memory', _('Memory Limit'));
- field.optional = true;
- field.description = _('Memory limit (e.g., 512m, 1g)');
- },
-
- async handleCreate() {
- if (!this.isValid()) {
- return this.scrollToInvalid();
- }
-
- await this.save();
-
- const data = this.getFieldValues();
- const spec = {
- image: data.image,
- privileged: Boolean(parseInt(data.privileged)),
- terminal: Boolean(parseInt(data.tty)),
- remove: Boolean(parseInt(data.remove)),
- };
-
- if (data.name) spec.name = data.name;
- if (data.pod) spec.pod = data.pod;
- if (data.command) spec.command = data.command.split(/\s+/).filter((c) => c.length > 0);
-
- if (!data.pod && data.ports) {
- spec.portmappings = [];
- data.ports.split('\n').forEach((line) => {
- const trimmed = line.trim();
- if (!trimmed) return;
- const parts = trimmed.split(':');
- if (parts.length === 2) {
- const hostPort = parseInt(parts[0], 10);
- const [containerPortStr, proto] = parts[1].split('/');
- const containerPort = parseInt(containerPortStr, 10);
- if (!isNaN(hostPort) && !isNaN(containerPort)) {
- spec.portmappings.push({
- host_port: hostPort,
- container_port: containerPort,
- protocol: (proto || 'tcp').toLowerCase()
- });
- }
- }
- });
- }
-
- const parseKeyValue = (text, target) => {
- text.split('\n').forEach((line) => {
- const parts = line.split('=');
- if (parts.length >= 2) {
- const key = parts[0].trim();
- const value = parts.slice(1).join('=').trim();
- if (key) target[key] = value;
- }
- });
- };
-
- if (data.env) {
- spec.env = {};
- parseKeyValue(data.env, spec.env);
- }
- if (data.volumes) {
- const mounts = [];
- const volumes = [];
- data.volumes.split('\n').forEach((line) => {
- const parts = line.trim().split(':');
- if (parts.length < 2) return;
-
- const opts = parts.length > 2 ? parts[2].split(',') : [];
- if (parts[0].includes('/')) {
- const mount = {
- Type: 'bind',
- Source: parts[0],
- Destination: parts[1]
- };
- if (opts.length > 0) mount.Options = opts;
- mounts.push(mount);
- return;
- }
-
- const vol = {
- Name: parts[0],
- Dest: parts[1]
- };
- if (opts.length > 0) vol.Options = opts;
- volumes.push(vol);
- });
- if (mounts.length > 0) spec.mounts = mounts;
- if (volumes.length > 0) spec.volumes = volumes;
- }
- if (!data.pod) {
- if (data.network === 'host') {
- spec.netns = {
- nsmode: 'host'
- };
- } else if (data.network === 'none') {
- spec.netns = {
- nsmode: 'none'
- };
- } else if (data.network && data.network !== 'bridge') {
- spec.networks = {
- [data.network]: {}
- };
- }
- }
- if (data.restart !== 'no') spec.restart_policy = data.restart;
- if (data.workdir) spec.work_dir = data.workdir;
- if (!data.pod && data.hostname) spec.hostname = data.hostname;
- if (data.user) spec.user = data.user;
- if (data.groups) {
- spec.groups = data.groups.split(',').map((g) => g.trim()).filter((g) => g);
- }
- if (!data.pod && data.expose) {
- spec.expose = {};
- data.expose.split(',').forEach((p) => {
- const trimmed = p.trim();
- if (!trimmed) return;
- const parts = trimmed.split('/');
- const port = parseInt(parts[0], 10);
- if (port >= 1 && port <= 65535)
- spec.expose[String(port)] = (parts[1] || 'tcp').toLowerCase();
- });
- }
- if (data.labels || data.autoupdate === '1') {
- spec.labels = {};
- if (data.labels) parseKeyValue(data.labels, spec.labels);
- if (data.autoupdate === '1') spec.labels['io.containers.autoupdate'] = 'registry';
- }
- if (data.cpus || data.memory) {
- spec.resource_limits = {};
- if (data.cpus) {
- spec.resource_limits.cpu = {
- quota: parseFloat(data.cpus) * 100000
- };
- }
- if (data.memory) {
- const memBytes = podmanUtil.format.parseMemory(data.memory);
- if (memBytes > 0) spec.resource_limits.memory = {
- limit: memBytes
- };
- }
- }
-
- const hasRestartPolicy = data.restart && data.restart !== 'no';
- const shouldStart = Boolean(parseInt(data.start));
-
- const createFn = async () => {
- const raw = await podmanRPC.containers.create(spec);
- const inspected = await Container.getSingleton(raw).inspect();
- const container = Container.getSingleton(inspected);
-
- if (hasRestartPolicy) {
- await container.generateInitScript();
- await container.enableInitScript();
- }
-
- if (shouldStart) await container.start();
- };
-
- return this.super('handleCreate', [createFn, _('Container')]);
- },
-});
-
-return baseclass.extend({
- init: PodmanFormContainer
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form/image.js b/luci-app-podman/htdocs/luci-static/resources/podman/form/image.js
deleted file mode 100644
index fa48445e9..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form/image.js
+++ /dev/null
@@ -1,91 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require form';
-'require ui';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-'require podman.model.Image as Image';
-
-/**
- * Pull podman image
- */
-const PodmanFormImage = podmanView.form.extend({
- __name__: 'Podman.Form.Image',
-
- makeData() {
- return {
- image: {
- registry: '',
- image: '',
- }
- };
- },
-
- createForm() {
- let field;
-
- field = this.section.option(form.ListValue, 'registry', _('Registry'));
- field.value('', 'docker.io');
- field.value('quay.io/', 'quay.io');
- field.value('ghcr.io/', 'ghcr.io');
- field.value('gcr.io/', 'gcr.io');
-
- field = this.section.option(form.Value, 'image', _('Image'));
- field.placeholder = 'nginx:latest';
- field.rmempty = false;
- },
-
- async handleCreate() {
- if (!this.isValid()) {
- return this.scrollToInvalid();
- }
-
- await this.save();
-
- const registry = this.getFieldValue('registry');
- const image = this.getFieldValue('image');
-
- const imageName = this.buildImageName(registry, image);
- const imageModel = Image.getSingleton({ RepoTags: [imageName] });
-
- const progressEl = E('pre', { class: 'terminal-area' });
- const modal = new podmanUI.Modal(_('Pulling %s').format(imageName), [ progressEl ]);
-
- /** @type {HTMLElement} */
- const closeButton = modal.getCloseButton();
- closeButton.classList.add('d-none');
-
- modal.getButtons = () => [ closeButton ];
- modal.render();
-
- const append = (text) => {
- progressEl.appendChild(document.createTextNode(text));
- progressEl.scrollTop = progressEl.scrollHeight;
- };
-
- try {
- await imageModel.streamPull(append);
- closeButton.classList.remove('d-none');
- podmanUI.alert(_('Image pulled successfully'), 'success', true);
- } catch (error) {
- this.error(error);
- }
- },
-
- buildImageName(registry, image) {
- const reg = (registry || '').trim();
- const img = (image || '').trim();
-
- if (!reg) {
- return img.includes('/') ? 'docker.io/' + img : 'docker.io/library/' + img;
- }
-
- return reg.replace(/\/+$/, '') + '/' + img.replace(/^\/+/, '');
- },
-});
-
-return baseclass.extend({
- init: PodmanFormImage
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form/network.js b/luci-app-podman/htdocs/luci-static/resources/podman/form/network.js
deleted file mode 100644
index 7828b2f75..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form/network.js
+++ /dev/null
@@ -1,304 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require form';
-'require ui';
-'require uci';
-'require network';
-'require firewall';
-
-'require podman.utils as utils';
-'require podman.rpc as podmanRPC';
-'require podman.view as podmanView';
-'require podman.model.Network as Network';
-
-/**
- * Create podman network
- */
-const PodmanFormNetwork = podmanView.form.extend({
- __name__: 'Podman.Form.Network',
-
- existingZones: null,
- parentDevices: null,
-
- makeData() {
- return {
- network: {
- name: null,
- driver: 'bridge',
- subnet: null,
- gateway: null,
- ip_range: null,
- ipv6: '0',
- internal: '0',
- labels: null,
- setup_openwrt: '1',
- firewall_zone: '_create_new_',
- }
- };
- },
-
- async render() {
- const [zones, parentDevices] = await Promise.all([
- firewall.getZones().then((zones) =>
- zones
- .filter(zone => zone.data.name?.startsWith('podman'))
- .map(zone => zone.data.name)
- ),
- network.getDevices().then((devices) =>
- devices.filter(this.isValidParentDevice)
- ),
- ]);
-
- this.existingZones = zones;
- this.parentDevices = parentDevices;
-
- return this.super('render', []);
- },
-
- createForm: function () {
- let field;
-
- field = this.section.option(form.Value, 'name', _('Network Name'));
- field.placeholder = 'my-network';
- field.datatype = 'and(uciname,maxlength(15))';
- field.description = _('Name for the network');
- field.rmempty = false;
-
- field = this.section.option(form.ListValue, 'driver', _('Driver'));
- field.value('bridge', 'bridge');
- field.value('macvlan', 'macvlan');
- field.value('ipvlan', 'ipvlan');
- field.description = _('Network driver');
-
- field = this.section.option(form.ListValue, 'parent', _('Parent Interface'));
- field.depends('driver', 'macvlan');
- field.depends('driver', 'ipvlan');
- field.description = _(
- 'Existing physical interface to use as parent. Required for macvlan/ipvlan networks.'
- );
- if (this.parentDevices.length > 0) {
- this.parentDevices.forEach((device) => {
- const name = device.getName();
- field.value(name, name + ' (' + device.getType() + ')');
- });
- } else {
- field.value('', _('No suitable interfaces found'));
- }
-
- field = this.section.option(form.Value, 'subnet', _('IPv4 Subnet (CIDR)'));
- field.placeholder = '10.89.0.0/24';
- field.datatype = 'cidr4';
- field.description = _('IPv4 subnet in CIDR notation');
- // field.rmempty = false;
-
- field = this.section.option(form.Value, 'gateway', _('IPv4 Gateway'));
- field.placeholder = '10.89.0.1';
- field.optional = true;
- field.datatype = 'ip4addr';
- field.description = _('IPv4 gateway address');
-
- field = this.section.option(form.Value, 'ip_range', _('IP Range (CIDR)'));
- field.placeholder = '10.89.0.0/28';
- field.optional = true;
- field.datatype = 'cidr4';
- field.description = _('Allocate container IP from this range');
-
- field = this.section.option(form.Flag, 'ipv6', _('Enable IPv6'));
- field.description = _('Enable IPv6 networking');
-
- field = this.section.option(form.Flag, 'internal', _('Internal Network'));
- field.description = _('Restrict external access to the network');
-
- field = this.section.option(form.Flag, 'setup_openwrt', _('Setup OpenWrt Integration'));
- field.description = _(
- 'Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt.'
- );
-
- field = this.section.option(form.Value, 'bridge_name', _('Bridge Interface Name'));
- field.placeholder = _('Leave empty to auto-generate');
- field.optional = true;
- field.datatype = 'netdevname';
- field.depends({
- 'setup_openwrt': '1',
- 'driver': 'bridge'
- });
- field.description = _(
- 'Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it.'
- );
-
- field = this.section.option(form.ListValue, 'firewall_zone', _('Firewall Zone'));
- field.value('_create_new_', _('Create new zone (will be named: podman_)'));
- if (this.existingZones.length > 0) {
- this.existingZones.forEach((zoneName) => {
- field.value(zoneName, zoneName);
- });
- }
- field.depends('setup_openwrt', '1');
- field.description = _(
- 'Choose firewall zone for this network.'
- );
-
- field = this.section.option(form.TextValue, 'labels', _('Labels'));
- field.placeholder = 'key1=value1\nkey2=value2';
- field.rows = 3;
- field.optional = true;
- field.description = _('Labels in key=value format, one per line');
- },
-
- async handleCreate() {
- if (!this.isValid()) {
- return this.scrollToInvalid();
- }
-
- await this.save();
- await uci.load(['network', 'firewall', 'dhcp']);
- const ulaPrefix = uci.get('network', 'globals', 'ula_prefix');
-
- const podnetwork = this.getFieldValues();
-
- const setupOpenwrt = podnetwork.setup_openwrt === '1';
- const driver = podnetwork.driver || 'bridge';
- const requestedZone = podnetwork.firewall_zone || '_create_new_';
- const zoneName = requestedZone === '_create_new_' ? 'podman_' + podnetwork.name :
- requestedZone;
- const baseBridgeName = podnetwork.bridge_name || podnetwork.name;
-
- let bridgeName = baseBridgeName;
- let i = 1;
- while (await network.getDevice(bridgeName)) {
- bridgeName = `${baseBridgeName}${i}`;
- i++;
- }
-
- if ((driver === 'macvlan' || driver === 'ipvlan') && !podnetwork.parent) {
- this.error(_('Parent interface is required for macvlan/ipvlan networks'));
- return;
- }
-
- // if (setupOpenwrt && !podnetwork.subnet) {
- // this.error(_('OpenWrt integration requires subnet to be specified'));
- // return;
- // }
-
- if (!podnetwork.gateway && podnetwork.subnet) {
- podnetwork.gateway = utils.ipv4.firstHost(podnetwork.subnet);
- }
-
- const payload = {
- name: podnetwork.name,
- driver: driver
- };
-
- if (driver === 'bridge') {
- payload.network_interface = bridgeName;
- } else if (driver === 'macvlan' || driver === 'ipvlan') {
- payload.network_interface = podnetwork.parent;
- }
-
- if (podnetwork.subnet) {
- payload.subnets = [{
- subnet: podnetwork.subnet
- }];
- if (podnetwork.gateway) payload.subnets[0].gateway = podnetwork.gateway;
-
- if (podnetwork.ip_range) {
- const range = utils.ipv4.cidrToRange(podnetwork.ip_range);
- if (range) payload.subnets[0].lease_range = range;
- }
- }
-
- payload.ipv6_enabled = false;
- if (podnetwork.ipv6 === '1') {
- const ipv6obj = utils.ipv6.deriveUlaFromIpv4(podnetwork.subnet, ulaPrefix);
- payload.ipv6_enabled = true;
-
- if (podnetwork.subnet) {
- payload.subnets.push({
- subnet: ipv6obj.ipv6subnet
- });
-
- if (podnetwork.gateway)
- payload.subnets[1].gateway = ipv6obj.ipv6gateway;
- }
- }
-
- payload.internal = podnetwork.internal === '1';
- if (podnetwork.labels) {
- payload.labels = {};
- podnetwork.labels.split('\n').forEach((line) => {
- const parts = line.split('=');
- if (parts.length >= 2) {
- const key = parts[0].trim();
- const value = parts.slice(1).join('=').trim();
- if (key) payload.labels[key] = value;
- }
- });
- }
-
- const createFn = async () => {
- const newNetwork = await podmanRPC.networks.create(payload);
-
- if (!setupOpenwrt) return;
-
- const inspectData = await Network.getSingleton({
- name: podnetwork.name
- }).inspect();
- const NetworkModel = Network.getSingleton(inspectData);
- const deviceName = await NetworkModel.integrationCreateDevice();
- await NetworkModel.integrationCreateNetwork(deviceName);
-
- if (await NetworkModel.hasDnsmasq()) {
- await NetworkModel.integrationAddDnsmasqExclusion();
- }
-
- if (await firewall.getZone(zoneName)) {
- const currentNetworks = uci.get('firewall', zoneName, 'network');
- const networkList = Array.isArray(currentNetworks) ? currentNetworks :
- currentNetworks ? [currentNetworks] : [];
- if (!networkList.includes(podnetwork.name)) {
- networkList.push(podnetwork.name);
- uci.set('firewall', zoneName, 'network', networkList);
- }
- } else {
- const zoneId = uci.add('firewall', 'zone');
- uci.set('firewall', zoneId, 'name', zoneName);
- uci.set('firewall', zoneId, 'input', 'DROP');
- uci.set('firewall', zoneId, 'output', 'ACCEPT');
- uci.set('firewall', zoneId, 'forward', 'REJECT');
- uci.set('firewall', zoneId, 'network', [podnetwork.name]);
- }
-
- const dnsRuleName = 'Allow-' + zoneName + '-DNS';
- const existingDnsRule = uci.sections('firewall', 'rule').find((s) =>
- uci.get('firewall', s['.name'], 'name') === dnsRuleName
- );
-
- if (!existingDnsRule) {
- const ruleId = uci.add('firewall', 'rule');
- uci.set('firewall', ruleId, 'name', dnsRuleName);
- uci.set('firewall', ruleId, 'src', zoneName);
- uci.set('firewall', ruleId, 'dest_port', '53');
- uci.set('firewall', ruleId, 'target', 'ACCEPT');
- }
-
- await uci.save();
- ui.changes.apply();
- await network.flushCache();
- };
-
- return this.super('handleCreate', [createFn, _('Network')]);
- },
-
- isValidParentDevice(device) {
- const type = device.getType();
- const name = device.getName();
- return ['ethernet', 'bridge', 'vlan'].includes(type) &&
- name !== 'lo' &&
- !name.match(/^(podman|cni-|docker|veth)/);
- }
-});
-
-return baseclass.extend({
- init: PodmanFormNetwork
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form/pod.js b/luci-app-podman/htdocs/luci-static/resources/podman/form/pod.js
deleted file mode 100644
index a34c62185..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form/pod.js
+++ /dev/null
@@ -1,178 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require form';
-
-'require podman.form as podmanForm';
-'require podman.utils as podmanUtil';
-'require podman.rpc as podmanRPC';
-'require podman.view as podmanView';
-
-const PodmanFormPod = podmanView.form.extend({
- __name__: 'Podman.Form.Pod',
-
- makeData() {
- return {
- pod: {
- name: '',
- hostname: null,
- share: ['cgroup', 'ipc', 'net', 'uts'],
- infra: '1',
- infra_image: null,
- network: 'bridge',
- dns_server: null,
- dns_search: null,
- cpus: null,
- cpuset_cpus: null,
- memory: null,
- labels: null,
- }
- };
- },
-
- async createForm() {
- const networks = await podmanRPC.networks.list();
-
- let field;
-
- field = this.section.option(form.Value, 'name', _('Pod Name'));
- field.placeholder = 'my-pod';
- field.optional = true;
- field.datatype = 'and(uciname,maxlength(63))';
- field.description = _('Leave empty to auto-generate');
-
- field = this.section.option(form.Value, 'hostname', _('Hostname'));
- field.placeholder = 'pod-host';
- field.optional = true;
- field.datatype = 'hostname';
- field.description = _('Hostname for the pod (defaults to pod name)');
-
- field = this.section.option(form.MultiValue, 'share', _('Shared Namespaces'));
- field.value('cgroup', 'cgroup');
- field.value('ipc', 'ipc');
- field.value('net', 'net');
- field.value('pid', 'pid');
- field.value('uts', 'uts');
- field.description = _('Linux namespaces shared between containers in the pod. Default matches `podman pod create`.');
-
- field = this.section.option(form.Flag, 'infra', _('Create Infra Container'));
- field.description = _('Required for shared network namespace. Disable only if you know you do not need it.');
-
- field = this.section.option(form.Value, 'infra_image', _('Infra Image'));
- field.depends('infra', '1');
- field.placeholder = 'k8s.gcr.io/pause:3.5';
- field.optional = true;
- field.description = _('Override the image used for the infra container');
-
- field = this.section.option(form.ListValue, 'network', _('Network'));
- field.depends('infra', '1');
- field.value('bridge', 'bridge (default)');
- field.value('host', 'host');
- field.value('none', 'none');
- networks.forEach((net) => {
- const name = net.getName();
- if (name && name !== 'bridge' && name !== 'host' && name !== 'none') {
- field.value(name, name);
- }
- });
- field.description = _('Network namespace for the pod. Containers in the pod share this network.');
-
- field = this.section.option(form.DynamicList, 'dns_server', _('DNS Servers'));
- field.depends('infra', '1');
- field.datatype = 'ipaddr';
- field.optional = true;
- field.description = _('DNS servers for the infra container (shared with all pod containers)');
-
- field = this.section.option(form.DynamicList, 'dns_search', _('DNS Search Domains'));
- field.depends('infra', '1');
- field.optional = true;
- field.description = _('DNS search domains for the infra container');
-
- field = this.section.option(form.Value, 'cpus', _('CPU Limit'));
- field.placeholder = '1.0';
- field.optional = true;
- field.datatype = 'ufloat';
- field.description = _('Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)');
-
- field = this.section.option(form.Value, 'cpuset_cpus', _('CPU Set'));
- field.placeholder = '0-3';
- field.optional = true;
- field.description = _('CPUs the pod is allowed to run on (e.g., "0-3" or "0,2")');
-
- field = this.section.option(podmanForm.field.MemoryValue, 'memory', _('Memory Limit'));
- field.optional = true;
- field.description = _('Memory limit for the pod (e.g., 512m, 1g)');
-
- field = this.section.option(form.TextValue, 'labels', _('Labels'));
- field.placeholder = 'key1=value1\nkey2=value2';
- field.rows = 3;
- field.optional = true;
- field.description = _('One per line, format: key=value');
- },
-
- async handleCreate() {
- if (!this.isValid()) {
- return this.scrollToInvalid();
- }
-
- await this.save();
-
- const data = this.getFieldValues();
- const spec = {};
-
- if (data.name) spec.name = data.name;
- if (data.hostname) spec.hostname = data.hostname;
-
- const shareRaw = data.share;
- spec.share = Array.isArray(shareRaw)
- ? shareRaw
- : (typeof shareRaw === 'string' && shareRaw.trim() ? shareRaw.trim().split(/\s+/) : []);
-
- const hasInfra = data.infra === '1';
- spec.infra = hasInfra;
- if (hasInfra && data.infra_image) spec.infra_image = data.infra_image;
-
- if (hasInfra) {
- if (data.network === 'host') {
- spec.netns = { nsmode: 'host' };
- } else if (data.network === 'none') {
- spec.netns = { nsmode: 'none' };
- } else if (data.network && data.network !== 'bridge') {
- spec.Networks = { [data.network]: {} };
- }
-
- if (data.dns_server && data.dns_server.length) spec.dns_server = data.dns_server;
- if (data.dns_search && data.dns_search.length) spec.dns_search = data.dns_search;
- }
-
- if (data.cpus) spec.cpus = parseFloat(data.cpus);
- if (data.cpuset_cpus) spec.cpuset_cpus = data.cpuset_cpus;
-
- if (data.memory) {
- const memBytes = podmanUtil.format.parseMemory(data.memory);
- if (memBytes > 0) {
- spec.resource_limits = { memory: { limit: memBytes } };
- }
- }
-
- if (data.labels) {
- spec.labels = {};
- data.labels.split('\n').forEach((line) => {
- const parts = line.split('=');
- if (parts.length >= 2) {
- const key = parts[0].trim();
- const value = parts.slice(1).join('=').trim();
- if (key) spec.labels[key] = value;
- }
- });
- }
-
- const createFn = () => podmanRPC.pods.create(spec);
-
- return this.super('handleCreate', [ createFn, _('Pod') ]);
- },
-});
-
-return baseclass.extend({
- init: PodmanFormPod
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form/resource.js b/luci-app-podman/htdocs/luci-static/resources/podman/form/resource.js
deleted file mode 100644
index f297bfb61..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form/resource.js
+++ /dev/null
@@ -1,117 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require form';
-
-'require podman.utils as podmanUtil';
-'require podman.form as podmanForm';
-'require podman.view as podmanView';
-
-/**
- * Update podman container resources
- */
-const PodmanFormResource = podmanView.form.extend({
- __name__: 'Podman.Form.Resource',
-
- container: null,
-
- makeData() {
- if (!this.container) {
- return { resources: { cpuLimit: '', cpuShares: '', memory: '', memorySwap: '' } };
- }
-
- const hostConfig = this.container.getHostConfig();
- return {
- resources: {
- cpuLimit: hostConfig.CpuQuota > 0 ? (hostConfig.CpuQuota / 100000).toFixed(2) : '',
- cpuShares: hostConfig.CpuShares || '',
- memory: hostConfig.Memory > 0 ? podmanUtil.format.bytes(hostConfig.Memory, 0) : '',
- memorySwap: hostConfig.MemorySwap > 0 ? podmanUtil.format.bytes(hostConfig.MemorySwap, 0) : '',
- }
- };
- },
-
- async render(container) {
- this.container = container;
-
- return this.super('render', []);
- },
-
- createForm() {
- let field;
-
- field = this.section.option(form.Value, 'cpuLimit', _('CPU Limit'));
- field.datatype = 'ufloat';
- field.placeholder = '0.5, 1.0, 2.0';
- field.description = _('Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited.');
-
- field = this.section.option(form.Value, 'cpuShares', _('CPU Shares Weight'));
- field.datatype = 'uinteger';
- field.placeholder = '1024';
- field.validate = (_section_id, value) => {
- if (value) {
- const n = parseInt(value);
- if (n < 0 || n > 262144) return _('Must be between 0 and 262144');
- }
- return true;
- };
- field.description = _('CPU shares (relative weight). 0 = use default.');
-
- field = this.section.option(podmanForm.field.MemoryValue, 'memory', _('Memory Limit'));
- field.description = _('Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default.');
-
- field = this.section.option(podmanForm.field.MemoryValue, 'memorySwap', _('Memory + Swap Limit'));
- field.description = _('Total memory limit (memory + swap). -1 = unlimited, 0 = use default.');
-
- field = this.section.option(form.Button, '_update', ' ');
- field.inputtitle = _('Update Resources');
- field.inputstyle = 'save';
- field.onclick = () => this.handleUpdate();
- },
-
- async handleUpdate() {
- if (!this.isValid()) {
- return this.scrollToInvalid();
- }
-
- await this.save();
-
- const data = this.getFieldValues();
- const updateData = {
- cpu: {
- quota: 0,
- period: 0,
- shares: parseInt(data.cpuShares) || 0,
- },
- };
-
- const parseMemory = (val) =>
- (!val || val === '-1' || val === '0') ? -1 : podmanUtil.format.parseMemory(val);
-
- const memory = parseMemory(data.memory);
- const memorySwap = parseMemory(data.memorySwap);
-
- if (data.cpuLimit) {
- const period = 100000;
- updateData.cpu.quota = Math.floor(parseFloat(data.cpuLimit) * period);
- updateData.cpu.period = period;
- }
-
- updateData.memory = { limit: memory };
- if (memory === -1 || memorySwap === -1) {
- updateData.memory.swap = -1;
- } else if (memorySwap > 0) {
- updateData.memory.swap = memorySwap;
- } else {
- updateData.memory.swap = null;
- }
-
- const createFn = () => this.container.update(updateData);
-
- return this.super('handleCreate', [ createFn, _('Saving resource'), _('Updating container'), _('Container updated successfully') ]);
- },
-});
-
-return baseclass.extend({
- init: PodmanFormResource
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form/secret.js b/luci-app-podman/htdocs/luci-static/resources/podman/form/secret.js
deleted file mode 100644
index 9fed6b27d..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form/secret.js
+++ /dev/null
@@ -1,89 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require form';
-
-'require podman.rpc as podmanRPC';
-'require podman.view as podmanView';
-
-/**
- * Create podman secret
- */
-const PodmanFormSecret = podmanView.form.extend({
- __name__: 'Podman.Form.Secret',
-
- makeData() {
- return {
- secret: {
- name: null,
- data: null,
- labels: null,
- }
- };
- },
-
- createForm() {
- let field;
-
- field = this.section.option(form.Value, 'name', _('Secret Name'));
- field.placeholder = 'my-secret';
- field.rmempty = false;
- field.datatype = 'maxlength(253)';
- field.validate = (_section_id, value) => {
- if (!/^[a-zA-Z0-9_-]+$/.test(value)) {
- return _(
- 'Secret name can only contain letters, numbers, underscores, and hyphens'
- );
- }
- return true;
- };
- field.description = _(
- '1-253 characters: letters, numbers, underscore (_), hyphen (-) only');
-
- field = this.section.option(form.TextValue, 'data', _('Secret Data'));
- field.placeholder = _('Enter secret data (password, token, key, etc.)');
- field.rmempty = false;
- field.rows = 6;
- field.description = _('The sensitive data to store securely');
-
- field = this.section.option(form.TextValue, 'labels', _('Labels'));
- field.placeholder = 'key1=value1\nkey2=value2';
- field.rows = 3;
- field.optional = true;
- field.description = _('Labels in key=value format, one per line');
- },
-
- async handleCreate() {
- if (!this.isValid()) {
- return this.scrollToInvalid();
- }
-
- await this.save();
-
- const data = this.getFieldValues();
-
- if (!data.name || !data.data) {
- return;
- }
-
- const labels = {};
- if (data.labels) {
- data.labels.split('\n').forEach((line) => {
- const parts = line.split('=');
- if (parts.length >= 2) {
- const key = parts[0].trim();
- const value = parts.slice(1).join('=').trim();
- if (key) labels[key] = value;
- }
- });
- }
-
- const createFn = () => podmanRPC.secrets.create(data.name, data.data, labels);
-
- return this.super('handleCreate', [ createFn, _('Secret') ]);
- },
-});
-
-return baseclass.extend({
- init: PodmanFormSecret
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form/volume.js b/luci-app-podman/htdocs/luci-static/resources/podman/form/volume.js
deleted file mode 100644
index 293f60c00..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form/volume.js
+++ /dev/null
@@ -1,97 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require form';
-
-'require podman.rpc as podmanRPC';
-'require podman.view as podmanView';
-
-/**
- * Create podman volume
- */
-const PodmanFormVolume = podmanView.form.extend({
- __name__: 'Podman.Form.Volume',
-
- sectionName: 'volume',
-
- makeData() {
- return {
- volume: {
- name: null,
- driver: 'local',
- options: null,
- labels: null,
- }
- };
- },
-
- createForm() {
- let field;
-
- field = this.section.option(form.Value, 'name', _('Volume Name'));
- field.placeholder = 'my-volume';
- field.optional = true;
- field.datatype = 'maxlength(253)';
- field.description = _('Volume name. Leave empty to auto-generate.');
-
- field = this.section.option(form.ListValue, 'driver', _('Driver'));
- field.value('local', 'local');
- field.value('image', 'image');
- field.description = _('Volume driver to use');
-
- field = this.section.option(form.Value, 'options', _('Mount Options'));
- field.placeholder = 'type=tmpfs,device=tmpfs,o=size=100m';
- field.optional = true;
- field.description = _('Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)');
-
- field = this.section.option(form.TextValue, 'labels', _('Labels'));
- field.placeholder = 'key1=value1\nkey2=value2';
- field.rows = 3;
- field.optional = true;
- field.description = _('Labels in key=value format, one per line');
- },
-
- async handleCreate() {
- if (!this.isValid()) {
- return this.scrollToInvalid();
- }
-
- await this.save();
-
- const data = this.getFieldValues();
- const payload = {
- Name: data.name,
- Driver: data.driver,
- };
-
- if (data.options) {
- payload.Options = {};
- data.options.split(',').forEach((opt) => {
- const parts = opt.split('=');
- if (parts.length >= 2) {
- payload.Options[parts[0].trim()] = parts.slice(1).join('=').trim();
- }
- });
- }
-
- if (data.labels) {
- payload.Labels = {};
- data.labels.split('\n').forEach((line) => {
- const parts = line.split('=');
- if (parts.length >= 2) {
- const key = parts[0].trim();
- const value = parts.slice(1).join('=').trim();
- if (key) payload.Labels[key] = value;
- }
- });
- }
-
- const createFn = () => podmanRPC.volumes.create(payload);
-
- return this.super('handleCreate', [ createFn, _('Volume') ]);
- },
-});
-
-return baseclass.extend({
- init: PodmanFormVolume,
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/form/volumeImport.js b/luci-app-podman/htdocs/luci-static/resources/podman/form/volumeImport.js
deleted file mode 100644
index e3e794383..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/form/volumeImport.js
+++ /dev/null
@@ -1,75 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require form';
-'require request';
-
-'require podman.rpc as podmanRPC';
-'require podman.view as podmanView';
-
-/**
- * Import podman volume
- */
-const PodmanFormVolumeImport = podmanView.form.extend({
- __name__: 'Podman.Form.VolumeImport',
-
- sectionName: 'volume',
-
- isCompressed: false,
- file: null,
-
- makeData() {
- return {
- volume: {
- name: null,
- }
- };
- },
-
- async render(file) {
- this.file = file;
-
- return this.super('render', []);
- },
-
- createForm() {
- const isCompressed = this.file.name.endsWith('.tar.gz') || this.file.name.endsWith('.tgz');
- const volumeName = this.file.name.replace(/\.(tar\.gz|tgz|tar)$/, '');
-
- this.isCompressed = isCompressed;
-
- const field = this.section.option(form.Value, 'name', _('Volume Name'));
- field.placeholder = 'my-volume';
- field.rmempty = false;
- field.datatype = 'rangelength(1,253)';
- field.default = volumeName;
- },
-
- async handleCreate() {
- await this.save();
-
- const name = this.getFieldValue('name');
-
- this.loading(_('Uploading file...'));
-
- const formData = new FormData();
- formData.append('sessionid', L.env.sessionid);
- formData.append('filename', '/tmp/podman-import');
- formData.append('filedata', this.file);
-
- const response = await request.post(L.env.cgi_base + '/cgi-upload', formData);
- if (!response.ok) {
- this.error(_('Upload failed: %s').format(response.statusText));
- return;
- }
-
- this.loading(_('Importing volume...'));
-
- await podmanRPC.volumes.import(name, this.isCompressed);
- this.success(_('Volume imported successfully'));
- },
-});
-
-return baseclass.extend({
- init: PodmanFormVolumeImport,
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/model/Container.js b/luci-app-podman/htdocs/luci-static/resources/podman/model/Container.js
deleted file mode 100644
index 9eb5e1092..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/model/Container.js
+++ /dev/null
@@ -1,897 +0,0 @@
-'use strict';
-
-'require baseclass';
-
-'require podman.model.Model as Model';
-'require podman.model.Network as Network';
-'require podman.model.Image as Image';
-'require podman.constants as constants';
-'require podman.utils as podmanUtil';
-
-
-const InitScript = {
- generate: Model.declareRPC({
- object: 'podman',
- method: 'init_script_generate',
- params: ['name']
- }),
-
- show: Model.declareRPC({
- object: 'podman',
- method: 'init_script_show',
- params: ['name']
- }),
-
- status: Model.declareRPC({
- object: 'podman',
- method: 'init_script_status',
- params: ['name']
- }),
-
- setEnabled: Model.declareRPC({
- object: 'podman',
- method: 'init_script_set_enabled',
- params: ['name', 'enabled']
- }),
-
- remove: Model.declareRPC({
- object: 'podman',
- method: 'init_script_remove',
- params: ['name']
- })
-};
-
-const ContainerRPC = {
- inspect: Model.declareRPC({
- object: 'podman',
- method: 'container_inspect',
- params: ['id']
- }),
-
- update: Model.declareRPC({
- object: 'podman',
- method: 'container_update',
- params: ['id', 'data']
- }),
-
- remove: Model.declareRPC({
- object: 'podman',
- method: 'container_remove',
- params: ['id', 'force', 'depend']
- }),
-
- start: Model.declareRPC({
- object: 'podman',
- method: 'container_start',
- params: ['id']
- }),
-
- stop: Model.declareRPC({
- object: 'podman',
- method: 'container_stop',
- params: ['id']
- }),
-
- restart: Model.declareRPC({
- object: 'podman',
- method: 'container_restart',
- params: ['id']
- }),
-
- pause: Model.declareRPC({
- object: 'podman',
- method: 'container_pause',
- params: ['id']
- }),
-
- unpause: Model.declareRPC({
- object: 'podman',
- method: 'container_unpause',
- params: ['id']
- }),
-
- rename: Model.declareRPC({
- object: 'podman',
- method: 'container_rename',
- params: ['id', 'name']
- }),
-
- create: Model.declareRPC({
- object: 'podman',
- method: 'container_create',
- params: ['data']
- }),
-};
-
-const Container = Model.base.extend({
- __name__: 'Podman.Model.Container',
-
- getID() {
- return this.Id || '';
- },
-
- getName() {
- if (this.Names && Array.isArray(this.Names) && this.Names.length > 0) {
- return this.Names[0];
- }
-
- if (this.Names && !Array.isArray(this.Names) && this.Names !== '') {
- return this.Names;
- }
-
- if (this.Name) {
- return this.Name;
- }
-
- return _('Unknown');
- },
-
- getState() {
- if (typeof this.State === 'string') {
- return this.State;
- }
-
- return this.State?.Status || this.Status || '';
- },
-
- getStateBadge() {
- return E('div', {
- class: `badge ${this.getState()}`
- }, [this.getState()]);
- },
-
- getAutoUpdateLabel() {
- const labels = this.Config?.Labels || this.Labels;
- if (!labels) {
- return false;
- }
- return labels['io.containers.autoupdate'] || false;
- },
-
- getCmdString() {
- return this.Config?.Cmd ? this.Config.Cmd.join(' ') : '';
- },
-
- getEntrypointString() {
- return this.Config?.Entrypoint ? this.Config.Entrypoint.join(' ') : '';
- },
-
- getCreateCommandString() {
- return this.Config?.CreateCommand ? this.Config?.CreateCommand.join(' ') : '';
- },
-
- inspectToSpec(imageRef) {
- const config = this.Config || {};
- const hostConfig = this.HostConfig || {};
- const networkSettings = this.NetworkSettings || {};
- const mounts = this.Mounts || [];
-
- const spec = {
- image: imageRef
- };
-
- // Name (strip leading slash added by Podman inspect)
- if (this.Name) spec.name = this.Name.replace(/^\//, '');
-
- // Process
- if (config.Cmd && config.Cmd.length) spec.command = config.Cmd;
- if (config.Entrypoint && config.Entrypoint.length) spec.entrypoint = config.Entrypoint;
- if (config.Tty) spec.terminal = true;
- if (config.OpenStdin) spec.stdin = true;
- if (config.WorkingDir) spec.work_dir = config.WorkingDir;
- if (config.User) spec.user = config.User;
- if (config.Hostname) spec.hostname = config.Hostname;
- if (config.StopSignal) {
- const sigMap = {
- SIGHUP: 1,
- SIGINT: 2,
- SIGQUIT: 3,
- SIGILL: 4,
- SIGTRAP: 5,
- SIGABRT: 6,
- SIGBUS: 7,
- SIGFPE: 8,
- SIGKILL: 9,
- SIGUSR1: 10,
- SIGSEGV: 11,
- SIGUSR2: 12,
- SIGPIPE: 13,
- SIGALRM: 14,
- SIGTERM: 15,
- SIGCHLD: 17,
- SIGCONT: 18,
- SIGSTOP: 19,
- SIGTSTP: 20,
- SIGTTIN: 21,
- SIGTTOU: 22,
- SIGURG: 23,
- SIGXCPU: 24,
- SIGXFSZ: 25,
- SIGVTALRM: 26,
- SIGPROF: 27,
- SIGWINCH: 28,
- SIGIO: 29,
- SIGPWR: 30,
- SIGSYS: 31,
- };
- const sigStr = String(config.StopSignal).toUpperCase().replace(/^SIG/, '');
- const sigNum = sigMap['SIG' + sigStr] ?? parseInt(config.StopSignal, 10);
- if (sigNum > 0) spec.stop_signal = sigNum;
- }
- if (config.StopTimeout) spec.stop_timeout = config.StopTimeout;
- if (config.Healthcheck) spec.healthconfig = config.Healthcheck;
-
- // Environment: ["KEY=val", ...] → {KEY: "val", ...}
- if (config.Env && config.Env.length) {
- spec.env = {};
- for (const e of config.Env) {
- const idx = e.indexOf('=');
- if (idx > 0) spec.env[e.substring(0, idx)] = e.substring(idx + 1);
- }
- }
-
- // Labels
- if (config.Labels && Object.keys(config.Labels).length)
- spec.labels = config.Labels;
-
- // HostConfig
- if (hostConfig.Privileged) spec.privileged = true;
- if (hostConfig.ReadonlyRootfs) spec.read_only_filesystem = true;
- if (hostConfig.AutoRemove) spec.remove = true;
- if (hostConfig.CapAdd && hostConfig.CapAdd.length) spec.cap_add = hostConfig.CapAdd;
- if (hostConfig.CapDrop && hostConfig.CapDrop.length) spec.cap_drop = hostConfig.CapDrop;
- if (hostConfig.Dns && hostConfig.Dns.length) spec.dns_server = hostConfig.Dns;
- if (hostConfig.DnsOptions && hostConfig.DnsOptions.length) spec.dns_option = hostConfig
- .DnsOptions;
- if (hostConfig.DnsSearch && hostConfig.DnsSearch.length) spec.dns_search = hostConfig
- .DnsSearch;
- if (hostConfig.ExtraHosts && hostConfig.ExtraHosts.length) spec.hostadd = hostConfig
- .ExtraHosts;
- if (hostConfig.GroupAdd && hostConfig.GroupAdd.length) spec.groups = hostConfig.GroupAdd;
- if (hostConfig.ShmSize) spec.shm_size = hostConfig.ShmSize;
- if (hostConfig.OomScoreAdj) spec.oom_score_adj = hostConfig.OomScoreAdj;
-
- // Restart policy
- const rp = hostConfig.RestartPolicy;
- if (rp && rp.Name && rp.Name !== 'no') {
- spec.restart_policy = rp.Name;
- if (rp.MaximumRetryCount) spec.restart_tries = rp.MaximumRetryCount;
- }
-
- // Exposed ports: {"8080/tcp": {}} → {8080: "tcp"}
- const exposedPorts = config.ExposedPorts || {};
- if (Object.keys(exposedPorts).length) {
- spec.expose = {};
- for (const portProto of Object.keys(exposedPorts)) {
- const [port, proto] = portProto.split('/');
- const portNum = parseInt(port, 10);
- if (portNum > 0 && portNum <= 65535)
- spec.expose[portNum] = proto || 'tcp';
- }
- }
-
- // Port mappings: {"8080/tcp": [{HostIp, HostPort}]} → array
- const portBindings = hostConfig.PortBindings || {};
- if (Object.keys(portBindings).length) {
- spec.portmappings = [];
- for (const [portProto, bindings] of Object.entries(portBindings)) {
- if (!bindings || !bindings.length) continue;
- const [port, protocol] = portProto.split('/');
- const containerPort = parseInt(port, 10);
- for (const b of bindings) {
- const m = {
- container_port: containerPort,
- protocol: protocol || 'tcp'
- };
- if (b.HostPort) m.host_port = parseInt(b.HostPort, 10);
- if (b.HostIp && b.HostIp !== '0.0.0.0') m.host_ip = b.HostIp;
- spec.portmappings.push(m);
- }
- }
- }
-
- // Resource limits - use CFS quota/period directly (most precise)
- if (hostConfig.Memory > 0 || hostConfig.CpuQuota > 0) {
- spec.resource_limits = {};
- if (hostConfig.Memory > 0)
- spec.resource_limits.memory = {
- limit: hostConfig.Memory
- };
- if (hostConfig.CpuQuota > 0) {
- spec.resource_limits.cpu = {
- quota: hostConfig.CpuQuota
- };
- if (hostConfig.CpuPeriod > 0)
- spec.resource_limits.cpu.period = hostConfig.CpuPeriod;
- }
- }
-
- // Volumes and bind mounts
- const namedVols = mounts.filter(m => m.Type === 'volume');
- const bindMounts = mounts.filter(m => m.Type === 'bind');
-
- if (namedVols.length) {
- spec.volumes = namedVols.map(m => ({
- Name: m.Name,
- Dest: m.Destination,
- Options: m.Options || []
- }));
- }
-
- if (bindMounts.length) {
- spec.mounts = bindMounts.map(m => {
- const options = (m.Options || []).slice();
- if (!m.RW) options.push('ro');
- return {
- Type: 'bind',
- Source: m.Source,
- Destination: m.Destination,
- Options: options
- };
- });
- }
-
- // Network
- const nm = hostConfig.NetworkMode || '';
- if (nm === 'host') {
- spec.netns = {
- nsmode: 'host'
- };
- } else if (nm === 'none') {
- spec.netns = {
- nsmode: 'none'
- };
- } else {
- const nets = networkSettings.Networks || {};
- const nonDefault = Object.keys(nets).filter(n => n !== 'bridge' && n !== 'default');
- if (nonDefault.length) {
- spec.networks = {};
- for (const n of nonDefault) spec.networks[n] = {};
- }
- }
-
- return spec;
- },
-
- getWorkingDir() {
- return this.Config?.WorkingDir;
- },
-
- getHostname() {
- return this.Config?.Hostname;
- },
-
- getUser() {
- return this.Config?.User;
- },
-
- getInteractive() {
- return this.Config?.OpenStdin;
- },
-
- getPrivileged() {
- return this.HostConfig?.Privileged;
- },
-
- getNetworkMode() {
- return this.HostConfig?.NetworkMode;
- },
-
- getNetworkSettings() {
- return this.NetworkSettings || {};
- },
-
- getConfig() {
- return this.Config || {};
- },
-
- getHostConfig() {
- return this.HostConfig || {};
- },
-
- getTty() {
- return this.Config?.Tty;
- },
-
- getMounts() {
- return this.Mounts || [];
- },
-
- getEnvironmentVars() {
- return this.Config?.Env || [];
- },
-
- getPorts() {
- const ports = [];
- const networkPorts = this.getNetworkSettings().Ports || {};
-
- Object.keys(networkPorts).forEach((port) => {
- const [portOnly, protocol] = port.split('/');
- const portBindings = networkPorts[port] || [];
-
- if (portBindings.length === 0) {
- ports.push({
- string: port,
- port: portOnly,
- protocol: protocol || '',
- hostPort: null,
- hostIp: null
- });
- return;
- }
-
- portBindings.forEach((portBinding) => {
- const bindingString = [port];
- if (portBinding.HostIp) bindingString.push(portBinding.HostIp);
- if (portBinding.HostPort) bindingString.push(portBinding.HostPort);
- ports.push({
- string: bindingString.join(':'),
- port: portOnly,
- protocol: protocol || '',
- hostIp: portBinding.HostIp,
- hostPort: portBinding.HostPort,
- });
- });
- });
-
- return ports;
- },
-
- getImageName() {
- return (this.ImageName || this.Image).replace(/^[^\/]+\//, '').split(':')[0];
- },
-
- _parseImageRef() {
- const cleanUrl = this.Image.split('@')[0];
- const lastColon = cleanUrl.lastIndexOf(':');
- const lastSlash = cleanUrl.lastIndexOf('/');
- return {
- cleanUrl,
- lastColon,
- lastSlash
- };
- },
-
- getImageRepo() {
- const {
- cleanUrl,
- lastColon,
- lastSlash
- } = this._parseImageRef();
- return lastColon > lastSlash ? cleanUrl.substring(0, lastColon) : '';
- },
-
- getImageTag() {
- const {
- cleanUrl,
- lastColon,
- lastSlash
- } = this._parseImageRef();
- return lastColon > lastSlash ? cleanUrl.substring(lastColon + 1) : 'latest';
- },
-
- getCreated(dateFormat) {
- return dateFormat ? podmanUtil.format.date(this.Created) : this.Created;
- },
-
- getStartedAt(dateFormat) {
- const date = this.StartedAt || this.State?.StartedAt;
- return dateFormat ? podmanUtil.format.date(date) : date;
- },
-
- getRestartPolicyName() {
- if (this.HostConfig?.RestartPolicy?.Name) {
- return this.HostConfig.RestartPolicy.Name;
- }
-
- return 'no';
- },
-
- getDetailLink(text) {
- return E('a', {
- class: 'text-bold',
- href: this.getDetailUrl(),
- 'data-container-id': this.getID()
- }, text || this.getID());
- },
-
- getDetailUrl() {
- return L.url('admin/podman/container', this.getID());
- },
-
- getAutoStartStatusIcon(status) {
- let text = '-';
-
- if (status === 'enabled') {
- text = constants.ICON.INIT_ENABLED;
- } else if (status === 'missing') {
- text = constants.ICON.INIT_MISSING;
- } else if (status === 'disabled') {
- text = constants.ICON.INIT_DISABLED;
- }
-
- return E('span', {
- class: `autostart-status autostart-${status || ''}`
- }, text);
- },
-
- isRunning() {
- const state = this.getState();
- return this.State?.Running ||
- state === 'running' ||
- state === 'starting' ||
- state === 'unhealthy';
- },
-
- isStopped() {
- const state = this.getState();
- return state === 'exited' || state === 'created';
- },
-
- isPaused() {
- return !!this.State?.Paused || this.getState() === 'paused';
- },
-
- async checkInitScript() {
- if (!this.HostConfig) {
- const inspectData = await this.inspect();
- if (!inspectData) return 'none';
- this.HostConfig = inspectData.HostConfig;
- }
- const hasRestartPolicy = this._hasRestartPolicy();
-
- if (!hasRestartPolicy) {
- return 'none';
- }
-
- const initStatus = await InitScript.status(this.getName());
- if (!initStatus) return 'none';
-
- if (initStatus.exists && initStatus.enabled) {
- return 'enabled';
- } else if (!initStatus.exists) {
- return 'missing';
- } else if (initStatus.exists && !initStatus.enabled) {
- return 'disabled';
- }
-
- return 'none';
- },
-
- async generateInitScript() {
- return InitScript.generate(this.getName());
- },
-
- async showInitScript() {
- return InitScript.show(this.getName());
- },
-
- async removeInitScript() {
- return InitScript.remove(this.getName());
- },
-
- async enableInitScript() {
- return InitScript.setEnabled(this.getName(), true);
- },
-
- async disableInitScript() {
- return InitScript.setEnabled(this.getName(), false);
- },
-
- _hasRestartPolicy() {
- return this.getRestartPolicyName() !== 'no';
- },
-
- async inspect() {
- return ContainerRPC.inspect(this.getID());
- },
-
- async update(data) {
- await ContainerRPC.update(this.getID(), data);
-
- const initScriptStatus = await this.checkInitScript();
- const policy = data.RestartPolicy;
- const hasRestartPolicy = policy !== 'no';
-
- if (hasRestartPolicy && (initScriptStatus === 'none' || initScriptStatus === 'missing')) {
- await this.generateInitScript();
- await this.enableInitScript();
- } else if (!hasRestartPolicy && (initScriptStatus === 'enabled' || initScriptStatus ===
- 'disabled')) {
- await this.removeInitScript();
- }
- },
-
- async remove(force, volumes) {
- const initScriptStatus = await this.checkInitScript();
- if (initScriptStatus === 'enabled' || initScriptStatus === 'disabled') {
- await this.removeInitScript();
- }
- return ContainerRPC.remove(this.getID(), force ?? false, volumes ?? false);
- },
-
- async start() {
- return ContainerRPC.start(this.getID());
- },
-
- async stop() {
- return ContainerRPC.stop(this.getID());
- },
-
- async restart() {
- return ContainerRPC.restart(this.getID());
- },
-
- async pause() {
- return ContainerRPC.pause(this.getID());
- },
-
- async unpause() {
- return ContainerRPC.unpause(this.getID());
- },
-
- async connect(networkName, payload) {
- return Network.getSingleton({
- name: networkName
- }).connect(Object.assign({
- container: this.getID()
- }, payload));
- },
-
- async disconnect(networkName) {
- return Network.getSingleton({
- name: networkName
- }).disconnect({
- Container: this.getID()
- });
- },
-
- streamTop(onChunk, delay, psargs) {
- const params = new URLSearchParams({
- delay: String(delay || 2)
- });
- if (psargs) params.set('ps_args', psargs);
- const url = L.url('admin/podman/stream/top', this.getID()) + '?' + params;
- return this._stream(
- () => url,
- (data) => {
- if (!data.raw && !data.Error) onChunk(data);
- }
- );
- },
-
- streamStats(onChunk, interval) {
- const params = new URLSearchParams({
- interval: String(interval || 2)
- });
- const url = L.url('admin/podman/stream/stats', this.getID()) + '?' + params;
- return this._stream(
- () => url,
- (data) => {
- if (data.raw || data.Error || !data.Stats || data.Stats.length === 0) {
- return;
- }
- onChunk(data.Stats[0]);
- }
- );
- },
-
- streamLogs(onChunk, {
- tail = 100,
- since = null,
- until = null,
- follow = true
- } = {}) {
- if (!follow) {
- // Historical fetch: single request, stop after completion (no reconnect)
- let handle;
- handle = this._stream(
- () => {
- const params = new URLSearchParams();
- params.set('tail', String(tail));
- params.set('follow', 'false');
- if (since !== null) params.set('since', String(since));
- if (until !== null) params.set('until', String(until));
- return L.url('admin/podman/stream/logs', this.getID()) + '?' + params;
- },
- onChunk,
- () => handle?.stop()
- );
- return handle;
- }
-
- // Live stream: reconnect with since= after each disconnect
- let reconnectSince = null;
- return this._stream(
- () => {
- const params = new URLSearchParams();
- if (reconnectSince !== null) {
- // Reconnect: continue from last close, no tail (would cap new lines)
- params.set('since', String(reconnectSince));
- } else {
- // First connect: apply user params
- params.set('tail', String(tail));
- if (since !== null) params.set('since', String(since));
- }
- params.set('follow', 'true');
- if (until !== null) params.set('until', String(until));
- return L.url('admin/podman/stream/logs', this.getID()) + '?' + params;
- },
- onChunk,
- () => {
- reconnectSince = Date.now() / 1000;
- }
- );
- },
-
- async checkImageUpdate() {
- const findArchDigest = (manifest, arch, os) => {
- if (!manifest || !manifest.manifests) {
- return manifest.digest || null;
- }
-
- const entry = manifest.manifests.find((m) =>
- m.platform &&
- m.platform.architecture === arch &&
- m.platform.os === os
- );
-
- return entry ? entry.digest : null;
- };
-
- try {
- const image = await this.getImage();
-
- const imageRef = image.getDisplayTag() || this.Image;
- if (!imageRef || imageRef.startsWith(''))
- return {
- hasUpdate: false
- };
-
- const localArch = image.Architecture || 'amd64';
- const localOs = image.Os || 'linux';
-
- const manifest = await image.inspectManifest(imageRef);
-
- const remoteDigest = findArchDigest(manifest, localArch, localOs);
-
- const repoDigests = image.RepoDigests || [];
- const hasUpdate = !!(remoteDigest && !repoDigests.some(rd => rd.includes(
- remoteDigest)));
-
- return {
- hasUpdate,
- remoteDigest,
- };
- } catch (err) {
- return {
- hasUpdate: false,
- error: err.message || String(err)
- };
- }
- },
-
- async _reinstateInitScript(status) {
- if (status !== 'enabled' && status !== 'disabled') return;
- await this.generateInitScript();
- if (status === 'enabled') await this.enableInitScript();
- },
-
- getUpdateSkipReason() {
- if (this.Pod)
- return _('Part of a pod ("%s")').format(this.Pod);
- const hostConfig = this.getHostConfig();
- if (hostConfig.AutoRemove)
- return _('Ephemeral (--rm flag)');
- if (hostConfig.NetworkMode?.startsWith('container:'))
- return _('Shares network with another container');
- return null;
- },
-
- async updateImage(onProgress) {
- const skipReason = this.getUpdateSkipReason();
- if (skipReason) throw new Error(skipReason);
-
- const [image, initStatus] = await Promise.all([this.getImage(), this.checkInitScript()]);
-
- if (!image.RepoTags?.length || image.RepoTags[0] === ':') {
- const ref = this.ImageName || this.Config?.Image;
- if (ref) image.RepoTags = [ref];
- }
-
- const imageRef = image.getDisplayTag();
- if (!imageRef || imageRef === ':')
- throw new Error(_('Container image has no tag - cannot update'));
-
- onProgress?.(_('Pulling %s').format(imageRef) + '\n');
- const oldImageId = image.getID();
- const newImageId = await image.update(onProgress);
-
- if (!newImageId)
- throw new Error(_('Pull did not return an image ID - pull may have failed'));
-
- if (newImageId === oldImageId)
- throw new Error(_('Image is already up-to-date'));
-
- const wasRunning = this.isRunning();
- const spec = this.inspectToSpec(newImageId);
-
- if (wasRunning) {
- onProgress?.('→ ' + _('Stopping container') + '\n');
- try {
- await this.stop();
- } catch (e) {
- throw new Error(_('Stop failed: %s').format(e.message || e));
- }
- }
-
- onProgress?.('→ ' + _('Removing container') + '\n');
- try {
- await this.remove();
- } catch (e) {
- throw new Error(_('Remove failed: %s').format(e.message || e));
- }
-
- onProgress?.('→ ' + _('Creating container') + '\n');
- let created;
- try {
- created = await ContainerRPC.create(spec);
- } catch (e) {
- throw new Error(_('Create failed: %s').format(e.message || e));
- }
- if (!created || created.error)
- throw new Error(_('Create failed: %s').format(created?.error || _(
- 'Failed to create container')));
-
- if (wasRunning) {
- onProgress?.('→ ' + _('Starting container') + '\n');
- try {
- await ContainerRPC.start(created.Id);
- } catch (e) {
- throw new Error(_('Start failed: %s').format(e.message || e));
- }
- }
-
- onProgress?.('→ ' + _('Reinstating init script') + '\n');
- try {
- await this._reinstateInitScript(initStatus);
- } catch (e) {
- throw new Error(_('Init script reinstate failed: %s').format(e.message || e));
- }
-
- onProgress?.('✓ ' + _('Updated to %s').format((newImageId || '').substring(0, 12)) +
- '\n');
- return {
- oldImage: image
- };
- },
-
- async getImage() {
- const image = Image.getSingleton({
- Id: this.ImageID || this.Image
- });
- return Image.getSingleton(await image.inspect());
- },
-
- async updateName(name) {
- if (!name || name === this.getName()) return;
-
- await ContainerRPC.rename(this.getID(), name);
-
- const initScriptStatus = await this.checkInitScript();
- if (initScriptStatus === 'enabled' || initScriptStatus === 'disabled') {
- await this.removeInitScript();
- }
-
- if (this.Names && this.Names.length > 0) this.Names[0] = name;
- if (this.Name) this.Name = name;
-
- await this._reinstateInitScript(initScriptStatus);
- },
-});
-
-return baseclass.extend({
- getSingleton(container) {
- return Container.extend(container).instantiate([]);
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/model/Image.js b/luci-app-podman/htdocs/luci-static/resources/podman/model/Image.js
deleted file mode 100644
index 53330dcb3..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/model/Image.js
+++ /dev/null
@@ -1,103 +0,0 @@
-'use strict';
-
-'require baseclass';
-
-'require podman.model.Model as Model';
-
-const ImageRPC = {
- inspect: Model.declareRPC({
- object: 'podman',
- method: 'image_inspect',
- params: ['id'],
- }),
-
- inspectManifest: Model.declareRPCSilent({
- object: 'podman',
- method: 'image_manifest_inspect',
- params: ['image']
- }),
-
- remove: Model.declareRPC({
- object: 'podman',
- method: 'image_remove',
- params: ['id', 'force'],
- }),
-};
-
-const Image = Model.base.extend({
- __name__: 'Podman.Model.Image',
-
- getID() {
- return this.Id;
- },
-
- getDisplayTag() {
- return this.getRepoTags()[0];
- },
-
- getRepoTags() {
- return this.RepoTags || [':'];
- },
-
- getRepository() {
- const tag = this.getDisplayTag() || ':';
- return tag.split(':')[0] || '';
- },
-
- getTag() {
- const tag = this.getDisplayTag() || ':';
- return tag.split(':')[1] || '';
- },
-
- getDigest() {
- if (this.Digest) {
- return this.Digest;
- }
-
- if (this.RepoDigests && this.RepoDigests.length > 0) {
- for (const rd of this.RepoDigests) {
- if (rd.includes('@sha256:')) {
- return rd.split('@')[1];
- }
- }
- }
- return null;
- },
-
- inspect() {
- return ImageRPC.inspect(this.getID());
- },
-
- inspectManifest(ref) {
- return ImageRPC.inspectManifest(ref || this.getDisplayTag());
- },
-
- remove() {
- return ImageRPC.remove(this.getID());
- },
-
- update(onProgress) {
- return this.streamPull(onProgress);
- },
-
- streamPull(onProgress) {
- return new Promise((resolve, reject) => {
- let handle;
- handle = this._stream(
- () => L.url('admin/podman/stream/pull') + '?reference=' + encodeURIComponent(this.getDisplayTag()),
- (chunk) => {
- if (chunk.images && chunk.images.length > 0) { resolve(chunk.images[0]); handle.stop(); return; }
- if (chunk.error) { reject(new Error(chunk.error)); handle.stop(); return; }
- if (chunk.stream) onProgress?.(chunk.stream);
- if (chunk.raw) onProgress?.(chunk.raw + '\n');
- }
- );
- });
- },
-});
-
-return baseclass.extend({
- getSingleton(image) {
- return Image.extend(image).instantiate([]);
- }
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/model/Model.js b/luci-app-podman/htdocs/luci-static/resources/podman/model/Model.js
deleted file mode 100644
index fdb125877..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/model/Model.js
+++ /dev/null
@@ -1,112 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require rpc';
-'require ui';
-
-'require podman.ui as podmanUI';
-
-function checkResponse(response) {
- if (response?.response >= 400) {
- throw new Error(response.message);
- }
- return response;
-}
-
-function catchError(err) {
- const msg = err?.message || String(err);
- if (msg.includes('Access denied') || msg.includes('session is expired')) {
- window.location.href = L.url('admin');
- return;
- }
- ui.hideModal();
- document.body.scrollTop = 0;
- document.documentElement.scrollTop = 0;
- podmanUI.alert(msg, 'error');
- throw err;
-}
-
-function processLines(buffer, onChunk) {
- const lines = buffer.split('\n');
- buffer = lines.pop() || '';
- for (const line of lines) {
- if (line.trim()) {
- try {
- onChunk(JSON.parse(line));
- } catch (e) {
- onChunk({ raw: line.trimEnd() });
- }
- }
- }
- return buffer;
-}
-
-const Model = baseclass.extend({
- __name: 'Podman.Model',
-
- _stream(getUrl, onData, onDone) {
- let stopped = false;
- let currentController = null;
-
- const doStream = async () => {
- const decoder = new TextDecoder();
- let backoff = 1000;
-
- while (!stopped) {
- currentController = new AbortController();
- try {
- const response = await fetch(getUrl(), { signal: currentController.signal });
- if (response.status === 403) {
- window.location.reload();
- return;
- }
- const reader = response.body?.getReader();
- let buffer = '';
-
- while (!stopped) {
- const { done, value } = await reader.read();
- if (done) {
- // Flush any trailing line the server sent without a final '\n'
- if (buffer.trim() && !stopped)
- processLines(buffer + '\n', onData);
- break;
- }
- buffer += decoder.decode(value, { stream: true });
- buffer = processLines(buffer, onData);
- }
-
- backoff = 1000;
- if (!stopped) onDone?.();
- } catch (err) {
- if (stopped) break; // AbortController fired from stop()
- // network error - reconnect with backoff
- await new Promise(r => setTimeout(r, backoff));
- backoff = Math.min(backoff * 2, 30000);
- }
- }
- };
-
- doStream();
-
- return {
- stop: () => {
- stopped = true;
- if (currentController) currentController.abort();
- }
- };
- },
-});
-
-return baseclass.extend({
- base: Model,
- declareRPC(options) {
- const fn = rpc.declare(options);
- return (...args) => fn(...args).then(checkResponse).catch(catchError);
- },
- // Like declareRPC but does not show the global error dialog on failure.
- // Use for background checks where the caller handles the error itself.
- declareRPCSilent(options) {
- const fn = rpc.declare(options);
- return (...args) => fn(...args).then(checkResponse);
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/model/Network.js b/luci-app-podman/htdocs/luci-static/resources/podman/model/Network.js
deleted file mode 100644
index 787262c7f..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/model/Network.js
+++ /dev/null
@@ -1,316 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require network';
-'require firewall';
-'require uci';
-'require ui';
-
-'require podman.model.Model as Model';
-
-const NetworkRPC = {
- inspect: Model.declareRPC({
- object: 'podman',
- method: 'network_inspect',
- params: ['name']
- }),
-
- remove: Model.declareRPC({
- object: 'podman',
- method: 'network_remove',
- params: ['name', 'force']
- }),
-
- connect: Model.declareRPC({
- object: 'podman',
- method: 'network_connect',
- params: ['name', 'data']
- }),
-
- disconnect: Model.declareRPC({
- object: 'podman',
- method: 'network_disconnect',
- params: ['name', 'data']
- }),
-};
-
-const Network = Model.base.extend({
- __name__: 'Podman.Model.Network',
-
- getID() {
- return this.ID;
- },
-
- getName() {
- return this.name || _('Unknown');
- },
-
- getDriver() {
- return this.driver;
- },
-
- getSubnetIP4() {
- if (this.subnets?.length > 0) {
- return this.subnets[0].subnet || '';
- }
- if (this.IPAM?.Config?.length > 0) {
- return this.IPAM.Config[0].Subnet || '';
- }
- return '';
- },
-
- getSubnetIP6() {
- if (this.ipv6_enabled && this.subnets?.length > 1) {
- return this.subnets[1].subnet || '';
- }
- return '';
- },
-
- getGatewayIP4() {
- if (this.subnets?.length > 0) {
- return this.subnets[0].gateway || '';
- }
- if (this.IPAM?.Config?.length > 0) {
- return this.IPAM.Config[0].Gateway || '';
- }
- return '';
- },
-
- getGatewayIP6() {
- if (this.ipv6_enabled && this.subnets?.length > 1) {
- return this.subnets[1].gateway || '';
- }
- return '';
- },
-
- isBridge() {
- return this.getDriver() === 'bridge';
- },
-
- async inspect() {
- return NetworkRPC.inspect(this.getName());
- },
-
- async remove(force) {
- return NetworkRPC.remove(this.getName(), force ?? false);
- },
-
- async connect(data) {
- return NetworkRPC.connect(this.getName(), data || {});
- },
-
- async disconnect(data) {
- return NetworkRPC.disconnect(this.getName(), data || {});
- },
-
- async integrationCheck() {
- const check = {
- hasInterface: false,
- hasDevice: false,
- hasDnsmasqExclusion: false,
- };
-
- const networkObj = await network.getNetwork(this.getName());
- let deviceObj;
-
- if (networkObj) {
- check.hasInterface = true;
- deviceObj = networkObj.getDevice();
-
- if (deviceObj) {
- check.hasDevice = true;
- }
- }
-
- if (!deviceObj) {
- const devices = (await network.getDevices()).map((device) => device.device);
-
- if (devices.includes(this.network_interface)) {
- check.hasDevice = true;
- }
- }
-
- await uci.load('dhcp');
- const mainSection = await this.hasDnsmasq() ? this._getDnsmasqSection() : null;
- if (mainSection) {
- const notInterfaces = uci.get('dhcp', mainSection, 'notinterface');
-
- if ([].concat(notInterfaces ?? []).includes(this.getName())) {
- check.hasDnsmasqExclusion = true;
- }
- } else {
- check.hasDnsmasqExclusion = true;
- }
-
- return check;
- },
-
- async integrationRepair() {
- await uci.load('dhcp');
- const status = await this.integrationCheck();
- if (status.hasInterface && status.hasDevice && status.hasDnsmasqExclusion) {
- return;
- }
-
- let deviceName;
- let changes = false;
-
- if (status.hasDevice === false && this.isBridge()) {
- deviceName = await this.integrationCreateDevice();
- changes = true;
-
- if (status.hasInterface === true) {
- const net = await network.getNetwork(this.getName());
- net.addDevice(deviceName);
- }
- }
-
- if (status.hasInterface === false) {
- if (status.hasDevice === true) {
- deviceName = this.network_interface;
- }
-
- await this.integrationCreateNetwork(deviceName);
- changes = true;
- }
-
- if (await this.hasDnsmasq() && status.hasDnsmasqExclusion === false) {
- await this.integrationAddDnsmasqExclusion();
- changes = true;
- }
-
- if (changes === false) {
- return;
- }
-
- await uci.save();
- ui.changes.apply();
- await network.flushCache();
- },
-
- async integrationRemove() {
- await uci.load('dhcp');
- const status = await this.integrationCheck();
- let changes = false;
-
- // Check device shared status BEFORE deleting the interface to avoid stale network cache
- let removeDevice = false;
- if (status.hasDevice === true && this.isBridge()) {
- const device = await network.getDevice(this.network_interface);
- removeDevice = device?.getNetworks().length === 1;
- }
-
- if (status.hasInterface === true) {
- const zone = await firewall.getZoneByNetwork(this.getName());
- if (zone) await zone.deleteNetwork(this.getName());
- await network.deleteNetwork(this.getName());
- changes = true;
- }
-
- if (removeDevice) {
- uci.remove('network', this.network_interface + '_device');
- changes = true;
- }
-
- if (await this.hasDnsmasq() && status.hasDnsmasqExclusion === true) {
- const mainSection = this._getDnsmasqSection();
- if (mainSection) {
- const notInterfaces = [].concat(uci.get('dhcp', mainSection, 'notinterface') || [])
- .filter(iface => iface !== this.getName());
- if (notInterfaces.length > 0)
- uci.set('dhcp', mainSection, 'notinterface', notInterfaces);
- else
- uci.unset('dhcp', mainSection, 'notinterface');
- changes = true;
- }
- }
-
- if (changes === false) {
- return;
- }
-
- await uci.save();
- ui.changes.apply();
- await network.flushCache();
- },
-
- async integrationCreateNetwork(deviceName) {
- const networkName = this.getName();
-
- if (this.subnets?.length === 0 && this.ipam_options?.driver === 'dhcp') {
- uci.add('network', 'interface', networkName);
- uci.set('network', networkName, 'proto', 'dhcp');
- return;
- }
-
- const subnet = this.getSubnetIP4();
- if (!subnet) return;
-
- const prefix = parseInt(subnet.split('/')[1], 10);
- const netmask = network.prefixToMask(prefix);
-
- const sid = `${networkName}`;
- uci.add('network', 'interface', sid);
- uci.set('network', sid, 'proto', 'static');
- if (deviceName) uci.set('network', sid, 'device', deviceName);
- uci.set('network', sid, 'ipaddr', this.getGatewayIP4());
- uci.set('network', sid, 'netmask', netmask);
-
- if (this.ipv6_enabled) {
- uci.set('network', sid, 'ip6addr', this.getGatewayIP6() + '/64');
- }
- },
-
- async integrationCreateDevice() {
- const devices = (await network.getDevices()).map((device) => device.device);
-
- const baseName = this.network_interface || this.getName();
- let i = 0;
- let deviceName = baseName;
-
- while (devices.includes(deviceName)) {
- i++;
- deviceName = `${baseName}${i}`;
- }
-
- const sid = `${deviceName}_device`;
- uci.add('network', 'device', sid);
- uci.set('network', sid, 'type', 'bridge');
- uci.set('network', sid, 'name', deviceName);
- uci.set('network', sid, 'bridge_empty', '1');
- uci.set('network', sid, 'ipv6', this.ipv6_enabled ? '1' : '0');
-
- if (this.ipv6_enabled) {
- uci.set('network', sid, 'ip6assign', '64');
- }
-
- return deviceName;
- },
-
- _getDnsmasqSection() {
- const sections = uci.sections('dhcp', 'dnsmasq');
- return sections.length > 0 ? sections[0]['.name'] : null;
- },
-
- async hasDnsmasq() {
- return L.hasSystemFeature('dnsmasq');
- },
-
- async integrationAddDnsmasqExclusion() {
- const mainSection = this._getDnsmasqSection();
- if (mainSection) {
- const notInterfaces = [].concat(uci.get('dhcp', mainSection, 'notinterface') || []);
- if (!notInterfaces.includes(this.getName())) {
- notInterfaces.push(this.getName());
- uci.set('dhcp', mainSection, 'notinterface', notInterfaces);
- }
- }
- },
-});
-
-return baseclass.extend({
- __name__: 'Podman.Model.Network',
- getSingleton(data) {
- return Network.extend(data).instantiate([]);
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/model/Pod.js b/luci-app-podman/htdocs/luci-static/resources/podman/model/Pod.js
deleted file mode 100644
index a359db95c..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/model/Pod.js
+++ /dev/null
@@ -1,182 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require ui';
-
-'require podman.model.Model as Model';
-'require podman.ui as podmanUI';
-
-const PodRPC = {
- inspect: Model.declareRPC({
- object: 'podman',
- method: 'pod_inspect',
- params: ['name']
- }),
-
- start: Model.declareRPC({
- object: 'podman',
- method: 'pod_start',
- params: ['name']
- }),
-
- stop: Model.declareRPC({
- object: 'podman',
- method: 'pod_stop',
- params: ['name']
- }),
-
- kill: Model.declareRPCSilent({
- object: 'podman',
- method: 'pod_kill',
- params: ['name', 'signal']
- }),
-
- restart: Model.declareRPC({
- object: 'podman',
- method: 'pod_restart',
- params: ['name']
- }),
-
- pause: Model.declareRPC({
- object: 'podman',
- method: 'pod_pause',
- params: ['name']
- }),
-
- unpause: Model.declareRPC({
- object: 'podman',
- method: 'pod_unpause',
- params: ['name']
- }),
-
- remove: Model.declareRPC({
- object: 'podman',
- method: 'pod_remove',
- params: ['name', 'force']
- }),
-};
-
-const Pod = Model.base.extend({
- __name__: 'Podman.Model.Pod',
-
- getID() {
- return this.Id;
- },
-
- getName() {
- return this.Name || this.Id || _('Unknown');
- },
-
- getStatus() {
- return this.Status || this.State || '';
- },
-
- getStatusBadge() {
- const status = this.getStatus();
- const cssClass = status.toLowerCase();
- return E('div', { class: `badge ${cssClass}` }, [ status ]);
- },
-
- getCreatedAt() {
- return this.Created;
- },
-
- getInfraId() {
- return this.InfraId || this.InfraContainerID;
- },
-
- getNetworks() {
- return this.Networks || [];
- },
-
- getLabels() {
- return this.Labels || {};
- },
-
- getContainers() {
- return this.Containers || [];
- },
-
- isRunning() {
- return this.getStatus() === 'Running';
- },
-
- isPaused() {
- return this.getStatus() === 'Paused';
- },
-
- isStopped() {
- const state = this.getStatus();
- return state === 'Stopped' || state === 'Exited' || state === 'Created' || state === 'Dead';
- },
-
- async inspect() {
- return PodRPC.inspect(this.getName());
- },
-
- async start() {
- return PodRPC.start(this.getName());
- },
-
- async stop() {
- const result = await PodRPC.stop(this.getName());
- if (result?.Id) return result;
-
- try {
- return await PodRPC.kill(this.getName(), 'SIGKILL');
- } catch (err) {
- const msg = String(err?.message || err);
- if (msg.includes('no running containers')) return result;
- ui.hideModal();
- podmanUI.alert(msg, 'error');
- throw err;
- }
- },
-
- async restart() {
- return PodRPC.restart(this.getName());
- },
-
- async pause() {
- return PodRPC.pause(this.getName());
- },
-
- async unpause() {
- return PodRPC.unpause(this.getName());
- },
-
- async remove(force) {
- return PodRPC.remove(this.getName(), force ?? true);
- },
-
- streamTop(onChunk, delay) {
- const params = new URLSearchParams({ delay: String(delay || 2) });
- const url = L.url('admin/podman/stream/pod_top', this.getName()) + '?' + params;
- return this._stream(
- () => url,
- (data) => { if (!data.raw && !data.Error) onChunk(data); }
- );
- },
-
- streamStats(onChunk) {
- const url = L.url('admin/podman/stream/pod_stats', this.getName());
- return this._stream(
- () => url,
- (data) => {
- if (!Array.isArray(data)) return;
- onChunk(data);
- }
- );
- },
-
- getDetailLink(label) {
- return E('a', { href: L.url('admin/podman/pod', this.getID()) }, label || this.getName());
- },
-});
-
-return baseclass.extend({
- __name__: 'Podman.Model.Pod',
- getSingleton(data) {
- return Pod.extend(data).instantiate([]);
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/model/Secret.js b/luci-app-podman/htdocs/luci-static/resources/podman/model/Secret.js
deleted file mode 100644
index 55b8669a0..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/model/Secret.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-
-'require baseclass';
-
-'require podman.model.Model as Model';
-
-const SecretRPC = {
- inspect: Model.declareRPC({
- object: 'podman',
- method: 'secret_inspect',
- params: ['name']
- }),
-
- remove: Model.declareRPC({
- object: 'podman',
- method: 'secret_remove',
- params: ['name']
- }),
-};
-
-const Secret = Model.base.extend({
- __name__: 'Podman.Model.Secret',
-
- getID() {
- return this.ID;
- },
-
- getName() {
- return this.Spec?.Name;
- },
-
- getDriver() {
- return this.Spec?.Driver?.Name;
- },
-
- getLabels() {
- return this.Spec?.Labels ?? {};
- },
-
- async inspect() {
- return SecretRPC.inspect(this.getName());
- },
-
- async remove() {
- return SecretRPC.remove(this.getName());
- },
-});
-
-return baseclass.extend({
- getSingleton(secret) {
- return Secret.extend(secret).instantiate([]);
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/model/Volume.js b/luci-app-podman/htdocs/luci-static/resources/podman/model/Volume.js
deleted file mode 100644
index 853e2294e..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/model/Volume.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-'require baseclass';
-
-'require podman.model.Model as Model';
-
-const VolumeRPC = {
- inspect: Model.declareRPC({
- object: 'podman',
- method: 'volume_inspect',
- params: ['name']
- }),
-
- remove: Model.declareRPC({
- object: 'podman',
- method: 'volume_remove',
- params: ['name', 'force']
- }),
-};
-
-const Volume = Model.base.extend({
- __name__: 'Podman.Model.Volume',
-
- getName() {
- return this.Name || _('Unknown');
- },
-
- async inspect() {
- return VolumeRPC.inspect(this.getName());
- },
-
- async remove(force) {
- return VolumeRPC.remove(this.getName(), force || false);
- },
-});
-
-return baseclass.extend({
- getSingleton(volume) {
- return Volume.extend(volume).instantiate([]);
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/rpc.js b/luci-app-podman/htdocs/luci-static/resources/podman/rpc.js
deleted file mode 100644
index 9c9e873d3..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/rpc.js
+++ /dev/null
@@ -1,187 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require podman.model.Model as Model';
-'require podman.model.Container as Container';
-'require podman.model.Image as Image';
-'require podman.model.Network as Network';
-'require podman.model.Volume as Volume';
-'require podman.model.Secret as Secret';
-'require podman.model.Pod as Pod';
-
-return baseclass.extend({
- /**
- * Container methods.
- */
- containers: {
- list: Model.declareRPC({
- object: 'podman',
- method: 'containers_list',
- params: ['query'],
- expect: {
- data: []
- },
- filter: (containers) => containers
- .map((container) => Container.getSingleton(container))
- .sort((containerA, containerB) => containerA
- .getName()
- .localeCompare(containerB.getName()))
- }),
-
- create: Model.declareRPC({
- object: 'podman',
- method: 'container_create',
- params: ['data']
- }),
- },
-
- /**
- * Image methods.
- */
- images: {
- list: Model.declareRPC({
- object: 'podman',
- method: 'images_list',
- params: [],
- expect: {
- data: []
- },
- filter: (images) => images
- .map((image) => Image.getSingleton(image))
- .sort((imageA, imageB) => imageA.getDisplayTag().localeCompare(imageB.getDisplayTag())),
- }),
- },
-
- /**
- * Pod methods.
- */
- pods: {
- list: Model.declareRPC({
- object: 'podman',
- method: 'pods_list',
- params: [],
- expect: {
- data: []
- },
- filter: (pods) => pods
- .map((pod) => Pod.getSingleton(pod))
- .sort((a, b) => a.getName().localeCompare(b.getName()))
- }),
-
- create: Model.declareRPC({
- object: 'podman',
- method: 'pod_create',
- params: ['data']
- }),
- },
-
- /**
- * Network management methods.
- */
- networks: {
- list: Model.declareRPC({
- object: 'podman',
- method: 'networks_list',
- params: [],
- expect: {
- data: []
- },
- filter: (networks) => networks
- .map((network) => Network.getSingleton(network))
- .sort((networkA, networkB) => networkA.getName().localeCompare(networkB.getName())),
- }),
-
- create: Model.declareRPC({
- object: 'podman',
- method: 'network_create',
- params: ['data']
- }),
- },
-
- /**
- * Volume management methods.
- */
- volumes: {
- list: Model.declareRPC({
- object: 'podman',
- method: 'volumes_list',
- params: [],
- expect: {
- data: []
- },
- filter: (volumes) => volumes
- .map((volume) => Volume.getSingleton(volume))
- .sort((volumeA, volumeB) => volumeA.getName().localeCompare(volumeB.getName()))
- }),
-
- create: Model.declareRPC({
- object: 'podman',
- method: 'volume_create',
- params: ['data']
- }),
-
- import: Model.declareRPC({
- object: 'podman',
- method: 'volume_import',
- params: ['name', 'compressed']
- }),
- },
-
- /**
- * Secret management methods.
- */
- secrets: {
- list: Model.declareRPC({
- object: 'podman',
- method: 'secrets_list',
- params: [],
- expect: {
- data: []
- },
- filter: (secrets) => secrets
- .map((secret) => Secret.getSingleton(secret))
- .sort((secretA, secretB) => secretA.getName().localeCompare(secretB.getName()))
- }),
-
- create: Model.declareRPC({
- object: 'podman',
- method: 'secret_create',
- params: ['name', 'data', 'labels']
- }),
- },
-
- /**
- * System information methods.
- */
- system: {
- version: Model.declareRPC({
- object: 'podman',
- method: 'version',
- params: []
- }),
-
- info: Model.declareRPC({
- object: 'podman',
- method: 'info',
- params: []
- }),
-
- df: Model.declareRPC({
- object: 'podman',
- method: 'system_df',
- params: []
- }),
-
- prune: Model.declareRPC({
- object: 'podman',
- method: 'system_prune',
- params: ['all', 'volumes']
- }),
-
- debug: Model.declareRPC({
- object: 'podman',
- method: 'system_debug',
- params: []
- })
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/ui.js b/luci-app-podman/htdocs/luci-static/resources/podman/ui.js
deleted file mode 100644
index 3feff5391..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/ui.js
+++ /dev/null
@@ -1,559 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require ui';
-'require podman.constants as c';
-
-const AbstractInputField = ui.Textfield.extend({
- __name__: 'Podman.UI.AbstractInputField',
-
- inputType: 'text',
-
- __init__(value, options) {
- this.value = value;
- this.options = Object.assign({ min: '', max: '' }, options);
- },
-
- render() {
- const frameEl = E('div', { id: this.options.id });
- const inputEl = E('input', {
- id: this.options.id ? `widget.${this.options.id}` : null,
- name: this.options.name,
- type: this.inputType,
- class: 'cbi-input-text',
- readonly: this.options.readonly ? '' : null,
- disabled: this.options.disabled ? '' : null,
- min: this.options.min,
- max: this.options.max,
- placeholder: this.options.placeholder,
- value: this.value,
- });
-
- frameEl.appendChild(inputEl);
-
- return this.bind(frameEl);
- },
-});
-
-const UINumberfield = AbstractInputField.extend({
- __name__: 'Podman.UI.Numberfield',
- inputType: 'number',
-});
-
-const UIDatefield = AbstractInputField.extend({
- __name__: 'Podman.UI.Datefield',
- inputType: 'date',
-});
-
-const UIBase = baseclass.extend({
- __name__: 'Podman.UI',
-
- alert(text, type, timeLimited) {
- timeLimited = timeLimited === true ? c.NOTIFICATION_TIMEOUT : timeLimited;
- type = type || 'info';
-
- if (Array.isArray(text) !== true) {
- text = E('p', {}, text);
- }
-
- if (parseInt(timeLimited) > 0) {
- ui.addTimeLimitedNotification(type.toUpperCase(), text, timeLimited, type);
- return;
- }
-
- ui.addNotification(type.toUpperCase(), text, type);
- },
-
- showSpinningModal(title, text) {
- ui.showModal(title, [E('div', { class: 'spinning' }, text)], 'loading-modal');
- },
-});
-
-const UITooltip = baseclass.extend({
- __name__: 'Podman.UI.Tooltip',
-
- node: '',
- tooltip: '',
- options: {},
-
- __init__(node, tooltip, options) {
- this.node = node || '';
- this.tooltip = tooltip || '';
- this.options = options || {};
- },
-
- render() {
- const cssClass = 'cbi-tooltip-container';
- const cls = this.options.class ? `${this.options.class} ${cssClass}` : cssClass;
- const options = Object.assign({}, this.options, { class: cls });
-
- return E('div', options, [
- this.node,
- E('div', { class: 'cbi-tooltip' }, this.tooltip),
- ]);
- }
-});
-
-const UISecretText = baseclass.extend({
- __name__: 'Podman.UI.SecretText',
-
- value: '',
- censoredValue: '',
- show: false,
-
- __init__(value, censoredValue) {
- this.value = value;
- this.censoredValue = censoredValue;
- },
-
- render() {
- const me = this;
-
- return new UITooltip(
- me.censoredValue,
- _('Click to reveal/hide value'),
- {
- class: 'tooltip',
- click() {
- if (me.show) {
- me.show = false;
- this.childNodes[0].nodeValue = me.censoredValue;
-
- return;
- }
-
- me.show = true;
- this.childNodes[0].nodeValue = me.value;
- },
- }
- ).render();
- }
-});
-
-const UIButton = baseclass.extend({
- __name__: 'Podman.UI.Button',
-
- __init__(text, href, cssClass, tooltip) {
- this.text = text;
- this.href = href;
- this.cssClass = cssClass;
- this.tooltip = tooltip;
- },
-
- render() {
- const attrs = {
- class: this.cssClass ? 'cbi-button cbi-button-' + this.cssClass : 'cbi-button',
- click: typeof this.href === 'function' ? this.href : (ev) => {
- ev.preventDefault();
- window.location.href = this.href;
- }
- };
-
- if (this.tooltip) {
- attrs.title = this.tooltip;
- }
-
- return E('button', attrs, this.text || '');
- }
-});
-
-const UIButtonNew = baseclass.extend({
- __name__: 'Podman.UI.ButtonNew',
-
- __init__(text, options) {
- this.options = Object.assign({
- text: text || '',
- // class: ''
- type: '',
- href: '',
- click: () => { },
- tooltip: '',
- }, options);
- },
-
- render() {
- const click = this.options.href
- ? ui.createHandlerFn(this, (event) => {
- event.preventDefault();
- window.location.href = this.options.href;
- })
- : this.options.click;
-
- const button = E('button', {
- class: `cbi-button cbi-button-${this.options.type}`,
- click,
- }, this.options.text);
-
- if (this.options.tooltip) {
- return new UITooltip(button, this.options.tooltip).render();
- }
-
- return button;
- }
-});
-
-const UIJsonArea = baseclass.extend({
- __name__: 'Podman.UI.JsonArea',
-
- __init__(data) {
- this.data = data || this.data;
- },
-
- render() {
- const el = E('pre', { class: 'json-area' });
- const json = JSON.stringify(this.data, null, 2);
- const nodes = [];
- let last = 0;
- json.replace(
- /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,
- (match, _p1, _p2, _p3, _p4, offset) => {
- if (offset > last)
- nodes.push(document.createTextNode(json.slice(last, offset)));
- let cls = 'number';
- if (/^"/.test(match)) cls = /:$/.test(match) ? 'key' : 'string';
- else if (/true|false/.test(match)) cls = 'boolean';
- else if (/null/.test(match)) cls = 'null';
- nodes.push(E('span', { 'class': cls }, match));
- last = offset + match.length;
- }
- );
- if (last < json.length)
- nodes.push(document.createTextNode(json.slice(last)));
- for (const node of nodes) el.appendChild(node);
- return el;
- },
-});
-
-const UIBashCodeArea = baseclass.extend({
- __name__: 'Podman.UI.BashCodeArea',
-
- code: '',
-
- __init__(code) {
- this.code = code || this.code;
- },
-
- render() {
- const el = E('pre', { class: 'code-area bash' });
- const code = this.code || '';
- const nodes = [];
- let last = 0;
- const bashRegex = /(#[^\n]*)|("(?:\\.|[^\\"])*"|'(?:\\.|[^\\'])*')|(\$\w+|\$\{[^}]+\})|\b(if|then|else|elif|fi|case|esac|for|while|do|done|in|break|continue|exit|return|stop_service|start_service)\b|(\b\d+\b)/g;
- code.replace(bashRegex, (match, comment, string, variable, keyword, number, offset) => {
- if (offset > last)
- nodes.push(document.createTextNode(code.slice(last, offset)));
- let cls = null;
- if (comment) cls = 'comment';
- else if (string) cls = 'string';
- else if (variable) cls = 'variable';
- else if (keyword) cls = 'keyword';
- else if (number) cls = 'number';
- nodes.push(cls ? E('span', { 'class': cls }, match) : document.createTextNode(match));
- last = offset + match.length;
- });
- if (last < code.length)
- nodes.push(document.createTextNode(code.slice(last)));
- for (const node of nodes) el.appendChild(node);
- return el;
- },
-});
-
-/**
- * Scrolling text log for streaming output. Each append() is one logical
- * update: lines containing CR overwrite the last line (Podman pull progress
- * uses CR to refresh "Copying blob X 50%"); plain lines append. Sticky
- * auto-scroll: jumps to bottom on append unless the user scrolled up.
- */
-const UIStreamLog = baseclass.extend({
- __name__: 'Podman.UI.StreamLog',
-
- maxLines: 2000,
- autoScroll: true,
-
- __init__(opts) {
- opts = opts || {};
- if (typeof opts.maxLines === 'number') this.maxLines = opts.maxLines;
- if (typeof opts.autoScroll === 'boolean') this.autoScroll = opts.autoScroll;
- this._container = E('div', { class: 'podman-stream-log' });
- this._lastLineNode = null;
- this._lineCount = 0;
- },
-
- append(text) {
- if (text == null) return this;
- const stripped = String(text).replace(/\n+$/, '');
- if (!stripped) return this;
-
- const stick = this.autoScroll && this._isAtBottom();
- const cr = stripped.lastIndexOf('\r');
- const isProgress = cr >= 0;
- const display = isProgress ? stripped.slice(cr + 1) : stripped;
-
- if (isProgress && this._lastLineNode) {
- this._lastLineNode.textContent = display;
- } else {
- this._appendLine(display);
- }
-
- if (stick) this._container.scrollTop = this._container.scrollHeight;
- return this;
- },
-
- appendBlock(lines) {
- if (Array.isArray(lines)) for (const l of lines) this.append(l);
- return this;
- },
-
- clear() {
- while (this._container.firstChild) this._container.removeChild(this._container.firstChild);
- this._lastLineNode = null;
- this._lineCount = 0;
- return this;
- },
-
- render() {
- return this._container;
- },
-
- _appendLine(text) {
- const node = E('div', { class: 'log-line' }, [text || ' ']);
- this._container.appendChild(node);
- this._lastLineNode = node;
- this._lineCount++;
- while (this._lineCount > this.maxLines && this._container.firstChild) {
- const removed = this._container.firstChild;
- this._container.removeChild(removed);
- this._lineCount--;
- if (this._lastLineNode === removed) this._lastLineNode = this._container.lastChild;
- }
- },
-
- _isAtBottom() {
- const el = this._container;
- return (el.scrollHeight - el.scrollTop - el.clientHeight) < 5;
- }
-});
-
-/**
- * Table builder with header and row chaining.
- */
-const UITable = baseclass.extend({
- __name__: 'Podman.UI.Table',
-
- options: { class: 'table' },
-
- headers: [],
- rows: [],
-
- __init__(options) {
- this.headers = [];
- this.rows = [];
-
- const baseClass = this.options.class;
- this.options = Object.assign({}, this.options, options);
- if (options?.class) this.options.class = `${baseClass} ${options.class}`;
- },
-
- addHeader(header, options) {
- this.headers.push({
- inner: header,
- options: Object.assign({ class: 'th' }, options || {}),
- });
-
- return this;
- },
-
- setHeaders(headers) {
- this.headers = headers;
-
- return this;
- },
-
- addRow(cells, options) {
- this.rows.push({
- cells,
- options: Object.assign({ class: 'tr' }, options || {}),
- });
-
- return this;
- },
-
- setRows(rows) {
- this.rows = rows;
-
- return this;
- },
-
- render() {
- let headerRow = '';
-
- if (Array.isArray(this.headers) && this.headers.length > 0) {
- headerRow = E('tr', { class: 'tr table-titles' },
- this.headers.map((header) => E('th', header.options, header.inner))
- );
- }
-
- let rows = '';
-
- if (Array.isArray(this.rows) && this.rows.length > 0) {
- rows = this.rows.map((row) => E('tr', row.options,
- row.cells.map((cell) => E('td', Object.assign({ class: 'td' }, cell.options || {}), cell.inner))
- ));
- }
-
- return E('table', this.options, [headerRow].concat(rows));
- }
-});
-
-const UITableList = UITable.extend({
- __name__: 'Podman.UI.TableList',
-
- options: { class: 'table table-list' },
-
- addRow(label, value, rowOptions) {
- return this.super('addRow', [[
- { inner: label },
- { inner: value }
- ], rowOptions]);
- },
-});
-
-/**
- * Tabbed interface using LuCI tabs API.
- */
-const UITabs = baseclass.extend({
- __name__: 'Podman.UI.Tabs',
-
- tabs: [],
- activeTab: null,
-
- __init__(activeTab) {
- this.tabs = [];
- this.activeTab = activeTab || null;
- },
-
- addTab(id, title, content, active) {
- this.tabs.push({
- id,
- title,
- content,
- active: active || false
- });
-
- return this;
- },
-
- render() {
- const tabPanes = this.tabs.map((tab, index) => {
- const isActive = tab.active || (!this.activeTab && index === 0) || (this.activeTab === tab.id);
-
- return E('div', {
- class: 'tab-pane',
- 'data-tab': tab.id,
- 'data-tab-title': tab.title,
- 'data-tab-active': isActive ? 'true' : null
- }, [tab.content || E('div', { class: 'cbi-section' }, E('div', { class: 'cbi-section-node' }))]);
- });
-
- const tabContainer = E('div', { class: 'cbi-section' }, [
- E('div', { class: 'cbi-section-node' }, [
- E('div', { class: 'tab-panes' }, tabPanes)
- ])
- ]);
-
- requestAnimationFrame(() => {
- const panes = tabContainer.querySelectorAll('.tab-pane');
- ui.tabs.initTabGroup(panes);
- });
-
- return tabContainer;
- }
-});
-
-const UIModal = baseclass.extend({
- __name__: 'Podman.UI.Modal',
-
- title: '',
- content: null,
- extraClasses: [],
-
- __init__(title, content, extraClasses) {
- this.title = title || this.title;
- this.content = content || this.content;
- this.extraClasses = extraClasses || this.extraClasses;
- },
-
- render() {
- ui.showModal(this.title, [
- E('div', {}, this.getContent()),
- E('div', { class: 'd-flex justify-end mt-sm gap-5' }, this.getButtons()),
- ], ...this.extraClasses);
- },
-
- getContent() {
- return this.content;
- },
-
- getButtons() {
- const buttons = [];
-
- if (typeof this.handleClose === 'function') {
- buttons.push(this.getCloseButton());
- }
-
- if (typeof this.handleSubmit === 'function') {
- buttons.push(this.getOkButton());
- }
-
- return buttons;
- },
-
- async handleClose() {
- ui.hideModal();
- },
-
- async handleSubmit() {
- ui.hideModal();
- },
-
- getOkButton() {
- return new UIButtonNew(_('OK'), {
- click: ui.createHandlerFn(this, 'handleSubmit'),
- type: 'positive',
- }).render();
- },
-
- getCloseButton() {
- return new UIButtonNew(_('Close'), {
- click: ui.createHandlerFn(this, 'handleClose'),
- type: 'negative',
- }).render();
- },
-});
-
-const PodmanUI = UIBase.extend({
- __name__: 'Podman.UI',
-
- Modal: UIModal,
-
- Button: UIButton,
- ButtonNew: UIButtonNew,
- // MultiButton: UIMultiButton,
-
- Numberfield: UINumberfield,
- Datefield: UIDatefield,
-
- SecretText: UISecretText,
-
- JsonArea: UIJsonArea,
- BashCodeArea: UIBashCodeArea,
-
- Table: UITable,
- TableList: UITableList,
- Tabs: UITabs,
- Tooltip: UITooltip,
-
- StreamLog: UIStreamLog,
-});
-
-return PodmanUI;
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/utils.js b/luci-app-podman/htdocs/luci-static/resources/podman/utils.js
deleted file mode 100644
index 9ca397edb..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/utils.js
+++ /dev/null
@@ -1,238 +0,0 @@
-'use strict';
-
-'require baseclass';
-
-const UtilIpv6 = baseclass.extend({
- /**
- * Derive ULA IPv6 subnet and gateway from IPv4 subnet.
- * Uses IPv4 octets 3-4 as subnet ID for consistent IPv4/IPv6 mapping.
- * @param {string} ipv4 - IPv4 subnet in CIDR (e.g., "192.168.20.0/24")
- * @param {string} ula_prefix - ULA prefix (e.g., "fd52:425:78eb::/48")
- * @returns {{ipv6subnet: string, ipv6gateway: string}} IPv6 config with subnet/gateway
- */
- deriveUlaFromIpv4(ipv4, ula_prefix) {
- const ipv4Address = ipv4.split('/')[0];
- const octets = ipv4Address.split('.').map(Number);
- const subnetIdHex = ((octets[2] << 8) | octets[3]).toString(16).padStart(4, '0');
- const ulaAddress = ula_prefix.split('/')[0];
- const ulaParts = ulaAddress.split('::');
-
- let hextets = ulaParts[0].split(':');
- if (hextets.length === 1 && hextets[0] === "") {
- hextets = [];
- }
-
- while (hextets.length < 3) {
- hextets.push('0');
- }
-
- const ipv6SubnetAddress = `${hextets.slice(0, 3).join(':')}:${subnetIdHex}::`;
-
- return {
- ipv6subnet: `${ipv6SubnetAddress}/64`,
- ipv6gateway: `${ipv6SubnetAddress}1`
- };
- },
-});
-
-const UtilIpv4 = baseclass.extend({
- // >>> 0 forces unsigned 32-bit interpretation (JS bitwise ops are signed)
- _ipToInt(octets) {
- return ((octets[0] << 24) | (octets[1] << 16) | (octets[2] << 8) | octets[3]) >>> 0;
- },
-
- _intToIp(n) {
- return [(n >>> 24) & 0xFF, (n >>> 16) & 0xFF, (n >>> 8) & 0xFF, n & 0xFF].join('.');
- },
-
- /**
- * Convert a CIDR string to a start/end IP range.
- * Works for both network addresses (10.89.0.0/24) and host addresses
- * within a subnet (10.89.0.5/24) - the mask normalises either to the
- * full network range.
- * @param {string} cidr - CIDR notation (e.g., "10.89.0.128/25")
- * @returns {{start_ip: string, end_ip: string}|null} Range or null if invalid
- */
- cidrToRange(cidr) {
- if (!cidr || typeof cidr !== 'string') return null;
-
- const parts = cidr.split('/');
- if (parts.length !== 2) return null;
-
- const octets = parts[0].split('.').map(Number);
- const prefixLen = parseInt(parts[1], 10);
-
- if (octets.length !== 4 || octets.some(o => isNaN(o) || o < 0 || o > 255)) return null;
- if (isNaN(prefixLen) || prefixLen < 0 || prefixLen > 32) return null;
-
- const ipInt = this._ipToInt(octets);
- const mask = prefixLen === 0 ? 0 : (0xFFFFFFFF << (32 - prefixLen)) >>> 0;
-
- return {
- start_ip: this._intToIp((ipInt & mask) >>> 0),
- end_ip: this._intToIp((ipInt | (~mask >>> 0)) >>> 0),
- };
- },
-
- /**
- * Return the first usable host address in a subnet (network address + 1).
- * Conventionally used as the gateway address.
- * @param {string} cidr - CIDR notation (e.g., "10.89.0.0/24")
- * @returns {string|null} First host IP (e.g., "10.89.0.1") or null if invalid
- */
- firstHost(cidr) {
- const range = this.cidrToRange(cidr);
- if (!range) return null;
-
- const octets = range.start_ip.split('.').map(Number);
- const next = (this._ipToInt(octets) + 1) >>> 0;
-
- return this._intToIp(next);
- },
-});
-
-const UtilFormat = baseclass.extend({
- __name__: 'Podman.Util.Format',
-
- /**
- * Format bytes to human-readable size
- */
- bytes(bytes, decimals) {
- if (!bytes) return '0 B';
-
- decimals = decimals ?? 2;
- const k = 1024;
- const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
- const i = Math.floor(Math.log(bytes) / Math.log(k));
-
- return parseFloat((bytes / k ** i).toFixed(decimals)) + ' ' + sizes[i];
- },
-
- /**
- * Format timestamp to locale string with leading zeros
- */
- date(timestamp) {
- if (!timestamp) {
- return _('Never');
- }
-
- let date;
-
- if (typeof timestamp === 'string') {
- if (timestamp === '0001-01-01T00:00:00Z' || timestamp.startsWith('0001-')) {
- return _('Never');
- }
- date = new Date(timestamp);
- } else {
- date = new Date(timestamp * 1000);
- }
-
- if (isNaN(date.getTime())) {
- return _('Unknown');
- }
-
- if (date.getFullYear() < 1970) {
- return _('Never');
- }
-
- const day = ('0' + date.getDate()).slice(-2);
- const month = ('0' + (date.getMonth() + 1)).slice(-2);
- const year = date.getFullYear();
- const hours = ('0' + date.getHours()).slice(-2);
- const minutes = ('0' + date.getMinutes()).slice(-2);
- const seconds = ('0' + date.getSeconds()).slice(-2);
-
- return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
- },
-
- /**
- * Parse memory string to bytes
- * Supports formats: 512m, 1g, 2gb, 1024, etc.
- * @param {string} memStr - Memory string (e.g., "512m", "1g", "2gb")
- * @returns {number} Size in bytes
- */
- parseMemory(memStr) {
- if (!memStr) return 0;
-
- const match = memStr.match(/^(\d+(?:\.\d+)?)\s*([kmgt]?b?)?$/i);
- if (!match) return 0;
-
- const value = parseFloat(match[1]);
- const unit = (match[2] || 'b').toLowerCase();
-
- const multipliers = {
- b: 1,
- k: 1024,
- kb: 1024,
- m: 1024 * 1024,
- mb: 1024 * 1024,
- g: 1024 * 1024 * 1024,
- gb: 1024 * 1024 * 1024,
- t: 1024 * 1024 * 1024 * 1024,
- tb: 1024 * 1024 * 1024 * 1024
- };
-
- return Math.floor(value * (multipliers[unit] || 1));
- },
-
- /**
- * Parse duration string to nanoseconds (Podman format)
- * Supports formats: 30s, 1m, 1h, 500ms, etc.
- * @param {string} duration - Duration string (e.g., "30s", "1m", "1h")
- * @returns {number} Duration in nanoseconds, or 0 if invalid
- */
- parseDuration(duration) {
- if (!duration) return 0;
-
- const match = duration.match(/^(\d+(?:\.\d+)?)\s*(ns|us|ms|s|m|h)$/);
- if (!match) return 0;
-
- const value = parseFloat(match[1]);
- const unit = match[2];
-
- const multipliers = {
- ns: 1,
- us: 1000,
- ms: 1000000,
- s: 1000000000,
- m: 60000000000,
- h: 3600000000000
- };
-
- return Math.floor(value * (multipliers[unit] || 0));
- },
-});
-
-/**
- * Shared utility functions.
- */
-return baseclass.extend({
- ipv4: new UtilIpv4(),
-
- ipv6: new UtilIpv6(),
-
- format: new UtilFormat(),
-
- truncate(str, maxLength) {
- if (!str || str.length <= maxLength) {
- return str;
- }
-
- return str.substring(0, maxLength) + '...';
- },
-
- moveArrayItem(arr, fromIndex, toIndex) {
- const [item] = arr.splice(fromIndex, 1);
- arr.splice(toIndex, 0, item);
- return arr;
- },
-
- _p(stringPlural) {
- return this._n(2, '', stringPlural);
- },
-
- _n(length, stringSingular, stringPlural) {
- return parseInt(length) === 1 ?
- stringSingular : stringPlural;
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/podman/view.js b/luci-app-podman/htdocs/luci-static/resources/podman/view.js
deleted file mode 100644
index 9b1fdd103..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/podman/view.js
+++ /dev/null
@@ -1,387 +0,0 @@
-'use strict';
-
-'require baseclass';
-'require view';
-'require form';
-'require dom';
-'require ui';
-
-'require podman.ui as podmanUI';
-'require podman.constants as constant';
-
-const ViewDefault = {
- scrollToTop() {
- document.body.scrollTop = 0;
- document.documentElement.scrollTop = 0;
- },
-
- loading(text) {
- this.scrollToTop();
- podmanUI.showSpinningModal(null, text || _('Loading...'));
- },
-
- confirm(content, onConfirm) {
- const modal = new podmanUI.Modal(_('Confirm'), content, [ 'confirm-modal' ]);
- modal.getCloseButton = () => new podmanUI.ButtonNew(_('Cancel'), {
- click: () => ui.hideModal(),
- type: 'negative',
- }).render();
- modal.handleSubmit = onConfirm;
- modal.render();
- },
-
- error(message) {
- this.scrollToTop();
- ui.hideModal();
- podmanUI.alert(message, 'error');
- },
-
- warning(message) {
- this.scrollToTop();
- ui.hideModal();
- podmanUI.alert(message, 'warning', true);
- },
-
- success(message) {
- this.scrollToTop();
- ui.hideModal();
- podmanUI.alert(message, 'success', true);
- },
-};
-
-const ViewBase = view.extend({
- ...ViewDefault,
- __name__: 'PodmanView.Base',
-
- handleSaveApply: null,
- handleSave: null,
- handleReset: null,
-
- __init__() {
- document.querySelector('head').appendChild(E('link', {
- rel: 'stylesheet',
- type: 'text/css',
- href: L.resource('view/podman/podman.css'),
- }));
-
- document.addEventListener('keydown', (event) => {
- if (event.key === 'Escape') ui.hideModal();
- });
-
- this.super('__init__', []);
- },
-});
-
-const ViewList = ViewBase.extend({
- __name__: 'Podman.View.List',
-
- map: null,
- section: null,
- title: '',
- sectionName: '',
- sectionHeadline: '',
- TableSelectSection: null,
-
- async render(data) {
- const listData = {};
- listData[this.sectionName] = data;
-
- await this.initSection(listData);
- await this.updateSection();
-
- return this.transformMap(await this.map.render());
- },
-
- transformMap(map) {
- return map;
- },
-
- initTableSelectSection(data) {
- this.map = new form.JSONMap(data, this.title);
-
- this.section = this.map.section(
- this.TableSelectSection,
- this.sectionName,
- '',
- this.sectionHeadline || _('Manage podman %s').format(this.title.toLowerCase())
- );
- this.section.view = this;
- this.section.anonymous = true;
- this.section.footer = true;
-
- return this.section;
- },
-
- async initSection(data) {
- if (!this.TableSelectSection) {
- // Require on-the-fly to avoid circular dependency
- const mod = await L.require('podman.TableSelectSection');
- this.TableSelectSection = mod.TableSelectSection;
- }
- return this.initTableSelectSection(data);
- },
-
- getSection() {
- return this.section;
- },
-});
-
-/**
- * Form View
- */
-const ViewForm = baseclass.extend({
- ...ViewDefault,
- __name__: 'Podman.View.Form',
-
- map: null,
- section: null,
-
- __init__() {
-
- },
-
- makeData() {
- return {};
- },
-
- async render() {
- const data = this.makeData();
- const sectionName = Object.keys(data)[0];
- this.map = new form.JSONMap(data, '', '');
- this.section = this.map.section(form.TypedSection, sectionName, '');
- this.section.anonymous = true;
-
- await this.createForm();
-
- return this.map.render();
- },
-
- createForm() {},
-
- getField(name) {
- return this.section?.getOption(name);
- },
-
- getFields() {
- return this.section?.getOption() || {};
- },
-
- getFieldValue(name) {
- return this.getField(name)?.formvalue(this.section?.sectiontype);
- },
-
- getFieldValues() {
- const values = {};
- const fields = this.getFields();
-
- Object.keys(fields).forEach((name) => {
- values[name] = fields[name].formvalue(this.section?.sectiontype);
- });
-
- return values;
- },
-
- isValid() {
- const fields = this.getFields();
- const sectionId = this.section.sectiontype;
-
- for (const [_key, field] of Object.entries(fields)) {
- if (field.isValid(sectionId) === false) {
- return false;
- }
- }
-
- return true;
- },
-
- scrollToInvalid() {
- const invalidElement = this.map.root.querySelector('.cbi-input-invalid');
- invalidElement.scrollIntoView();
- },
-
- async save() {
- try {
- await this.map.save(() => {}, true);
- } catch (error) {
- return false;
- }
-
- return true;
- },
-
- async handleCreate(createFn, title, textLoading, textSuccess) {
- ui.hideModal();
-
- const loadingText = textLoading || _('Creating %s').format(title);
- const successText = textSuccess || _('%s created successfully').format(title);
-
- this.loading(loadingText);
-
- await createFn();
- ui.hideModal();
- if (successText !== false) {
- this.success(successText);
- }
- },
-});
-
-const ViewTabs = ViewBase.extend({
- __name__: 'Podman.View.Tabs',
- tabs: null,
-
- __init__() {
- this.tabs = new podmanUI.Tabs('info');
- this.super('__init__', []);
- },
-
- renderTab(tab, content, description) {
- const tabContainer = document.querySelector(`.tab-pane[data-tab="${tab}"]`);
- const tabContainerNode = tabContainer?.querySelector('.cbi-section-node');
-
- if (!tabContainerNode) return;
-
- if (description) {
- tabContainer.insertBefore(E('div', {
- class: 'cbi-section-descr'
- }, description), tabContainer.firstChild);
- }
-
- dom.content(tabContainerNode, content);
- },
-
- getTabInstance(name) {
- const tabNode = document.querySelector(`.tab-pane[data-tab="${name}"]`);
- return tabNode ? dom.findClassInstance(tabNode) : null;
- },
-});
-
-const ViewContainer = ViewTabs.extend({
- __name__: 'Podman.View.Container',
- listUrl: '#',
-
- async render() {
- window.addEventListener('pagehide', () => this.stopStreams(), { once: true });
-
- return E('div', {}, [ this.createHeader(), this.tabs.render() ]);
- },
-
- createHeader(name, isRunning, isStopped, isPaused) {
- return E('div', { class: 'mb-sm container-toolbar' }, [
- E('div', { class: 'd-flex align-start' }, [
- E('h2', { class: 'mb-sm' }, [ name ]),
- new podmanUI.ButtonNew(constant.ICON.BACK, {
- click: () => this.redirectToList(),
- type: 'none',
- }).render(),
- ]),
- E('div', { class: 'd-flex align-center' }, [
- new podmanUI.ButtonNew(constant.ICON.START, {
- click: ui.createHandlerFn(this, 'handleStart'),
- type: isRunning ? 'active' : '',
- }).render(),
- new podmanUI.ButtonNew(constant.ICON.STOP, {
- click: ui.createHandlerFn(this, 'handleStop'),
- type: isStopped ? 'active' : '',
- }).render(),
- new podmanUI.ButtonNew(constant.ICON.RESTART, {
- click: ui.createHandlerFn(this, 'handleRestart'),
- }).render(),
- new podmanUI.ButtonNew(constant.ICON.PAUSE, {
- click: ui.createHandlerFn(this, 'handlePause'),
- type: isPaused ? 'active' : '',
- }).render(),
- new podmanUI.ButtonNew(_('Delete'), {
- click: ui.createHandlerFn(this, 'handleRemove'),
- type: 'negative',
- }).render(),
- ]),
- ]);
- },
-
- redirectToList() {
- this.stopStreams();
- window.location.href = this.listUrl;
- },
-
- stopStreams() {
- },
-});
-
-const ViewTabContent = baseclass.extend({
- ...ViewDefault,
- __name__: 'PodmanView.TabContent',
- tab: null,
- active: false,
-
- __init__(tab) {
- this.tab = tab || this.tab;
- this.super('__init__', []);
-
- if (!this.tab) {
- return;
- }
-
- let attempts = 0;
- new Promise((resolve, reject) => {
- const check = () => {
- if (attempts++ > 100) { reject(); return; }
- const element = document.querySelector(`[data-tab="${this.tab}"]`);
- if (element) resolve(element);
- else setTimeout(check, 100);
- };
- check();
- }).then(() => {
- const mainNode = document.querySelector(`.tab-pane[data-tab="${this.tab}"]`);
-
- dom.bindClassInstance(mainNode, this);
-
- const mutationObserver = new MutationObserver((mutationsList) => {
- let handled = false;
- mutationsList.forEach((mutation) => {
- const setActive = mutation.target.dataset.tabActive === 'true';
-
- if (handled || mutation.attributeName !== 'data-tab-active') return;
- handled = true;
-
- if (this.active === setActive) {
- return;
- }
-
- if (setActive) {
- this.active = true;
- this.onTabActive();
- return;
- }
-
- this.active = false;
- this.onTabInactive();
- });
- });
-
- mutationObserver.observe(mainNode, { attributes: true });
- }).catch(() => {});
- },
-
- async onTabActive() { },
-
- async onTabInactive() { },
-
- renderTabContent(headline, content) {
- return E('div', {}, [
- E('h4', {}, headline),
- ...(content || []),
- ]);
- },
-
- warningContent(message) {
- return E('div', { class: 'alert-message d-flex justify-center p-sm' }, message);
- },
-});
-
-return baseclass.extend({
- base: ViewBase,
- list: ViewList,
- form: ViewForm,
- container: ViewContainer,
- tabContent: ViewTabContent,
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/info.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/info.js
deleted file mode 100644
index 09fc01ff6..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/info.js
+++ /dev/null
@@ -1,388 +0,0 @@
-'use strict';
-
-'require ui';
-
-'require podman.ui as podmanUI';
-'require podman.form as podmanForm';
-'require podman.view as podmanView';
-'require podman.rpc as podmanRPC';
-'require podman.utils as utils';
-
-'require podman.model.Container as Container';
-
-const CENSORED_VALUE = '••••••••';
-
-return podmanView.tabContent.extend({
- tab: 'info',
-
- container: null,
- initScriptStatus: '',
-
- async render(container) {
- this.container = container;
-
- const sections = await Promise.all([
- this.basicSection(),
- this.configSection(),
- this.networkSection(),
- this.envSection(),
- this.mountSection(),
- ]);
-
- this.updateInitScriptIcon(sections[0]);
-
- return sections;
- },
-
- basicSection() {
- const basicTable = new podmanUI.TableList();
-
- const editableNameField = new ui.Textfield(this.container.getName(), { name: 'container-name' }).render();
- const editableName = new podmanForm.EditableField('container-name', editableNameField);
- editableName.onSubmit = (value) => this.handleUpdateName(value);
-
- const policies = {
- 'no': _('No'),
- 'always': _('Always'),
- 'on-failure': _('On Failure'),
- 'unless-stopped': _('Unless Stopped')
- };
- const currentPolicy = this.container.getRestartPolicyName();
- const editableRestartField = new ui.Select(currentPolicy, policies, { name: 'container-restart' }).render();
- const editableRestart = new podmanForm.EditableField('container-restart', editableRestartField);
- editableRestart.onSubmit = (value) => this.handleUpdateRestartPolicy(value);
-
- basicTable
- .addRow(_('Name'), editableName.render())
- .addRow(_('ID'), this.container.getID().substring(0, 64))
- .addRow(_('Image'), new podmanUI.Tooltip(this.container.getImageName(), this.container.Image, { class: 'tooltip' }).render())
- .addRow(_('Tag'), this.container.getImageTag())
- .addRow(_('Status'), this.container.getStateBadge())
- .addRow(_('Created'), this.container.getCreated(true))
- .addRow(_('Started'), this.container.getStartedAt(true))
- .addRow(_('Restart Policy'), editableRestart.render())
- .addRow(_('Auto Update'), this.container.getAutoUpdateLabel() || _('Disabled'))
- .addRow(_('Init Script'), E('div', {
- class: `init-script-form align-center ${this.container.getRestartPolicyName() === 'no' ? 'd-none' : 'd-flex'}`
- }, [
- new podmanUI.Tooltip(
- new podmanUI.ButtonNew(
- this.container.getAutoStartStatusIcon(),
- {
- click: ui.createHandlerFn(this, 'handleToggleInitScript'),
- }
- ).render(),
- _('Click to enable/disable'),
- {
- class: 'cursor-pointer',
- }
- ).render(),
-
- new podmanUI.ButtonNew(_('Show'), {
- type: 'none',
- click: ui.createHandlerFn(this, 'handleShowInitScript'),
- }).render(),
- new podmanUI.ButtonNew(_('Generate'), {
- type: 'none',
- click: ui.createHandlerFn(this, 'handleGenerateInitScript'),
- }).render(),
- ]))
- ;
-
- return E('div', {}, [
- E('h4', {}, _('Basic Information')),
- basicTable.render(),
- ]);
- },
-
- configSection() {
- const configTable = new podmanUI.TableList();
- const cmd = this.container.getCmdString() || '-';
- const entrypoint = this.container.getEntrypointString() || '-';
- const createCommand = this.container.getCreateCommandString() || '-';
- const createCommandField = new podmanUI.SecretText(createCommand, CENSORED_VALUE);
-
- configTable
- .addRow(_('Create Command'), createCommandField.render())
- .addRow(_('Command'), cmd)
- .addRow(_('Entrypoint'), entrypoint)
- .addRow(_('Working Directory'), this.container.getWorkingDir())
- .addRow(_('User'), this.container.getUser())
- .addRow(_('Hostname'), this.container.getHostname())
- .addRow(_('Privileged'), this.container.getPrivileged() ? _('Yes') : _('No'))
- .addRow(_('TTY'), this.container.getTty() ? _('Yes') : _('No'))
- .addRow(_('Interactive'), this.container.getInteractive() ? _('Yes') : _('No'))
- ;
-
- return E('div', {}, [
- E('h4', {}, _('Configuration')),
- configTable.render(),
- ]);
- },
-
- async networkSection () {
- const table = new podmanUI.TableList();
- const { NetworkMode, Links } = this.container.getHostConfig();
- const { Networks, IPAddress } = this.container.getNetworkSettings();
-
- table.addRow(_('Network Mode'), NetworkMode || _('default'));
-
- const systemNetworks = ['bridge', 'host', 'none', 'container', 'slirp4netns'];
- let userNetworks = [];
-
- if (Networks && Object.keys(Networks).length > 0) {
- userNetworks = Object.keys(Networks).filter((netName) => !systemNetworks.includes(netName));
-
- userNetworks.forEach((netName) => {
- const net = Networks[netName];
- const tooltip = (() => {
- if (!this.container.isRunning()) {
- return _('Container is not running');
- }
-
- const parts = [];
- if (net.IPAddress) parts.push(`IPv4: ${net.IPAddress}`);
- if (net.GlobalIPv6Address) parts.push(`IPv6: ${net.GlobalIPv6Address}`);
- else parts.push('IPv6: disabled');
- if (net.Gateway) parts.push(`Gateway: ${net.Gateway}`);
- if (net.MacAddress) parts.push(`MAC: ${net.MacAddress}`);
- return parts.join('\n');
- })();
-
- const ipContent = net.GlobalIPv6Address
- ? [net.IPAddress || '-', E('br'), net.GlobalIPv6Address]
- : net.IPAddress || '-';
-
- table.addRow(
- new podmanUI.Tooltip(E('span', { class: 'tooltip' }, netName), tooltip).render(),
- E('div', { class: 'd-flex align-center' }, [
- E('span', {}, ipContent),
- new podmanUI.Tooltip('✖', _('Click to disconnect'), {
- class: 'text-error cursor-pointer container-icon-disconnect ml-sm border-0',
- click: () => this.handleNetworkDisconnect(netName),
- }).render(),
- ])
- );
- });
- }
-
- if (IPAddress && userNetworks.length === 0) {
- table.addRow(_('IP Address'), IPAddress);
- }
-
- const podmanNetworks = await podmanRPC.networks.list();
- const networkOptions = Object.fromEntries(podmanNetworks.map(item => [item.name, item.name]));
-
- const networkSelectWidget = new ui.Select([''], networkOptions, { name: 'container-connect-network', optional: false });
- const ipTextWidget = new ui.Textfield('', { name: 'container-connect-ip', placeholder: '192.168.1.100', datatype: 'ip4addr' });
-
- table.addRow(_('Connect to'), [
- E('div', { class: 'd-flex align-center container-connect' }, [
- networkSelectWidget.render(),
- ipTextWidget.render(),
- new podmanUI.Button(_('Connect'), () => {
- const selectedNetwork = networkSelectWidget.getValue();
- const selectedIp = ipTextWidget.getValue();
-
- networkSelectWidget.triggerValidation();
- ipTextWidget.triggerValidation();
-
- if (!selectedNetwork || !ipTextWidget.isValid()) {
- return;
- }
-
- this.handleNetworkConnect(selectedNetwork, selectedIp);
- }).render(),
- ]),
- ]);
-
- table.addRow(_('Ports'), E('div', {},
- this.container.getPorts().map((port) => E('div', {}, port.string)),
- ));
-
- if (Links && Links.length > 0) {
- const linkNodes = Links.reduce((nodes, link, i) => {
- if (i > 0) nodes.push(E('br'));
- nodes.push(link);
- return nodes;
- }, []);
- table.addRow(_('Links'), linkNodes);
- }
-
- return E('div', { class: 'networks' }, [
- E('h4', {}, _('Network')),
- table.render(),
- ]);
- },
-
- envSection() {
- const table = new podmanUI.Table();
- table
- .addHeader(_('Variable'), { style: 'width: 50%;' })
- .addHeader(_('Value'), { style: 'width: 50%;' });
-
- this.container.getEnvironmentVars().forEach((env) => {
- const parts = env.split('=');
- const varName = parts[0];
- const varValue = parts.slice(1).join('=');
- const valueField = new podmanUI.SecretText(varValue, CENSORED_VALUE);
-
- table.addRow([{
- inner: varName
- },
- {
- inner: valueField.render(),
- },
- ]);
- });
-
- return E('div', {}, [
- E('h4', {}, _('Environment Variables')),
- table.render(),
- ]);
- },
-
- mountSection() {
- const table = new podmanUI.Table();
- table
- .addHeader(_('Type'), { style: 'width: 10%;' })
- .addHeader(_('Source'), { style: 'width: 35%;' })
- .addHeader(_('Destination'), { style: 'width: 35%;' })
- .addHeader(_('Mode'), { style: 'width: 10%;' })
- ;
-
- const truncatedField = (value) => {
- const v = value || '-';
- return v.length > 50 ? new podmanUI.Tooltip(utils.truncate(v, 50), v).render() : v;
- };
-
- this.container.getMounts().forEach((mount) => {
- const mountSourceField = truncatedField(mount.Source);
- const mountDestField = truncatedField(mount.Destination);
-
- table.addRow([
- { inner: mount.Type || '-' },
- { inner: mountSourceField },
- { inner: mountDestField },
- { inner: mount.RW ? 'rw' : 'ro' },
- ]);
- })
-
- return E('div', {}, [
- E('h4', {}, _('Mounts')),
- table.render(),
- ]);
- },
-
- async _refreshContainer() {
- const inspectData = await this.container.inspect();
- this.container = Container.getSingleton(inspectData);
- },
-
- async _refreshNetworkSection() {
- const networkSection = await this.networkSection();
- document.querySelector('.networks').replaceWith(networkSection);
- },
-
- async updateInitScriptIcon(infoSection) {
- this.initScriptStatus = await this.container.checkInitScript();
- const initScriptIconElement = (infoSection || document).querySelector('.autostart-status');
- const initScriptIcon = this.container.getAutoStartStatusIcon(this.initScriptStatus);
- initScriptIconElement.replaceWith(initScriptIcon);
- },
-
- async handleUpdateName(name) {
- if (!name || this.container.Name === name) {
- return;
- }
-
- this.loading(_('Update name'));
-
- await this.container.updateName(name);
-
- document.querySelector('.container-toolbar h2').textContent = name;
- this.success(_('Name updated successfully'));
- },
-
- async handleUpdateRestartPolicy(policy) {
- this.loading(_('Update restart policy'));
-
- const updateData = { RestartPolicy: policy };
- if (policy === 'on-failure') updateData.RestartRetries = 5;
-
- await this.container.update(updateData);
- await this._refreshContainer();
-
- const initScriptForm = document.querySelector('.init-script-form');
- if (policy === 'no') {
- initScriptForm.classList.replace('d-flex', 'd-none');
- } else {
- initScriptForm.classList.replace('d-none', 'd-flex');
- }
-
- this.updateInitScriptIcon();
-
- this.success(_('Restart policy updated successfully'));
- },
-
- async handleNetworkConnect(networkName, ip) {
- this.loading(_('Connecting container to network'));
-
- const params = {};
- if (ip) params.static_ips = [ip];
-
- await this.container.connect(networkName, params);
- await this._refreshContainer();
- this.success(_('Connected successfully to %s').format(networkName));
- await this._refreshNetworkSection();
- },
-
- async handleNetworkDisconnect(networkName) {
- this.loading(_('Disconnect container from network'));
-
- await this.container.disconnect(networkName);
- await this._refreshContainer();
- this.success(_('Disconnected from %s').format(networkName));
- await this._refreshNetworkSection();
- },
-
- async handleGenerateInitScript() {
- this.loading(_('Creating auto-start configuration for %s').format(this.container.getName()));
-
- await this.container.generateInitScript();
- await this.container.enableInitScript();
- ui.hideModal();
- window.location.reload();
- },
-
- async handleShowInitScript() {
- this.loading(_('Loading init script'));
-
- const result = await this.container.showInitScript();
- ui.hideModal();
-
- if (!result || !result.path || !result.content) return;
-
- const modal = new podmanUI.Modal(result.path, [
- new podmanUI.BashCodeArea(result.content.replace(/\\n/g, '\n')).render()
- ]);
- modal.handleSubmit = undefined;
- modal.render();
- },
-
- async handleToggleInitScript() {
- if (this.initScriptStatus === 'missing') {
- return this.handleGenerateInitScript();
- } else if (this.initScriptStatus === 'enabled') {
- this.loading(_('Disabling init script'));
- await this.container.disableInitScript();
- ui.hideModal();
- window.location.reload();
- } else if (this.initScriptStatus === 'disabled') {
- this.loading(_('Enabling init script'));
- await this.container.enableInitScript();
- ui.hideModal();
- window.location.reload();
- }
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/logs.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/logs.js
deleted file mode 100644
index 01703ea2d..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/logs.js
+++ /dev/null
@@ -1,137 +0,0 @@
-'use strict';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-
-const TIMESTAMP_RE_GLOBAL = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})\s*/g;
-const ANSI_REGEX = /\x1B\[[0-9;]*[A-Za-z]/g;
-const MAX_LOG_LINES = 1000;
-
-return podmanView.tabContent.extend({
- tab: 'logs',
- container: null,
-
- render(container) {
- this.container = container;
-
- this.logViewer = E('pre', { id: 'log-viewer', class: 'terminal-area' }, []);
-
- return this.renderTabContent('', [
- this.renderLogToolbar(),
- this.logViewer,
- ]);
- },
-
- onTabActive() {
- // Running: auto-start live stream. Stopped: load historical logs on demand via play button.
- if (this.container.isRunning()) {
- this.startStream();
- }
- },
-
- onTabInactive() {
- this.stopStream();
- },
-
- _setStreamActive(active) {
- this.logLinesInput.disabled = active;
- this.logSinceInput.disabled = active;
- this.logUntilInput.disabled = active;
- this.playButton.querySelector('.cbi-button').classList.toggle('cbi-button-active', active);
- this.stopButton.querySelector('.cbi-button').classList.toggle('cbi-button-active', !active);
- },
-
- startStream() {
- if (!this.container || this.logsStream) {
- return;
- }
-
- this._setStreamActive(true);
-
- this.logViewer.textContent = '';
-
- const toUnixSince = (val) => val ? new Date(val + 'T00:00:00').getTime() / 1000 : null;
- const toUnixUntil = (val) => val ? new Date(val + 'T23:59:59').getTime() / 1000 : null;
-
- this.logsStream = this.container.streamLogs((data) => {
- if (!data || !data.raw) return;
-
- const line = data.raw
- .replace(TIMESTAMP_RE_GLOBAL, '')
- .replace(ANSI_REGEX, '')
- .trim();
-
- if (!line) return;
-
- this.logViewer.textContent += line + '\n';
- this.trimLogOutput();
- this.logViewer.scrollTop = this.logViewer.scrollHeight;
- }, {
- tail: this.logLinesInput.value || 100,
- since: toUnixSince(this.logSinceInput.value),
- until: toUnixUntil(this.logUntilInput.value),
- follow: this.container.isRunning(),
- });
- },
-
- stopStream() {
- if (!this.logsStream) return;
-
- this._setStreamActive(false);
-
- this.logsStream.stop();
- this.logsStream = null;
- },
-
- renderLogToolbar() {
- // Fields start disabled only for running containers (stream auto-starts and locks them).
- // For stopped containers they start enabled so the user can set filters before fetching.
- const initialDisabled = this.container.isRunning();
- const linesField = new podmanUI.Numberfield(100, { id: 'log-lines', min: '10', max: '250', disabled: initialDisabled }).render();
- const sinceField = new podmanUI.Datefield(null, { id: 'log-since', disabled: initialDisabled }).render();
- const untilField = new podmanUI.Datefield(null, { id: 'log-until', disabled: initialDisabled }).render();
-
- this.logLinesInput = linesField.querySelector('input');
- this.logSinceInput = sinceField.querySelector('input');
- this.logUntilInput = untilField.querySelector('input');
-
- this.stopButton = new podmanUI.ButtonNew('◼', {
- click: () => this.stopStream(),
- type: ' stop-button',
- tooltip: _('Stop stream'),
- }).render();
-
- this.playButton = new podmanUI.ButtonNew('►', {
- click: () => this.startStream(),
- type: 'active play-button',
- tooltip: _('Start stream'),
- }).render();
-
- return E('div', { class: 'd-flex align-center mb-sm' }, [
- E('label', { class: 'mr-xs' }, _('Number of lines')),
- linesField,
- '',
- E('label', { class: 'ml-xs mr-xs' }, _('Since')),
- sinceField,
-
- E('label', { class: 'ml-xs mr-xs' }, _('Until')),
- untilField,
-
- E('div', { class: 'ml-xs' }, ''),
-
- new podmanUI.ButtonNew('🗑️', {
- click: () => this.logViewer.textContent = '',
- tooltip: _('Clear logs'),
- }).render(),
- this.stopButton,
- this.playButton,
- ]);
- },
-
- trimLogOutput() {
- const lines = this.logViewer.textContent.split('\n');
- if (lines.length > MAX_LOG_LINES) {
- this.logViewer.textContent = lines.slice(lines.length - MAX_LOG_LINES).join('\n');
- }
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/processes.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/processes.js
deleted file mode 100644
index a691da6e5..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/processes.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-
-'require dom';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-
-return podmanView.tabContent.extend({
- tab: 'ps',
- container: null,
-
- render(container) {
- this.container = container;
-
- if (!this.container.isRunning()) {
- return this.warningContent(_('Container is not running'));
- }
-
- this.tableContent = E('div', { class: 'ps-table-content' }, []);
-
- return this.renderTabContent('', [
- this.tableContent,
- ]);
- },
-
- onTabActive() {
- if (!this.container || !this.container.isRunning() || this.processStream) {
- return;
- }
-
- this.processStream = this.container.streamTop((ps) => {
- this.updateProcessList(ps);
- });
- },
-
- onTabInactive() {
- if (!this.processStream) return;
-
- this.processStream.stop();
- this.processStream = null;
- },
-
- updateProcessList(ps) {
- if (!ps || !ps.Titles || !ps.Processes || ps.Titles.length === 0) {
- return;
- }
-
- const psTable = new podmanUI.Table();
- const columnWidth = `width: ${100 / ps.Titles.length}%;`;
- const timeIndex = ps.Titles.indexOf('ELAPSED');
-
- ps.Titles.forEach((title) => {
- psTable.addHeader(_(title), { style: columnWidth });
- });
-
- ps.Processes.forEach((process) => {
- psTable.addRow(process.map((detail, i) => ({
- inner: i === timeIndex ? this._formatElapsedTime(detail) : detail
- })));
- });
-
- dom.content(this.tableContent, psTable.render());
- },
-
- _formatElapsedTime(timeStr) {
- if (!timeStr) return '-';
-
- const result = [];
- const pattern = /(\d+(?:\.\d+)?)([ydhms])/g;
- let match;
-
- while ((match = pattern.exec(timeStr)) !== null) {
- let value = parseFloat(match[1]);
- const unit = match[2];
-
- if (unit === 's' && value > 1000) {
- value = Math.floor(value / 1000000000);
-
- if (value >= 60) {
- const mins = Math.floor(value / 60);
- const secs = value % 60;
- if (mins > 0) result.push(`${mins}m`);
- if (secs > 0) result.push(`${secs}s`);
- continue;
- }
- } else {
- value = Math.floor(value);
- }
-
- if (unit === 's' || unit === 'm') {
- result.push(String(value).padStart(2, '0') + unit);
- } else {
- result.push(value + unit);
- }
- }
-
- return result.length > 0 ? result.join('') : timeStr;
- }
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/stats.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/stats.js
deleted file mode 100644
index 0aff2a19c..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/container-tab/stats.js
+++ /dev/null
@@ -1,107 +0,0 @@
-'use strict';
-
-'require dom';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-'require podman.utils as podmanUtil';
-
-return podmanView.tabContent.extend({
- tab: 'stats',
- container: null,
-
- render(container) {
- this.container = container;
-
- if (!this.container.isRunning()) {
- return this.warningContent(_('Container is not running'));
- }
-
- return this.renderTabContent(_('Statistics'), [
- this.renderStatsTable(),
- ]);
- },
-
- onTabActive() {
- if (!this.container || !this.container.isRunning() || this.statsStream) {
- return;
- }
-
- this.statsStream = this.container.streamStats((stats) => {
- this.updateStatsDisplay(stats);
- });
- },
-
- onTabInactive() {
- if (!this.statsStream) {
- return;
- }
-
- this.statsStream.stop();
- this.statsStream = null;
- },
-
- renderStatsTable() {
- const table = new podmanUI.TableList();
-
- table
- .addRow(_('CPU Usage'), '-', { 'data-stat': 'cpu' })
- .addRow(_('Memory Usage'), '-', { 'data-stat': 'memory' })
- .addRow(_('Memory Limit'), '-', { 'data-stat': 'memory-limit' })
- .addRow(_('Memory %'), '-', { 'data-stat': 'memory-percent' })
- .addRow(_('Network I/O'), '-', { 'data-stat': 'network-io' })
- .addRow(_('Block I/O'), '-', { 'data-stat': 'block-io' })
- .addRow(_('PIDs'), '-', { 'data-stat': 'pids' })
- ;
-
- return table.render();
- },
-
- updateStatsDisplay(stats) {
- if (!stats) return;
-
- if (!this.statElements) {
- this.statElements = {};
- for (const key of ['cpu', 'memory', 'memory-limit', 'memory-percent', 'network-io', 'block-io', 'pids']) {
- this.statElements[key] = document.querySelector(`[data-stat="${key}"] td:last-of-type`);
- }
- }
-
- const updates = [
- ['cpu', stats.CPU != null ? stats.CPU.toFixed(2) + '%' : '-'],
- ['memory', podmanUtil.format.bytes(stats.MemUsage) || '-'],
- ['memory-limit', podmanUtil.format.bytes(stats.MemLimit) || '-'],
- ['memory-percent', stats.MemPerc != null ? stats.MemPerc.toFixed(2) + '%' : '-'],
- ['network-io', this._formatNetworkIO(stats.Network)],
- ['block-io', this._formatBlockIO(stats.BlockInput, stats.BlockOutput)],
- ['pids', stats.PIDs],
- ];
-
- for (const [key, value] of updates) {
- if (this.statElements[key])
- dom.content(this.statElements[key], value);
- }
- },
-
- _formatNetworkIO(networks) {
- const parts = Object.keys(networks || {}).map((iface) => {
- const net = networks[iface];
- return `${iface}: ↓ ${podmanUtil.format.bytes(net.RxBytes)} / ↑ ${podmanUtil.format.bytes(net.TxBytes)}`;
- });
-
- if (parts.length === 0) return '-';
-
- return parts.reduce((nodes, part, i) => {
- if (i > 0) nodes.push(E('br'));
- nodes.push(part);
- return nodes;
- }, []);
- },
-
- _formatBlockIO(blockInput, blockOutput) {
- return _('Read: %s / Write: %s').format(
- podmanUtil.format.bytes(blockInput || 0),
- podmanUtil.format.bytes(blockOutput || 0)
- );
- }
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/container.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/container.js
deleted file mode 100644
index ae3b14412..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/container.js
+++ /dev/null
@@ -1,167 +0,0 @@
-'use strict';
-
-'require ui';
-'require dom';
-
-'require podman.constants as constant';
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-'require podman.model.Container as Container';
-'require podman.form.resource as PodmanFormResource';
-
-'require view.podman.container-tab.info as ContainerInfoTab';
-'require view.podman.container-tab.stats as ContainerStatsTab';
-'require view.podman.container-tab.processes as ContainerProcessesTab';
-'require view.podman.container-tab.logs as ContainerLogsTab';
-
-/**
- * Container detail view with tabbed interface
- */
-return podmanView.container.extend({
- container: null,
- data: null,
- listUrl: L.url('admin/podman/containers'),
-
- async load() {
- // Extract container ID from URL path
- // URL format: /cgi-bin/luci/admin/podman/container/
- const path = L.location();
- const matches = path.match(/container\/([a-f0-9]+)/i);
-
- if (!matches || !matches[1]) {
- this.redirectToList();
- return;
- }
-
- const containerId = matches[1];
- const container = Container.getSingleton({ Id: containerId });
-
- const inspectData = await container.inspect();
- this.data = inspectData;
- return Container.getSingleton(inspectData);
- },
-
- async render(container) {
- if (!container) {
- this.redirectToList();
- return;
- }
-
- this.container = container;
- this.tabs
- .addTab('info', _('Info'))
- .addTab('resources', _('Resources'))
- .addTab('stats', _('Stats'))
- .addTab('ps', _('Processes'))
- .addTab('logs', _('Logs'))
- // .addTab('health', _('Health'))
- .addTab('inspect', _('Inspect'))
- // .addTab('console', _('Console'))
- ;
-
- requestAnimationFrame(() => {
- this.renderInfoTab();
- this.renderResourcesTab();
- this.renderStatsTab();
- this.renderProcessesTab();
- this.renderLogsTab();
- this.renderInspectTab();
- });
-
- return this.super('render', []);
- },
-
- createHeader() {
- return this.super('createHeader', [
- this.container.getName(),
- this.container.isRunning(),
- this.container.isStopped(),
- this.container.isPaused(),
- ]);
- },
-
- stopStreams() {
- this.getTabInstance('stats')?.onTabInactive();
- this.getTabInstance('ps')?.onTabInactive();
- this.getTabInstance('logs')?.onTabInactive();
- },
-
- async renderInfoTab() {
- const content = await ContainerInfoTab.render(this.container);
- this.renderTab('info', content);
- },
-
- async renderResourcesTab() {
- const resourceForm = await new PodmanFormResource.init().render(this.container);
- this.renderTab('resources', resourceForm, _('Configure resource limits for this container.'));
- },
-
- async renderStatsTab() {
- const content = await ContainerStatsTab.render(this.container);
- this.renderTab('stats', content);
- },
-
- async renderProcessesTab() {
- const content = await ContainerProcessesTab.render(this.container);
- this.renderTab('ps', content);
- },
-
- async renderLogsTab() {
- const content = await ContainerLogsTab.render(this.container);
- this.renderTab('logs', content);
- },
-
- renderInspectTab() {
- this.renderTab('inspect', new podmanUI.JsonArea(this.data).render());
- },
-
- async handleStart() {
- if (this.container.isRunning()) {
- return;
- }
-
- this.loading(_('Start container'));
-
- if (this.container.isPaused()) {
- this.container.unpause().then(() => window.location.reload());
- return;
- }
-
- this.container.start().then(() => window.location.reload());
- },
-
- async handleStop() {
- if (this.container.isStopped()) {
- return;
- }
-
- this.loading(_('Stop container'));
- this.stopStreams();
- this.container.stop().then(() => window.location.reload());
- },
-
- async handleRestart() {
- this.loading(_('Restart container'));
- this.stopStreams();
- this.container.restart().then(() => window.location.reload());
- },
-
- async handlePause() {
- if (!this.container.isRunning()) {
- return;
- }
-
- this.loading(_('Pause container'));
- this.stopStreams();
- this.container.pause().then(() => window.location.reload());
- },
-
- async handleRemove() {
- this.confirm([
- E('p', {}, _('Are you sure to remove container?')),
- ], async () => {
- this.loading(_('Remove container'));
- this.container.remove().then(() => this.redirectToList());
- });
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/containers.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/containers.js
deleted file mode 100644
index 1c2afd188..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/containers.js
+++ /dev/null
@@ -1,151 +0,0 @@
-'use strict';
-
-'require dom';
-'require ui';
-
-'require podman.constants as constant';
-'require podman.rpc as podmanRPC';
-'require podman.utils as utils';
-'require podman.ui as podmanUI';
-'require podman.form as podmanForm';
-'require podman.view as podmanView';
-'require podman.form.container as PodmanFormContainer';
-
-/**
- * Manage podman containers
- */
-return podmanView.list.extend({
- sectionName: 'containers',
-
- title: _('Containers'),
- titleSingle: _('Container'),
-
- async load() {
- return podmanRPC.containers.list('all=true');
- },
-
- /**
- * Update list section
- */
- async updateSection() {
- this.section.selectKey = 'Id';
- this.section.createForm = PodmanFormContainer;
- this.section.handleRefreshCb = () => this.checkInitScripts();
- this.section.toolbarExtraButtons = [
- new podmanUI.Button(constant.ICON.START, ui.createHandlerFn(this, 'handleStart')).render(),
- new podmanUI.Button(constant.ICON.STOP, ui.createHandlerFn(this, 'handleStop')).render(),
- new podmanUI.Button(constant.ICON.RESTART, ui.createHandlerFn(this, 'handleRestart')).render(),
- new podmanUI.Button(constant.ICON.PAUSE, ui.createHandlerFn(this, 'handlePause')).render(),
- ];
-
- let o;
-
- o = this.section.option(podmanForm.field.DummyValue, 'Names', _('Name'));
-
- o = this.section.option(podmanForm.field.DummyValue, 'Id', _('ID'));
- o.cfgdatavalue = (container) => container.getDetailLink(utils.truncate(container.getID(), 10));
- o.width = '12%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'Image', _('Image'));
- o.cfgdatavalue = (container) => container.getImageName();
- o.width = '25%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'ImageTag', _('Tag'));
- o.cfgdatavalue = (container) => container.getImageTag();
- o.cfgformatter = (imageTag) => utils.truncate(imageTag, 10);
- o.cfgtt = (imageTag) => imageTag.length > 10 ? imageTag : '';
- o.width = '11%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'State', _('Status'));
- o.cfgdatavalue = (container) => container.getStateBadge();
- o.width = '8%';
-
- o = this.section.option(podmanForm.field.TimestampDummyValue, 'StartedAt', _('Started At'));
- o.width = '17%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'InitScript', _('Boot'));
- o.cfgvalue = () => E('span', { class: 'autostart-status autostart-' }, '...');
- o.width = '6%';
- },
-
- transformMap(map) {
- this.checkInitScripts(map);
- return map;
- },
-
- async checkInitScripts(renderedTable) {
- const data = this.map.data.data;
-
- for (const [key, container] of Object.entries(data)) {
- const iconEl = (renderedTable || document)
- .querySelector(`tr[data-sid="${key}"] td[data-name="InitScript"] .autostart-status`);
-
- container.checkInitScript().then((initScriptStatus) => {
- let initScriptIcon = container.getAutoStartStatusIcon(initScriptStatus);
-
- if (initScriptStatus === 'missing') {
- initScriptIcon = new podmanUI.Tooltip(
- initScriptIcon,
- _('Start script missing\n\nClick to generate'),
- {
- class: 'border-0',
- click: ui.createHandlerFn(this, 'handleGenerateInitScript')
- }
- ).render();
- } else if (initScriptStatus === 'disabled') {
- initScriptIcon = new podmanUI.Tooltip(initScriptIcon, _('Start script disabled'), { class: 'border-0' }).render();
- } else if (initScriptStatus === 'enabled') {
- initScriptIcon = new podmanUI.Tooltip(initScriptIcon, _('Start on boot'), { class: 'border-0' }).render();
- }
-
- if (iconEl) iconEl.replaceWith(initScriptIcon);
- }).catch(() => {});
- }
- },
-
- async handleGenerateInitScript(event) {
- const clickedIcon = event.target;
- const recordRow = dom.parent(clickedIcon, 'tr');
- const container = this.map.data.data[recordRow.getAttribute('data-sid')];
-
- await container.generateInitScript();
- await container.enableInitScript();
-
- this.section.handleRefresh();
- },
-
- handleStart() {
- return this.updateContainersStatus(
- (container) => container.isPaused() ? container.unpause() : container.start(),
- _('Start container')
- );
- },
-
- handleStop() {
- return this.updateContainersStatus((container) => container.stop(), _('Stop container'));
- },
-
- handleRestart() {
- return this.updateContainersStatus((container) => container.restart(), _('Restart container'));
- },
-
- handlePause() {
- return this.updateContainersStatus((container) => container.pause(), _('Pause container'));
- },
-
- async updateContainersStatus(statusFunction, textLoad) {
- const section = this.getSection();
- const selected = section.getSelectedData();
- if (selected.length === 0) {
- return section.showNoneSelectedWarning();
- }
-
- for (const [i, container] of selected.entries()) {
- this.loading(_('%s: %d/%d').format(textLoad, i + 1, selected.length));
- await statusFunction(container);
- }
-
- ui.hideModal();
- section.handleRefresh();
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/images.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/images.js
deleted file mode 100644
index e3cee49ed..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/images.js
+++ /dev/null
@@ -1,118 +0,0 @@
-'use strict';
-
-'require form';
-'require ui';
-
-'require podman.rpc as podmanRPC';
-'require podman.utils as utils';
-'require podman.ui as podmanUI';
-'require podman.form as podmanForm';
-'require podman.view as podmanView';
-'require podman.form.image as PodmanFormImage';
-
-const IMAGE_ID_TRUNCATE_LEN = 12;
-const IMAGE_TAG_TRUNCATE_LEN = 14;
-
-/**
- * Manage podman images
- */
-return podmanView.list.extend({
- sectionName: 'images',
-
- title: _('Images'),
- titleSingle: _('Image'),
-
- async load() {
- return podmanRPC.images.list();
- },
-
- /**
- * Update list section
- */
- async updateSection() {
- this.section.selectKey = 'Id';
- this.section.handleCreateText = _('Pull Image');
- this.section.getCreateButton = function() {
- return new podmanUI.ButtonNew(_('Pull Image'), {
- click: ui.createHandlerFn(this, 'handleCreate'),
- type: 'add',
- }).render();
- };
- this.section.modalCreateTitle = _('Pull Image');
- this.section.createForm = PodmanFormImage;
- this.section.toolbarExtraButtons = [
- new podmanUI.Button(_('Update'), ui.createHandlerFn(this, 'handlePullImages')).render(),
- ];
-
- let o;
-
- o = this.section.option(podmanForm.field.DummyValue, 'Repository', _('Repository'));
- o.cfgdatavalue = async (image) => image.getRepository();
-
- o = this.section.option(podmanForm.field.DummyValue, 'Tag', _('Tag'));
- o.cfgdatavalue = async (image) => {
- const tagValue = image.getTag();
-
- if (tagValue.length > IMAGE_TAG_TRUNCATE_LEN) {
- return new podmanUI.Tooltip(utils.truncate(tagValue, IMAGE_TAG_TRUNCATE_LEN), tagValue).render();
- }
-
- return tagValue;
- };
- o.width = '17%';
-
- o = this.section.option(podmanForm.field.LinkDummyValue, 'ImageId', _('Image ID'));
- o.click = (_value, image) => this.section.handleInspect(image);
- o.cfgdatavalue = (image) => utils.truncate(image.getID(), IMAGE_ID_TRUNCATE_LEN);
- o.width = '15%';
-
- o = this.section.option(podmanForm.field.ByteDummyValue, 'Size', _('Size'));
- o.width = '12%';
-
- o = this.section.option(podmanForm.field.TimestampDummyValue, 'Created', _('Created'));
- o.width = '18%';
-
- return this.map.render();
- },
-
- handlePullImages: async function () {
- const selected = this.section.getSelectedData();
-
- if (selected.length === 0) {
- return this.section.showNoneSelectedWarning();
- }
-
- const progressEl = E('pre', { class: 'terminal-area' });
- const modal = new podmanUI.Modal(_('Updating Images'), [ progressEl ]);
-
- /** @type {HTMLElement} */
- const closeButton = modal.getCloseButton();
- closeButton.classList.add('d-none');
-
- modal.getButtons = () => [ closeButton ];
- modal.render();
-
- const append = (text) => {
- progressEl.textContent += text;
- progressEl.scrollTop = progressEl.scrollHeight;
- };
-
- let errors = 0;
- let first = true;
- for (const image of selected) {
- if (!first) append('\n');
- first = false;
- try {
- await image.streamPull((text) => append(text));
- } catch (err) {
- podmanUI.alert(`${_('Error')}: ${err.message}`);
- errors++;
- }
- }
-
- this.section.handleRefresh();
- closeButton.classList.remove('d-none');
- if (errors === 0)
- podmanUI.alert(_('All images updated successfully'), 'success', true);
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/modal/autoUpdate.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/modal/autoUpdate.js
deleted file mode 100644
index fa2e6b79c..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/modal/autoUpdate.js
+++ /dev/null
@@ -1,216 +0,0 @@
-'use strict';
-
-'require ui';
-
-'require podman.rpc as podmanRPC';
-'require podman.ui as podmanUI';
-'require podman.model.Container as Container';
-
-return podmanUI.Modal.extend({
- title: _('Auto Update'),
- containers: [],
- buttons: [],
-
- getContent() {
- if (!this.containers || this.containers.length === 0) {
- this.buttons = [ this.getCloseButton() ];
- return [
- E('p', {}, _('No containers with auto-update label found.')),
- E('p', { class: 'mt-sm' },
- _('To enable auto-update for a container, add the label: io.containers.autoupdate=registry')
- ),
- ];
- }
-
- this.buttons = [
- this.getCloseButton(),
- new podmanUI.ButtonNew(_('Check'), {
- click: ui.createHandlerFn(this, 'handleCheckUpdate'),
- type: 'positive',
- }).render()
- ];
-
- return [
- E('p', {}, _('Check %d containers for updates?').format(this.containers.length))
- ];
- },
-
- setContainers(containers) {
- this.containers = containers ?? [];
- return this;
- },
-
- getButtons() {
- return this.buttons;
- },
-
- getCloseButton() {
- return new podmanUI.ButtonNew(_('Close'), {
- click: () => ui.hideModal(),
- type: 'remove',
- }).render();
- },
-
- async handleCheckUpdate() {
- const containersWithUpdates = [];
- const checkErrors = [];
-
- for (const [index, container] of this.containers.entries()) {
- podmanUI.showSpinningModal(null, _('Check for updates: %s/%s').format(index + 1, this.containers.length));
-
- const updateState = await container.checkImageUpdate();
- if (updateState.hasUpdate) {
- containersWithUpdates.push(container);
- } else if (updateState.error) {
- checkErrors.push({ name: container.getName(), error: updateState.error });
- }
- }
-
- if (containersWithUpdates.length === 0) {
- const content = [ E('p', {}, _('No new updates available.')) ];
- if (checkErrors.length > 0) {
- content.push(E('p', { class: 'mt-sm' }, _('%d check(s) failed:').format(checkErrors.length)));
- checkErrors.forEach((e) => content.push(E('p', { class: 'text-error' }, `${e.name}: ${e.error}`)));
- }
- const modal = new podmanUI.Modal(_('Check Complete'), content);
- modal.getButtons = () => [ this.getCloseButton() ];
- modal.render();
- return;
- }
-
- const updateContent = [
- E('p', {}, _('Select containers to update')),
- ];
-
- const checkboxes = {};
- containersWithUpdates.forEach((container) => {
- const skipReason = container.getUpdateSkipReason();
- const checkbox = new ui.Checkbox(0);
- const checkboxNode = checkbox.render();
- const checkboxInputNode = checkboxNode.querySelector('input[type="checkbox"]');
- const checkboxId = checkboxInputNode.id;
-
- if (skipReason) {
- checkboxInputNode.disabled = true;
- } else {
- checkboxes[container.getID()] = { container, checkbox };
- }
-
- const inner = skipReason
- ? new podmanUI.Tooltip(checkboxNode, skipReason).render()
- : checkboxNode;
-
- updateContent.push(E('div', { class: 'd-flex align-center checkbox-with-label mb-xs' }, [
- inner,
- E('label', { for: checkboxId }, container.getName()),
- ]));
- });
-
- const modal = new podmanUI.Modal(_('Apply Updates'), updateContent);
- modal.getButtons = () => [
- this.getCloseButton(),
- new podmanUI.ButtonNew(_('Update'), {
- click: async () => {
- const selectedUpdates = Object.values(checkboxes)
- .filter(({ checkbox }) => checkbox.isChecked())
- .map(({ container }) => container);
-
- if (selectedUpdates.length === 0) {
- return;
- }
-
- await this.handleUpdate(selectedUpdates);
- },
- type: 'positive',
- }).render()
- ];
- modal.render();
- },
-
- async handleUpdate(containers) {
- const failures = [];
- const oldImages = [];
-
- const counterEl = E('strong', {}, '');
- const spinnerEl = E('div', { class: 'spinning' });
- const headerEl = E('div', { class: 'd-flex align-center mb-sm gap-5' }, [
- counterEl,
- spinnerEl,
- ]);
- const log = new podmanUI.StreamLog();
-
- const finalize = () => {
- ui.hideModal();
- if (failures.length === 0 && imageWarnings.length === 0) {
- podmanUI.alert(_('Containers updated successfully'), 'success', true);
- return;
- }
- const lines = [];
- if (failures.length > 0) {
- const succeeded = containers.length - failures.length;
- lines.push(E('p', {}, _('%d updated, %d failed:').format(succeeded, failures.length)));
- failures.forEach(f => lines.push(E('p', {}, `${f.name}: ${f.error}`)));
- } else {
- lines.push(E('p', {}, _('Containers updated successfully.')));
- }
- imageWarnings.forEach(w => lines.push(E('p', { class: 'mt-sm' }, w)));
- podmanUI.alert(lines, failures.length > 0 ? 'warning' : 'info');
- };
-
- const closeBtn = new podmanUI.ButtonNew(_('Close'), {
- click: () => finalize(),
- type: 'negative',
- }).render();
- closeBtn.disabled = true;
-
- const modal = new podmanUI.Modal(_('Apply Updates'), [ headerEl, log.render() ]);
- modal.getButtons = () => [ closeBtn ];
- modal.render();
-
- let imageWarnings = [];
-
- for (const [i, container] of containers.entries()) {
- counterEl.textContent = _('Update image: %d/%d - %s').format(i + 1, containers.length, container.getName());
- log.append('━━ ' + container.getName() + ' ━━\n');
- try {
- const inspected = Container.getSingleton(await container.inspect());
- const result = await inspected.updateImage((line) => log.append(line));
- if (result?.oldImage) oldImages.push({ image: result.oldImage });
- } catch (err) {
- const msg = err.message || String(err);
- log.append('✗ ' + msg + '\n');
- failures.push({ name: container.getName(), error: msg });
- }
- log.append('\n');
- }
-
- if (oldImages.length > 0) {
- counterEl.textContent = _('Cleaning up old images...');
- log.append('━━ ' + _('Cleaning up old images...') + ' ━━\n');
-
- const allContainers = await podmanRPC.containers.list('all=true').catch(() => []);
- const normalize = id => (id || '').replace(/^sha256:/, '').toLowerCase();
- const usedIds = new Set(allContainers.map(c => normalize(c.ImageID)));
-
- const seen = new Set();
- for (const { image } of oldImages) {
- const id = normalize(image.getID());
- if (seen.has(id)) continue;
- seen.add(id);
-
- if (usedIds.has(id)) {
- const warning = _('Old image still used by other containers');
- imageWarnings.push(warning);
- log.append('! ' + warning + '\n');
- } else {
- await image.remove();
- log.append('✓ ' + _('Removed old image %s').format(image.getID().substring(0, 12)) + '\n');
- }
- }
- }
-
- counterEl.textContent = _('Done.');
- spinnerEl.classList.remove('spinning');
- closeBtn.disabled = false;
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/modal/prune.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/modal/prune.js
deleted file mode 100644
index 8a1cef4c3..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/modal/prune.js
+++ /dev/null
@@ -1,120 +0,0 @@
-'use strict';
-
-'require ui';
-
-'require podman.rpc as podmanRPC';
-'require podman.utils as podmanUtil';
-'require podman.ui as podmanUI';
-
-return podmanUI.Modal.extend({
- title: _('Cleanup Unused Resources'),
-
- getContent() {
- this.checkboxPruneAll = new ui.Checkbox(1, {
- hiddenname: 'prune-all-images'
- });
- this.checkboxPruneVolumes = new ui.Checkbox(0, {
- hiddenname: 'prune-volumes'
- });
-
- const pruneAllNode = this.checkboxPruneAll.render();
- const pruneVolumesNode = this.checkboxPruneVolumes.render();
- const pruneAllId = pruneAllNode.querySelector('input[type="checkbox"]').id;
- const pruneVolumesId = pruneVolumesNode.querySelector('input[type="checkbox"]').id;
-
- return E('div', {}, [
- E('p', {}, _('Select what to clean up:')),
-
- E('div', {
- class: 'd-flex align-center checkbox-with-label',
- style: 'margin-bottom: 2px;'
- }, [
- pruneAllNode,
- E('label', {
- for: pruneAllId
- }, _('Remove all unused images (not just dangling)')),
- ]),
-
- E('div', {
- class: 'd-flex align-center checkbox-with-label'
- }, [
- pruneVolumesNode,
- E('label', {
- for: pruneVolumesId
- }, _('Remove unused volumes')),
- ]),
- ]);
- },
-
- getButtons() {
- return [
- this.getCloseButton(),
- new podmanUI.ButtonNew(_('Clean Up Now'), {
- click: ui.createHandlerFn(this, 'handlePrune'),
- type: 'positive',
- }).render()
- ];
- },
-
- async handlePrune() {
- const allImages = this.checkboxPruneAll.getValue() === '1';
- const volumes = this.checkboxPruneVolumes.getValue() === '1';
- podmanUI.showSpinningModal(_('Clean Up Now'), _(
- 'Removing unused resources, please wait...'));
-
- const result = await podmanRPC.system.prune(allImages, volumes);
- let freedSpace = 0;
- const deletedItems = [];
-
- const reportTypes = [{
- key: 'ContainerPruneReports',
- label: _('Containers')
- },
- {
- key: 'ImagePruneReports',
- label: _('Images')
- },
- {
- key: 'VolumePruneReports',
- label: _('Volumes')
- }
- ];
-
- reportTypes.forEach((type) => {
- const reports = result[type.key];
- if (reports && reports.length > 0) {
- reports.forEach((r) => {
- if (r.Size > 0) freedSpace += r.Size;
- });
- deletedItems.push('%d %s'.format(reports.length, type.label
- .toLowerCase()));
- }
- });
-
- const modal = new podmanUI.Modal(_('Cleanup Complete'));
- modal.handleClose = null;
- modal.handleSubmit = () => {
- ui.hideModal();
- window.location.reload();
- };
- modal.content = [
- E('p', {}, _('Cleanup successful!')),
- ];
-
- if (deletedItems.length > 0) {
- modal.content.push(E('p', {
- class: 'mt-sm'
- }, _('Removed: %s').format(deletedItems.join(', '))));
- } else {
- modal.content.push(E('p', {
- class: 'mt-sm'
- }, _('No unused resources found')));
- }
-
- modal.content.push(E('p', {
- class: 'mt-sm text-success text-bold'
- }, _('Space freed: %s').format(podmanUtil.format.bytes(freedSpace))));
-
- modal.render();
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/networks.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/networks.js
deleted file mode 100644
index 1bc2cf5d9..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/networks.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-
-'require network';
-'require ui';
-
-'require podman.rpc as podmanRPC';
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-'require podman.form as podmanForm';
-'require podman.form.network as PodmanFormNetwork';
-
-/**
- * Manage podman networks
- */
-return podmanView.list.extend({
- sectionName: 'networks',
-
- title: _('Networks'),
- titleSingle: _('Network'),
-
- async load() {
- return podmanRPC.networks.list();
- },
-
- /**
- * Update list section
- */
- async updateSection() {
- this.section.selectKey = 'ID';
- this.section.createForm = PodmanFormNetwork;
- this.section.handleRemove = async () => this.removeNetworks();
-
- let o;
-
- o = this.section.option(podmanForm.field.LinkDummyValue, 'name', _('Name'));
- o.click = (_value, net) => this.section.handleInspect(net);
-
- o = this.section.option(podmanForm.field.DummyValue, 'Int', _('Int'));
- o.cfgdatavalue = (net) => this.getIntegrationIcon(net);
- o.width = '5%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'driver', _('Driver'));
- o.width = '10%';
-
- const ipPairCell = (getV4, getV6) => (net) => E('div', {}, [
- E('span', {}, getV4(net) || '-'),
- E('br'),
- E('span', {}, getV6(net) || '-'),
- ]);
-
- o = this.section.option(podmanForm.field.DummyValue, 'Subnet', _('Subnet'));
- o.cfgdatavalue = ipPairCell(n => n.getSubnetIP4(), n => n.getSubnetIP6());
- o.width = '20%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'Gateway', _('Gateway'));
- o.cfgdatavalue = ipPairCell(n => n.getGatewayIP4(), n => n.getGatewayIP6());
- o.width = '20%';
-
- o = this.section.option(podmanForm.field.DateDummyValue, 'created', _('Created'));
- o.width = '20%';
-
- await network.flushCache();
- },
-
- async removeNetworks() {
- const selected = this.section.getSelectedData();
- if (selected.length === 0) {
- return this.section.showNoneSelectedWarning();
- }
-
- const checkboxRemoveIntegration = new ui.Checkbox('1', { hiddenname: 'remove-integration' });
- const checkboxNode = checkboxRemoveIntegration.render();
- const checkboxId = checkboxNode.querySelector('input[type="checkbox"]').id;
-
- this.confirm([
- E('p', {}, _('Are you sure to delete the records?')),
- E('div', { class: 'd-flex align-center checkbox-with-label' }, [
- checkboxNode,
- E('label', { for: checkboxId }, _('Remove OpenWrt integration')),
- ]),
- ], async () => {
- for (const [i, item] of selected.entries()) {
- this.loading(_('Deleting records: %s/%s').format(i + 1, selected.length));
-
- await item.remove();
- if (checkboxRemoveIntegration.getValue() === '1') {
- await item.integrationRemove();
- }
- }
-
- ui.hideModal();
- this.section.handleRefresh();
- });
- },
-
- async getIntegrationIcon(net) {
- const { hasInterface, hasDevice, hasDnsmasqExclusion } = await net.integrationCheck();
-
- if (hasInterface && hasDevice && hasDnsmasqExclusion) {
- return new podmanUI.Tooltip('✅', _('OpenWrt integration exists\n\nClick to remove'), {
- click: () => {
- this.confirm([
- E('p', {}, _('Are you sure to remove integration?')),
- ], async () => {
- await net.integrationRemove();
- this.section.handleRefresh();
- });
- },
- }).render();
- }
-
- const tooltip = [];
- tooltip.push(_('OpenWrt integration incomplete'));
- tooltip.push('');
- tooltip.push(`${_('Interface')}: ${String(hasInterface)}`);
- tooltip.push(`${_('Device')}: ${String(hasDevice)}`);
- if (await net.hasDnsmasq()) {
- tooltip.push(`${_('Dnsmasq')}: ${String(hasDnsmasqExclusion)}`);
- }
- tooltip.push('');
- tooltip.push(_('Click icon to repair'));
-
- return new podmanUI.Tooltip('❌', tooltip.join('\n'), {
- click: () =>
- net.integrationRepair().then(() => this.section.handleRefresh()),
- }).render();
- }
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/overview.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/overview.js
deleted file mode 100644
index 6ef3a1258..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/overview.js
+++ /dev/null
@@ -1,202 +0,0 @@
-'use strict';
-
-'require dom';
-'require ui';
-
-'require podman.rpc as podmanRPC';
-'require podman.utils as podmanUtil';
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-
-'require view.podman.modal.prune as PruneModal';
-'require view.podman.modal.autoUpdate as AutoUpdateModal';
-
-/**
- * Podman Overview Dashboard View
- */
-return podmanView.base.extend({
- async load() {
- return Promise.all([
- podmanRPC.system.version(),
- podmanRPC.system.info(),
- ])
- },
-
- async render([version, info]) {
- const sections = await Promise.all([
- this.createToolbar(),
- this.createInfoSection(version, info),
- this.createDebugSection(),
- this.createResourcesSection(),
- ]);
-
- this.loadAdditionalInformation();
-
- return E('div', {}, sections.filter(Boolean));
- },
-
- async loadAdditionalInformation() {
- const [containers, images, volumes, networks, pods] = await Promise.all([
- podmanRPC.containers.list('all=true'),
- podmanRPC.images.list(),
- podmanRPC.volumes.list(),
- podmanRPC.networks.list(),
- podmanRPC.pods.list()
- ]);
-
- const runningContainers = containers.filter((container) => container.isRunning()).length;
- const runningPods = pods.filter((p) => p.Status === 'Running').length;
-
- if (this.resourceCardsEl) {
- dom.content(this.resourceCardsEl, [
- this.createResourceCards(containers, pods, images, networks, volumes,
- runningContainers, runningPods)
- ]);
- }
- },
-
- createToolbar() {
- return E('div', { class: 'overview-actions mb-sm' }, [
- new podmanUI.Button(
- _('Check for Updates'),
- ui.createHandlerFn(this, 'handleAutoUpdate'),
- 'positive'
- ).render(),
- new podmanUI.Button(
- _('Cleanup / Prune'),
- ui.createHandlerFn(this, 'handlePrune'),
- 'remove'
- ).render()
- ]);
- },
-
- createInfoSection(version, info) {
- const memTotal = podmanUtil.format.bytes(info.host?.memTotal);
- const memFree = podmanUtil.format.bytes(info.host?.memFree);
-
- const table = new podmanUI.TableList()
- .addRow(_('Podman Version'), version.Version || _('Unknown'))
- .addRow(_('API Version'), version.ApiVersion || _('Unknown'))
- .addRow(_('CPU'), info.host?.cpus?.toString() || _('Unknown'))
- .addRow(_('Memory'), memFree + ' / ' + memTotal)
- .addRow(_('Socket Path'), info.host?.remoteSocket?.path || '/run/podman/podman.sock')
- .addRow(_('Graph Root'), info.store?.graphRoot || _('Unknown'))
- .addRow(_('Run Root'), info.store?.runRoot || _('Unknown'))
- .addRow(_('Registries'), this.getRegistries(info))
- ;
-
- return this.createSection(_('Information'), table.render());
- },
-
- createDebugSection() {
- this.systemDiagnosticsEl = E('div', { class: 'system-diagnostics', style: 'margin-bottom: 18px;' }, [
- new podmanUI.Button(
- _('Load'),
- ui.createHandlerFn(this, 'handleLoadSystemDiagnostics'),
- 'positive'
- ).render(),
- ]);
-
- return this.createSection(_('System Diagnostics'), this.systemDiagnosticsEl);
- },
-
- createResourcesSection() {
- this.resourceCardsEl = E('div', { class: 'resources-cards' }, [
- E('div', { class: 'loading-placeholder' }, [
- E('em', { class: 'spinning' }, _('Loading...')),
- ]),
- ]);
-
- return this.createSection(_('Resources'), this.resourceCardsEl);
- },
-
- createSection(headline, content) {
- return E('div', {}, [
- E('h3', {}, headline),
- content,
- ]);
- },
-
- getRegistries(info) {
- if (info.registries && info.registries.search) {
- return info.registries.search.join(', ');
- }
- return 'docker.io, registry.fedoraproject.org, registry.access.redhat.com';
- },
-
- createResourceCards(containers, pods, images, networks, volumes, runningContainers,
- runningPods) {
-
- return E('div', { class: 'overview-cards' }, [
- this.createCard('🐳', _('Containers'), 'containers', containers.length, runningContainers, 'admin/podman/containers'),
- this.createCard('🔗', _('Pods'), 'pods', pods.length, runningPods, 'admin/podman/pods'),
- this.createCard('💿', _('Images'), 'images', images.length, null, 'admin/podman/images'),
- this.createCard('🌐', _('Networks'), 'networks', networks.length, null, 'admin/podman/networks'),
- this.createCard('💾', _('Volumes'), 'volumes', volumes.length, null, 'admin/podman/volumes'),
- ]);
- },
-
- createCard(icon, title, slug, total, running, url) {
- const statsText = running !== null ? running + ' / ' + total : total.toString();
-
- return E('a', {
- href: L.url(url),
- class: 'd-flex flex-column cursor-pointer align-center overview-card-link overview-card-' + slug,
- }, [
- E('div', { class: 'card-link-header d-flex align-center w-100' }, [
- E('span', { class: 'card-link-title text-bold' }, title),
- icon,
- ]),
- E('div', { class: 'w-100' }, [
- E('div', { class: 'card-link-headline text-bold' }, statsText),
- running !== null
- ? E('div', { class: 'card-link-text' }, _('running') + ' / ' + _('total'))
- : E('div', { class: 'card-link-text' }, _('total'))
- ])
- ]);
- },
-
- async handleLoadSystemDiagnostics() {
- this.loading(_('Load System diagnostics'));
-
- const debugData = await podmanRPC.system.debug();
- const statusIcons = { ok: '\u2713', warn: '\u26A0', error: '\u2717' };
- const statusColors = { ok: '#2ecc71', warn: '#e67e22', error: '#e74c3c' };
-
- const table = new podmanUI.TableList();
-
- (debugData.checks || []).forEach((check) => {
- const icon = statusIcons[check.status] || '?';
- const color = statusColors[check.status] || '#666';
- const detail = check.detail || '';
- const message = check.message ? ' \u2014 ' + check.message : '';
-
- table.addRow(
- _(check.label),
- E('span', { style: 'color:' + color }, [
- E('strong', {}, icon + ' '),
- E('span', { class: 'cli-value' }, detail),
- message
- ])
- );
- });
-
- dom.content(this.systemDiagnosticsEl, [table.render()]);
- ui.hideModal();
- },
-
- handlePrune() {
- PruneModal.render();
- },
-
- handleAutoUpdate() {
- this.loading(_('Find updateable containers'));
-
- // @todo Use podman api filter
- return podmanRPC.containers.list('all=true').then((containers) => {
- AutoUpdateModal
- .setContainers(containers.filter((c) => c.getAutoUpdateLabel()))
- .render();
- });
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/containers.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/containers.js
deleted file mode 100644
index da496fe42..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/containers.js
+++ /dev/null
@@ -1,87 +0,0 @@
-'use strict';
-
-'require dom';
-'require form';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-'require podman.form as podmanForm';
-'require podman.model.Container as Container';
-'require podman.utils as podmanUtil';
-'require podman.TableSelectSection as TableSelectSection';
-
-return podmanView.tabContent.extend({
- tab: 'ps',
- pod: null,
-
- async render(pod) {
- this.pod = pod;
-
- const containers = [];
-
- for (const podContainer of this.pod.getContainers()) {
- const containerInspect = await Container.getSingleton(podContainer).inspect();
- const container = Container.getSingleton(containerInspect);
- containers.push(container);
- }
-
- this.map = new form.JSONMap({ containers }, '');
-
- this.section = this.map.section(
- TableSelectSection.TableSelectSection,
- 'containers',
- '',
- ''
- );
- this.section.view = this;
- this.section.anonymous = true;
- this.section.footer = true;
-
- this.section.selectKey = 'Id';
- // this.section.createForm = PodmanFormContainer;
- this.section.handleCreate = null;
- this.section.handleRemove = null;
- this.section.handleRefresh = null;
-
- // this.section.handleRefreshCb = () => this.checkInitScripts();
- // this.section.handleRefreshCb = null;
- // this.section.toolbarExtraButtons = [
- // new podmanUI.Button('►', ui.createHandlerFn(this, 'handleStart')).render(),
- // new podmanUI.Button('◼', ui.createHandlerFn(this, 'handleStop')).render(),
- // new podmanUI.Button('↻', ui.createHandlerFn(this, 'handleRestart')).render(),
- // ];
-
- let o;
-
- o = this.section.option(podmanForm.field.DummyValue, 'Names', _('Name'));
- o.cfgdatavalue = (container) => container.getName();
-
- o = this.section.option(podmanForm.field.DummyValue, 'Id', _('ID'));
- o.cfgdatavalue = (container) => container.getDetailLink(podmanUtil.truncate(container.getID(), 10));
- o.width = '12%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'Image', _('Image'));
- o.cfgdatavalue = (container) => container.getImageName();
- o.width = '25%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'ImageTag', _('Tag'));
- o.cfgdatavalue = (container) => container.getImageTag();
- o.cfgformatter = (imageTag) => podmanUtil.truncate(imageTag, 10);
- o.cfgtt = (imageTag) => imageTag.length > 10 ? imageTag : '';
- o.width = '11%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'State', _('Status'));
- o.cfgdatavalue = (container) => container.getStateBadge();
- o.width = '8%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'StartedAt', _('Started At'));
- o.cfgdatavalue = (container) => container.getStartedAt(true);
- o.width = '17%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'InitScript', _('Boot'));
- o.cfgvalue = () => E('span', { class: 'autostart-status autostart-' }, '...');
- o.width = '6%';
-
- return this.map.render();
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/info.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/info.js
deleted file mode 100644
index 07a2a639e..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/info.js
+++ /dev/null
@@ -1,135 +0,0 @@
-'use strict';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-'require podman.utils as podmanUtil';
-'require podman.model.Container as Container';
-
-const DASH = '-';
-
-function joinOrDash(values) {
- return Array.isArray(values) && values.length > 0 ? values.join(', ') : DASH;
-}
-
-function valueOrDash(value) {
- return (value === undefined || value === null || value === '') ? DASH : value;
-}
-
-return podmanView.tabContent.extend({
- tab: 'info',
- pod: null,
-
- render(pod) {
- this.pod = pod;
-
- const sections = [
- this.basicSection(),
- this.configSection(),
- this.resourcesSection(),
- this.networkSection(),
- ];
-
- const labels = this.labelsSection();
- if (labels) sections.push(labels);
-
- return sections;
- },
-
- basicSection() {
- const table = new podmanUI.TableList();
-
- table
- .addRow(_('Name'), this.pod.getName())
- .addRow(_('ID'), (this.pod.getID() || '').substring(0, 64))
- .addRow(_('Status'), this.pod.getStatusBadge())
- .addRow(_('Created'), podmanUtil.format.date(this.pod.getCreatedAt()));
-
- return E('div', {}, [
- E('h4', {}, _('Basic Information')),
- table.render(),
- ]);
- },
-
- configSection() {
- const table = new podmanUI.TableList();
-
- const infraId = this.pod.getInfraId();
- const infraIdCell = infraId
- ? E('a', { href: L.url('admin/podman/container', infraId) }, infraId.substring(0, 12))
- : DASH;
-
- table
- .addRow(_('Hostname'), valueOrDash(this.pod.Hostname))
- .addRow(_('Cgroup parent'), valueOrDash(this.pod.CgroupParent))
- .addRow(_('Exit policy'), valueOrDash(this.pod.ExitPolicy))
- .addRow(_('Restart policy'), valueOrDash(this.pod.RestartPolicy))
- .addRow(_('Shared namespaces'), joinOrDash(this.pod.SharedNamespaces))
- .addRow(_('Infra container'), infraIdCell);
-
- return E('div', {}, [
- E('h4', {}, _('Configuration')),
- table.render(),
- ]);
- },
-
- resourcesSection() {
- const table = new podmanUI.TableList();
-
- const memLimit = this.pod.memory_limit;
- const memLimitDisplay = memLimit > 0 ? podmanUtil.format.bytes(memLimit) : _('Unlimited');
-
- const cpuQuota = this.pod.cpu_quota;
- const cpuQuotaDisplay = (cpuQuota === undefined || cpuQuota < 0) ? _('Unlimited') : `${cpuQuota} µs`;
-
- const cpuPeriod = this.pod.cpu_period;
- const cpuPeriodDisplay = cpuPeriod > 0 ? `${cpuPeriod} µs` : DASH;
-
- table
- .addRow(_('CPU period'), cpuPeriodDisplay)
- .addRow(_('CPU quota'), cpuQuotaDisplay)
- .addRow(_('CPU shares'), valueOrDash(this.pod.cpu_shares))
- .addRow(_('CPU set'), valueOrDash(this.pod.cpuset_cpus))
- .addRow(_('Memory limit'), memLimitDisplay);
-
- return E('div', {}, [
- E('h4', {}, _('Resources')),
- table.render(),
- ]);
- },
-
- networkSection() {
- const table = new podmanUI.TableList();
- const infra = this.pod.InfraConfig || {};
-
- table
- .addRow(_('Networks'), joinOrDash(infra.Networks || this.pod.getNetworks()))
- .addRow(_('Static IPv4'), valueOrDash(infra.StaticIP))
- .addRow(_('Static MAC'), valueOrDash(infra.StaticMAC))
- .addRow(_('DNS servers'), joinOrDash(infra.DNSServer))
- .addRow(_('DNS search'), joinOrDash(infra.DNSSearch))
- .addRow(_('DNS options'), joinOrDash(infra.DNSOption))
- .addRow(_('Extra hosts'), joinOrDash(infra.HostAdd))
- .addRow(_('Host network'), infra.HostNetwork ? _('Yes') : _('No'));
-
- return E('div', {}, [
- E('h4', {}, _('Network')),
- table.render(),
- ]);
- },
-
- labelsSection() {
- const labels = this.pod.getLabels();
- const keys = Object.keys(labels || {});
- if (keys.length === 0) return null;
-
- const table = new podmanUI.TableList();
- for (const key of keys) {
- table.addRow(key, labels[key]);
- }
-
- return E('div', {}, [
- E('h4', {}, _('Labels')),
- table.render(),
- ]);
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/processes.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/processes.js
deleted file mode 100644
index d6f577643..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/processes.js
+++ /dev/null
@@ -1,96 +0,0 @@
-'use strict';
-
-'require dom';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-
-return podmanView.tabContent.extend({
- tab: 'ps',
- pod: null,
-
- render(pod) {
- this.pod = pod;
-
- if (!this.pod.isRunning()) {
- return this.warningContent(_('Pod is not running'));
- }
-
- this.tableContent = E('div', { class: 'ps-table-content' }, []);
-
- return this.renderTabContent('', [ this.tableContent ]);
- },
-
- onTabActive() {
- if (!this.pod || !this.pod.isRunning() || this.processStream) return;
-
- this.processStream = this.pod.streamTop((ps) => {
- this.updateProcessList(ps);
- });
- },
-
- onTabInactive() {
- if (!this.processStream) return;
-
- this.processStream.stop();
- this.processStream = null;
- },
-
- updateProcessList(ps) {
- if (!ps || !ps.Titles || !ps.Processes || ps.Titles.length === 0) {
- return;
- }
-
- const psTable = new podmanUI.Table();
- const columnWidth = `width: ${100 / ps.Titles.length}%;`;
- const timeIndex = ps.Titles.indexOf('ELAPSED');
-
- ps.Titles.forEach((title) => {
- psTable.addHeader(_(title), { style: columnWidth });
- });
-
- ps.Processes.forEach((process) => {
- psTable.addRow(process.map((detail, i) => ({
- inner: i === timeIndex ? this._formatElapsedTime(detail) : detail
- })));
- });
-
- dom.content(this.tableContent, psTable.render());
- },
-
- // @todo: duplicated code (containers-tab/processes.js)
- _formatElapsedTime(timeStr) {
- if (!timeStr) return '-';
-
- const result = [];
- const pattern = /(\d+(?:\.\d+)?)([ydhms])/g;
- let match;
-
- while ((match = pattern.exec(timeStr)) !== null) {
- let value = parseFloat(match[1]);
- const unit = match[2];
-
- if (unit === 's' && value > 1000) {
- value = Math.floor(value / 1000000000);
-
- if (value >= 60) {
- const mins = Math.floor(value / 60);
- const secs = value % 60;
- if (mins > 0) result.push(`${mins}m`);
- if (secs > 0) result.push(`${secs}s`);
- continue;
- }
- } else {
- value = Math.floor(value);
- }
-
- if (unit === 's' || unit === 'm') {
- result.push(String(value).padStart(2, '0') + unit);
- } else {
- result.push(value + unit);
- }
- }
-
- return result.length > 0 ? result.join('') : timeStr;
- }
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/stats.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/stats.js
deleted file mode 100644
index 8f832aa70..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod-tab/stats.js
+++ /dev/null
@@ -1,83 +0,0 @@
-'use strict';
-
-'require dom';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-'require podman.utils as podmanUtil';
-
-return podmanView.tabContent.extend({
- tab: 'stats',
- pod: null,
-
- render(pod) {
- this.pod = pod;
-
- if (!this.pod.isRunning()) {
- return this.warningContent(_('Pod is not running'));
- }
-
- this.containerNames = this.buildContainerNameMap();
- this.tableContent = E('div', { class: 'stats-table-content' }, []);
-
- return this.renderTabContent('', [ this.tableContent ]);
- },
-
- onTabActive() {
- if (!this.pod || !this.pod.isRunning() || this.statsStream) return;
-
- this.statsStream = this.pod.streamStats((reports) => {
- this.updateStats(reports);
- });
- },
-
- onTabInactive() {
- if (!this.statsStream) return;
-
- this.statsStream.stop();
- this.statsStream = null;
- },
-
- buildContainerNameMap() {
- const map = {};
- for (const c of (this.pod.getContainers() || [])) {
- if (c?.Id) map[c.Id] = c.Name;
- }
- return map;
- },
-
- updateStats(reports) {
- if (!Array.isArray(reports)) return;
-
- const table = new podmanUI.Table();
- const headers = [
- _('Container'),
- _('CID'),
- _('CPU %'),
- _('Memory'),
- _('Memory %'),
- _('Net I/O'),
- _('Block I/O'),
- _('PIDs'),
- ];
- const columnWidth = `width: ${100 / headers.length}%;`;
- headers.forEach((h) => table.addHeader(h, { style: columnWidth }));
-
- for (const r of reports) {
- const cid = r.CID || '';
- const name = this.containerNames[cid] || r.Name || '-';
- table.addRow([
- { inner: name },
- { inner: podmanUtil.truncate(cid, 12) },
- { inner: r.CPU || '-' },
- { inner: r.MemUsage || '-' },
- { inner: r.Mem || '-' },
- { inner: r.NetIO || '-' },
- { inner: r.BlockIO || '-' },
- { inner: r.PIDS || '-' },
- ]);
- }
-
- dom.content(this.tableContent, table.render());
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/pod.js
deleted file mode 100644
index 15a791c60..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/pod.js
+++ /dev/null
@@ -1,150 +0,0 @@
-'use strict';
-
-'require ui';
-'require dom';
-
-'require podman.ui as podmanUI';
-'require podman.view as podmanView';
-'require podman.model.Pod as Pod';
-
-'require view.podman.pod-tab.info as PodInfoTab';
-'require view.podman.pod-tab.containers as PodContainersTab';
-'require view.podman.pod-tab.stats as PodStatsTab';
-'require view.podman.pod-tab.processes as PodProcessesTab';
-
-return podmanView.container.extend({
- pod: null,
- data: null,
- listUrl: L.url('admin/podman/pods'),
-
- async load() {
- const path = L.location();
- const matches = path.match(/pod\/([a-f0-9]+)/i);
-
- if (!matches || !matches[1]) {
- this.redirectToList();
- return;
- }
-
- const podId = matches[1];
- const pod = Pod.getSingleton({ Id: podId });
-
- const inspectData = await pod.inspect();
- this.data = inspectData;
-
- return Pod.getSingleton(inspectData);
- },
-
- async render(pod) {
- if (!pod) {
- this.redirectToList();
- return;
- }
-
- this.pod = pod;
- this.tabs
- .addTab('info', _('Info'))
- .addTab('containers', _('Containers'))
- .addTab('stats', _('Stats'))
- .addTab('ps', _('Processes'))
- .addTab('inspect', _('Inspect'));
-
- requestAnimationFrame(() => {
- this.renderInfoTab();
- this.renderContainersTab();
- this.renderStatsTab();
- this.renderProcessesTab();
- this.renderInspectTab();
- });
-
- return this.super('render', []);
- },
-
- createHeader() {
- return this.super('createHeader', [
- this.pod.getName(),
- this.pod.isRunning(),
- this.pod.isStopped(),
- this.pod.isPaused(),
- ]);
- },
-
- stopStreams() {
- this.getTabInstance('stats')?.onTabInactive();
- this.getTabInstance('ps')?.onTabInactive();
- },
-
- async renderInfoTab() {
- const content = await PodInfoTab.render(this.pod);
- this.renderTab('info', content);
- },
-
- async renderContainersTab() {
- const content = await PodContainersTab.render(this.pod);
- this.renderTab('containers', content);
- },
-
- async renderStatsTab() {
- const content = await PodStatsTab.render(this.pod);
- this.renderTab('stats', content);
- },
-
- async renderProcessesTab() {
- const content = await PodProcessesTab.render(this.pod);
- this.renderTab('ps', content);
- },
-
- renderInspectTab() {
- this.renderTab('inspect', new podmanUI.JsonArea(this.data).render());
- },
-
- async handleStart() {
- if (this.pod.isRunning()) {
- return;
- }
-
- this.loading(_('Start pod'));
-
- if (this.pod.isPaused()) {
- this.pod.unpause().then(() => window.location.reload());
- return;
- }
-
- this.pod.start().then(() => window.location.reload());
- },
-
- async handleStop() {
- if (!this.pod.isRunning() && !this.pod.isPaused()) {
- return;
- }
-
- this.loading(_('Stop pod'));
- this.stopStreams();
- this.pod.stop().then(() => window.location.reload());
- },
-
- async handleRestart() {
- this.loading(_('Restart pod'));
- this.stopStreams();
- this.pod.restart().then(() => window.location.reload());
- },
-
- async handlePause() {
- if (!this.pod.isRunning()) {
- return;
- }
-
- this.loading(_('Pause pod'));
- this.stopStreams();
- this.pod.pause().then(() => window.location.reload());
- },
-
- async handleRemove() {
- this.confirm([
- E('p', {}, _('Are you sure to remove pod?')),
- ], async () => {
- this.loading(_('Remove pod'));
- this.pod.remove().then(() => this.redirectToList());
- });
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/podman.css b/luci-app-podman/htdocs/luci-static/resources/view/podman/podman.css
deleted file mode 100644
index 55088c1ce..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/podman.css
+++ /dev/null
@@ -1,431 +0,0 @@
-:root {
- --podman-terminal-bg: #1a1a1a;
- --podman-terminal-fg: #0f0;
- --warn-background-color-dark: rgba(166, 141, 69, 0.2);
-}
-
-.overview-cards {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
- gap: 1.3125rem;
-}
-
-div.cbi-tooltip-container {
- width: fit-content;
-}
-
-div.cbi-tooltip-container div.cbi-tooltip {
- font-size: 13px;
- font-weight: 400;
- line-height: normal;
-}
-
-.overview-card-link,
-.overview-card-link:hover,
-.overview-card-link:focus {
- text-decoration: none;
- color: inherit;
- justify-content: space-between;
- min-height: 120px;
- padding: 1.3125rem;
- margin: 0 0 .625rem 0;
- transition: all 0.2s ease-in-out;
-}
-
-.overview-card-link .card-link-header {
- justify-content: space-between;
- margin-bottom: .625rem;
- font-size: 20px;
-}
-
-.overview-card-link .card-link-title {
- font-size: 16px;
- opacity: 0.8;
-}
-
-.overview-card-link .card-link-icon {
- font-size: 24px;
- opacity: 0.6;
-}
-
-.overview-card-link .card-link-headline {
- font-size: 32px;
-}
-
-.overview-card-link .card-link-text {
- font-size: 12px;
- opacity: 0.7;
- margin-top: .3125rem;
-}
-
-.overview-card-containers {
- border-left: 4px solid #3498db;
-}
-
-.overview-card-containers .card-link-headline {
- color: #3498db;
-}
-
-.overview-card-pods {
- border-left: 4px solid #2ecc71;
-}
-
-.overview-card-pods .card-link-headline {
- color: #2ecc71;
-}
-
-.overview-card-images {
- border-left: 4px solid #9b59b6;
-}
-
-.overview-card-images .card-link-headline {
- color: #9b59b6;
-}
-
-.overview-card-networks {
- border-left: 4px solid #e67e22;
-}
-
-.overview-card-networks .card-link-headline {
- color: #e67e22;
-}
-
-.overview-card-volumes {
- border-left: 4px solid #34495e;
-}
-
-.overview-card-volumes .card-link-headline {
- color: #34495e;
-}
-
-.border-0 {
- border: 0 !important;
-}
-
-.cursor-pointer {
- cursor: pointer;
-}
-
-.d-flex {
- display: flex;
-}
-
-.align-center {
- align-items: center;
-}
-
-.align-start {
- align-items: start;
-}
-
-.justify-center {
- justify-content: center;
-}
-
-.justify-end {
- justify-content: end;
-}
-
-.flex-column {
- flex-direction: column;
-}
-
-.gap-5 {
- gap: .3125rem;
-}
-
-.cbi-button-active {
- background: linear-gradient(lightgray, lightgray 25%, var(--background-color-low));
-}
-
-.badge {
- font-size: 0.85em;
- padding: 0 4px;
- text-align: center;
- border-radius: .3125rem;
- width: fit-content;
-}
-
-.badge.running {
- background-color: var(--success-color-high);
-}
-
-.badge.exited {
- background-color: var(--error-color-high);
-}
-
-.badge.created {
- background-color: var(--background-color-low);
-}
-
-.badge.paused {
- background-color: var(--warning-color-high, #d68a00);
-}
-
-.badge.degraded {
- background-color: var(--warning-color-high, #d68a00);
-}
-
-.badge.stopped,
-.badge.dead {
- background-color: var(--error-color-high);
-}
-
-.badge.running,
-.badge.error,
-.badge.exited,
-.badge.paused,
-.badge.degraded,
-.badge.stopped,
-.badge.dead {
- color: white;
-}
-
-.tooltip {
- border-bottom: 1px dotted;
-}
-
-.w-100 {
- width: 100%;
-}
-
-.d-none {
- display: none;
-}
-
-.modal.loading-modal {
- padding: 1em;
-}
-
-.cbi-checkbox + label {
- margin-left: 3px;
-}
-
-.text-success {
- color: var(--success-color-high);
-}
-
-.text-error {
- color: var(--error-color-high);
-}
-
-.mr-xs {
- margin-right: .3125rem;
-}
-
-.ml-xs {
- margin-left: .3125rem;
-}
-
-.ml-sm {
- margin-left: .625rem;
-}
-
-.mt-sm {
- margin-top: .625rem;
-}
-
-.mb-xs {
- margin-bottom: .3125rem;
-}
-
-.mb-sm {
- margin-bottom: .625rem;
-}
-
-.p-sm {
- padding: .625rem;
-}
-
-.text-bold {
- font-weight: bold;
-}
-
-.text-center {
- text-align: center !important;
-}
-
-.d-flex {
- display: flex;
-}
-
-.gap-xs {
- gap: .25rem;
-}
-
-.gap-sm {
- gap: .625rem;
-}
-
-.editable-field {
- width: 100%;
- display: flex;
-}
-
-.table-list>tr>td:first-of-type {
- width: 33%;
- font-weight: bold;
-}
-
-.code-area,
-.json-area,
-.terminal-area {
- max-height: 600px;
- font-weight: 100;
- overflow: auto !important;
- white-space: pre !important;
- display: block;
- word-wrap: normal;
-}
-
-.json-area .key {
- color: #660066;
- font-weight: bold;
-}
-
-.json-area .string {
- color: #007700;
-}
-
-.json-area .boolean {
- color: #aa5500;
-}
-
-.json-area .null {
- color: #777777;
-}
-
-.json-area .number {
- color: #0000ff;
-}
-
-.code-area.bash .comment {
- color: #888888;
- font-style: italic;
-}
-
-.code-area.bash .string {
- color: #007700;
-}
-
-.code-area.bash .variable {
- color: #aa5500;
-}
-
-.code-area.bash .keyword {
- color: #0000ff;
- font-weight: bold;
-}
-
-.code-area.bash .number {
- color: #ff4500;
-}
-
-.terminal-area {
- min-height: 100px;
- background: var(--podman-terminal-bg);
- color: var(--podman-terminal-fg);
-}
-
-.autostart-enabled {
- color: var(--success-color-high);
-}
-
-.autostart-none,
-.autostart-disabled {
- color: var(--text-color-medium);
-}
-
-.autostart-missing {
- color: var(--warn-color-high);
- cursor: pointer;
-}
-
-.autostart-error {
- color: var(--error-color-high);
-}
-
-.loading-placeholder {
- text-align: center;
- padding: 30px;
-}
-
-.cbi-button-none {
- border: 0;
- background: transparent;
- box-shadow: none;
-}
-
-.container-toolbar .d-flex {
- gap: .25rem;
-}
-
-.checkbox-with-label .cbi-checkbox {
- display: flex;
- align-items: center;
-}
-
-.container-icon-disconnect {
- border: 0;
-}
-
-#log-viewer {
- height: 600px;
- overflow: auto;
- white-space: pre;
-}
-
-#log-lines {
- width: 50px;
-}
-
-#log-since,
-#log-until {
- width: 100px;
-}
-
-#log-lines input,
-#log-since input,
-#log-until input {
- width: inherit;
-}
-
-.cbi-section-table-select {
- table-layout: fixed;
-}
-
-th[data-widget="Podman.Form.SelectDummyValue"] {
- padding: .625rem .625rem 8px !important;
-}
-
-th[data-widget="Podman.Form.SelectDummyValue"] .cbi-checkbox {
- margin-top: 1px;
-}
-
-td[data-widget="Podman.Form.SelectDummyValue"] {
- padding: .625rem .625rem 7px !important;
-}
-
-td[data-widget="Podman.Form.SelectDummyValue"] .cbi-checkbox {
- margin-top: 2px;
-}
-
-.podman-stream-log {
- font-family: monospace;
- font-size: 0.85rem;
- line-height: 1.35;
- background: #1e1e1e;
- color: #e8e8e8;
- border: 1px solid #444;
- border-radius: 3px;
- padding: 0.5rem 0.75rem;
- max-height: 320px;
- overflow-y: auto;
- overflow-x: auto;
- white-space: pre;
-}
-
-.podman-stream-log .log-line {
- white-space: pre;
- word-break: keep-all;
-}
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/pods.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/pods.js
deleted file mode 100644
index 83d21960d..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/pods.js
+++ /dev/null
@@ -1,172 +0,0 @@
-'use strict';
-
-'require ui';
-
-'require podman.rpc as podmanRPC';
-'require podman.utils as utils';
-'require podman.ui as podmanUI';
-'require podman.form as podmanForm';
-'require podman.view as podmanView';
-'require podman.form.pod as PodmanFormPod';
-'require podman.model.Container as Container';
-
-return podmanView.list.extend({
- sectionName: 'pods',
-
- title: _('Pods'),
- titleSingle: _('Pod'),
-
- async load() {
- return podmanRPC.pods.list();
- },
-
- async updateSection() {
- this.section.selectKey = 'Id';
- this.section.createForm = PodmanFormPod;
- this.section.toolbarExtraButtons = [
- new podmanUI.Button('►', ui.createHandlerFn(this, 'handleStart')).render(),
- new podmanUI.Button('◼', ui.createHandlerFn(this, 'handleStop')).render(),
- new podmanUI.Button('↻', ui.createHandlerFn(this, 'handleRestart')).render(),
- new podmanUI.Button('❚❚', ui.createHandlerFn(this, 'handlePause')).render(),
- ];
-
- let o;
-
- o = this.section.option(podmanForm.field.DummyValue, 'Name', _('Name'));
-
- o = this.section.option(podmanForm.field.DummyValue, 'Id', _('ID'));
- o.cfgdatavalue = (pod) => pod.getDetailLink(utils.truncate(pod.getID(), 16));
- o.width = '20%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'Status', _('Status'));
- o.cfgdatavalue = (pod) => pod.getStatusBadge();
- o.width = '10%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'Containers', _('Containers'));
- o.cfgdatavalue = (pod) => this.renderContainersCell(pod);
- o.width = '12%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'Networks', _('Networks'));
- o.cfgdatavalue = (pod) => {
- const nets = pod.getNetworks();
- return nets.length > 0 ? nets.join(', ') : '-';
- };
- o.width = '15%';
-
- o = this.section.option(podmanForm.field.DateDummyValue, 'Created', _('Created'));
- o.width = '20%';
- },
-
- renderContainersCell(pod) {
- const count = pod.getContainers().length;
- if (count === 0) {
- return E('span', {}, '0');
- }
-
- return E('a', {
- href: '#',
- class: 'text-bold',
- click: (ev) => {
- ev.preventDefault();
- this.handleShowContainers(pod);
- }
- }, `${count} ▸`);
- },
-
- handleShowContainers(pod) {
- const containers = pod.getContainers();
-
- const headerRow = E('tr', {}, [
- E('th', {}, _('Name')),
- E('th', {}, _('ID')),
- E('th', {}, _('Status')),
- ]);
-
- const rows = containers.map((c) => {
- const container = Container.getSingleton(c);
- const idShort = utils.truncate(container.getID(), 10);
- const idCell = container.getDetailLink(idShort);
-
- return E('tr', {}, [
- E('td', {}, container.getName()),
- E('td', {}, idCell),
- E('td', {}, container.getStateBadge()),
- ]);
- });
-
- // @todo: create table with helpers or show a simpler list
- const table = E('table', {
- class: 'table cbi-section-table'
- }, [
- E('thead', {}, headerRow),
- E('tbody', {}, rows.length > 0 ? rows : [
- E('tr', {}, E('td', {
- colspan: 3,
- class: 'text-center'
- }, _('No containers in this pod'))),
- ]),
- ]);
-
- const title = _('Containers in pod %s').format(pod.getName());
- const modal = new podmanUI.Modal(title, [table]);
- modal.render();
- },
-
- handleStart() {
- return this.runOnSelected(
- (pod) => pod.isPaused() ? pod.unpause() : pod.start(),
- _('Starting pod')
- );
- },
-
- handleStop() {
- return this.runOnSelected((pod) => pod.stop(), _('Stopping pod'));
- },
-
- handleRestart() {
- return this.runOnSelected((pod) => pod.restart(), _('Restarting pod'));
- },
-
- handlePause() {
- return this.runOnSelected((pod) => pod.pause(), _('Pausing pod'));
- },
-
- async runOnSelected(action, textLoad) {
- const section = this.getSection();
- const selected = section.getSelectedData();
- if (selected.length === 0) {
- return section.showNoneSelectedWarning();
- }
-
- const failures = [];
- for (const [i, pod] of selected.entries()) {
- this.loading(_('%s: %d/%d').format(textLoad, i + 1, selected.length));
- const result = await action(pod);
- if (result?.Errs?.length > 0) {
- failures.push({
- name: pod.getName(),
- errs: result.Errs
- });
- }
- }
-
- ui.hideModal();
-
- if (failures.length > 0) {
- const blocks = failures.map(({
- name,
- errs
- }) => E('div', {
- class: 'mb-sm'
- }, [
- E('strong', {}, name + ':'),
- E('ul', {
- class: 'm-0'
- }, errs.map((e) => E('li', {}, e))),
- ]));
- podmanUI.alert(blocks, 'error');
- }
-
- section.handleRefresh();
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/secrets.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/secrets.js
deleted file mode 100644
index accec5a5c..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/secrets.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-'require form';
-
-'require podman.utils as utils';
-'require podman.rpc as podmanRPC';
-'require podman.form as podmanForm';
-'require podman.view as podmanView';
-'require podman.form.secret as PodmanFormSecret';
-
-const SECRET_LABELS_TRUNCATE_LEN = 30;
-
-/**
- * Manage podman secrets
- */
-return podmanView.list.extend({
- sectionName: 'secrets',
-
- title: _('Secrets'),
- titleSingle: _('Secret'),
-
- /**
- * Load secret data
- */
- async load() {
- return podmanRPC.secrets.list();
- },
-
- /**
- * Update list section
- */
- async updateSection() {
- this.section.selectKey = 'ID';
- this.section.createForm = PodmanFormSecret;
-
- let o;
-
- o = this.section.option(podmanForm.field.LinkDummyValue, 'Name', _('Name'));
- o.cfgdatavalue = (secret) => secret.getName();
- o.click = (_value, secret) => this.section.handleInspect(secret, ['SecretData']);
-
- o = this.section.option(podmanForm.field.DummyValue, 'Driver', _('Driver'));
- o.cfgdatavalue = (secret) => secret.getDriver();
- o.width = '10%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'Labels', _('Labels'));
- o.cfgdatavalue = (secret) => {
- const labels = secret.getLabels();
- const keys = Object.keys(labels);
- return keys.length ? keys.map((key) => `${key}=${labels[key]}`).join(', ') : '-';
- };
- o.cfgformatter = (labels) => utils.truncate(labels, SECRET_LABELS_TRUNCATE_LEN);
- o.cfgtt = (labels) => labels.length > SECRET_LABELS_TRUNCATE_LEN ? labels : '';
- o.width = '20%';
-
- o = this.section.option(podmanForm.field.DateDummyValue, 'CreatedAt', _('Created'));
- o.width = '20%';
- },
-});
diff --git a/luci-app-podman/htdocs/luci-static/resources/view/podman/volumes.js b/luci-app-podman/htdocs/luci-static/resources/view/podman/volumes.js
deleted file mode 100644
index 1c7b68a93..000000000
--- a/luci-app-podman/htdocs/luci-static/resources/view/podman/volumes.js
+++ /dev/null
@@ -1,122 +0,0 @@
-'use strict';
-
-'require ui';
-'require fs';
-
-'require podman.utils as utils';
-'require podman.rpc as podmanRPC';
-'require podman.ui as podmanUI';
-'require podman.form as podmanForm';
-'require podman.view as podmanView';
-'require podman.form.volume as PodmanFormVolume';
-'require podman.form.volumeImport as PodmanFormVolumeImport';
-
-const VOLUME_MOUNT_TRUNCATE_LEN = 30;
-
-return podmanView.list.extend({
- sectionName: 'volumes',
-
- title: _('Volumes'),
- titleSingle: _('Volume'),
-
- async load() {
- return podmanRPC.volumes.list();
- },
-
- async updateSection() {
- this.section.selectKey = 'Name';
- this.section.createForm = PodmanFormVolume;
- this.section.toolbarExtraButtons = [
- new podmanUI.ButtonNew(_('Import'), {
- click: ui.createHandlerFn(this, 'handleImport'),
- }).render(),
- new podmanUI.ButtonNew(_('Export'), {
- click: ui.createHandlerFn(this, 'handleExport'),
- }).render(),
- ];
-
- let o;
-
- o = this.section.option(podmanForm.field.LinkDummyValue, 'VolumeName', _('Name'));
- o.cfgdatavalue = (volume) => utils.truncate(volume.getName(), 20);
- o.cfgtt = (_cfg, volume) => volume.getName().length > 20 ? volume.getName() : '';
- o.click = (_cfg, volume) => this.section.handleInspect(volume);
-
- o = this.section.option(podmanForm.field.DummyValue, 'Driver', _('Driver'));
- o.width = '10%';
-
- o = this.section.option(podmanForm.field.DummyValue, 'Mountpoint', _('Mountpoint'));
- o.cfgformatter = (mountpoint) => utils.truncate(mountpoint, VOLUME_MOUNT_TRUNCATE_LEN);
- o.cfgtt = (mountpoint) => mountpoint.length > VOLUME_MOUNT_TRUNCATE_LEN ? mountpoint : '';
- o.width = '35%';
-
- o = this.section.option(podmanForm.field.DateDummyValue, 'CreatedAt', _('Created'));
- o.width = '20%';
- },
-
- handleImport() {
- const fileInput = E('input', {
- type: 'file',
- accept: '.tar,.tar.gz,.tgz',
- class: 'hidden'
- });
-
- fileInput.addEventListener('change', async (ev) => {
- document.body.removeChild(fileInput);
- const file = ev.target.files[0];
- if (!file) return;
-
- const importForm = new PodmanFormVolumeImport.init();
- const formContent = await importForm.render(file);
- const title = _('Import from archive: %s').format(file.name);
- const modal = new podmanUI.Modal(title, [ formContent ]);
- modal.getButtons = () => [
- modal.getCloseButton(),
- new podmanUI.ButtonNew(_('Import'), {
- click: async () => {
- await importForm.handleCreate();
- await this.section.handleRefresh();
- },
- type: 'positive',
- }).render(),
- ];
- modal.render();
- });
-
- document.body.appendChild(fileInput);
- fileInput.click();
- },
-
- async handleExport() {
- const selected = this.section.getSelectedData();
-
- if (selected.length === 0) {
- return this.section.showNoneSelectedWarning();
- }
-
- let errors = 0;
- for (const [index, volume] of selected.entries()) {
- this.loading(_('Exporting selected volumes: %d/%d').format(index + 1, selected.length));
-
- const volumeName = volume.getName();
- try {
- const blob = await fs.exec_direct('/usr/libexec/podman-api', ['volume_export', volumeName], 'blob');
-
- const url = URL.createObjectURL(blob);
- const a = E('a', { href: url, download: `${volumeName}.tar` });
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
- setTimeout(() => URL.revokeObjectURL(url), 100);
- } catch (err) {
- podmanUI.alert(_('Error: %s').format(err.message), 'error');
- errors++;
- }
- }
-
- ui.hideModal();
-
- if (errors === 0)
- this.success(_('All volumes exported successfully'));
- },
-});
diff --git a/luci-app-podman/po/de/podman.po b/luci-app-podman/po/de/podman.po
deleted file mode 100644
index f0825b810..000000000
--- a/luci-app-podman/po/de/podman.po
+++ /dev/null
@@ -1,1090 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: luci-app-podman\n"
-"PO-Revision-Date: 2026-05-03 11:05+0000\n"
-"Last-Translator:\n"
-"Language-Team: German \n"
-"Language: de\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid "%d check(s) failed:"
-msgstr "%d Prüfung(en) fehlgeschlagen:"
-
-msgid "%d updated, %d failed:"
-msgstr "%d aktualisiert, %d fehlgeschlagen:"
-
-msgid "%s created successfully"
-msgstr "%s erfolgreich erstellt"
-
-msgid "%s: %d/%d"
-msgstr "%s: %d/%d"
-
-msgid "(none)"
-msgstr "(keine)"
-
-msgid "-- Select %s --"
-msgstr "-- %s auswählen --"
-
-msgid "1-253 characters: letters, numbers, underscore (_), hyphen (-) only"
-msgstr "1-253 Zeichen: Nur Buchstaben, Zahlen, Unterstriche (_) und Bindestriche (-)"
-
-msgid "512m, 1g, or -1 for unlimited"
-msgstr "512m, 1g oder -1 für unbegrenzt"
-
-msgid "API Version"
-msgstr "API-Version"
-
-msgid "Add the container to an existing pod. Network, hostname and port mappings come from the pod's infra container."
-msgstr "Container zu einem bestehenden Pod hinzufügen. Netzwerk, Hostname und Port-Mappings stammen vom Infra-Container des Pods."
-
-msgid "All images updated successfully"
-msgstr "Alle Images erfolgreich aktualisiert"
-
-msgid "All volumes exported successfully"
-msgstr "Alle Volumes erfolgreich exportiert"
-
-msgid "Allocate TTY (-t)"
-msgstr "TTY zuweisen (-t)"
-
-msgid "Allocate container IP from this range"
-msgstr "Container-IP aus diesem Bereich zuweisen"
-
-msgid "Always"
-msgstr "Immer"
-
-msgid "Apply Updates"
-msgstr "Updates anwenden"
-
-msgid "Are you sure to delete the records?"
-msgstr "Einträge wirklich löschen?"
-
-msgid "Are you sure to remove container?"
-msgstr "Container wirklich entfernen?"
-
-msgid "Are you sure to remove integration?"
-msgstr "Integration wirklich entfernen?"
-
-msgid "Auto Remove (--rm)"
-msgstr "Automatisch entfernen (--rm)"
-
-msgid "Auto Update"
-msgstr "Automatische Aktualisierung"
-
-msgid "Auto-Update"
-msgstr "Auto-Update"
-
-msgid "Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt."
-msgstr "Netzwerkschnittstelle, Bridge und Firewall-Zone in OpenWrt automatisch konfigurieren. Dringend empfohlen für korrektes Container-Networking unter OpenWrt."
-
-msgid "Automatically start the container after it is created"
-msgstr "Container nach der Erstellung automatisch starten"
-
-msgid "Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry"
-msgstr "Container automatisch aktualisieren, wenn ein neueres Image verfügbar ist. Fügt Label hinzu: io.containers.autoupdate=registry"
-
-msgid "Basic Information"
-msgstr "Basisinformationen"
-
-msgid "Block I/O"
-msgstr "Block-I/O"
-
-msgid "Boot"
-msgstr "Systemstart"
-
-msgid "Bridge Interface Name"
-msgstr "Schnittstellenname der Bridge"
-
-msgid "CPU"
-msgstr "CPU"
-
-msgid "CPU Limit"
-msgstr "CPU-Limit"
-
-msgid "CPU Set"
-msgstr "CPU-Set"
-
-msgid "CPU Shares Weight"
-msgstr "CPU-Shares Gewichtung"
-
-msgid "CPU Usage"
-msgstr "CPU-Auslastung"
-
-msgid "CPU shares (relative weight). 0 = use default."
-msgstr "CPU-Anteile (relatives Gewicht). 0 = Standard."
-
-msgid "CPUs the pod is allowed to run on (e.g., \"0-3\" or \"0,2\")"
-msgstr "CPUs, auf denen der Pod laufen darf (z. B. \"0-3\" oder \"0,2\")"
-
-msgid "Cancel"
-msgstr "Abbrechen"
-
-msgid "Check"
-msgstr "Prüfen"
-
-msgid "Check %d containers for updates?"
-msgstr "%d Container auf Updates prüfen?"
-
-msgid "Check Complete"
-msgstr "Prüfung abgeschlossen"
-
-msgid "Check for Updates"
-msgstr "Auf Updates prüfen"
-
-msgid "Check for updates: %s/%s"
-msgstr "Auf Updates prüfen: %s/%s"
-
-msgid "Choose firewall zone for this network."
-msgstr "Firewall-Zone für dieses Netzwerk wählen."
-
-msgid "Clean Up Now"
-msgstr "Jetzt bereinigen"
-
-msgid "Cleaning up old images..."
-msgstr "Alte Images werden bereinigt..."
-
-msgid "Cleanup / Prune"
-msgstr "Bereinigen / Prune"
-
-msgid "Cleanup Complete"
-msgstr "Bereinigung abgeschlossen"
-
-msgid "Cleanup Unused Resources"
-msgstr "Nicht verwendete Ressourcen bereinigen"
-
-msgid "Cleanup successful!"
-msgstr "Bereinigung erfolgreich!"
-
-msgid "Clear logs"
-msgstr "Protokolle leeren"
-
-msgid "Click icon to repair"
-msgstr "Symbol anklicken zum Reparieren"
-
-msgid "Click to disconnect"
-msgstr "Klicken zum Trennen"
-
-msgid "Click to enable/disable"
-msgstr "Klicken zum Aktivieren/Deaktivieren"
-
-msgid "Click to reveal/hide value"
-msgstr "Klicken zum Ein-/Ausblenden des Wertes"
-
-msgid "Close"
-msgstr "Schließen"
-
-msgid "Comma-separated list of supplementary group IDs"
-msgstr "Kommagetrennte Liste zusätzlicher Gruppen-IDs"
-
-msgid "Comma-separated ports to expose (e.g., 6052, 8080/udp)"
-msgstr "Durch Komma getrennte freizugebende Ports (z.B. 6052, 8080/udp)"
-
-msgid "Command"
-msgstr "Befehl"
-
-msgid "Command to run (space-separated)"
-msgstr "Auszuführender Befehl (leerzeichengetrennt)"
-
-msgid "Configuration"
-msgstr "Konfiguration"
-
-msgid "Configure resource limits for this container."
-msgstr "Ressourcenlimits für diesen Container konfigurieren."
-
-msgid "Confirm"
-msgstr "Bestätigen"
-
-msgid "Connect"
-msgstr "Verbinden"
-
-msgid "Connect to"
-msgstr "Verbinden mit"
-
-msgid "Connected successfully to %s"
-msgstr "Erfolgreich mit %s verbunden"
-
-msgid "Connecting container to network"
-msgstr "Container mit Netzwerk verbinden"
-
-msgid "Console"
-msgstr "Konsole"
-
-msgid "Container"
-msgstr "Container"
-
-msgid "Container Name"
-msgstr "Container-Name"
-
-msgid "Container image has no tag - cannot update"
-msgstr "Container-Image hat kein Tag – Aktualisierung nicht möglich"
-
-msgid "Container image to use"
-msgstr "Zu verwendendes Container-Image"
-
-msgid "Container is not running"
-msgstr "Container läuft nicht"
-
-msgid "Container updated successfully"
-msgstr "Container erfolgreich aktualisiert"
-
-msgid "Containers"
-msgstr "Container"
-
-msgid "Containers in pod %s"
-msgstr "Container im Pod %s"
-
-msgid "Containers updated successfully"
-msgstr "Container erfolgreich aktualisiert"
-
-msgid "Containers updated successfully."
-msgstr "Container erfolgreich aktualisiert."
-
-msgid "Create"
-msgstr "Erstellen"
-
-msgid "Create %s"
-msgstr "%s erstellen"
-
-msgid "Create Command"
-msgstr "Erstellungsbefehl"
-
-msgid "Create Infra Container"
-msgstr "Infra-Container erstellen"
-
-msgid "Create new zone (will be named: podman_)"
-msgstr "Neue Zone erstellen (Name: podman_)"
-
-msgid "Created"
-msgstr "Erstellt"
-
-msgid "Creating %s"
-msgstr "Erstelle %s"
-
-msgid "Creating auto-start configuration for %s"
-msgstr "Erstelle Autostart-Konfiguration für %s"
-
-msgid "DNS Search Domains"
-msgstr "DNS-Suchdomänen"
-
-msgid "DNS Servers"
-msgstr "DNS-Server"
-
-msgid "DNS search domains for the infra container"
-msgstr "DNS-Suchdomänen für den Infra-Container"
-
-msgid "DNS servers for the infra container (shared with all pod containers)"
-msgstr "DNS-Server für den Infra-Container (gemeinsam für alle Container im Pod)"
-
-msgid "Delete"
-msgstr "Löschen"
-
-msgid "Deleting records: %d/%d"
-msgstr "Einträge werden gelöscht: %d/%d"
-
-msgid "Deleting records: %s/%s"
-msgstr "Einträge werden gelöscht: %s/%s"
-
-msgid "Destination"
-msgstr "Ziel"
-
-msgid "Device"
-msgstr "Gerät"
-
-msgid "Disabled"
-msgstr "Deaktiviert"
-
-msgid "Disabling init script"
-msgstr "Init-Skript wird deaktiviert"
-
-msgid "Disconnect container from network"
-msgstr "Container vom Netzwerk trennen"
-
-msgid "Disconnected from %s"
-msgstr "Von %s getrennt"
-
-msgid "Dnsmasq"
-msgstr "Dnsmasq"
-
-msgid "Driver"
-msgstr "Treiber"
-
-msgid "Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)"
-msgstr "Treiberspezifische Optionen (kommagetrennt, z. B. type=tmpfs,o=size=100m)"
-
-msgid "Enable IPv6"
-msgstr "IPv6 aktivieren"
-
-msgid "Enable IPv6 networking"
-msgstr "IPv6-Networking aktivieren"
-
-msgid "Enabling init script"
-msgstr "Init-Skript wird aktiviert"
-
-msgid "Enter secret data (password, token, key, etc.)"
-msgstr "Geheimnisdaten eingeben (Passwort, Token, Schlüssel etc.)"
-
-msgid "Entrypoint"
-msgstr "Entrypoint"
-
-msgid "Environment Variables"
-msgstr "Umgebungsvariablen"
-
-msgid "Ephemeral (--rm flag)"
-msgstr "Temporär (--rm Flag)"
-
-msgid "Error"
-msgstr "Fehler"
-
-msgid "Error: %s"
-msgstr "Fehler: %s"
-
-msgid "Existing physical interface to use as parent. Required for macvlan/ipvlan networks."
-msgstr "Bestehende physische Schnittstelle als Parent. Erforderlich für macvlan/ipvlan-Netzwerke."
-
-msgid "Expecting: %s"
-msgstr "Erwartet: %s"
-
-msgid "Export"
-msgstr "Exportieren"
-
-msgid "Exporting selected volumes: %d/%d"
-msgstr "Ausgewählte Volumes werden exportiert: %d/%d"
-
-msgid "Expose Ports"
-msgstr "Ports freigeben"
-
-msgid "Failed to create container"
-msgstr "Container konnte nicht erstellt werden"
-
-msgid "Fetching information..."
-msgstr "Informationen werden abgerufen..."
-
-msgid "Find updateable containers"
-msgstr "Aktualisierbare Container suchen"
-
-msgid "Firewall Zone"
-msgstr "Firewall-Zone"
-
-msgid "Gateway"
-msgstr "Gateway"
-
-msgid "Generate"
-msgstr "Generieren"
-
-msgid "Graph Root"
-msgstr "Graph-Root"
-
-msgid "Health"
-msgstr "Gesundheit"
-
-msgid "Hostname"
-msgstr "Hostname"
-
-msgid "Hostname for the pod (defaults to pod name)"
-msgstr "Hostname des Pods (Standard: Pod-Name)"
-
-msgid "ID"
-msgstr "ID"
-
-msgid "IP Address"
-msgstr "IP-Adresse"
-
-msgid "IP Range (CIDR)"
-msgstr "IP-Bereich (CIDR)"
-
-msgid "IPv4 Gateway"
-msgstr "IPv4-Gateway"
-
-msgid "IPv4 Subnet (CIDR)"
-msgstr "IPv4-Subnetz (CIDR)"
-
-msgid "IPv4 gateway address"
-msgstr "IPv4-Gateway-Adresse"
-
-msgid "IPv4 subnet in CIDR notation"
-msgstr "IPv4-Subnetz in CIDR-Notation"
-
-msgid "Image"
-msgstr "Image"
-
-msgid "Image ID"
-msgstr "Image-ID"
-
-msgid "Image is already up-to-date"
-msgstr "Image ist bereits aktuell"
-
-msgid "Image pulled successfully"
-msgstr "Image erfolgreich abgerufen"
-
-msgid "Images"
-msgstr "Images"
-
-msgid "Import"
-msgstr "Importieren"
-
-msgid "Import from archive: %s"
-msgstr "Aus Archiv importieren: %s"
-
-msgid "Importing volume..."
-msgstr "Importiere Volume..."
-
-msgid "Info"
-msgstr "Info"
-
-msgid "Information"
-msgstr "Informationen"
-
-msgid "Infra Image"
-msgstr "Infra-Image"
-
-msgid "Init Script"
-msgstr "Init-Skript"
-
-msgid "Inspect"
-msgstr "Inspizieren"
-
-msgid "Int"
-msgstr "Ganz"
-
-msgid "Interactive"
-msgstr "Interaktiv"
-
-msgid "Interface"
-msgstr "Schnittstelle"
-
-msgid "Internal Network"
-msgstr "Internes Netzwerk"
-
-msgid "Labels"
-msgstr "Labels"
-
-msgid "Labels in key=value format, one per line"
-msgstr "Labels im Format Schlüssel=Wert, eines pro Zeile"
-
-msgid "Leave empty to auto-generate"
-msgstr "Leer lassen für automatische Generierung"
-
-msgid "Links"
-msgstr "Links"
-
-msgid "Linux namespaces shared between containers in the pod. Default matches `podman pod create`."
-msgstr "Linux-Namespaces, die von den Containern im Pod gemeinsam genutzt werden. Standard entspricht `podman pod create`."
-
-msgid "Load"
-msgstr "Laden"
-
-msgid "Load System diagnostics"
-msgstr "Systemdiagnose laden"
-
-msgid "Loading init script"
-msgstr "Init-Skript wird geladen"
-
-msgid "Loading..."
-msgstr "Lade..."
-
-msgid "Logs"
-msgstr "Logs"
-
-msgid "Manage podman %s"
-msgstr "Podman %s verwalten"
-
-msgid "Memory"
-msgstr "Arbeitsspeicher"
-
-msgid "Memory %"
-msgstr "Speicher %"
-
-msgid "Memory + Swap Limit"
-msgstr "Limit für Arbeitsspeicher + Swap"
-
-msgid "Memory Limit"
-msgstr "Speicherlimit"
-
-msgid "Memory Usage"
-msgstr "Speicherauslastung"
-
-msgid "Memory limit (e.g., 512m, 1g)"
-msgstr "Speicherlimit (z. B. 512m, 1g)"
-
-msgid "Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default."
-msgstr "Speicherlimit (z.B. 512m, 1g). -1 = unbegrenzt, 0 = Standard."
-
-msgid "Memory limit for the pod (e.g., 512m, 1g)"
-msgstr "Speicherlimit für den Pod (z. B. 512m, 1g)"
-
-msgid "Mode"
-msgstr "Modus"
-
-msgid "Mount Options"
-msgstr "Mount-Optionen"
-
-msgid "Mountpoint"
-msgstr "Mountpoint"
-
-msgid "Mounts"
-msgstr "Mounts"
-
-msgid "Must be between 0 and 262144"
-msgstr "Muss zwischen 0 und 262144 sein"
-
-msgid "Name"
-msgstr "Name"
-
-msgid "Name for the network"
-msgstr "Name für das Netzwerk"
-
-msgid "Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it."
-msgstr "Name der Bridge-Schnittstelle (z. B. podman0, mynet0). Leer lassen für: <Netzwerkname>0. Hinweis: Falls der generierte Name mit einer bestehenden Schnittstelle kollidiert, wird OpenWrt ihn automatisch hochzählen."
-
-msgid "Name updated successfully"
-msgstr "Name erfolgreich aktualisiert"
-
-msgid "Network"
-msgstr "Netzwerk"
-
-msgid "Network I/O"
-msgstr "Netzwerk-I/O"
-
-msgid "Network Mode"
-msgstr "Netzwerkmodus"
-
-msgid "Network Name"
-msgstr "Netzwerkname"
-
-msgid "Network driver"
-msgstr "Netzwerktreiber"
-
-msgid "Network namespace for the pod. Containers in the pod share this network."
-msgstr "Netzwerk-Namespace für den Pod. Container im Pod teilen sich dieses Netzwerk."
-
-msgid "Networks"
-msgstr "Netzwerke"
-
-msgid "Never"
-msgstr "Nie"
-
-msgid "No"
-msgstr "Nein"
-
-msgid "No %s selected"
-msgstr "Keine %s ausgewählt"
-
-msgid "No containers in this pod"
-msgstr "Keine Container in diesem Pod"
-
-msgid "No containers with auto-update label found."
-msgstr "Keine Container mit Auto-Update-Label gefunden."
-
-msgid "No new updates available."
-msgstr "Keine neuen Updates verfügbar."
-
-msgid "No suitable interfaces found"
-msgstr "Keine geeigneten Schnittstellen gefunden"
-
-msgid "No unused resources found"
-msgstr "Keine ungenutzten Ressourcen gefunden"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0)"
-msgstr "Anzahl der CPUs (z. B. 0.5, 1.0, 2.0)"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited."
-msgstr "Anzahl der CPUs (z. B. 0.5, 1.0, 2.0). Leer lassen für unbegrenzt."
-
-msgid "Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)"
-msgstr "Anzahl der CPUs für den Pod (z. B. 0.5, 1.0, 2.0)"
-
-msgid "Number of lines"
-msgstr "Anzahl der Zeilen"
-
-msgid "OK"
-msgstr "OK"
-
-msgid "Old image still used by other containers"
-msgstr "Altes Image wird noch von anderen Containern verwendet"
-
-msgid "On Failure"
-msgstr "Bei Fehler"
-
-msgid "One per line, format: host:container[/protocol]"
-msgstr "Einer pro Zeile, Format: Host:Container[/Protokoll]"
-
-msgid "One per line, format: key=value"
-msgstr "Einer pro Zeile, Format: Schlüssel=Wert"
-
-msgid "One per line. Format: source:destination[:options]. Options: ro, rw, Z, z"
-msgstr "Einer pro Zeile. Format: Quelle:Ziel[:Optionen]. Optionen: ro, rw, Z, z"
-
-msgid "OpenWrt integration exists\n\nClick to remove"
-msgstr "OpenWrt-Integration vorhanden\n\nKlicken zum Entfernen"
-
-msgid "OpenWrt integration incomplete"
-msgstr "OpenWrt-Integration unvollständig"
-
-msgid "OpenWrt integration requires subnet to be specified"
-msgstr "OpenWrt-Integration erfordert die Angabe eines Subnetzes"
-
-msgid "Override the image used for the infra container"
-msgstr "Image für den Infra-Container überschreiben"
-
-msgid "PIDs"
-msgstr "PIDs"
-
-msgid "Parent Interface"
-msgstr "Parent-Schnittstelle"
-
-msgid "Parent interface is required for macvlan/ipvlan networks"
-msgstr "Parent-Schnittstelle ist für macvlan/ipvlan-Netzwerke erforderlich"
-
-msgid "Part of a pod (\"%s\")"
-msgstr "Teil eines Pods (\"%s\")"
-
-msgid "Pausing pod"
-msgstr "Pod wird pausiert"
-
-msgid "Pod"
-msgstr "Pod"
-
-msgid "Pod Name"
-msgstr "Pod-Name"
-
-msgid "Podman Version"
-msgstr "Podman-Version"
-
-msgid "Pods"
-msgstr "Pods"
-
-msgid "Port Mappings"
-msgstr "Port-Mappings"
-
-msgid "Ports"
-msgstr "Ports"
-
-msgid "Privileged"
-msgstr "Privilegiert"
-
-msgid "Privileged Mode"
-msgstr "Privilegierter Modus"
-
-msgid "Processes"
-msgstr "Prozesse"
-
-msgid "Pull Image"
-msgstr "Image abrufen"
-
-msgid "Pull did not return an image ID - pull may have failed"
-msgstr "Pull hat keine Image-ID zurückgegeben – Pull möglicherweise fehlgeschlagen"
-
-msgid "Pulling %s"
-msgstr "%s wird abgerufen"
-
-msgid "Read: %s / Write: %s"
-msgstr "Gelesen: %s / Geschrieben: %s"
-
-msgid "Refreshing %s..."
-msgstr "Aktualisiere %s..."
-
-msgid "Registries"
-msgstr "Registries"
-
-msgid "Registry"
-msgstr "Registry"
-
-msgid "Reload"
-msgstr "Neu laden"
-
-msgid "Remove OpenWrt integration"
-msgstr "OpenWrt-Integration entfernen"
-
-msgid "Remove all unused images (not just dangling)"
-msgstr "Alle ungenutzten Images entfernen (nicht nur verwaiste)"
-
-msgid "Remove container"
-msgstr "Container entfernen"
-
-msgid "Remove unused volumes"
-msgstr "Ungenutzte Volumes entfernen"
-
-msgid "Removed: %s"
-msgstr "Entfernt: %s"
-
-msgid "Removing unused resources, please wait..."
-msgstr "Ungenutzte Ressourcen werden entfernt, bitte warten..."
-
-msgid "Repository"
-msgstr "Repository"
-
-msgid "Required for shared network namespace. Disable only if you know you do not need it."
-msgstr "Erforderlich für gemeinsamen Netzwerk-Namespace. Nur deaktivieren, wenn nicht benötigt."
-
-msgid "Resources"
-msgstr "Ressourcen"
-
-msgid "Restart Policy"
-msgstr "Restart-Policy"
-
-msgid "Restart container"
-msgstr "Container neu starten"
-
-msgid "Restart policy updated successfully"
-msgstr "Restart-Policy erfolgreich aktualisiert"
-
-msgid "Restarting pod"
-msgstr "Pod wird neu gestartet"
-
-msgid "Restrict external access to the network"
-msgstr "Externen Zugriff auf das Netzwerk einschränken"
-
-msgid "Run Root"
-msgstr "Run-Root"
-
-msgid "Saving resource"
-msgstr "Ressource wird gespeichert"
-
-msgid "Secret"
-msgstr "Geheimnis (Secret)"
-
-msgid "Secret Data"
-msgstr "Geheimnisdaten"
-
-msgid "Secret Name"
-msgstr "Geheimnis-Name"
-
-msgid "Secret name can only contain letters, numbers, underscores, and hyphens"
-msgstr "Name des Geheimnisses darf nur Buchstaben, Zahlen, Unterstriche und Bindestriche enthalten"
-
-msgid "Secrets"
-msgstr "Geheimnisse"
-
-msgid "Security Notice:"
-msgstr "Sicherheitshinweis:"
-
-msgid "Select containers to update"
-msgstr "Container zum Aktualisieren auswählen"
-
-msgid "Select network for the new container. User-created networks provide better isolation and DNS resolution between containers."
-msgstr "Netzwerk für den neuen Container auswählen. Benutzerdefinierte Netzwerke bieten bessere Isolation und DNS-Auflösung zwischen Containern."
-
-msgid "Select what to clean up:"
-msgstr "Wählen Sie aus, was bereinigt werden soll:"
-
-msgid "Sensitive data is hidden for security reasons."
-msgstr "Sensible Daten sind aus Sicherheitsgründen ausgeblendet."
-
-msgid "Setup OpenWrt Integration"
-msgstr "OpenWrt-Integration einrichten"
-
-msgid "Shared Namespaces"
-msgstr "Gemeinsame Namespaces"
-
-msgid "Shares network with another container"
-msgstr "Teilt Netzwerk mit einem anderen Container"
-
-msgid "Show"
-msgstr "Anzeigen"
-
-msgid "Since"
-msgstr "Seit"
-
-msgid "Size"
-msgstr "Größe"
-
-msgid "Socket Path"
-msgstr "Socket-Pfad"
-
-msgid "Source"
-msgstr "Quelle"
-
-msgid "Space freed: %s"
-msgstr "Freigewordener Platz: %s"
-
-msgid "Start after creation"
-msgstr "Nach Erstellung starten"
-
-msgid "Start container"
-msgstr "Container starten"
-
-msgid "Start on boot"
-msgstr "Beim Systemstart starten"
-
-msgid "Start script disabled"
-msgstr "Startskript deaktiviert"
-
-msgid "Start script missing\n\nClick to generate"
-msgstr "Startskript fehlt\n\nKlicken zum Generieren"
-
-msgid "Start stream"
-msgstr "Stream starten"
-
-msgid "Started"
-msgstr "Gestartet"
-
-msgid "Started At"
-msgstr "Gestartet um"
-
-msgid "Starting pod"
-msgstr "Pod wird gestartet"
-
-msgid "Statistics"
-msgstr "Statistiken"
-
-msgid "Stats"
-msgstr "Stats"
-
-msgid "Status"
-msgstr "Status"
-
-msgid "Stop container"
-msgstr "Container stoppen"
-
-msgid "Stop stream"
-msgstr "Stream stoppen"
-
-msgid "Stopping pod"
-msgstr "Pod wird gestoppt"
-
-msgid "Subnet"
-msgstr "Subnetz"
-
-msgid "Supplementary Groups"
-msgstr "Zusätzliche Gruppen"
-
-msgid "System Diagnostics"
-msgstr "Systemdiagnose"
-
-msgid "TTY"
-msgstr "TTY"
-
-msgid "Tag"
-msgstr "Tag"
-
-msgid "The sensitive data to store securely"
-msgstr "Die sensiblen Daten, die sicher gespeichert werden sollen"
-
-msgid "To enable auto-update for a container, add the label: io.containers.autoupdate=registry"
-msgstr "Für automatische Aktualisierung das Label hinzufügen: io.containers.autoupdate=registry"
-
-msgid "Total"
-msgstr "Gesamt"
-
-msgid "Total memory limit (memory + swap). -1 = unlimited, 0 = use default."
-msgstr "Gesamtspeicherlimit (Speicher + Swap). -1 = unbegrenzt, 0 = Standard."
-
-msgid "Type"
-msgstr "Typ"
-
-msgid "Unknown"
-msgstr "Unbekannt"
-
-msgid "Unless Stopped"
-msgstr "Sofern nicht gestoppt"
-
-msgid "Until"
-msgstr "Bis"
-
-msgid "Update"
-msgstr "Aktualisieren"
-
-msgid "Update Resources"
-msgstr "Ressourcen aktualisieren"
-
-msgid "Update name"
-msgstr "Name aktualisieren"
-
-msgid "Update restart policy"
-msgstr "Neustart-Richtlinie aktualisieren"
-
-msgid "Updating Images"
-msgstr "Images werden aktualisiert"
-
-msgid "Updating container"
-msgstr "Container wird aktualisiert"
-
-msgid "Upload failed: %s"
-msgstr "Upload fehlgeschlagen: %s"
-
-msgid "Uploading file..."
-msgstr "Datei wird hochgeladen..."
-
-msgid "User"
-msgstr "Benutzer"
-
-msgid "User and group to run as (UID:GID)"
-msgstr "Benutzer und Gruppe (UID:GID)"
-
-msgid "Value"
-msgstr "Wert"
-
-msgid "Variable"
-msgstr "Variable"
-
-msgid "Volume"
-msgstr "Volume"
-
-msgid "Volume Name"
-msgstr "Volume-Name"
-
-msgid "Volume driver to use"
-msgstr "Zu verwendender Volume-Treiber"
-
-msgid "Volume imported successfully"
-msgstr "Volume erfolgreich importiert"
-
-msgid "Volume name. Leave empty to auto-generate."
-msgstr "Volume-Name. Leer lassen für automatische Generierung."
-
-msgid "Volumes"
-msgstr "Volumes"
-
-msgid "Working Directory"
-msgstr "Arbeitsverzeichnis"
-
-msgid "Yes"
-msgstr "Ja"
-
-msgid "default"
-msgstr "Standard"
-
-msgid "non-empty value"
-msgstr "nicht leerer Wert"
-
-msgid "running"
-msgstr "läuft"
-
-msgid "total"
-msgstr "gesamt"
-
-msgid "Are you sure to remove pod?"
-msgstr "Pod wirklich entfernen?"
-
-msgid "Cgroup parent"
-msgstr "Cgroup-Parent"
-
-msgid "CID"
-msgstr "CID"
-
-msgid "CPU %"
-msgstr "CPU-%"
-
-msgid "CPU period"
-msgstr "CPU-Periode"
-
-msgid "CPU quota"
-msgstr "CPU-Quote"
-
-msgid "CPU set"
-msgstr "CPU-Set"
-
-msgid "CPU shares"
-msgstr "CPU-Shares"
-
-msgid "DNS options"
-msgstr "DNS-Optionen"
-
-msgid "DNS search"
-msgstr "DNS-Suche"
-
-msgid "DNS servers"
-msgstr "DNS-Server"
-
-msgid "Exit policy"
-msgstr "Exit-Policy"
-
-msgid "Extra hosts"
-msgstr "Zusätzliche Hosts"
-
-msgid "Host network"
-msgstr "Host-Netzwerk"
-
-msgid "Infra container"
-msgstr "Infra-Container"
-
-msgid "Memory limit"
-msgstr "Speicherlimit"
-
-msgid "Net I/O"
-msgstr "Netzwerk-I/O"
-
-msgid "Pause pod"
-msgstr "Pod pausieren"
-
-msgid "Pod is not running"
-msgstr "Pod läuft nicht"
-
-msgid "Remove pod"
-msgstr "Pod entfernen"
-
-msgid "Restart policy"
-msgstr "Restart-Policy"
-
-msgid "Restart pod"
-msgstr "Pod neustarten"
-
-msgid "Shared namespaces"
-msgstr "Gemeinsame Namespaces"
-
-msgid "Start pod"
-msgstr "Pod starten"
-
-msgid "Static IPv4"
-msgstr "Statische IPv4"
-
-msgid "Static MAC"
-msgstr "Statische MAC"
-
-msgid "Stop pod"
-msgstr "Pod stoppen"
-
-msgid "Unlimited"
-msgstr "Unbegrenzt"
-
-msgid "Unpause pod"
-msgstr "Pod fortsetzen"
-
-msgid "Stopping container"
-msgstr "Container wird gestoppt"
-
-msgid "Stop failed: %s"
-msgstr "Stoppen fehlgeschlagen: %s"
-
-msgid "Removing container"
-msgstr "Container wird entfernt"
-
-msgid "Remove failed: %s"
-msgstr "Entfernen fehlgeschlagen: %s"
-
-msgid "Creating container"
-msgstr "Container wird erstellt"
-
-msgid "Create failed: %s"
-msgstr "Erstellen fehlgeschlagen: %s"
-
-msgid "Starting container"
-msgstr "Container wird gestartet"
-
-msgid "Start failed: %s"
-msgstr "Start fehlgeschlagen: %s"
-
-msgid "Reinstating init script"
-msgstr "Init-Skript wird wiederhergestellt"
-
-msgid "Init script reinstate failed: %s"
-msgstr "Wiederherstellen des Init-Skripts fehlgeschlagen: %s"
-
-msgid "Updated to %s"
-msgstr "Auf %s aktualisiert"
-
-msgid "Update image: %d/%d - %s"
-msgstr "Image aktualisieren: %d/%d - %s"
-
-msgid "Removed old image %s"
-msgstr "Altes Image %s entfernt"
-
-msgid "Done."
-msgstr "Fertig."
-
-msgid "Pause container"
-msgstr "Container pausieren"
-
-msgid "Unpause container"
-msgstr "Container fortsetzen"
diff --git a/luci-app-podman/po/es/podman.po b/luci-app-podman/po/es/podman.po
deleted file mode 100644
index 129901400..000000000
--- a/luci-app-podman/po/es/podman.po
+++ /dev/null
@@ -1,1090 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: luci-app-podman\n"
-"PO-Revision-Date: 2026-05-03 11:05+0000\n"
-"Last-Translator:\n"
-"Language-Team: Dutch \n"
-"Language: es\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid "%d check(s) failed:"
-msgstr "%d comprobación(es) fallida(s):"
-
-msgid "%d updated, %d failed:"
-msgstr "%d actualizados, %d fallidos:"
-
-msgid "%s created successfully"
-msgstr "%s creado correctamente"
-
-msgid "%s: %d/%d"
-msgstr "%s: %d/%d"
-
-msgid "(none)"
-msgstr "(ninguno)"
-
-msgid "-- Select %s --"
-msgstr "-- Seleccionar %s --"
-
-msgid "1-253 characters: letters, numbers, underscore (_), hyphen (-) only"
-msgstr "1-253 caracteres: solo letras, números, guion bajo (_) y guion (-)"
-
-msgid "512m, 1g, or -1 for unlimited"
-msgstr "512m, 1g o -1 para ilimitado"
-
-msgid "API Version"
-msgstr "Versión de la API"
-
-msgid "Add the container to an existing pod. Network, hostname and port mappings come from the pod's infra container."
-msgstr "Añadir el contenedor a un pod existente. La red, el nombre de host y los mapeos de puertos provienen del contenedor infra del pod."
-
-msgid "All images updated successfully"
-msgstr "Todas las imágenes actualizadas correctamente"
-
-msgid "All volumes exported successfully"
-msgstr "Todos los volúmenes se exportaron correctamente"
-
-msgid "Allocate TTY (-t)"
-msgstr "Asignar TTY (-t)"
-
-msgid "Allocate container IP from this range"
-msgstr "Asignar IP del contenedor desde este rango"
-
-msgid "Always"
-msgstr "Siempre"
-
-msgid "Apply Updates"
-msgstr "Aplicar actualizaciones"
-
-msgid "Are you sure to delete the records?"
-msgstr "¿Eliminar los registros?"
-
-msgid "Are you sure to remove container?"
-msgstr "¿Eliminar el contenedor?"
-
-msgid "Are you sure to remove integration?"
-msgstr "¿Eliminar la integración?"
-
-msgid "Auto Remove (--rm)"
-msgstr "Eliminación automática (--rm)"
-
-msgid "Auto Update"
-msgstr "Actualización automática"
-
-msgid "Auto-Update"
-msgstr "Actualización automática"
-
-msgid "Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt."
-msgstr "Configura automáticamente la interfaz de red, el puente y la zona de firewall de OpenWrt. Muy recomendado para una red de contenedores adecuada en OpenWrt."
-
-msgid "Automatically start the container after it is created"
-msgstr "Iniciar automáticamente el contenedor después de crearlo"
-
-msgid "Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry"
-msgstr "Actualizar automáticamente el contenedor cuando haya una imagen más reciente. Añade la etiqueta: io.containers.autoupdate=registry"
-
-msgid "Basic Information"
-msgstr "Información básica"
-
-msgid "Block I/O"
-msgstr "E/S de bloque"
-
-msgid "Boot"
-msgstr "Arranque"
-
-msgid "Bridge Interface Name"
-msgstr "Nombre de la interfaz puente"
-
-msgid "CPU"
-msgstr "CPU"
-
-msgid "CPU Limit"
-msgstr "Límite de CPU"
-
-msgid "CPU Set"
-msgstr "Conjunto de CPU"
-
-msgid "CPU Shares Weight"
-msgstr "Peso de CPU shares"
-
-msgid "CPU Usage"
-msgstr "Uso de CPU"
-
-msgid "CPU shares (relative weight). 0 = use default."
-msgstr "Cuotas de CPU (peso relativo). 0 = usar predeterminado."
-
-msgid "CPUs the pod is allowed to run on (e.g., \"0-3\" or \"0,2\")"
-msgstr "CPUs en las que el pod puede ejecutarse (p. ej., \"0-3\" o \"0,2\")"
-
-msgid "Cancel"
-msgstr "Cancelar"
-
-msgid "Check"
-msgstr "Comprobar"
-
-msgid "Check %d containers for updates?"
-msgstr "¿Comprobar actualizaciones de %d contenedores?"
-
-msgid "Check Complete"
-msgstr "Comprobación completa"
-
-msgid "Check for Updates"
-msgstr "Buscar actualizaciones"
-
-msgid "Check for updates: %s/%s"
-msgstr "Buscando actualizaciones: %s/%s"
-
-msgid "Choose firewall zone for this network."
-msgstr "Elegir zona de firewall para esta red."
-
-msgid "Clean Up Now"
-msgstr "Limpiar ahora"
-
-msgid "Cleaning up old images..."
-msgstr "Eliminando imágenes antiguas..."
-
-msgid "Cleanup / Prune"
-msgstr "Limpiar / Purgar"
-
-msgid "Cleanup Complete"
-msgstr "Limpieza completada"
-
-msgid "Cleanup Unused Resources"
-msgstr "Limpiar recursos no utilizados"
-
-msgid "Cleanup successful!"
-msgstr "¡Limpieza exitosa!"
-
-msgid "Clear logs"
-msgstr "Borrar registros"
-
-msgid "Click icon to repair"
-msgstr "Haz clic en el icono para reparar"
-
-msgid "Click to disconnect"
-msgstr "Clic para desconectar"
-
-msgid "Click to enable/disable"
-msgstr "Clic para habilitar/deshabilitar"
-
-msgid "Click to reveal/hide value"
-msgstr "Haga clic para mostrar/ocultar el valor"
-
-msgid "Close"
-msgstr "Cerrar"
-
-msgid "Comma-separated list of supplementary group IDs"
-msgstr "Lista de IDs de grupos suplementarios separados por coma"
-
-msgid "Comma-separated ports to expose (e.g., 6052, 8080/udp)"
-msgstr "Puertos a exponer separados por coma (ej. 6052, 8080/udp)"
-
-msgid "Command"
-msgstr "Comando"
-
-msgid "Command to run (space-separated)"
-msgstr "Comando a ejecutar (separado por espacios)"
-
-msgid "Configuration"
-msgstr "Configuración"
-
-msgid "Configure resource limits for this container."
-msgstr "Configurar límites de recursos para este contenedor."
-
-msgid "Confirm"
-msgstr "Confirmar"
-
-msgid "Connect"
-msgstr "Conectar"
-
-msgid "Connect to"
-msgstr "Conectar a"
-
-msgid "Connected successfully to %s"
-msgstr "Conectado correctamente a %s"
-
-msgid "Connecting container to network"
-msgstr "Conectando contenedor a la red"
-
-msgid "Console"
-msgstr "Consola"
-
-msgid "Container"
-msgstr "Contenedor"
-
-msgid "Container Name"
-msgstr "Nombre del contenedor"
-
-msgid "Container image has no tag - cannot update"
-msgstr "La imagen del contenedor no tiene etiqueta - no se puede actualizar"
-
-msgid "Container image to use"
-msgstr "Imagen de contenedor a usar"
-
-msgid "Container is not running"
-msgstr "El contenedor no está en ejecución"
-
-msgid "Container updated successfully"
-msgstr "Contenedor actualizado correctamente"
-
-msgid "Containers"
-msgstr "Contenedores"
-
-msgid "Containers in pod %s"
-msgstr "Contenedores en el pod %s"
-
-msgid "Containers updated successfully"
-msgstr "Contenedores actualizados correctamente"
-
-msgid "Containers updated successfully."
-msgstr "Contenedores actualizados correctamente."
-
-msgid "Create"
-msgstr "Crear"
-
-msgid "Create %s"
-msgstr "Crear %s"
-
-msgid "Create Command"
-msgstr "Comando de creación"
-
-msgid "Create Infra Container"
-msgstr "Crear contenedor infra"
-
-msgid "Create new zone (will be named: podman_)"
-msgstr "Crear nueva zona (se llamará: podman_)"
-
-msgid "Created"
-msgstr "Creado"
-
-msgid "Creating %s"
-msgstr "Creando %s"
-
-msgid "Creating auto-start configuration for %s"
-msgstr "Creando configuración de inicio automático para %s"
-
-msgid "DNS Search Domains"
-msgstr "Dominios de búsqueda DNS"
-
-msgid "DNS Servers"
-msgstr "Servidores DNS"
-
-msgid "DNS search domains for the infra container"
-msgstr "Dominios de búsqueda DNS para el contenedor infra"
-
-msgid "DNS servers for the infra container (shared with all pod containers)"
-msgstr "Servidores DNS para el contenedor infra (compartidos con todos los contenedores del pod)"
-
-msgid "Delete"
-msgstr "Eliminar"
-
-msgid "Deleting records: %d/%d"
-msgstr "Eliminando registros: %d/%d"
-
-msgid "Deleting records: %s/%s"
-msgstr "Eliminando registros: %s/%s"
-
-msgid "Destination"
-msgstr "Destino"
-
-msgid "Device"
-msgstr "Dispositivo"
-
-msgid "Disabled"
-msgstr "Desactivado"
-
-msgid "Disabling init script"
-msgstr "Desactivando script de inicio"
-
-msgid "Disconnect container from network"
-msgstr "Desconectar contenedor de la red"
-
-msgid "Disconnected from %s"
-msgstr "Desconectado de %s"
-
-msgid "Dnsmasq"
-msgstr "Dnsmasq"
-
-msgid "Driver"
-msgstr "Controlador"
-
-msgid "Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)"
-msgstr "Opciones específicas del controlador (separadas por comas, ej. type=tmpfs,o=size=100m)"
-
-msgid "Enable IPv6"
-msgstr "Activar IPv6"
-
-msgid "Enable IPv6 networking"
-msgstr "Activar red IPv6"
-
-msgid "Enabling init script"
-msgstr "Activando script de inicio"
-
-msgid "Enter secret data (password, token, key, etc.)"
-msgstr "Introduzca datos secretos (contraseña, token, clave, etc.)"
-
-msgid "Entrypoint"
-msgstr "Punto de entrada (Entrypoint)"
-
-msgid "Environment Variables"
-msgstr "Variables de entorno"
-
-msgid "Ephemeral (--rm flag)"
-msgstr "Efímero (opción --rm)"
-
-msgid "Error"
-msgstr "Error"
-
-msgid "Error: %s"
-msgstr "Error: %s"
-
-msgid "Existing physical interface to use as parent. Required for macvlan/ipvlan networks."
-msgstr "Interfaz física existente para usar como padre. Requerido para redes macvlan/ipvlan."
-
-msgid "Expecting: %s"
-msgstr "Se espera: %s"
-
-msgid "Export"
-msgstr "Exportar"
-
-msgid "Exporting selected volumes: %d/%d"
-msgstr "Exportando volúmenes seleccionados: %d/%d"
-
-msgid "Expose Ports"
-msgstr "Exponer puertos"
-
-msgid "Failed to create container"
-msgstr "Error al crear el contenedor"
-
-msgid "Fetching information..."
-msgstr "Obteniendo información..."
-
-msgid "Find updateable containers"
-msgstr "Buscar contenedores actualizables"
-
-msgid "Firewall Zone"
-msgstr "Zona de firewall"
-
-msgid "Gateway"
-msgstr "Puerta de enlace"
-
-msgid "Generate"
-msgstr "Generar"
-
-msgid "Graph Root"
-msgstr "Raíz del gráfico (Graph Root)"
-
-msgid "Health"
-msgstr "Salud"
-
-msgid "Hostname"
-msgstr "Nombre de host"
-
-msgid "Hostname for the pod (defaults to pod name)"
-msgstr "Nombre de host del pod (por defecto, el nombre del pod)"
-
-msgid "ID"
-msgstr "ID"
-
-msgid "IP Address"
-msgstr "Dirección IP"
-
-msgid "IP Range (CIDR)"
-msgstr "Rango de IP (CIDR)"
-
-msgid "IPv4 Gateway"
-msgstr "Puerta de enlace IPv4"
-
-msgid "IPv4 Subnet (CIDR)"
-msgstr "Subred IPv4 (CIDR)"
-
-msgid "IPv4 gateway address"
-msgstr "Dirección de puerta de enlace IPv4"
-
-msgid "IPv4 subnet in CIDR notation"
-msgstr "Subred IPv4 en notación CIDR"
-
-msgid "Image"
-msgstr "Imagen"
-
-msgid "Image ID"
-msgstr "ID de imagen"
-
-msgid "Image is already up-to-date"
-msgstr "La imagen ya está actualizada"
-
-msgid "Image pulled successfully"
-msgstr "Imagen descargada correctamente"
-
-msgid "Images"
-msgstr "Imágenes"
-
-msgid "Import"
-msgstr "Importar"
-
-msgid "Import from archive: %s"
-msgstr "Importar desde archivo: %s"
-
-msgid "Importing volume..."
-msgstr "Importando volumen..."
-
-msgid "Info"
-msgstr "Info"
-
-msgid "Information"
-msgstr "Información"
-
-msgid "Infra Image"
-msgstr "Imagen infra"
-
-msgid "Init Script"
-msgstr "Script de inicio"
-
-msgid "Inspect"
-msgstr "Inspeccionar"
-
-msgid "Int"
-msgstr "Ent"
-
-msgid "Interactive"
-msgstr "Interactivo"
-
-msgid "Interface"
-msgstr "Interfaz"
-
-msgid "Internal Network"
-msgstr "Red interna"
-
-msgid "Labels"
-msgstr "Etiquetas"
-
-msgid "Labels in key=value format, one per line"
-msgstr "Etiquetas en formato clave=valor, una por línea"
-
-msgid "Leave empty to auto-generate"
-msgstr "Dejar vacío para generar automáticamente"
-
-msgid "Links"
-msgstr "Enlaces"
-
-msgid "Linux namespaces shared between containers in the pod. Default matches `podman pod create`."
-msgstr "Namespaces de Linux compartidos entre los contenedores del pod. El valor por defecto coincide con `podman pod create`."
-
-msgid "Load"
-msgstr "Cargar"
-
-msgid "Load System diagnostics"
-msgstr "Cargar diagnósticos del sistema"
-
-msgid "Loading init script"
-msgstr "Cargando script de inicio"
-
-msgid "Loading..."
-msgstr "Cargando..."
-
-msgid "Logs"
-msgstr "Registros"
-
-msgid "Manage podman %s"
-msgstr "Gestionar podman %s"
-
-msgid "Memory"
-msgstr "Memoria"
-
-msgid "Memory %"
-msgstr "Memoria %"
-
-msgid "Memory + Swap Limit"
-msgstr "Límite de memoria + intercambio"
-
-msgid "Memory Limit"
-msgstr "Límite de memoria"
-
-msgid "Memory Usage"
-msgstr "Uso de memoria"
-
-msgid "Memory limit (e.g., 512m, 1g)"
-msgstr "Límite de memoria (ej. 512m, 1g)"
-
-msgid "Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default."
-msgstr "Límite de memoria (ej. 512m, 1g). -1 = ilimitado, 0 = predeterminado."
-
-msgid "Memory limit for the pod (e.g., 512m, 1g)"
-msgstr "Límite de memoria para el pod (p. ej., 512m, 1g)"
-
-msgid "Mode"
-msgstr "Modo"
-
-msgid "Mount Options"
-msgstr "Opciones de montaje"
-
-msgid "Mountpoint"
-msgstr "Punto de montaje"
-
-msgid "Mounts"
-msgstr "Montajes"
-
-msgid "Must be between 0 and 262144"
-msgstr "Debe estar entre 0 y 262144"
-
-msgid "Name"
-msgstr "Nombre"
-
-msgid "Name for the network"
-msgstr "Nombre para la red"
-
-msgid "Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it."
-msgstr "Nombre de la interfaz puente (ej. podman0, mynet0). Dejar vacío para usar: <nombre-de-red>0. Nota: Si el nombre entra en conflicto con uno existente, OpenWrt lo incrementará."
-
-msgid "Name updated successfully"
-msgstr "Nombre actualizado correctamente"
-
-msgid "Network"
-msgstr "Red"
-
-msgid "Network I/O"
-msgstr "E/S de red"
-
-msgid "Network Mode"
-msgstr "Modo de red"
-
-msgid "Network Name"
-msgstr "Nombre de la red"
-
-msgid "Network driver"
-msgstr "Controlador de red"
-
-msgid "Network namespace for the pod. Containers in the pod share this network."
-msgstr "Namespace de red para el pod. Los contenedores del pod comparten esta red."
-
-msgid "Networks"
-msgstr "Redes"
-
-msgid "Never"
-msgstr "Nunca"
-
-msgid "No"
-msgstr "No"
-
-msgid "No %s selected"
-msgstr "No hay %s seleccionado"
-
-msgid "No containers in this pod"
-msgstr "No hay contenedores en este pod"
-
-msgid "No containers with auto-update label found."
-msgstr "No se encontraron contenedores con la etiqueta de actualización automática."
-
-msgid "No new updates available."
-msgstr "No hay nuevas actualizaciones disponibles."
-
-msgid "No suitable interfaces found"
-msgstr "No se encontraron interfaces adecuadas"
-
-msgid "No unused resources found"
-msgstr "No se encontraron recursos sin usar"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0)"
-msgstr "Número de CPUs (ej. 0.5, 1.0, 2.0)"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited."
-msgstr "Número de CPUs (ej. 0.5, 1.0, 2.0). Dejar vacío para ilimitado."
-
-msgid "Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)"
-msgstr "Número de CPUs disponibles para el pod (p. ej., 0.5, 1.0, 2.0)"
-
-msgid "Number of lines"
-msgstr "Número de líneas"
-
-msgid "OK"
-msgstr "Aceptar"
-
-msgid "Old image still used by other containers"
-msgstr "La imagen antigua aún la usan otros contenedores"
-
-msgid "On Failure"
-msgstr "En caso de fallo"
-
-msgid "One per line, format: host:container[/protocol]"
-msgstr "Uno por línea, formato: host:contenedor[/protocolo]"
-
-msgid "One per line, format: key=value"
-msgstr "Uno por línea, formato: clave=valor"
-
-msgid "One per line. Format: source:destination[:options]. Options: ro, rw, Z, z"
-msgstr "Uno por línea. Formato: origen:destino[:opciones]. Opciones: ro, rw, Z, z"
-
-msgid "OpenWrt integration exists\n\nClick to remove"
-msgstr "Integración OpenWrt existente\n\nClic para eliminar"
-
-msgid "OpenWrt integration incomplete"
-msgstr "Integración OpenWrt incompleta"
-
-msgid "OpenWrt integration requires subnet to be specified"
-msgstr "La integración de OpenWrt requiere especificar una subred"
-
-msgid "Override the image used for the infra container"
-msgstr "Sobrescribir la imagen utilizada para el contenedor infra"
-
-msgid "PIDs"
-msgstr "PIDs"
-
-msgid "Parent Interface"
-msgstr "Interfaz padre"
-
-msgid "Parent interface is required for macvlan/ipvlan networks"
-msgstr "La interfaz padre es obligatoria para redes macvlan/ipvlan"
-
-msgid "Part of a pod (\"%s\")"
-msgstr "Parte de un pod (\"%s\")"
-
-msgid "Pausing pod"
-msgstr "Pausando pod"
-
-msgid "Pod"
-msgstr "Pod"
-
-msgid "Pod Name"
-msgstr "Nombre del pod"
-
-msgid "Podman Version"
-msgstr "Versión de Podman"
-
-msgid "Pods"
-msgstr "Pods"
-
-msgid "Port Mappings"
-msgstr "Mapeo de puertos"
-
-msgid "Ports"
-msgstr "Puertos"
-
-msgid "Privileged"
-msgstr "Privilegiado"
-
-msgid "Privileged Mode"
-msgstr "Modo privilegiado"
-
-msgid "Processes"
-msgstr "Procesos"
-
-msgid "Pull Image"
-msgstr "Descargar imagen"
-
-msgid "Pull did not return an image ID - pull may have failed"
-msgstr "El pull no devolvió un ID de imagen - el pull puede haber fallado"
-
-msgid "Pulling %s"
-msgstr "Descargando %s"
-
-msgid "Read: %s / Write: %s"
-msgstr "Lectura: %s / Escritura: %s"
-
-msgid "Refreshing %s..."
-msgstr "Actualizando %s..."
-
-msgid "Registries"
-msgstr "Registros (Registries)"
-
-msgid "Registry"
-msgstr "Registro"
-
-msgid "Reload"
-msgstr "Recargar"
-
-msgid "Remove OpenWrt integration"
-msgstr "Eliminar integración OpenWrt"
-
-msgid "Remove all unused images (not just dangling)"
-msgstr "Eliminar todas las imágenes sin usar (no solo las huérfanas)"
-
-msgid "Remove container"
-msgstr "Eliminar contenedor"
-
-msgid "Remove unused volumes"
-msgstr "Eliminar volúmenes sin usar"
-
-msgid "Removed: %s"
-msgstr "Eliminado: %s"
-
-msgid "Removing unused resources, please wait..."
-msgstr "Eliminando recursos sin usar, espere..."
-
-msgid "Repository"
-msgstr "Repositorio"
-
-msgid "Required for shared network namespace. Disable only if you know you do not need it."
-msgstr "Requerido para el namespace de red compartido. Desactivar solo si está seguro de no necesitarlo."
-
-msgid "Resources"
-msgstr "Recursos"
-
-msgid "Restart Policy"
-msgstr "Política de reinicio"
-
-msgid "Restart container"
-msgstr "Reiniciar contenedor"
-
-msgid "Restart policy updated successfully"
-msgstr "Política de reinicio actualizada correctamente"
-
-msgid "Restarting pod"
-msgstr "Reiniciando pod"
-
-msgid "Restrict external access to the network"
-msgstr "Restringir el acceso externo a la red"
-
-msgid "Run Root"
-msgstr "Raíz de ejecución (Run Root)"
-
-msgid "Saving resource"
-msgstr "Guardando recurso"
-
-msgid "Secret"
-msgstr "Secreto (Secret)"
-
-msgid "Secret Data"
-msgstr "Datos secretos"
-
-msgid "Secret Name"
-msgstr "Nombre del secreto"
-
-msgid "Secret name can only contain letters, numbers, underscores, and hyphens"
-msgstr "El nombre del secreto solo puede contener letras, números, guiones bajos y guiones"
-
-msgid "Secrets"
-msgstr "Secretos"
-
-msgid "Security Notice:"
-msgstr "Aviso de seguridad:"
-
-msgid "Select containers to update"
-msgstr "Seleccionar contenedores para actualizar"
-
-msgid "Select network for the new container. User-created networks provide better isolation and DNS resolution between containers."
-msgstr "Seleccionar red para el nuevo contenedor. Las redes de usuario ofrecen mejor aislamiento y resolución DNS entre contenedores."
-
-msgid "Select what to clean up:"
-msgstr "Seleccione qué limpiar:"
-
-msgid "Sensitive data is hidden for security reasons."
-msgstr "Los datos sensibles están ocultos por razones de seguridad."
-
-msgid "Setup OpenWrt Integration"
-msgstr "Configurar integración de OpenWrt"
-
-msgid "Shared Namespaces"
-msgstr "Namespaces compartidos"
-
-msgid "Shares network with another container"
-msgstr "Comparte red con otro contenedor"
-
-msgid "Show"
-msgstr "Mostrar"
-
-msgid "Since"
-msgstr "Desde"
-
-msgid "Size"
-msgstr "Tamaño"
-
-msgid "Socket Path"
-msgstr "Ruta del socket"
-
-msgid "Source"
-msgstr "Origen"
-
-msgid "Space freed: %s"
-msgstr "Espacio liberado: %s"
-
-msgid "Start after creation"
-msgstr "Iniciar tras la creación"
-
-msgid "Start container"
-msgstr "Iniciar contenedor"
-
-msgid "Start on boot"
-msgstr "Iniciar al arrancar"
-
-msgid "Start script disabled"
-msgstr "Script de inicio desactivado"
-
-msgid "Start script missing\n\nClick to generate"
-msgstr "Script de inicio faltante\n\nHaga clic para generar"
-
-msgid "Start stream"
-msgstr "Iniciar transmisión"
-
-msgid "Started"
-msgstr "Iniciado"
-
-msgid "Started At"
-msgstr "Iniciado en"
-
-msgid "Starting pod"
-msgstr "Iniciando pod"
-
-msgid "Statistics"
-msgstr "Estadísticas"
-
-msgid "Stats"
-msgstr "Estadísticas"
-
-msgid "Status"
-msgstr "Estado"
-
-msgid "Stop container"
-msgstr "Detener contenedor"
-
-msgid "Stop stream"
-msgstr "Detener transmisión"
-
-msgid "Stopping pod"
-msgstr "Deteniendo pod"
-
-msgid "Subnet"
-msgstr "Subred"
-
-msgid "Supplementary Groups"
-msgstr "Grupos suplementarios"
-
-msgid "System Diagnostics"
-msgstr "Diagnósticos del sistema"
-
-msgid "TTY"
-msgstr "TTY"
-
-msgid "Tag"
-msgstr "Etiqueta"
-
-msgid "The sensitive data to store securely"
-msgstr "Los datos sensibles a almacenar de forma segura"
-
-msgid "To enable auto-update for a container, add the label: io.containers.autoupdate=registry"
-msgstr "Para habilitar la actualización automática, añadir la etiqueta: io.containers.autoupdate=registry"
-
-msgid "Total"
-msgstr "Total"
-
-msgid "Total memory limit (memory + swap). -1 = unlimited, 0 = use default."
-msgstr "Límite de memoria total (memoria + swap). -1 = ilimitado, 0 = predeterminado."
-
-msgid "Type"
-msgstr "Tipo"
-
-msgid "Unknown"
-msgstr "Desconocido"
-
-msgid "Unless Stopped"
-msgstr "A menos que se detenga (Unless Stopped)"
-
-msgid "Until"
-msgstr "Hasta"
-
-msgid "Update"
-msgstr "Actualizar"
-
-msgid "Update Resources"
-msgstr "Actualizar recursos"
-
-msgid "Update name"
-msgstr "Actualizar nombre"
-
-msgid "Update restart policy"
-msgstr "Actualizar política de reinicio"
-
-msgid "Updating Images"
-msgstr "Actualizando imágenes"
-
-msgid "Updating container"
-msgstr "Actualizando contenedor"
-
-msgid "Upload failed: %s"
-msgstr "Error al subir: %s"
-
-msgid "Uploading file..."
-msgstr "Subiendo archivo..."
-
-msgid "User"
-msgstr "Usuario"
-
-msgid "User and group to run as (UID:GID)"
-msgstr "Usuario y grupo (UID:GID)"
-
-msgid "Value"
-msgstr "Valor"
-
-msgid "Variable"
-msgstr "Variable"
-
-msgid "Volume"
-msgstr "Volumen"
-
-msgid "Volume Name"
-msgstr "Nombre del volumen"
-
-msgid "Volume driver to use"
-msgstr "Controlador de volumen a usar"
-
-msgid "Volume imported successfully"
-msgstr "Volumen importado correctamente"
-
-msgid "Volume name. Leave empty to auto-generate."
-msgstr "Nombre del volumen. Dejar vacío para generar automáticamente."
-
-msgid "Volumes"
-msgstr "Volúmenes"
-
-msgid "Working Directory"
-msgstr "Directorio de trabajo"
-
-msgid "Yes"
-msgstr "Sí"
-
-msgid "default"
-msgstr "predeterminado"
-
-msgid "non-empty value"
-msgstr "valor no vacío"
-
-msgid "running"
-msgstr "en ejecución"
-
-msgid "total"
-msgstr "total"
-
-msgid "Are you sure to remove pod?"
-msgstr "¿Está seguro de eliminar el pod?"
-
-msgid "Cgroup parent"
-msgstr "Cgroup padre"
-
-msgid "CID"
-msgstr "CID"
-
-msgid "CPU %"
-msgstr "CPU %"
-
-msgid "CPU period"
-msgstr "Período de CPU"
-
-msgid "CPU quota"
-msgstr "Cuota de CPU"
-
-msgid "CPU set"
-msgstr "Conjunto de CPU"
-
-msgid "CPU shares"
-msgstr "Shares de CPU"
-
-msgid "DNS options"
-msgstr "Opciones DNS"
-
-msgid "DNS search"
-msgstr "Búsqueda DNS"
-
-msgid "DNS servers"
-msgstr "Servidores DNS"
-
-msgid "Exit policy"
-msgstr "Política de salida"
-
-msgid "Extra hosts"
-msgstr "Hosts adicionales"
-
-msgid "Host network"
-msgstr "Red del host"
-
-msgid "Infra container"
-msgstr "Contenedor infra"
-
-msgid "Memory limit"
-msgstr "Límite de memoria"
-
-msgid "Net I/O"
-msgstr "I/O de red"
-
-msgid "Pause pod"
-msgstr "Pausar pod"
-
-msgid "Pod is not running"
-msgstr "El pod no está en ejecución"
-
-msgid "Remove pod"
-msgstr "Eliminar pod"
-
-msgid "Restart policy"
-msgstr "Política de reinicio"
-
-msgid "Restart pod"
-msgstr "Reiniciar pod"
-
-msgid "Shared namespaces"
-msgstr "Namespaces compartidos"
-
-msgid "Start pod"
-msgstr "Iniciar pod"
-
-msgid "Static IPv4"
-msgstr "IPv4 estática"
-
-msgid "Static MAC"
-msgstr "MAC estática"
-
-msgid "Stop pod"
-msgstr "Detener pod"
-
-msgid "Unlimited"
-msgstr "Ilimitado"
-
-msgid "Unpause pod"
-msgstr "Reanudar pod"
-
-msgid "Stopping container"
-msgstr "Deteniendo contenedor"
-
-msgid "Stop failed: %s"
-msgstr "Error al detener: %s"
-
-msgid "Removing container"
-msgstr "Eliminando contenedor"
-
-msgid "Remove failed: %s"
-msgstr "Error al eliminar: %s"
-
-msgid "Creating container"
-msgstr "Creando contenedor"
-
-msgid "Create failed: %s"
-msgstr "Error al crear: %s"
-
-msgid "Starting container"
-msgstr "Iniciando contenedor"
-
-msgid "Start failed: %s"
-msgstr "Error al iniciar: %s"
-
-msgid "Reinstating init script"
-msgstr "Restableciendo script de inicio"
-
-msgid "Init script reinstate failed: %s"
-msgstr "Error al restablecer el script de inicio: %s"
-
-msgid "Updated to %s"
-msgstr "Actualizado a %s"
-
-msgid "Update image: %d/%d - %s"
-msgstr "Actualizar imagen: %d/%d - %s"
-
-msgid "Removed old image %s"
-msgstr "Imagen antigua %s eliminada"
-
-msgid "Done."
-msgstr "Listo."
-
-msgid "Pause container"
-msgstr "Pausar contenedor"
-
-msgid "Unpause container"
-msgstr "Reanudar contenedor"
diff --git a/luci-app-podman/po/fr/podman.po b/luci-app-podman/po/fr/podman.po
deleted file mode 100644
index ca943674a..000000000
--- a/luci-app-podman/po/fr/podman.po
+++ /dev/null
@@ -1,1090 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: luci-app-podman\n"
-"PO-Revision-Date: 2026-05-03 11:05+0000\n"
-"Last-Translator:\n"
-"Language-Team: French \n"
-"Language: fr\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid "%d check(s) failed:"
-msgstr "%d vérification(s) échouée(s) :"
-
-msgid "%d updated, %d failed:"
-msgstr "%d mis à jour, %d échoué(s) :"
-
-msgid "%s created successfully"
-msgstr "%s créé avec succès"
-
-msgid "%s: %d/%d"
-msgstr "%s : %d/%d"
-
-msgid "(none)"
-msgstr "(aucun)"
-
-msgid "-- Select %s --"
-msgstr "-- Sélectionner %s --"
-
-msgid "1-253 characters: letters, numbers, underscore (_), hyphen (-) only"
-msgstr "1-253 caractères : lettres, chiffres, underscore (_) et trait d'union (-) uniquement"
-
-msgid "512m, 1g, or -1 for unlimited"
-msgstr "512m, 1g ou -1 pour illimité"
-
-msgid "API Version"
-msgstr "Version de l'API"
-
-msgid "Add the container to an existing pod. Network, hostname and port mappings come from the pod's infra container."
-msgstr "Ajouter le conteneur à un pod existant. Le réseau, le nom d'hôte et les mappages de ports proviennent du conteneur infra du pod."
-
-msgid "All images updated successfully"
-msgstr "Toutes les images mises à jour avec succès"
-
-msgid "All volumes exported successfully"
-msgstr "Tous les volumes ont été exportés avec succès"
-
-msgid "Allocate TTY (-t)"
-msgstr "Allouer un TTY (-t)"
-
-msgid "Allocate container IP from this range"
-msgstr "Allouer l'IP du conteneur à partir de cette plage"
-
-msgid "Always"
-msgstr "Toujours"
-
-msgid "Apply Updates"
-msgstr "Appliquer les mises à jour"
-
-msgid "Are you sure to delete the records?"
-msgstr "Supprimer les enregistrements ?"
-
-msgid "Are you sure to remove container?"
-msgstr "Supprimer le conteneur ?"
-
-msgid "Are you sure to remove integration?"
-msgstr "Supprimer l'intégration ?"
-
-msgid "Auto Remove (--rm)"
-msgstr "Suppression automatique (--rm)"
-
-msgid "Auto Update"
-msgstr "Mise à jour automatique"
-
-msgid "Auto-Update"
-msgstr "Mise à jour automatique"
-
-msgid "Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt."
-msgstr "Configurer automatiquement l'interface réseau, le pont et la zone de pare-feu OpenWrt. Fortement recommandé pour un réseau de conteneurs correct sur OpenWrt."
-
-msgid "Automatically start the container after it is created"
-msgstr "Démarrer automatiquement le conteneur après sa création"
-
-msgid "Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry"
-msgstr "Mettre à jour automatiquement le conteneur lorsqu'une image plus récente est disponible. Ajoute l'étiquette : io.containers.autoupdate=registry"
-
-msgid "Basic Information"
-msgstr "Informations de base"
-
-msgid "Block I/O"
-msgstr "E/S bloc"
-
-msgid "Boot"
-msgstr "Démarrage"
-
-msgid "Bridge Interface Name"
-msgstr "Nom de l'interface pont"
-
-msgid "CPU"
-msgstr "CPU"
-
-msgid "CPU Limit"
-msgstr "Limite CPU"
-
-msgid "CPU Set"
-msgstr "Ensemble CPU"
-
-msgid "CPU Shares Weight"
-msgstr "Poids des CPU shares"
-
-msgid "CPU Usage"
-msgstr "Utilisation CPU"
-
-msgid "CPU shares (relative weight). 0 = use default."
-msgstr "Parts CPU (poids relatif). 0 = valeur par défaut."
-
-msgid "CPUs the pod is allowed to run on (e.g., \"0-3\" or \"0,2\")"
-msgstr "CPUs sur lesquels le pod peut s'exécuter (p. ex., \"0-3\" ou \"0,2\")"
-
-msgid "Cancel"
-msgstr "Annuler"
-
-msgid "Check"
-msgstr "Vérifier"
-
-msgid "Check %d containers for updates?"
-msgstr "Vérifier les mises à jour de %d conteneurs ?"
-
-msgid "Check Complete"
-msgstr "Vérification terminée"
-
-msgid "Check for Updates"
-msgstr "Rechercher des mises à jour"
-
-msgid "Check for updates: %s/%s"
-msgstr "Vérification des mises à jour : %s/%s"
-
-msgid "Choose firewall zone for this network."
-msgstr "Choisir la zone de pare-feu pour ce réseau."
-
-msgid "Clean Up Now"
-msgstr "Nettoyer maintenant"
-
-msgid "Cleaning up old images..."
-msgstr "Nettoyage des anciennes images..."
-
-msgid "Cleanup / Prune"
-msgstr "Nettoyage / Prune"
-
-msgid "Cleanup Complete"
-msgstr "Nettoyage terminé"
-
-msgid "Cleanup Unused Resources"
-msgstr "Nettoyer les ressources inutilisées"
-
-msgid "Cleanup successful!"
-msgstr "Nettoyage réussi !"
-
-msgid "Clear logs"
-msgstr "Effacer les journaux"
-
-msgid "Click icon to repair"
-msgstr "Cliquer sur l'icône pour réparer"
-
-msgid "Click to disconnect"
-msgstr "Cliquer pour déconnecter"
-
-msgid "Click to enable/disable"
-msgstr "Cliquer pour activer/désactiver"
-
-msgid "Click to reveal/hide value"
-msgstr "Cliquer pour afficher/masquer la valeur"
-
-msgid "Close"
-msgstr "Fermer"
-
-msgid "Comma-separated list of supplementary group IDs"
-msgstr "Liste d'ID de groupes supplémentaires séparés par des virgules"
-
-msgid "Comma-separated ports to expose (e.g., 6052, 8080/udp)"
-msgstr "Ports à exposer séparés par des virgules (ex. 6052, 8080/udp)"
-
-msgid "Command"
-msgstr "Commande"
-
-msgid "Command to run (space-separated)"
-msgstr "Commande à exécuter (séparée par des espaces)"
-
-msgid "Configuration"
-msgstr "Configuration"
-
-msgid "Configure resource limits for this container."
-msgstr "Configurer les limites de ressources pour ce conteneur."
-
-msgid "Confirm"
-msgstr "Confirmer"
-
-msgid "Connect"
-msgstr "Connecter"
-
-msgid "Connect to"
-msgstr "Se connecter à"
-
-msgid "Connected successfully to %s"
-msgstr "Connecté avec succès à %s"
-
-msgid "Connecting container to network"
-msgstr "Connexion du conteneur au réseau"
-
-msgid "Console"
-msgstr "Console"
-
-msgid "Container"
-msgstr "Conteneur"
-
-msgid "Container Name"
-msgstr "Nom du conteneur"
-
-msgid "Container image has no tag - cannot update"
-msgstr "L'image du conteneur n'a pas de tag - impossible de mettre à jour"
-
-msgid "Container image to use"
-msgstr "Image de conteneur à utiliser"
-
-msgid "Container is not running"
-msgstr "Le conteneur n'est pas en cours d'exécution"
-
-msgid "Container updated successfully"
-msgstr "Conteneur mis à jour avec succès"
-
-msgid "Containers"
-msgstr "Conteneurs"
-
-msgid "Containers in pod %s"
-msgstr "Conteneurs dans le pod %s"
-
-msgid "Containers updated successfully"
-msgstr "Conteneurs mis à jour avec succès"
-
-msgid "Containers updated successfully."
-msgstr "Conteneurs mis à jour avec succès."
-
-msgid "Create"
-msgstr "Créer"
-
-msgid "Create %s"
-msgstr "Créer %s"
-
-msgid "Create Command"
-msgstr "Commande de création"
-
-msgid "Create Infra Container"
-msgstr "Créer le conteneur infra"
-
-msgid "Create new zone (will be named: podman_)"
-msgstr "Créer une nouvelle zone (sera nommée : podman_)"
-
-msgid "Created"
-msgstr "Créé"
-
-msgid "Creating %s"
-msgstr "Création de %s"
-
-msgid "Creating auto-start configuration for %s"
-msgstr "Création de la configuration de démarrage automatique pour %s"
-
-msgid "DNS Search Domains"
-msgstr "Domaines de recherche DNS"
-
-msgid "DNS Servers"
-msgstr "Serveurs DNS"
-
-msgid "DNS search domains for the infra container"
-msgstr "Domaines de recherche DNS pour le conteneur infra"
-
-msgid "DNS servers for the infra container (shared with all pod containers)"
-msgstr "Serveurs DNS pour le conteneur infra (partagés avec tous les conteneurs du pod)"
-
-msgid "Delete"
-msgstr "Supprimer"
-
-msgid "Deleting records: %d/%d"
-msgstr "Suppression des enregistrements : %d/%d"
-
-msgid "Deleting records: %s/%s"
-msgstr "Suppression des enregistrements : %s/%s"
-
-msgid "Destination"
-msgstr "Destination"
-
-msgid "Device"
-msgstr "Périphérique"
-
-msgid "Disabled"
-msgstr "Désactivé"
-
-msgid "Disabling init script"
-msgstr "Désactivation du script d'initialisation"
-
-msgid "Disconnect container from network"
-msgstr "Déconnecter le conteneur du réseau"
-
-msgid "Disconnected from %s"
-msgstr "Déconnecté de %s"
-
-msgid "Dnsmasq"
-msgstr "Dnsmasq"
-
-msgid "Driver"
-msgstr "Pilote"
-
-msgid "Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)"
-msgstr "Options spécifiques au pilote (séparées par des virgules, ex: type=tmpfs,o=size=100m)"
-
-msgid "Enable IPv6"
-msgstr "Activer IPv6"
-
-msgid "Enable IPv6 networking"
-msgstr "Activer le réseau IPv6"
-
-msgid "Enabling init script"
-msgstr "Activation du script d'initialisation"
-
-msgid "Enter secret data (password, token, key, etc.)"
-msgstr "Saisir les données secrètes (mot de passe, jeton, clé, etc.)"
-
-msgid "Entrypoint"
-msgstr "Point d'entrée (Entrypoint)"
-
-msgid "Environment Variables"
-msgstr "Variables d'environnement"
-
-msgid "Ephemeral (--rm flag)"
-msgstr "Éphémère (option --rm)"
-
-msgid "Error"
-msgstr "Erreur"
-
-msgid "Error: %s"
-msgstr "Erreur : %s"
-
-msgid "Existing physical interface to use as parent. Required for macvlan/ipvlan networks."
-msgstr "Interface physique existante comme parent. Requis pour les réseaux macvlan/ipvlan."
-
-msgid "Expecting: %s"
-msgstr "Attendu : %s"
-
-msgid "Export"
-msgstr "Exporter"
-
-msgid "Exporting selected volumes: %d/%d"
-msgstr "Exportation des volumes sélectionnés : %d/%d"
-
-msgid "Expose Ports"
-msgstr "Exposer les ports"
-
-msgid "Failed to create container"
-msgstr "Échec de la création du conteneur"
-
-msgid "Fetching information..."
-msgstr "Récupération des informations..."
-
-msgid "Find updateable containers"
-msgstr "Rechercher les conteneurs pouvant être mis à jour"
-
-msgid "Firewall Zone"
-msgstr "Zone de pare-feu"
-
-msgid "Gateway"
-msgstr "Passerelle"
-
-msgid "Generate"
-msgstr "Générer"
-
-msgid "Graph Root"
-msgstr "Racine du graphe"
-
-msgid "Health"
-msgstr "Santé"
-
-msgid "Hostname"
-msgstr "Nom d'hôte"
-
-msgid "Hostname for the pod (defaults to pod name)"
-msgstr "Nom d'hôte du pod (par défaut, le nom du pod)"
-
-msgid "ID"
-msgstr "ID"
-
-msgid "IP Address"
-msgstr "Adresse IP"
-
-msgid "IP Range (CIDR)"
-msgstr "Plage IP (CIDR)"
-
-msgid "IPv4 Gateway"
-msgstr "Passerelle IPv4"
-
-msgid "IPv4 Subnet (CIDR)"
-msgstr "Sous-réseau IPv4 (CIDR)"
-
-msgid "IPv4 gateway address"
-msgstr "Adresse de la passerelle IPv4"
-
-msgid "IPv4 subnet in CIDR notation"
-msgstr "Sous-réseau IPv4 en notation CIDR"
-
-msgid "Image"
-msgstr "Image"
-
-msgid "Image ID"
-msgstr "ID de l'image"
-
-msgid "Image is already up-to-date"
-msgstr "L'image est déjà à jour"
-
-msgid "Image pulled successfully"
-msgstr "Image récupérée avec succès"
-
-msgid "Images"
-msgstr "Images"
-
-msgid "Import"
-msgstr "Importer"
-
-msgid "Import from archive: %s"
-msgstr "Importer depuis l'archive : %s"
-
-msgid "Importing volume..."
-msgstr "Importation du volume..."
-
-msgid "Info"
-msgstr "Info"
-
-msgid "Information"
-msgstr "Informations"
-
-msgid "Infra Image"
-msgstr "Image infra"
-
-msgid "Init Script"
-msgstr "Script d'initialisation"
-
-msgid "Inspect"
-msgstr "Inspecter"
-
-msgid "Int"
-msgstr "Ent"
-
-msgid "Interactive"
-msgstr "Interactif"
-
-msgid "Interface"
-msgstr "Interface"
-
-msgid "Internal Network"
-msgstr "Réseau interne"
-
-msgid "Labels"
-msgstr "Étiquettes"
-
-msgid "Labels in key=value format, one per line"
-msgstr "Étiquettes au format clé=valeur, une par ligne"
-
-msgid "Leave empty to auto-generate"
-msgstr "Laisser vide pour l'auto-génération"
-
-msgid "Links"
-msgstr "Liens"
-
-msgid "Linux namespaces shared between containers in the pod. Default matches `podman pod create`."
-msgstr "Namespaces Linux partagés entre les conteneurs du pod. La valeur par défaut correspond à `podman pod create`."
-
-msgid "Load"
-msgstr "Charger"
-
-msgid "Load System diagnostics"
-msgstr "Charger les diagnostics système"
-
-msgid "Loading init script"
-msgstr "Chargement du script d'initialisation"
-
-msgid "Loading..."
-msgstr "Chargement..."
-
-msgid "Logs"
-msgstr "Journaux"
-
-msgid "Manage podman %s"
-msgstr "Gérer podman %s"
-
-msgid "Memory"
-msgstr "Mémoire"
-
-msgid "Memory %"
-msgstr "Mémoire %"
-
-msgid "Memory + Swap Limit"
-msgstr "Limite Mémoire + Swap"
-
-msgid "Memory Limit"
-msgstr "Limite Mémoire"
-
-msgid "Memory Usage"
-msgstr "Utilisation mémoire"
-
-msgid "Memory limit (e.g., 512m, 1g)"
-msgstr "Limite mémoire (ex: 512m, 1g)"
-
-msgid "Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default."
-msgstr "Limite mémoire (ex. 512m, 1g). -1 = illimité, 0 = par défaut."
-
-msgid "Memory limit for the pod (e.g., 512m, 1g)"
-msgstr "Limite de mémoire pour le pod (p. ex., 512m, 1g)"
-
-msgid "Mode"
-msgstr "Mode"
-
-msgid "Mount Options"
-msgstr "Options de montage"
-
-msgid "Mountpoint"
-msgstr "Point de montage"
-
-msgid "Mounts"
-msgstr "Montages"
-
-msgid "Must be between 0 and 262144"
-msgstr "Doit être entre 0 et 262144"
-
-msgid "Name"
-msgstr "Nom"
-
-msgid "Name for the network"
-msgstr "Nom du réseau"
-
-msgid "Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it."
-msgstr "Nom de l'interface pont (ex: podman0). Laisser vide pour utiliser : <nom-réseau>0. Note : En cas de conflit, OpenWrt l'incrémentera automatiquement."
-
-msgid "Name updated successfully"
-msgstr "Nom mis à jour avec succès"
-
-msgid "Network"
-msgstr "Réseau"
-
-msgid "Network I/O"
-msgstr "E/S réseau"
-
-msgid "Network Mode"
-msgstr "Mode réseau"
-
-msgid "Network Name"
-msgstr "Nom du réseau"
-
-msgid "Network driver"
-msgstr "Pilote réseau"
-
-msgid "Network namespace for the pod. Containers in the pod share this network."
-msgstr "Namespace réseau pour le pod. Les conteneurs du pod partagent ce réseau."
-
-msgid "Networks"
-msgstr "Réseaux"
-
-msgid "Never"
-msgstr "Jamais"
-
-msgid "No"
-msgstr "Non"
-
-msgid "No %s selected"
-msgstr "Aucun %s sélectionné"
-
-msgid "No containers in this pod"
-msgstr "Aucun conteneur dans ce pod"
-
-msgid "No containers with auto-update label found."
-msgstr "Aucun conteneur avec l'étiquette de mise à jour automatique trouvé."
-
-msgid "No new updates available."
-msgstr "Aucune nouvelle mise à jour disponible."
-
-msgid "No suitable interfaces found"
-msgstr "Aucune interface appropriée trouvée"
-
-msgid "No unused resources found"
-msgstr "Aucune ressource inutilisée trouvée"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0)"
-msgstr "Nombre de CPUs (ex: 0.5, 1.0, 2.0)"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited."
-msgstr "Nombre de CPUs (ex: 0.5, 1.0, 2.0). Laisser vide pour illimité."
-
-msgid "Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)"
-msgstr "Nombre de CPUs disponibles pour le pod (p. ex., 0.5, 1.0, 2.0)"
-
-msgid "Number of lines"
-msgstr "Nombre de lignes"
-
-msgid "OK"
-msgstr "OK"
-
-msgid "Old image still used by other containers"
-msgstr "L'ancienne image est encore utilisée par d'autres conteneurs"
-
-msgid "On Failure"
-msgstr "En cas d'échec"
-
-msgid "One per line, format: host:container[/protocol]"
-msgstr "Un par ligne, format : hôte:conteneur[/protocole]"
-
-msgid "One per line, format: key=value"
-msgstr "Une par ligne, format : clé=valeur"
-
-msgid "One per line. Format: source:destination[:options]. Options: ro, rw, Z, z"
-msgstr "Un par ligne. Format : source:destination[:options]. Options : ro, rw, Z, z"
-
-msgid "OpenWrt integration exists\n\nClick to remove"
-msgstr "Intégration OpenWrt existante\n\nCliquer pour supprimer"
-
-msgid "OpenWrt integration incomplete"
-msgstr "Intégration OpenWrt incomplète"
-
-msgid "OpenWrt integration requires subnet to be specified"
-msgstr "L'intégration OpenWrt nécessite la spécification d'un sous-réseau"
-
-msgid "Override the image used for the infra container"
-msgstr "Remplacer l'image utilisée pour le conteneur infra"
-
-msgid "PIDs"
-msgstr "PIDs"
-
-msgid "Parent Interface"
-msgstr "Interface parent"
-
-msgid "Parent interface is required for macvlan/ipvlan networks"
-msgstr "L'interface parent est requise pour les réseaux macvlan/ipvlan"
-
-msgid "Part of a pod (\"%s\")"
-msgstr "Fait partie du pod « %s »"
-
-msgid "Pausing pod"
-msgstr "Mise en pause du pod"
-
-msgid "Pod"
-msgstr "Pod"
-
-msgid "Pod Name"
-msgstr "Nom du pod"
-
-msgid "Podman Version"
-msgstr "Version de Podman"
-
-msgid "Pods"
-msgstr "Pods"
-
-msgid "Port Mappings"
-msgstr "Mappages de ports"
-
-msgid "Ports"
-msgstr "Ports"
-
-msgid "Privileged"
-msgstr "Privilégié"
-
-msgid "Privileged Mode"
-msgstr "Mode privilégié"
-
-msgid "Processes"
-msgstr "Processus"
-
-msgid "Pull Image"
-msgstr "Récupérer l'image"
-
-msgid "Pull did not return an image ID - pull may have failed"
-msgstr "Le pull n'a pas retourné d'ID d'image - le pull a peut-être échoué"
-
-msgid "Pulling %s"
-msgstr "Téléchargement de %s"
-
-msgid "Read: %s / Write: %s"
-msgstr "Lecture : %s / Écriture : %s"
-
-msgid "Refreshing %s..."
-msgstr "Actualisation de %s..."
-
-msgid "Registries"
-msgstr "Registres (Registries)"
-
-msgid "Registry"
-msgstr "Registre"
-
-msgid "Reload"
-msgstr "Recharger"
-
-msgid "Remove OpenWrt integration"
-msgstr "Supprimer l'intégration OpenWrt"
-
-msgid "Remove all unused images (not just dangling)"
-msgstr "Supprimer toutes les images inutilisées (pas seulement les orphelines)"
-
-msgid "Remove container"
-msgstr "Supprimer le conteneur"
-
-msgid "Remove unused volumes"
-msgstr "Supprimer les volumes inutilisés"
-
-msgid "Removed: %s"
-msgstr "Supprimé : %s"
-
-msgid "Removing unused resources, please wait..."
-msgstr "Suppression des ressources inutilisées, veuillez patienter..."
-
-msgid "Repository"
-msgstr "Dépôt"
-
-msgid "Required for shared network namespace. Disable only if you know you do not need it."
-msgstr "Requis pour le namespace réseau partagé. Désactivez uniquement si vous savez que vous n'en avez pas besoin."
-
-msgid "Resources"
-msgstr "Ressources"
-
-msgid "Restart Policy"
-msgstr "Politique de redémarrage"
-
-msgid "Restart container"
-msgstr "Redémarrer le conteneur"
-
-msgid "Restart policy updated successfully"
-msgstr "Politique de redémarrage mise à jour avec succès"
-
-msgid "Restarting pod"
-msgstr "Redémarrage du pod"
-
-msgid "Restrict external access to the network"
-msgstr "Restreindre l'accès externe au réseau"
-
-msgid "Run Root"
-msgstr "Run Root"
-
-msgid "Saving resource"
-msgstr "Sauvegarde de la ressource"
-
-msgid "Secret"
-msgstr "Secret"
-
-msgid "Secret Data"
-msgstr "Données secrètes"
-
-msgid "Secret Name"
-msgstr "Nom du secret"
-
-msgid "Secret name can only contain letters, numbers, underscores, and hyphens"
-msgstr "Le nom du secret ne peut contenir que des lettres, chiffres, underscores et tirets"
-
-msgid "Secrets"
-msgstr "Secrets"
-
-msgid "Security Notice:"
-msgstr "Avis de sécurité :"
-
-msgid "Select containers to update"
-msgstr "Sélectionner les conteneurs à mettre à jour"
-
-msgid "Select network for the new container. User-created networks provide better isolation and DNS resolution between containers."
-msgstr "Sélectionner le réseau pour le nouveau conteneur. Les réseaux utilisateur offrent un meilleur isolement et une meilleure résolution DNS entre conteneurs."
-
-msgid "Select what to clean up:"
-msgstr "Sélectionner ce qu'il faut nettoyer :"
-
-msgid "Sensitive data is hidden for security reasons."
-msgstr "Les données sensibles sont masquées pour des raisons de sécurité."
-
-msgid "Setup OpenWrt Integration"
-msgstr "Configurer l'intégration OpenWrt"
-
-msgid "Shared Namespaces"
-msgstr "Namespaces partagés"
-
-msgid "Shares network with another container"
-msgstr "Partage le réseau avec un autre conteneur"
-
-msgid "Show"
-msgstr "Afficher"
-
-msgid "Since"
-msgstr "Depuis"
-
-msgid "Size"
-msgstr "Taille"
-
-msgid "Socket Path"
-msgstr "Chemin du socket"
-
-msgid "Source"
-msgstr "Source"
-
-msgid "Space freed: %s"
-msgstr "Espace libéré : %s"
-
-msgid "Start after creation"
-msgstr "Démarrer après création"
-
-msgid "Start container"
-msgstr "Démarrer le conteneur"
-
-msgid "Start on boot"
-msgstr "Démarrer au démarrage"
-
-msgid "Start script disabled"
-msgstr "Script de démarrage désactivé"
-
-msgid "Start script missing\n\nClick to generate"
-msgstr "Script de démarrage manquant\n\nCliquez pour générer"
-
-msgid "Start stream"
-msgstr "Démarrer le flux"
-
-msgid "Started"
-msgstr "Démarré"
-
-msgid "Started At"
-msgstr "Démarré à"
-
-msgid "Starting pod"
-msgstr "Démarrage du pod"
-
-msgid "Statistics"
-msgstr "Statistiques"
-
-msgid "Stats"
-msgstr "Stats"
-
-msgid "Status"
-msgstr "État"
-
-msgid "Stop container"
-msgstr "Arrêter le conteneur"
-
-msgid "Stop stream"
-msgstr "Arrêter le flux"
-
-msgid "Stopping pod"
-msgstr "Arrêt du pod"
-
-msgid "Subnet"
-msgstr "Sous-réseau"
-
-msgid "Supplementary Groups"
-msgstr "Groupes supplémentaires"
-
-msgid "System Diagnostics"
-msgstr "Diagnostics système"
-
-msgid "TTY"
-msgstr "TTY"
-
-msgid "Tag"
-msgstr "Tag"
-
-msgid "The sensitive data to store securely"
-msgstr "Les données sensibles à stocker en toute sécurité"
-
-msgid "To enable auto-update for a container, add the label: io.containers.autoupdate=registry"
-msgstr "Pour activer la mise à jour automatique, ajouter l'étiquette : io.containers.autoupdate=registry"
-
-msgid "Total"
-msgstr "Total"
-
-msgid "Total memory limit (memory + swap). -1 = unlimited, 0 = use default."
-msgstr "Limite mémoire totale (mémoire + swap). -1 = illimité, 0 = par défaut."
-
-msgid "Type"
-msgstr "Type"
-
-msgid "Unknown"
-msgstr "Inconnu"
-
-msgid "Unless Stopped"
-msgstr "Sauf si arrêté (Unless Stopped)"
-
-msgid "Until"
-msgstr "Jusqu'à"
-
-msgid "Update"
-msgstr "Mettre à jour"
-
-msgid "Update Resources"
-msgstr "Mettre à jour les ressources"
-
-msgid "Update name"
-msgstr "Mettre à jour le nom"
-
-msgid "Update restart policy"
-msgstr "Mettre à jour la politique de redémarrage"
-
-msgid "Updating Images"
-msgstr "Mise à jour des images"
-
-msgid "Updating container"
-msgstr "Mise à jour du conteneur"
-
-msgid "Upload failed: %s"
-msgstr "Échec du téléchargement : %s"
-
-msgid "Uploading file..."
-msgstr "Téléchargement du fichier..."
-
-msgid "User"
-msgstr "Utilisateur"
-
-msgid "User and group to run as (UID:GID)"
-msgstr "Utilisateur et groupe (UID:GID)"
-
-msgid "Value"
-msgstr "Valeur"
-
-msgid "Variable"
-msgstr "Variable"
-
-msgid "Volume"
-msgstr "Volume"
-
-msgid "Volume Name"
-msgstr "Nom du volume"
-
-msgid "Volume driver to use"
-msgstr "Pilote de volume à utiliser"
-
-msgid "Volume imported successfully"
-msgstr "Volume importé avec succès"
-
-msgid "Volume name. Leave empty to auto-generate."
-msgstr "Nom du volume. Laisser vide pour l'auto-génération."
-
-msgid "Volumes"
-msgstr "Volumes"
-
-msgid "Working Directory"
-msgstr "Répertoire de travail"
-
-msgid "Yes"
-msgstr "Oui"
-
-msgid "default"
-msgstr "par défaut"
-
-msgid "non-empty value"
-msgstr "valeur non vide"
-
-msgid "running"
-msgstr "en cours"
-
-msgid "total"
-msgstr "total"
-
-msgid "Are you sure to remove pod?"
-msgstr "Êtes-vous sûr de supprimer le pod ?"
-
-msgid "Cgroup parent"
-msgstr "Cgroup parent"
-
-msgid "CID"
-msgstr "CID"
-
-msgid "CPU %"
-msgstr "CPU %"
-
-msgid "CPU period"
-msgstr "Période CPU"
-
-msgid "CPU quota"
-msgstr "Quota CPU"
-
-msgid "CPU set"
-msgstr "Ensemble CPU"
-
-msgid "CPU shares"
-msgstr "Shares CPU"
-
-msgid "DNS options"
-msgstr "Options DNS"
-
-msgid "DNS search"
-msgstr "Recherche DNS"
-
-msgid "DNS servers"
-msgstr "Serveurs DNS"
-
-msgid "Exit policy"
-msgstr "Politique de sortie"
-
-msgid "Extra hosts"
-msgstr "Hôtes supplémentaires"
-
-msgid "Host network"
-msgstr "Réseau hôte"
-
-msgid "Infra container"
-msgstr "Conteneur infra"
-
-msgid "Memory limit"
-msgstr "Limite de mémoire"
-
-msgid "Net I/O"
-msgstr "I/O réseau"
-
-msgid "Pause pod"
-msgstr "Mettre le pod en pause"
-
-msgid "Pod is not running"
-msgstr "Le pod n'est pas en cours d'exécution"
-
-msgid "Remove pod"
-msgstr "Supprimer le pod"
-
-msgid "Restart policy"
-msgstr "Politique de redémarrage"
-
-msgid "Restart pod"
-msgstr "Redémarrer le pod"
-
-msgid "Shared namespaces"
-msgstr "Namespaces partagés"
-
-msgid "Start pod"
-msgstr "Démarrer le pod"
-
-msgid "Static IPv4"
-msgstr "IPv4 statique"
-
-msgid "Static MAC"
-msgstr "MAC statique"
-
-msgid "Stop pod"
-msgstr "Arrêter le pod"
-
-msgid "Unlimited"
-msgstr "Illimité"
-
-msgid "Unpause pod"
-msgstr "Reprendre le pod"
-
-msgid "Stopping container"
-msgstr "Arrêt du conteneur"
-
-msgid "Stop failed: %s"
-msgstr "Échec de l'arrêt : %s"
-
-msgid "Removing container"
-msgstr "Suppression du conteneur"
-
-msgid "Remove failed: %s"
-msgstr "Échec de la suppression : %s"
-
-msgid "Creating container"
-msgstr "Création du conteneur"
-
-msgid "Create failed: %s"
-msgstr "Échec de la création : %s"
-
-msgid "Starting container"
-msgstr "Démarrage du conteneur"
-
-msgid "Start failed: %s"
-msgstr "Échec du démarrage : %s"
-
-msgid "Reinstating init script"
-msgstr "Restauration du script d'initialisation"
-
-msgid "Init script reinstate failed: %s"
-msgstr "Échec de la restauration du script d'initialisation : %s"
-
-msgid "Updated to %s"
-msgstr "Mis à jour vers %s"
-
-msgid "Update image: %d/%d - %s"
-msgstr "Mise à jour de l'image : %d/%d - %s"
-
-msgid "Removed old image %s"
-msgstr "Ancienne image %s supprimée"
-
-msgid "Done."
-msgstr "Terminé."
-
-msgid "Pause container"
-msgstr "Mettre le conteneur en pause"
-
-msgid "Unpause container"
-msgstr "Reprendre le conteneur"
diff --git a/luci-app-podman/po/nl/podman.po b/luci-app-podman/po/nl/podman.po
deleted file mode 100644
index da95baac1..000000000
--- a/luci-app-podman/po/nl/podman.po
+++ /dev/null
@@ -1,1090 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: luci-app-podman\n"
-"PO-Revision-Date: 2026-05-03 11:05+0000\n"
-"Last-Translator:\n"
-"Language-Team: Dutch \n"
-"Language: nl\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid "%d check(s) failed:"
-msgstr "%d controle(s) mislukt:"
-
-msgid "%d updated, %d failed:"
-msgstr "%d bijgewerkt, %d mislukt:"
-
-msgid "%s created successfully"
-msgstr "%s succesvol aangemaakt"
-
-msgid "%s: %d/%d"
-msgstr "%s: %d/%d"
-
-msgid "(none)"
-msgstr "(geen)"
-
-msgid "-- Select %s --"
-msgstr "-- Selecteer %s --"
-
-msgid "1-253 characters: letters, numbers, underscore (_), hyphen (-) only"
-msgstr "1-253 tekens: alleen letters, cijfers, laag streepje (_) en koppelteken (-)"
-
-msgid "512m, 1g, or -1 for unlimited"
-msgstr "512m, 1g of -1 voor onbeperkt"
-
-msgid "API Version"
-msgstr "API-versie"
-
-msgid "Add the container to an existing pod. Network, hostname and port mappings come from the pod's infra container."
-msgstr "Container toevoegen aan een bestaande pod. Netwerk, hostnaam en poort-mappings komen van de infra-container van de pod."
-
-msgid "All images updated successfully"
-msgstr "Alle images succesvol bijgewerkt"
-
-msgid "All volumes exported successfully"
-msgstr "Alle volumes succesvol geëxporteerd"
-
-msgid "Allocate TTY (-t)"
-msgstr "TTY toewijzen (-t)"
-
-msgid "Allocate container IP from this range"
-msgstr "Container IP toewijzen uit dit bereik"
-
-msgid "Always"
-msgstr "Altijd"
-
-msgid "Apply Updates"
-msgstr "Updates toepassen"
-
-msgid "Are you sure to delete the records?"
-msgstr "Records verwijderen?"
-
-msgid "Are you sure to remove container?"
-msgstr "Container verwijderen?"
-
-msgid "Are you sure to remove integration?"
-msgstr "Integratie verwijderen?"
-
-msgid "Auto Remove (--rm)"
-msgstr "Automatisch verwijderen (--rm)"
-
-msgid "Auto Update"
-msgstr "Automatisch bijwerken"
-
-msgid "Auto-Update"
-msgstr "Automatisch bijwerken"
-
-msgid "Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt."
-msgstr "Automatisch OpenWrt netwerkinterface, bridge en firewallzone configureren. Ten zeerste aanbevolen voor correct container-netwerkgebruik op OpenWrt."
-
-msgid "Automatically start the container after it is created"
-msgstr "De container automatisch starten nadat deze is aangemaakt"
-
-msgid "Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry"
-msgstr "Container automatisch bijwerken wanneer een nieuwer image beschikbaar is. Voegt label toe: io.containers.autoupdate=registry"
-
-msgid "Basic Information"
-msgstr "Basis informatie"
-
-msgid "Block I/O"
-msgstr "Blok I/O"
-
-msgid "Boot"
-msgstr "Opstarten"
-
-msgid "Bridge Interface Name"
-msgstr "Bridge interfacenaam"
-
-msgid "CPU"
-msgstr "CPU"
-
-msgid "CPU Limit"
-msgstr "CPU-limiet"
-
-msgid "CPU Set"
-msgstr "CPU-set"
-
-msgid "CPU Shares Weight"
-msgstr "CPU shares gewicht"
-
-msgid "CPU Usage"
-msgstr "CPU-gebruik"
-
-msgid "CPU shares (relative weight). 0 = use default."
-msgstr "CPU-aandelen (relatief gewicht). 0 = standaard."
-
-msgid "CPUs the pod is allowed to run on (e.g., \"0-3\" or \"0,2\")"
-msgstr "CPU's waarop de pod mag draaien (bijv. \"0-3\" of \"0,2\")"
-
-msgid "Cancel"
-msgstr "Annuleren"
-
-msgid "Check"
-msgstr "Controleren"
-
-msgid "Check %d containers for updates?"
-msgstr "%d containers controleren op updates?"
-
-msgid "Check Complete"
-msgstr "Controle voltooid"
-
-msgid "Check for Updates"
-msgstr "Controleren op updates"
-
-msgid "Check for updates: %s/%s"
-msgstr "Controleren op updates: %s/%s"
-
-msgid "Choose firewall zone for this network."
-msgstr "Firewallzone kiezen voor dit netwerk."
-
-msgid "Clean Up Now"
-msgstr "Nu opruimen"
-
-msgid "Cleaning up old images..."
-msgstr "Oude images opruimen..."
-
-msgid "Cleanup / Prune"
-msgstr "Opruimen / Prune"
-
-msgid "Cleanup Complete"
-msgstr "Opruimen voltooid"
-
-msgid "Cleanup Unused Resources"
-msgstr "Ongebruikte bronnen opruimen"
-
-msgid "Cleanup successful!"
-msgstr "Opruimen succesvol!"
-
-msgid "Clear logs"
-msgstr "Logboeken wissen"
-
-msgid "Click icon to repair"
-msgstr "Klik op het pictogram om te repareren"
-
-msgid "Click to disconnect"
-msgstr "Klikken om te verbreken"
-
-msgid "Click to enable/disable"
-msgstr "Klikken om in/uit te schakelen"
-
-msgid "Click to reveal/hide value"
-msgstr "Klik om waarde te tonen/verbergen"
-
-msgid "Close"
-msgstr "Sluiten"
-
-msgid "Comma-separated list of supplementary group IDs"
-msgstr "Door komma's gescheiden lijst van aanvullende groeps-ID's"
-
-msgid "Comma-separated ports to expose (e.g., 6052, 8080/udp)"
-msgstr "Door komma's gescheiden poorten om te exposeren (bijv. 6052, 8080/udp)"
-
-msgid "Command"
-msgstr "Opdracht"
-
-msgid "Command to run (space-separated)"
-msgstr "Uit te voeren opdracht (spatie-gescheiden)"
-
-msgid "Configuration"
-msgstr "Configuratie"
-
-msgid "Configure resource limits for this container."
-msgstr "Resourcelimieten configureren voor deze container."
-
-msgid "Confirm"
-msgstr "Bevestigen"
-
-msgid "Connect"
-msgstr "Verbinden"
-
-msgid "Connect to"
-msgstr "Verbinden met"
-
-msgid "Connected successfully to %s"
-msgstr "Succesvol verbonden met %s"
-
-msgid "Connecting container to network"
-msgstr "Container verbinden met netwerk"
-
-msgid "Console"
-msgstr "Console"
-
-msgid "Container"
-msgstr "Container"
-
-msgid "Container Name"
-msgstr "Container naam"
-
-msgid "Container image has no tag - cannot update"
-msgstr "Container-image heeft geen tag - kan niet bijwerken"
-
-msgid "Container image to use"
-msgstr "Te gebruiken container image"
-
-msgid "Container is not running"
-msgstr "Container is niet actief"
-
-msgid "Container updated successfully"
-msgstr "Container succesvol bijgewerkt"
-
-msgid "Containers"
-msgstr "Containers"
-
-msgid "Containers in pod %s"
-msgstr "Containers in pod %s"
-
-msgid "Containers updated successfully"
-msgstr "Containers succesvol bijgewerkt"
-
-msgid "Containers updated successfully."
-msgstr "Containers succesvol bijgewerkt."
-
-msgid "Create"
-msgstr "Aanmaken"
-
-msgid "Create %s"
-msgstr "%s aanmaken"
-
-msgid "Create Command"
-msgstr "Aanmaakcommando"
-
-msgid "Create Infra Container"
-msgstr "Infra-container aanmaken"
-
-msgid "Create new zone (will be named: podman_)"
-msgstr "Nieuwe zone aanmaken (naam wordt: podman_)"
-
-msgid "Created"
-msgstr "Aangemaakt"
-
-msgid "Creating %s"
-msgstr "Aanmaken van %s"
-
-msgid "Creating auto-start configuration for %s"
-msgstr "Automatische start configuratie aanmaken voor %s"
-
-msgid "DNS Search Domains"
-msgstr "DNS-zoekdomeinen"
-
-msgid "DNS Servers"
-msgstr "DNS-servers"
-
-msgid "DNS search domains for the infra container"
-msgstr "DNS-zoekdomeinen voor de infra-container"
-
-msgid "DNS servers for the infra container (shared with all pod containers)"
-msgstr "DNS-servers voor de infra-container (gedeeld met alle containers in de pod)"
-
-msgid "Delete"
-msgstr "Verwijderen"
-
-msgid "Deleting records: %d/%d"
-msgstr "Records verwijderen: %d/%d"
-
-msgid "Deleting records: %s/%s"
-msgstr "Records verwijderen: %s/%s"
-
-msgid "Destination"
-msgstr "Bestemming"
-
-msgid "Device"
-msgstr "Apparaat"
-
-msgid "Disabled"
-msgstr "Uitgeschakeld"
-
-msgid "Disabling init script"
-msgstr "Init-script uitschakelen"
-
-msgid "Disconnect container from network"
-msgstr "Container verbreken van netwerk"
-
-msgid "Disconnected from %s"
-msgstr "Verbroken van %s"
-
-msgid "Dnsmasq"
-msgstr "Dnsmasq"
-
-msgid "Driver"
-msgstr "Driver"
-
-msgid "Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)"
-msgstr "Driver-specifieke opties (komma-gescheiden, bijv. type=tmpfs,o=size=100m)"
-
-msgid "Enable IPv6"
-msgstr "IPv6 inschakelen"
-
-msgid "Enable IPv6 networking"
-msgstr "IPv6-netwerkgebruik inschakelen"
-
-msgid "Enabling init script"
-msgstr "Init-script inschakelen"
-
-msgid "Enter secret data (password, token, key, etc.)"
-msgstr "Voer geheime gegevens in (wachtwoord, token, sleutel, etc.)"
-
-msgid "Entrypoint"
-msgstr "Entrypoint"
-
-msgid "Environment Variables"
-msgstr "Omgevingsvariabelen"
-
-msgid "Ephemeral (--rm flag)"
-msgstr "Efemeer (--rm vlag)"
-
-msgid "Error"
-msgstr "Fout"
-
-msgid "Error: %s"
-msgstr "Fout: %s"
-
-msgid "Existing physical interface to use as parent. Required for macvlan/ipvlan networks."
-msgstr "Bestaande fysieke interface om als parent te gebruiken. Vereist voor macvlan/ipvlan netwerken."
-
-msgid "Expecting: %s"
-msgstr "Verwacht: %s"
-
-msgid "Export"
-msgstr "Exporteren"
-
-msgid "Exporting selected volumes: %d/%d"
-msgstr "Exporteren van geselecteerde volumes: %d/%d"
-
-msgid "Expose Ports"
-msgstr "Poorten blootstellen"
-
-msgid "Failed to create container"
-msgstr "Aanmaken van container mislukt"
-
-msgid "Fetching information..."
-msgstr "Informatie ophalen..."
-
-msgid "Find updateable containers"
-msgstr "Bijwerkbare containers zoeken"
-
-msgid "Firewall Zone"
-msgstr "Firewallzone"
-
-msgid "Gateway"
-msgstr "Gateway"
-
-msgid "Generate"
-msgstr "Genereren"
-
-msgid "Graph Root"
-msgstr "Grafiek-root"
-
-msgid "Health"
-msgstr "Gezondheid"
-
-msgid "Hostname"
-msgstr "Hostnaam"
-
-msgid "Hostname for the pod (defaults to pod name)"
-msgstr "Hostnaam voor de pod (standaard: pod-naam)"
-
-msgid "ID"
-msgstr "ID"
-
-msgid "IP Address"
-msgstr "IP-adres"
-
-msgid "IP Range (CIDR)"
-msgstr "IP-bereik (CIDR)"
-
-msgid "IPv4 Gateway"
-msgstr "IPv4 Gateway"
-
-msgid "IPv4 Subnet (CIDR)"
-msgstr "IPv4 Subnet (CIDR)"
-
-msgid "IPv4 gateway address"
-msgstr "IPv4 gateway-adres"
-
-msgid "IPv4 subnet in CIDR notation"
-msgstr "IPv4-subnet in CIDR-notatie"
-
-msgid "Image"
-msgstr "Image"
-
-msgid "Image ID"
-msgstr "Image-ID"
-
-msgid "Image is already up-to-date"
-msgstr "Image is al up-to-date"
-
-msgid "Image pulled successfully"
-msgstr "Image succesvol opgehaald"
-
-msgid "Images"
-msgstr "Images"
-
-msgid "Import"
-msgstr "Importeren"
-
-msgid "Import from archive: %s"
-msgstr "Importeren uit archief: %s"
-
-msgid "Importing volume..."
-msgstr "Volume importeren..."
-
-msgid "Info"
-msgstr "Info"
-
-msgid "Information"
-msgstr "Informatie"
-
-msgid "Infra Image"
-msgstr "Infra-image"
-
-msgid "Init Script"
-msgstr "Init-script"
-
-msgid "Inspect"
-msgstr "Inspecteren"
-
-msgid "Int"
-msgstr "Geh"
-
-msgid "Interactive"
-msgstr "Interactief"
-
-msgid "Interface"
-msgstr "Interface"
-
-msgid "Internal Network"
-msgstr "Intern netwerk"
-
-msgid "Labels"
-msgstr "Labels"
-
-msgid "Labels in key=value format, one per line"
-msgstr "Labels in sleutel=waarde formaat, één per regel"
-
-msgid "Leave empty to auto-generate"
-msgstr "Leeg laten voor automatisch genereren"
-
-msgid "Links"
-msgstr "Links"
-
-msgid "Linux namespaces shared between containers in the pod. Default matches `podman pod create`."
-msgstr "Linux-namespaces gedeeld tussen de containers in de pod. Standaard komt overeen met `podman pod create`."
-
-msgid "Load"
-msgstr "Laden"
-
-msgid "Load System diagnostics"
-msgstr "Systeemdiagnostiek laden"
-
-msgid "Loading init script"
-msgstr "Init-script laden"
-
-msgid "Loading..."
-msgstr "Laden..."
-
-msgid "Logs"
-msgstr "Logs"
-
-msgid "Manage podman %s"
-msgstr "Podman %s beheren"
-
-msgid "Memory"
-msgstr "Geheugen"
-
-msgid "Memory %"
-msgstr "Geheugen %"
-
-msgid "Memory + Swap Limit"
-msgstr "Geheugen + Swap limiet"
-
-msgid "Memory Limit"
-msgstr "Geheugenlimiet"
-
-msgid "Memory Usage"
-msgstr "Geheugengebruik"
-
-msgid "Memory limit (e.g., 512m, 1g)"
-msgstr "Geheugenlimiet (bijv. 512m, 1g)"
-
-msgid "Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default."
-msgstr "Geheugenlimiet (bijv. 512m, 1g). -1 = onbeperkt, 0 = standaard."
-
-msgid "Memory limit for the pod (e.g., 512m, 1g)"
-msgstr "Geheugenlimiet voor de pod (bijv. 512m, 1g)"
-
-msgid "Mode"
-msgstr "Modus"
-
-msgid "Mount Options"
-msgstr "Mount-opties"
-
-msgid "Mountpoint"
-msgstr "Mountpoint"
-
-msgid "Mounts"
-msgstr "Mounts"
-
-msgid "Must be between 0 and 262144"
-msgstr "Moet tussen 0 en 262144 zijn"
-
-msgid "Name"
-msgstr "Naam"
-
-msgid "Name for the network"
-msgstr "Naam voor het netwerk"
-
-msgid "Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it."
-msgstr "Naam van de bridge interface (bijv. podman0, mynet0). Leeg laten voor: <netwerknaam>0. Let op: Bij conflict met een bestaande interface zal OpenWrt dit automatisch ophogen."
-
-msgid "Name updated successfully"
-msgstr "Naam succesvol bijgewerkt"
-
-msgid "Network"
-msgstr "Netwerk"
-
-msgid "Network I/O"
-msgstr "Netwerk I/O"
-
-msgid "Network Mode"
-msgstr "Netwerkmodus"
-
-msgid "Network Name"
-msgstr "Netwerknaam"
-
-msgid "Network driver"
-msgstr "Netwerkdriver"
-
-msgid "Network namespace for the pod. Containers in the pod share this network."
-msgstr "Netwerk-namespace voor de pod. Containers in de pod delen dit netwerk."
-
-msgid "Networks"
-msgstr "Netwerken"
-
-msgid "Never"
-msgstr "Nooit"
-
-msgid "No"
-msgstr "Nee"
-
-msgid "No %s selected"
-msgstr "Geen %s geselecteerd"
-
-msgid "No containers in this pod"
-msgstr "Geen containers in deze pod"
-
-msgid "No containers with auto-update label found."
-msgstr "Geen containers met auto-update label gevonden."
-
-msgid "No new updates available."
-msgstr "Geen nieuwe updates beschikbaar."
-
-msgid "No suitable interfaces found"
-msgstr "Geen geschikte interfaces gevonden"
-
-msgid "No unused resources found"
-msgstr "Geen ongebruikte bronnen gevonden"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0)"
-msgstr "Aantal CPU's (bijv. 0.5, 1.0, 2.0)"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited."
-msgstr "Aantal CPU's (bijv. 0.5, 1.0, 2.0). Leeg laten voor onbeperkt."
-
-msgid "Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)"
-msgstr "Aantal CPU's beschikbaar voor de pod (bijv. 0.5, 1.0, 2.0)"
-
-msgid "Number of lines"
-msgstr "Aantal regels"
-
-msgid "OK"
-msgstr "OK"
-
-msgid "Old image still used by other containers"
-msgstr "Oude image wordt nog gebruikt door andere containers"
-
-msgid "On Failure"
-msgstr "Bij fout"
-
-msgid "One per line, format: host:container[/protocol]"
-msgstr "Één per regel, formaat: host:container[/protocol]"
-
-msgid "One per line, format: key=value"
-msgstr "Eén per regel, formaat: sleutel=waarde"
-
-msgid "One per line. Format: source:destination[:options]. Options: ro, rw, Z, z"
-msgstr "Één per regel. Formaat: bron:bestemming[:opties]. Opties: ro, rw, Z, z"
-
-msgid "OpenWrt integration exists\n\nClick to remove"
-msgstr "OpenWrt-integratie bestaat\n\nKlik om te verwijderen"
-
-msgid "OpenWrt integration incomplete"
-msgstr "OpenWrt-integratie onvolledig"
-
-msgid "OpenWrt integration requires subnet to be specified"
-msgstr "OpenWrt-integratie vereist opgave van een subnet"
-
-msgid "Override the image used for the infra container"
-msgstr "Image overschrijven die voor de infra-container wordt gebruikt"
-
-msgid "PIDs"
-msgstr "PIDs"
-
-msgid "Parent Interface"
-msgstr "Parent-interface"
-
-msgid "Parent interface is required for macvlan/ipvlan networks"
-msgstr "Parent-interface is vereist voor macvlan/ipvlan netwerken"
-
-msgid "Part of a pod (\"%s\")"
-msgstr "Onderdeel van pod \"%s\""
-
-msgid "Pausing pod"
-msgstr "Pod wordt gepauzeerd"
-
-msgid "Pod"
-msgstr "Pod"
-
-msgid "Pod Name"
-msgstr "Pod-naam"
-
-msgid "Podman Version"
-msgstr "Podman-versie"
-
-msgid "Pods"
-msgstr "Pods"
-
-msgid "Port Mappings"
-msgstr "Poort-mappings"
-
-msgid "Ports"
-msgstr "Poorten"
-
-msgid "Privileged"
-msgstr "Privileged"
-
-msgid "Privileged Mode"
-msgstr "Privileged-modus"
-
-msgid "Processes"
-msgstr "Processen"
-
-msgid "Pull Image"
-msgstr "Image ophalen"
-
-msgid "Pull did not return an image ID - pull may have failed"
-msgstr "Pull heeft geen image-ID geretourneerd - pull is mogelijk mislukt"
-
-msgid "Pulling %s"
-msgstr "%s ophalen"
-
-msgid "Read: %s / Write: %s"
-msgstr "Lezen: %s / Schrijven: %s"
-
-msgid "Refreshing %s..."
-msgstr "Vernieuwen van %s..."
-
-msgid "Registries"
-msgstr "Registries"
-
-msgid "Registry"
-msgstr "Registry"
-
-msgid "Reload"
-msgstr "Herladen"
-
-msgid "Remove OpenWrt integration"
-msgstr "OpenWrt-integratie verwijderen"
-
-msgid "Remove all unused images (not just dangling)"
-msgstr "Alle ongebruikte images verwijderen (niet alleen dangling)"
-
-msgid "Remove container"
-msgstr "Container verwijderen"
-
-msgid "Remove unused volumes"
-msgstr "Ongebruikte volumes verwijderen"
-
-msgid "Removed: %s"
-msgstr "Verwijderd: %s"
-
-msgid "Removing unused resources, please wait..."
-msgstr "Ongebruikte bronnen verwijderen, even geduld..."
-
-msgid "Repository"
-msgstr "Repository"
-
-msgid "Required for shared network namespace. Disable only if you know you do not need it."
-msgstr "Vereist voor gedeeld netwerk-namespace. Alleen uitschakelen als u weet dat dit niet nodig is."
-
-msgid "Resources"
-msgstr "Bronnen"
-
-msgid "Restart Policy"
-msgstr "Herstartbeleid"
-
-msgid "Restart container"
-msgstr "Container opnieuw starten"
-
-msgid "Restart policy updated successfully"
-msgstr "Herstartbeleid succesvol bijgewerkt"
-
-msgid "Restarting pod"
-msgstr "Pod wordt herstart"
-
-msgid "Restrict external access to the network"
-msgstr "Externe toegang tot het netwerk beperken"
-
-msgid "Run Root"
-msgstr "Run-root"
-
-msgid "Saving resource"
-msgstr "Resource opslaan"
-
-msgid "Secret"
-msgstr "Geheim (Secret)"
-
-msgid "Secret Data"
-msgstr "Geheime gegevens"
-
-msgid "Secret Name"
-msgstr "Geheim naam"
-
-msgid "Secret name can only contain letters, numbers, underscores, and hyphens"
-msgstr "Geheim naam mag alleen letters, cijfers, underscores en koppeltekens bevatten"
-
-msgid "Secrets"
-msgstr "Geheimen"
-
-msgid "Security Notice:"
-msgstr "Veiligheidswaarschuwing:"
-
-msgid "Select containers to update"
-msgstr "Containers selecteren om bij te werken"
-
-msgid "Select network for the new container. User-created networks provide better isolation and DNS resolution between containers."
-msgstr "Netwerk selecteren voor de nieuwe container. Door gebruikers aangemaakte netwerken bieden betere isolatie en DNS-resolutie tussen containers."
-
-msgid "Select what to clean up:"
-msgstr "Selecteer wat op te ruimen:"
-
-msgid "Sensitive data is hidden for security reasons."
-msgstr "Gevoelige gegevens zijn verborgen om veiligheidsredenen."
-
-msgid "Setup OpenWrt Integration"
-msgstr "OpenWrt-integratie instellen"
-
-msgid "Shared Namespaces"
-msgstr "Gedeelde namespaces"
-
-msgid "Shares network with another container"
-msgstr "Deelt netwerk met een andere container"
-
-msgid "Show"
-msgstr "Tonen"
-
-msgid "Since"
-msgstr "Vanaf"
-
-msgid "Size"
-msgstr "Grootte"
-
-msgid "Socket Path"
-msgstr "Socket-pad"
-
-msgid "Source"
-msgstr "Bron"
-
-msgid "Space freed: %s"
-msgstr "Ruimte vrijgemaakt: %s"
-
-msgid "Start after creation"
-msgstr "Starten na aanmaak"
-
-msgid "Start container"
-msgstr "Container starten"
-
-msgid "Start on boot"
-msgstr "Starten bij opstarten"
-
-msgid "Start script disabled"
-msgstr "Startscript uitgeschakeld"
-
-msgid "Start script missing\n\nClick to generate"
-msgstr "Opstartscript ontbreekt\n\nKlik om te genereren"
-
-msgid "Start stream"
-msgstr "Stream starten"
-
-msgid "Started"
-msgstr "Gestart"
-
-msgid "Started At"
-msgstr "Gestart om"
-
-msgid "Starting pod"
-msgstr "Pod wordt gestart"
-
-msgid "Statistics"
-msgstr "Statistieken"
-
-msgid "Stats"
-msgstr "Statistieken"
-
-msgid "Status"
-msgstr "Status"
-
-msgid "Stop container"
-msgstr "Container stoppen"
-
-msgid "Stop stream"
-msgstr "Stream stoppen"
-
-msgid "Stopping pod"
-msgstr "Pod wordt gestopt"
-
-msgid "Subnet"
-msgstr "Subnet"
-
-msgid "Supplementary Groups"
-msgstr "Aanvullende groepen"
-
-msgid "System Diagnostics"
-msgstr "Systeemdiagnose"
-
-msgid "TTY"
-msgstr "TTY"
-
-msgid "Tag"
-msgstr "Tag"
-
-msgid "The sensitive data to store securely"
-msgstr "De gevoelige gegevens om veilig op te slaan"
-
-msgid "To enable auto-update for a container, add the label: io.containers.autoupdate=registry"
-msgstr "Voeg het label toe om automatisch bijwerken in te schakelen: io.containers.autoupdate=registry"
-
-msgid "Total"
-msgstr "Totaal"
-
-msgid "Total memory limit (memory + swap). -1 = unlimited, 0 = use default."
-msgstr "Totale geheugenlimiet (geheugen + swap). -1 = onbeperkt, 0 = standaard."
-
-msgid "Type"
-msgstr "Type"
-
-msgid "Unknown"
-msgstr "Onbekend"
-
-msgid "Unless Stopped"
-msgstr "Unless Stopped"
-
-msgid "Until"
-msgstr "Tot"
-
-msgid "Update"
-msgstr "Bijwerken"
-
-msgid "Update Resources"
-msgstr "Bronnen bijwerken"
-
-msgid "Update name"
-msgstr "Naam bijwerken"
-
-msgid "Update restart policy"
-msgstr "Herstartbeleid bijwerken"
-
-msgid "Updating Images"
-msgstr "Images bijwerken"
-
-msgid "Updating container"
-msgstr "Container bijwerken"
-
-msgid "Upload failed: %s"
-msgstr "Upload mislukt: %s"
-
-msgid "Uploading file..."
-msgstr "Bestand uploaden..."
-
-msgid "User"
-msgstr "Gebruiker"
-
-msgid "User and group to run as (UID:GID)"
-msgstr "Gebruiker en groep (UID:GID)"
-
-msgid "Value"
-msgstr "Waarde"
-
-msgid "Variable"
-msgstr "Variabele"
-
-msgid "Volume"
-msgstr "Volume"
-
-msgid "Volume Name"
-msgstr "Volume naam"
-
-msgid "Volume driver to use"
-msgstr "Te gebruiken volumedriver"
-
-msgid "Volume imported successfully"
-msgstr "Volume succesvol geïmporteerd"
-
-msgid "Volume name. Leave empty to auto-generate."
-msgstr "Volumenaam. Leeg laten voor automatisch genereren."
-
-msgid "Volumes"
-msgstr "Volumes"
-
-msgid "Working Directory"
-msgstr "Werkmap"
-
-msgid "Yes"
-msgstr "Ja"
-
-msgid "default"
-msgstr "standaard"
-
-msgid "non-empty value"
-msgstr "niet-lege waarde"
-
-msgid "running"
-msgstr "actief"
-
-msgid "total"
-msgstr "totaal"
-
-msgid "Are you sure to remove pod?"
-msgstr "Weet u zeker dat u de pod wilt verwijderen?"
-
-msgid "Cgroup parent"
-msgstr "Cgroup-parent"
-
-msgid "CID"
-msgstr "CID"
-
-msgid "CPU %"
-msgstr "CPU %"
-
-msgid "CPU period"
-msgstr "CPU-periode"
-
-msgid "CPU quota"
-msgstr "CPU-quotum"
-
-msgid "CPU set"
-msgstr "CPU-set"
-
-msgid "CPU shares"
-msgstr "CPU-shares"
-
-msgid "DNS options"
-msgstr "DNS-opties"
-
-msgid "DNS search"
-msgstr "DNS-zoek"
-
-msgid "DNS servers"
-msgstr "DNS-servers"
-
-msgid "Exit policy"
-msgstr "Exit-beleid"
-
-msgid "Extra hosts"
-msgstr "Extra hosts"
-
-msgid "Host network"
-msgstr "Host-netwerk"
-
-msgid "Infra container"
-msgstr "Infra-container"
-
-msgid "Memory limit"
-msgstr "Geheugenlimiet"
-
-msgid "Net I/O"
-msgstr "Netwerk-I/O"
-
-msgid "Pause pod"
-msgstr "Pod pauzeren"
-
-msgid "Pod is not running"
-msgstr "Pod is niet actief"
-
-msgid "Remove pod"
-msgstr "Pod verwijderen"
-
-msgid "Restart policy"
-msgstr "Herstartbeleid"
-
-msgid "Restart pod"
-msgstr "Pod herstarten"
-
-msgid "Shared namespaces"
-msgstr "Gedeelde namespaces"
-
-msgid "Start pod"
-msgstr "Pod starten"
-
-msgid "Static IPv4"
-msgstr "Statische IPv4"
-
-msgid "Static MAC"
-msgstr "Statische MAC"
-
-msgid "Stop pod"
-msgstr "Pod stoppen"
-
-msgid "Unlimited"
-msgstr "Onbeperkt"
-
-msgid "Unpause pod"
-msgstr "Pod hervatten"
-
-msgid "Stopping container"
-msgstr "Container wordt gestopt"
-
-msgid "Stop failed: %s"
-msgstr "Stoppen mislukt: %s"
-
-msgid "Removing container"
-msgstr "Container wordt verwijderd"
-
-msgid "Remove failed: %s"
-msgstr "Verwijderen mislukt: %s"
-
-msgid "Creating container"
-msgstr "Container wordt aangemaakt"
-
-msgid "Create failed: %s"
-msgstr "Aanmaken mislukt: %s"
-
-msgid "Starting container"
-msgstr "Container wordt gestart"
-
-msgid "Start failed: %s"
-msgstr "Starten mislukt: %s"
-
-msgid "Reinstating init script"
-msgstr "Init-script wordt hersteld"
-
-msgid "Init script reinstate failed: %s"
-msgstr "Herstellen van init-script mislukt: %s"
-
-msgid "Updated to %s"
-msgstr "Bijgewerkt naar %s"
-
-msgid "Update image: %d/%d - %s"
-msgstr "Image bijwerken: %d/%d - %s"
-
-msgid "Removed old image %s"
-msgstr "Oude image %s verwijderd"
-
-msgid "Done."
-msgstr "Klaar."
-
-msgid "Pause container"
-msgstr "Container pauzeren"
-
-msgid "Unpause container"
-msgstr "Container hervatten"
diff --git a/luci-app-podman/po/ru/podman.po b/luci-app-podman/po/ru/podman.po
deleted file mode 100644
index af132e24d..000000000
--- a/luci-app-podman/po/ru/podman.po
+++ /dev/null
@@ -1,1093 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: luci-app-podman\n"
-"PO-Revision-Date: 2026-05-03 11:05+0000\n"
-"Last-Translator:\n"
-"Language-Team: Russian \n"
-"Language: ru\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid ""
-"Start script missing\n"
-"\n"
-"Click to generate"
-msgstr "Скрипт запуска отсутствует\n\nНажмите для создания"
-
-msgid "%d check(s) failed:"
-msgstr "%d проверок не удалось:"
-
-msgid "%d updated, %d failed:"
-msgstr "%d обновлено, %d не удалось:"
-
-msgid "%s created successfully"
-msgstr "%s успешно создан"
-
-msgid "%s: %d/%d"
-msgstr "%s: %d/%d"
-
-msgid "(none)"
-msgstr "(нет)"
-
-msgid "-- Select %s --"
-msgstr "-- Выберите %s --"
-
-msgid "1-253 characters: letters, numbers, underscore (_), hyphen (-) only"
-msgstr "1-253 символа: только буквы, цифры, подчёркивание (_) и дефис (-)"
-
-msgid "512m, 1g, or -1 for unlimited"
-msgstr "512m, 1g или -1 для неограниченно"
-
-msgid "API Version"
-msgstr "Версия API"
-
-msgid "Add the container to an existing pod. Network, hostname and port mappings come from the pod's infra container."
-msgstr "Добавить контейнер в существующий под. Сеть, имя хоста и сопоставления портов берутся из infra-контейнера пода."
-
-msgid "All images updated successfully"
-msgstr "Все образы успешно обновлены"
-
-msgid "All volumes exported successfully"
-msgstr "Все тома успешно экспортированы"
-
-msgid "Allocate TTY (-t)"
-msgstr "Выделить TTY (-t)"
-
-msgid "Allocate container IP from this range"
-msgstr "Выделить IP контейнера из этого диапазона"
-
-msgid "Always"
-msgstr "Всегда"
-
-msgid "Apply Updates"
-msgstr "Применить обновления"
-
-msgid "Are you sure to delete the records?"
-msgstr "Вы уверены, что хотите удалить записи?"
-
-msgid "Are you sure to remove container?"
-msgstr "Вы уверены, что хотите удалить контейнер?"
-
-msgid "Are you sure to remove integration?"
-msgstr "Вы уверены, что хотите удалить интеграцию?"
-
-msgid "Auto Remove (--rm)"
-msgstr "Автоудаление (--rm)"
-
-msgid "Auto Update"
-msgstr "Автообновление"
-
-msgid "Auto-Update"
-msgstr "Автообновление"
-
-msgid "Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt."
-msgstr "Автоматически настроить сетевой интерфейс OpenWrt, мост и зону брандмауэра. Настоятельно рекомендуется для правильной работы сети контейнеров на OpenWrt."
-
-msgid "Automatically start the container after it is created"
-msgstr "Автоматически запускать контейнер после создания"
-
-msgid "Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry"
-msgstr "Автоматически обновлять контейнер при наличии нового образа. Добавляет метку: `io.containers.autoupdate=registry`"
-
-msgid "Basic Information"
-msgstr "Основная информация"
-
-msgid "Block I/O"
-msgstr "Блочный ввод/вывод"
-
-msgid "Boot"
-msgstr "Загрузка"
-
-msgid "Bridge Interface Name"
-msgstr "Имя интерфейса моста"
-
-msgid "CPU"
-msgstr "ЦП"
-
-msgid "CPU Limit"
-msgstr "Ограничение ЦП"
-
-msgid "CPU Set"
-msgstr "Набор CPU"
-
-msgid "CPU Shares Weight"
-msgstr "Вес долей ЦП"
-
-msgid "CPU Usage"
-msgstr "Использование ЦП"
-
-msgid "CPU shares (relative weight). 0 = use default."
-msgstr "Доли ЦП (относительный вес). 0 = использовать по умолчанию."
-
-msgid "CPUs the pod is allowed to run on (e.g., \"0-3\" or \"0,2\")"
-msgstr "CPU, на которых разрешено выполнять под (например, \"0-3\" или \"0,2\")"
-
-msgid "Cancel"
-msgstr "Отмена"
-
-msgid "Check"
-msgstr "Проверить"
-
-msgid "Check %d containers for updates?"
-msgstr "Проверить %d контейнеров на обновления?"
-
-msgid "Check Complete"
-msgstr "Проверка завершена"
-
-msgid "Check for Updates"
-msgstr "Проверить обновления"
-
-msgid "Check for updates: %s/%s"
-msgstr "Проверка обновлений: %s/%s"
-
-msgid "Choose firewall zone for this network."
-msgstr "Выберите зону брандмауэра для этой сети."
-
-msgid "Clean Up Now"
-msgstr "Очистить сейчас"
-
-msgid "Cleaning up old images..."
-msgstr "Очистка старых образов..."
-
-msgid "Cleanup / Prune"
-msgstr "Очистка / Удаление неиспользуемого"
-
-msgid "Cleanup Complete"
-msgstr "Очистка завершена"
-
-msgid "Cleanup Unused Resources"
-msgstr "Очистка неиспользуемых ресурсов"
-
-msgid "Cleanup successful!"
-msgstr "Очистка успешна!"
-
-msgid "Clear logs"
-msgstr "Очистить логи"
-
-msgid "Click icon to repair"
-msgstr "Нажмите значок для восстановления"
-
-msgid "Click to disconnect"
-msgstr "Нажмите для отключения"
-
-msgid "Click to enable/disable"
-msgstr "Нажмите для включения/отключения"
-
-msgid "Click to reveal/hide value"
-msgstr "Нажмите для отображения/скрытия значения"
-
-msgid "Close"
-msgstr "Закрыть"
-
-msgid "Comma-separated list of supplementary group IDs"
-msgstr "Список дополнительных идентификаторов групп через запятую"
-
-msgid "Comma-separated ports to expose (e.g., 6052, 8080/udp)"
-msgstr "Порты для публикации через запятую (например, 6052, 8080/udp)"
-
-msgid "Command"
-msgstr "Команда"
-
-msgid "Command to run (space-separated)"
-msgstr "Команда для запуска (разделённая пробелами)"
-
-msgid "Configuration"
-msgstr "Конфигурация"
-
-msgid "Configure resource limits for this container."
-msgstr "Настройте ограничения ресурсов для этого контейнера."
-
-msgid "Confirm"
-msgstr "Подтвердить"
-
-msgid "Connect"
-msgstr "Подключить"
-
-msgid "Connect to"
-msgstr "Подключить к"
-
-msgid "Connected successfully to %s"
-msgstr "Успешно подключено к %s"
-
-msgid "Connecting container to network"
-msgstr "Подключение контейнера к сети"
-
-msgid "Console"
-msgstr "Консоль"
-
-msgid "Container"
-msgstr "Контейнер"
-
-msgid "Container Name"
-msgstr "Имя контейнера"
-
-msgid "Container image has no tag - cannot update"
-msgstr "Образ контейнера не имеет тега - невозможно обновить"
-
-msgid "Container image to use"
-msgstr "Образ контейнера для использования"
-
-msgid "Container is not running"
-msgstr "Контейнер не запущен"
-
-msgid "Container updated successfully"
-msgstr "Контейнер успешно обновлён"
-
-msgid "Containers"
-msgstr "Контейнеры"
-
-msgid "Containers in pod %s"
-msgstr "Контейнеры в поде %s"
-
-msgid "Containers updated successfully"
-msgstr "Контейнеры успешно обновлены"
-
-msgid "Containers updated successfully."
-msgstr "Контейнеры успешно обновлены."
-
-msgid "Create"
-msgstr "Создать"
-
-msgid "Create %s"
-msgstr "Создать %s"
-
-msgid "Create Command"
-msgstr "Команда создания"
-
-msgid "Create Infra Container"
-msgstr "Создать infra-контейнер"
-
-msgid "Create new zone (will be named: podman_)"
-msgstr "Создать новую зону (будет названа: podman_<имя-сети>)"
-
-msgid "Created"
-msgstr "Создано"
-
-msgid "Creating %s"
-msgstr "Создание %s"
-
-msgid "Creating auto-start configuration for %s"
-msgstr "Создание конфигурации автозапуска для %s"
-
-msgid "DNS Search Domains"
-msgstr "Домены поиска DNS"
-
-msgid "DNS Servers"
-msgstr "DNS-серверы"
-
-msgid "DNS search domains for the infra container"
-msgstr "Домены поиска DNS для infra-контейнера"
-
-msgid "DNS servers for the infra container (shared with all pod containers)"
-msgstr "DNS-серверы для infra-контейнера (общие для всех контейнеров пода)"
-
-msgid "Delete"
-msgstr "Удалить"
-
-msgid "Deleting records: %d/%d"
-msgstr "Удаление записей: %d/%d"
-
-msgid "Deleting records: %s/%s"
-msgstr "Удаление записей: %s/%s"
-
-msgid "Destination"
-msgstr "Назначение"
-
-msgid "Device"
-msgstr "Устройство"
-
-msgid "Disabled"
-msgstr "Отключено"
-
-msgid "Disabling init script"
-msgstr "Отключение скрипта инициализации"
-
-msgid "Disconnect container from network"
-msgstr "Отключить контейнер от сети"
-
-msgid "Disconnected from %s"
-msgstr "Отключено от %s"
-
-msgid "Dnsmasq"
-msgstr "Dnsmasq"
-
-msgid "Driver"
-msgstr "Драйвер"
-
-msgid "Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)"
-msgstr "Опции драйвера (разделённые запятыми, например, type=tmpfs,o=size=100m)"
-
-msgid "Enable IPv6"
-msgstr "Включить IPv6"
-
-msgid "Enable IPv6 networking"
-msgstr "Включить сеть IPv6"
-
-msgid "Enabling init script"
-msgstr "Включение скрипта инициализации"
-
-msgid "Enter secret data (password, token, key, etc.)"
-msgstr "Введите секретные данные (пароль, токен, ключ и т.д.)"
-
-msgid "Entrypoint"
-msgstr "Точка входа"
-
-msgid "Environment Variables"
-msgstr "Переменные окружения"
-
-msgid "Ephemeral (--rm flag)"
-msgstr "Эфемерный (флаг --rm)"
-
-msgid "Error"
-msgstr "Ошибка"
-
-msgid "Error: %s"
-msgstr "Ошибка: %s"
-
-msgid "Existing physical interface to use as parent. Required for macvlan/ipvlan networks."
-msgstr "Существующий физический интерфейс для использования в качестве родительского. Требуется для сетей macvlan/ipvlan."
-
-msgid "Expecting: %s"
-msgstr "Ожидается: %s"
-
-msgid "Export"
-msgstr "Экспорт"
-
-msgid "Exporting selected volumes: %d/%d"
-msgstr "Экспорт выбранных томов: %d/%d"
-
-msgid "Expose Ports"
-msgstr "Открываемые порты"
-
-msgid "Failed to create container"
-msgstr "Не удалось создать контейнер"
-
-msgid "Fetching information..."
-msgstr "Получение информации..."
-
-msgid "Find updateable containers"
-msgstr "Найти контейнеры с доступными обновлениями"
-
-msgid "Firewall Zone"
-msgstr "Зона брандмауэра"
-
-msgid "Gateway"
-msgstr "Шлюз"
-
-msgid "Generate"
-msgstr "Сгенерировать"
-
-msgid "Graph Root"
-msgstr "Корень графа"
-
-msgid "Health"
-msgstr "Состояние"
-
-msgid "Hostname"
-msgstr "Имя хоста"
-
-msgid "Hostname for the pod (defaults to pod name)"
-msgstr "Имя хоста для пода (по умолчанию — имя пода)"
-
-msgid "ID"
-msgstr "ID"
-
-msgid "IP Address"
-msgstr "IP-адрес"
-
-msgid "IP Range (CIDR)"
-msgstr "Диапазон IP (CIDR)"
-
-msgid "IPv4 Gateway"
-msgstr "Шлюз IPv4"
-
-msgid "IPv4 Subnet (CIDR)"
-msgstr "Подсеть IPv4 (CIDR)"
-
-msgid "IPv4 gateway address"
-msgstr "Адрес шлюза IPv4"
-
-msgid "IPv4 subnet in CIDR notation"
-msgstr "Подсеть IPv4 в нотации CIDR"
-
-msgid "Image"
-msgstr "Образ"
-
-msgid "Image ID"
-msgstr "ID образа"
-
-msgid "Image is already up-to-date"
-msgstr "Образ уже актуален"
-
-msgid "Image pulled successfully"
-msgstr "Образ успешно загружен"
-
-msgid "Images"
-msgstr "Образы"
-
-msgid "Import"
-msgstr "Импорт"
-
-msgid "Import from archive: %s"
-msgstr "Импорт из архива: %s"
-
-msgid "Importing volume..."
-msgstr "Импорт тома..."
-
-msgid "Info"
-msgstr "Инфо"
-
-msgid "Information"
-msgstr "Информация"
-
-msgid "Infra Image"
-msgstr "Infra-образ"
-
-msgid "Init Script"
-msgstr "Скрипт инициализации"
-
-msgid "Inspect"
-msgstr "Проверить"
-
-msgid "Int"
-msgstr "Целое число"
-
-msgid "Interactive"
-msgstr "Интерактивный"
-
-msgid "Interface"
-msgstr "Интерфейс"
-
-msgid "Internal Network"
-msgstr "Внутренняя сеть"
-
-msgid "Labels"
-msgstr "Метки"
-
-msgid "Labels in key=value format, one per line"
-msgstr "Метки в формате key=value, по одной на строку"
-
-msgid "Leave empty to auto-generate"
-msgstr "Оставьте пустым для автогенерации"
-
-msgid "Links"
-msgstr "Ссылки"
-
-msgid "Linux namespaces shared between containers in the pod. Default matches `podman pod create`."
-msgstr "Пространства имён Linux, общие для контейнеров пода. По умолчанию соответствует `podman pod create`."
-
-msgid "Load"
-msgstr "Загрузить"
-
-msgid "Load System diagnostics"
-msgstr "Загрузить системную диагностику"
-
-msgid "Loading init script"
-msgstr "Загрузка скрипта инициализации"
-
-msgid "Loading..."
-msgstr "Загрузка..."
-
-msgid "Logs"
-msgstr "Логи"
-
-msgid "Manage podman %s"
-msgstr "Управление podman %s"
-
-msgid "Memory"
-msgstr "Память"
-
-msgid "Memory %"
-msgstr "Память %"
-
-msgid "Memory + Swap Limit"
-msgstr "Память + Ограничение Swap"
-
-msgid "Memory Limit"
-msgstr "Ограничение памяти"
-
-msgid "Memory Usage"
-msgstr "Использование памяти"
-
-msgid "Memory limit (e.g., 512m, 1g)"
-msgstr "Ограничение памяти (например, 512м, 1г)"
-
-msgid "Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default."
-msgstr "Ограничение памяти (например, 512m, 1g). -1 = неограниченно, 0 = использовать по умолчанию."
-
-msgid "Memory limit for the pod (e.g., 512m, 1g)"
-msgstr "Лимит памяти для пода (например, 512m, 1g)"
-
-msgid "Mode"
-msgstr "Режим"
-
-msgid "Mount Options"
-msgstr "Опции монтирования"
-
-msgid "Mountpoint"
-msgstr "Точка монтирования"
-
-msgid "Mounts"
-msgstr "Монтирования"
-
-msgid "Must be between 0 and 262144"
-msgstr "Должно быть между 0 и 262144"
-
-msgid "Name"
-msgstr "Имя"
-
-msgid "Name for the network"
-msgstr "Имя для сети"
-
-msgid "Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it."
-msgstr "Имя интерфейса моста (например, podman0, mynet0). Оставьте пустым для использования: <имя-сети>0. Примечание: Если сгенерированное имя конфликтует с существующим интерфейсом, OpenWrt автоматически увеличит его."
-
-msgid "Name updated successfully"
-msgstr "Имя успешно обновлено"
-
-msgid "Network"
-msgstr "Сеть"
-
-msgid "Network I/O"
-msgstr "Сетевой ввод/вывод"
-
-msgid "Network Mode"
-msgstr "Сетевой режим"
-
-msgid "Network Name"
-msgstr "Имя сети"
-
-msgid "Network driver"
-msgstr "Сетевой драйвер"
-
-msgid "Network namespace for the pod. Containers in the pod share this network."
-msgstr "Сетевое пространство имён для пода. Контейнеры в поде используют общую сеть."
-
-msgid "Networks"
-msgstr "Сети"
-
-msgid "Never"
-msgstr "Никогда"
-
-msgid "No"
-msgstr "Нет"
-
-msgid "No %s selected"
-msgstr "%s не выбрано"
-
-msgid "No containers in this pod"
-msgstr "В этом поде нет контейнеров"
-
-msgid "No containers with auto-update label found."
-msgstr "Контейнеры с меткой автообновления не найдены."
-
-msgid "No new updates available."
-msgstr "Новые обновления недоступны."
-
-msgid "No suitable interfaces found"
-msgstr "Подходящие интерфейсы не найдены"
-
-msgid "No unused resources found"
-msgstr "Неиспользуемые ресурсы не найдены"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0)"
-msgstr "Количество ЦП (например, 0.5, 1.0, 2.0)"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited."
-msgstr "Количество ЦП (например, 0.5, 1.0, 2.0). Оставьте пустым для неограниченно."
-
-msgid "Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)"
-msgstr "Количество CPU, доступных поду (например, 0.5, 1.0, 2.0)"
-
-msgid "Number of lines"
-msgstr "Количество строк"
-
-msgid "OK"
-msgstr "OK"
-
-msgid "Old image still used by other containers"
-msgstr "Старый образ ещё используется другими контейнерами"
-
-msgid "On Failure"
-msgstr "При ошибке"
-
-msgid "One per line, format: host:container[/protocol]"
-msgstr "По одному на строку, формат: хост:контейнер[/протокол]"
-
-msgid "One per line, format: key=value"
-msgstr "По одному на строку, формат: key=value"
-
-msgid "One per line. Format: source:destination[:options]. Options: ro, rw, Z, z"
-msgstr "По одному на строку. Формат: источник:назначение[:опции]. Опции: ro, rw, Z, z"
-
-msgid "OpenWrt integration exists\n\nClick to remove"
-msgstr "Интеграция OpenWrt существует\n\nНажмите для удаления"
-
-msgid "OpenWrt integration incomplete"
-msgstr "Интеграция с OpenWrt неполная"
-
-msgid "OpenWrt integration requires subnet to be specified"
-msgstr "Интеграция с OpenWrt требует указания подсети"
-
-msgid "Override the image used for the infra container"
-msgstr "Переопределить образ, используемый для infra-контейнера"
-
-msgid "PIDs"
-msgstr "PID"
-
-msgid "Parent Interface"
-msgstr "Родительский интерфейс"
-
-msgid "Parent interface is required for macvlan/ipvlan networks"
-msgstr "Родительский интерфейс требуется для сетей macvlan/ipvlan"
-
-msgid "Part of a pod (\"%s\")"
-msgstr "Часть пода (\"%s\")"
-
-msgid "Pausing pod"
-msgstr "Приостановка пода"
-
-msgid "Pod"
-msgstr "Под"
-
-msgid "Pod Name"
-msgstr "Имя пода"
-
-msgid "Podman Version"
-msgstr "Версия Podman"
-
-msgid "Pods"
-msgstr "Поды"
-
-msgid "Port Mappings"
-msgstr "Маппинг портов"
-
-msgid "Ports"
-msgstr "Порты"
-
-msgid "Privileged"
-msgstr "Привилегированный"
-
-msgid "Privileged Mode"
-msgstr "Привилегированный режим"
-
-msgid "Processes"
-msgstr "Процессы"
-
-msgid "Pull Image"
-msgstr "Загрузить образ"
-
-msgid "Pull did not return an image ID - pull may have failed"
-msgstr "Загрузка не вернула ID образа - возможно, загрузка не удалась"
-
-msgid "Pulling %s"
-msgstr "Загрузка %s"
-
-msgid "Read: %s / Write: %s"
-msgstr "Чтение: %s / Запись: %s"
-
-msgid "Refreshing %s..."
-msgstr "Обновление %s..."
-
-msgid "Registries"
-msgstr "Реестры"
-
-msgid "Registry"
-msgstr "Реестр"
-
-msgid "Reload"
-msgstr "Перезагрузить"
-
-msgid "Remove OpenWrt integration"
-msgstr "Удалить интеграцию с OpenWrt"
-
-msgid "Remove all unused images (not just dangling)"
-msgstr "Удалить все неиспользуемые образы (не только висячие)"
-
-msgid "Remove container"
-msgstr "Удалить контейнер"
-
-msgid "Remove unused volumes"
-msgstr "Удалить неиспользуемые тома"
-
-msgid "Removed: %s"
-msgstr "Удалено: %s"
-
-msgid "Removing unused resources, please wait..."
-msgstr "Удаление неиспользуемых ресурсов, пожалуйста, подождите..."
-
-msgid "Repository"
-msgstr "Репозиторий"
-
-msgid "Required for shared network namespace. Disable only if you know you do not need it."
-msgstr "Требуется для общего сетевого пространства имён. Отключайте только если уверены, что это не нужно."
-
-msgid "Resources"
-msgstr "Ресурсы"
-
-msgid "Restart Policy"
-msgstr "Политика перезапуска"
-
-msgid "Restart container"
-msgstr "Перезапустить контейнер"
-
-msgid "Restart policy updated successfully"
-msgstr "Политика перезапуска успешно обновлена"
-
-msgid "Restarting pod"
-msgstr "Перезапуск пода"
-
-msgid "Restrict external access to the network"
-msgstr "Ограничить внешний доступ к сети"
-
-msgid "Run Root"
-msgstr "Корень запуска"
-
-msgid "Saving resource"
-msgstr "Сохранение ресурса"
-
-msgid "Secret"
-msgstr "Секрет"
-
-msgid "Secret Data"
-msgstr "Секретные данные"
-
-msgid "Secret Name"
-msgstr "Имя секрета"
-
-msgid "Secret name can only contain letters, numbers, underscores, and hyphens"
-msgstr "Имя секрета может содержать только буквы, цифры, подчёркивания и дефисы"
-
-msgid "Secrets"
-msgstr "Секреты"
-
-msgid "Security Notice:"
-msgstr "Уведомление о безопасности:"
-
-msgid "Select containers to update"
-msgstr "Выберите контейнеры для обновления"
-
-msgid "Select network for the new container. User-created networks provide better isolation and DNS resolution between containers."
-msgstr "Выберите сеть для нового контейнера. Пользовательские сети обеспечивают лучшую изоляцию и разрешение DNS между контейнерами."
-
-msgid "Select what to clean up:"
-msgstr "Выберите, что очистить:"
-
-msgid "Sensitive data is hidden for security reasons."
-msgstr "Конфиденциальные данные скрыты по соображениям безопасности."
-
-msgid "Setup OpenWrt Integration"
-msgstr "Настроить интеграцию с OpenWrt"
-
-msgid "Shared Namespaces"
-msgstr "Общие пространства имён"
-
-msgid "Shares network with another container"
-msgstr "Использует общую сеть с другим контейнером"
-
-msgid "Show"
-msgstr "Показать"
-
-msgid "Since"
-msgstr "С"
-
-msgid "Size"
-msgstr "Размер"
-
-msgid "Socket Path"
-msgstr "Путь к сокету"
-
-msgid "Source"
-msgstr "Источник"
-
-msgid "Space freed: %s"
-msgstr "Освобождено места: %s"
-
-msgid "Start after creation"
-msgstr "Запустить после создания"
-
-msgid "Start container"
-msgstr "Запустить контейнер"
-
-msgid "Start on boot"
-msgstr "Запускать при загрузке"
-
-msgid "Start script disabled"
-msgstr "Скрипт запуска отключён"
-
-msgid "Start stream"
-msgstr "Начать поток"
-
-msgid "Started"
-msgstr "Запущено"
-
-msgid "Started At"
-msgstr "Запущено в"
-
-msgid "Starting pod"
-msgstr "Запуск пода"
-
-msgid "Statistics"
-msgstr "Статистика"
-
-msgid "Stats"
-msgstr "Статистика"
-
-msgid "Status"
-msgstr "Статус"
-
-msgid "Stop container"
-msgstr "Остановить контейнер"
-
-msgid "Stop stream"
-msgstr "Остановить поток"
-
-msgid "Stopping pod"
-msgstr "Остановка пода"
-
-msgid "Subnet"
-msgstr "Подсеть"
-
-msgid "Supplementary Groups"
-msgstr "Дополнительные группы"
-
-msgid "System Diagnostics"
-msgstr "Системная диагностика"
-
-msgid "TTY"
-msgstr "TTY"
-
-msgid "Tag"
-msgstr "Тег"
-
-msgid "The sensitive data to store securely"
-msgstr "Конфиденциальные данные для безопасного хранения"
-
-msgid "To enable auto-update for a container, add the label: io.containers.autoupdate=registry"
-msgstr "Для включения автообновления контейнера добавьте метку: `io.containers.autoupdate=registry`"
-
-msgid "Total"
-msgstr "Всего"
-
-msgid "Total memory limit (memory + swap). -1 = unlimited, 0 = use default."
-msgstr "Общее ограничение памяти (память + swap). -1 = неограниченно, 0 = использовать по умолчанию."
-
-msgid "Type"
-msgstr "Тип"
-
-msgid "Unknown"
-msgstr "Неизвестно"
-
-msgid "Unless Stopped"
-msgstr "Пока не остановлен"
-
-msgid "Until"
-msgstr "До"
-
-msgid "Update"
-msgstr "Обновить"
-
-msgid "Update Resources"
-msgstr "Обновить ресурсы"
-
-msgid "Update name"
-msgstr "Обновить имя"
-
-msgid "Update restart policy"
-msgstr "Обновить политику перезапуска"
-
-msgid "Updating Images"
-msgstr "Обновление образов"
-
-msgid "Updating container"
-msgstr "Обновление контейнера"
-
-msgid "Upload failed: %s"
-msgstr "Загрузка не удалась: %s"
-
-msgid "Uploading file..."
-msgstr "Загрузка файла..."
-
-msgid "User"
-msgstr "Пользователь"
-
-msgid "User and group to run as (UID:GID)"
-msgstr "Пользователь и группа для запуска (UID:GID)"
-
-msgid "Value"
-msgstr "Значение"
-
-msgid "Variable"
-msgstr "Переменная"
-
-msgid "Volume"
-msgstr "Том"
-
-msgid "Volume Name"
-msgstr "Имя тома"
-
-msgid "Volume driver to use"
-msgstr "Драйвер тома для использования"
-
-msgid "Volume imported successfully"
-msgstr "Том успешно импортирован"
-
-msgid "Volume name. Leave empty to auto-generate."
-msgstr "Имя тома. Оставьте пустым для автогенерации."
-
-msgid "Volumes"
-msgstr "Тома"
-
-msgid "Working Directory"
-msgstr "Рабочая директория"
-
-msgid "Yes"
-msgstr "Да"
-
-msgid "default"
-msgstr "по умолчанию"
-
-msgid "non-empty value"
-msgstr "непустое значение"
-
-msgid "running"
-msgstr "запущен"
-
-msgid "total"
-msgstr "всего"
-
-msgid "Are you sure to remove pod?"
-msgstr "Действительно удалить под?"
-
-msgid "Cgroup parent"
-msgstr "Родитель cgroup"
-
-msgid "CID"
-msgstr "CID"
-
-msgid "CPU %"
-msgstr "ЦП %"
-
-msgid "CPU period"
-msgstr "Период CPU"
-
-msgid "CPU quota"
-msgstr "Квота CPU"
-
-msgid "CPU set"
-msgstr "Набор CPU"
-
-msgid "CPU shares"
-msgstr "Доли CPU"
-
-msgid "DNS options"
-msgstr "Параметры DNS"
-
-msgid "DNS search"
-msgstr "Поиск DNS"
-
-msgid "DNS servers"
-msgstr "DNS-серверы"
-
-msgid "Exit policy"
-msgstr "Политика выхода"
-
-msgid "Extra hosts"
-msgstr "Дополнительные хосты"
-
-msgid "Host network"
-msgstr "Сеть хоста"
-
-msgid "Infra container"
-msgstr "Infra-контейнер"
-
-msgid "Memory limit"
-msgstr "Лимит памяти"
-
-msgid "Net I/O"
-msgstr "Сетевой I/O"
-
-msgid "Pause pod"
-msgstr "Приостановить под"
-
-msgid "Pod is not running"
-msgstr "Под не запущен"
-
-msgid "Remove pod"
-msgstr "Удалить под"
-
-msgid "Restart policy"
-msgstr "Политика перезапуска"
-
-msgid "Restart pod"
-msgstr "Перезапустить под"
-
-msgid "Shared namespaces"
-msgstr "Общие пространства имён"
-
-msgid "Start pod"
-msgstr "Запустить под"
-
-msgid "Static IPv4"
-msgstr "Статический IPv4"
-
-msgid "Static MAC"
-msgstr "Статический MAC"
-
-msgid "Stop pod"
-msgstr "Остановить под"
-
-msgid "Unlimited"
-msgstr "Без ограничений"
-
-msgid "Unpause pod"
-msgstr "Возобновить под"
-
-msgid "Stopping container"
-msgstr "Остановка контейнера"
-
-msgid "Stop failed: %s"
-msgstr "Ошибка остановки: %s"
-
-msgid "Removing container"
-msgstr "Удаление контейнера"
-
-msgid "Remove failed: %s"
-msgstr "Ошибка удаления: %s"
-
-msgid "Creating container"
-msgstr "Создание контейнера"
-
-msgid "Create failed: %s"
-msgstr "Ошибка создания: %s"
-
-msgid "Starting container"
-msgstr "Запуск контейнера"
-
-msgid "Start failed: %s"
-msgstr "Ошибка запуска: %s"
-
-msgid "Reinstating init script"
-msgstr "Восстановление скрипта инициализации"
-
-msgid "Init script reinstate failed: %s"
-msgstr "Ошибка восстановления скрипта инициализации: %s"
-
-msgid "Updated to %s"
-msgstr "Обновлено до %s"
-
-msgid "Update image: %d/%d - %s"
-msgstr "Обновление образа: %d/%d - %s"
-
-msgid "Removed old image %s"
-msgstr "Старый образ %s удалён"
-
-msgid "Done."
-msgstr "Готово."
-
-msgid "Pause container"
-msgstr "Приостановить контейнер"
-
-msgid "Unpause container"
-msgstr "Возобновить контейнер"
diff --git a/luci-app-podman/po/templates/podman.pot b/luci-app-podman/po/templates/podman.pot
deleted file mode 100644
index 2641b17eb..000000000
--- a/luci-app-podman/po/templates/podman.pot
+++ /dev/null
@@ -1,1081 +0,0 @@
-msgid ""
-msgstr "Content-Type: text/plain; charset=UTF-8"
-
-msgid "%d check(s) failed:"
-msgstr ""
-
-msgid "%d updated, %d failed:"
-msgstr ""
-
-msgid "%s created successfully"
-msgstr ""
-
-msgid "%s: %d/%d"
-msgstr ""
-
-msgid "(none)"
-msgstr ""
-
-msgid "-- Select %s --"
-msgstr ""
-
-msgid "1-253 characters: letters, numbers, underscore (_), hyphen (-) only"
-msgstr ""
-
-msgid "512m, 1g, or -1 for unlimited"
-msgstr ""
-
-msgid "API Version"
-msgstr ""
-
-msgid "Add the container to an existing pod. Network, hostname and port mappings come from the pod's infra container."
-msgstr ""
-
-msgid "All images updated successfully"
-msgstr ""
-
-msgid "All volumes exported successfully"
-msgstr ""
-
-msgid "Allocate TTY (-t)"
-msgstr ""
-
-msgid "Allocate container IP from this range"
-msgstr ""
-
-msgid "Always"
-msgstr ""
-
-msgid "Apply Updates"
-msgstr ""
-
-msgid "Are you sure to delete the records?"
-msgstr ""
-
-msgid "Are you sure to remove container?"
-msgstr ""
-
-msgid "Are you sure to remove integration?"
-msgstr ""
-
-msgid "Auto Remove (--rm)"
-msgstr ""
-
-msgid "Auto Update"
-msgstr ""
-
-msgid "Auto-Update"
-msgstr ""
-
-msgid "Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt."
-msgstr ""
-
-msgid "Automatically start the container after it is created"
-msgstr ""
-
-msgid "Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry"
-msgstr ""
-
-msgid "Basic Information"
-msgstr ""
-
-msgid "Block I/O"
-msgstr ""
-
-msgid "Boot"
-msgstr ""
-
-msgid "Bridge Interface Name"
-msgstr ""
-
-msgid "CPU"
-msgstr ""
-
-msgid "CPU Limit"
-msgstr ""
-
-msgid "CPU Set"
-msgstr ""
-
-msgid "CPU Shares Weight"
-msgstr ""
-
-msgid "CPU Usage"
-msgstr ""
-
-msgid "CPU shares (relative weight). 0 = use default."
-msgstr ""
-
-msgid "CPUs the pod is allowed to run on (e.g., \"0-3\" or \"0,2\")"
-msgstr ""
-
-msgid "Cancel"
-msgstr ""
-
-msgid "Check"
-msgstr ""
-
-msgid "Check %d containers for updates?"
-msgstr ""
-
-msgid "Check Complete"
-msgstr ""
-
-msgid "Check for Updates"
-msgstr ""
-
-msgid "Check for updates: %s/%s"
-msgstr ""
-
-msgid "Choose firewall zone for this network."
-msgstr ""
-
-msgid "Clean Up Now"
-msgstr ""
-
-msgid "Cleaning up old images..."
-msgstr ""
-
-msgid "Cleanup / Prune"
-msgstr ""
-
-msgid "Cleanup Complete"
-msgstr ""
-
-msgid "Cleanup Unused Resources"
-msgstr ""
-
-msgid "Cleanup successful!"
-msgstr ""
-
-msgid "Clear logs"
-msgstr ""
-
-msgid "Click icon to repair"
-msgstr ""
-
-msgid "Click to disconnect"
-msgstr ""
-
-msgid "Click to enable/disable"
-msgstr ""
-
-msgid "Click to reveal/hide value"
-msgstr ""
-
-msgid "Close"
-msgstr ""
-
-msgid "Comma-separated list of supplementary group IDs"
-msgstr ""
-
-msgid "Comma-separated ports to expose (e.g., 6052, 8080/udp)"
-msgstr ""
-
-msgid "Command"
-msgstr ""
-
-msgid "Command to run (space-separated)"
-msgstr ""
-
-msgid "Configuration"
-msgstr ""
-
-msgid "Configure resource limits for this container."
-msgstr ""
-
-msgid "Confirm"
-msgstr ""
-
-msgid "Connect"
-msgstr ""
-
-msgid "Connect to"
-msgstr ""
-
-msgid "Connected successfully to %s"
-msgstr ""
-
-msgid "Connecting container to network"
-msgstr ""
-
-msgid "Console"
-msgstr ""
-
-msgid "Container"
-msgstr ""
-
-msgid "Container Name"
-msgstr ""
-
-msgid "Container image has no tag - cannot update"
-msgstr ""
-
-msgid "Container image to use"
-msgstr ""
-
-msgid "Container is not running"
-msgstr ""
-
-msgid "Container updated successfully"
-msgstr ""
-
-msgid "Containers"
-msgstr ""
-
-msgid "Containers in pod %s"
-msgstr ""
-
-msgid "Containers updated successfully"
-msgstr ""
-
-msgid "Containers updated successfully."
-msgstr ""
-
-msgid "Create"
-msgstr ""
-
-msgid "Create %s"
-msgstr ""
-
-msgid "Create Command"
-msgstr ""
-
-msgid "Create Infra Container"
-msgstr ""
-
-msgid "Create new zone (will be named: podman_)"
-msgstr ""
-
-msgid "Created"
-msgstr ""
-
-msgid "Creating %s"
-msgstr ""
-
-msgid "Creating auto-start configuration for %s"
-msgstr ""
-
-msgid "DNS Search Domains"
-msgstr ""
-
-msgid "DNS Servers"
-msgstr ""
-
-msgid "DNS search domains for the infra container"
-msgstr ""
-
-msgid "DNS servers for the infra container (shared with all pod containers)"
-msgstr ""
-
-msgid "Delete"
-msgstr ""
-
-msgid "Deleting records: %d/%d"
-msgstr ""
-
-msgid "Deleting records: %s/%s"
-msgstr ""
-
-msgid "Destination"
-msgstr ""
-
-msgid "Device"
-msgstr ""
-
-msgid "Disabled"
-msgstr ""
-
-msgid "Disabling init script"
-msgstr ""
-
-msgid "Disconnect container from network"
-msgstr ""
-
-msgid "Disconnected from %s"
-msgstr ""
-
-msgid "Dnsmasq"
-msgstr ""
-
-msgid "Driver"
-msgstr ""
-
-msgid "Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)"
-msgstr ""
-
-msgid "Enable IPv6"
-msgstr ""
-
-msgid "Enable IPv6 networking"
-msgstr ""
-
-msgid "Enabling init script"
-msgstr ""
-
-msgid "Enter secret data (password, token, key, etc.)"
-msgstr ""
-
-msgid "Entrypoint"
-msgstr ""
-
-msgid "Environment Variables"
-msgstr ""
-
-msgid "Ephemeral (--rm flag)"
-msgstr ""
-
-msgid "Error"
-msgstr ""
-
-msgid "Error: %s"
-msgstr ""
-
-msgid "Existing physical interface to use as parent. Required for macvlan/ipvlan networks."
-msgstr ""
-
-msgid "Expecting: %s"
-msgstr ""
-
-msgid "Export"
-msgstr ""
-
-msgid "Exporting selected volumes: %d/%d"
-msgstr ""
-
-msgid "Expose Ports"
-msgstr ""
-
-msgid "Failed to create container"
-msgstr ""
-
-msgid "Fetching information..."
-msgstr ""
-
-msgid "Find updateable containers"
-msgstr ""
-
-msgid "Firewall Zone"
-msgstr ""
-
-msgid "Gateway"
-msgstr ""
-
-msgid "Generate"
-msgstr ""
-
-msgid "Graph Root"
-msgstr ""
-
-msgid "Health"
-msgstr ""
-
-msgid "Hostname"
-msgstr ""
-
-msgid "Hostname for the pod (defaults to pod name)"
-msgstr ""
-
-msgid "ID"
-msgstr ""
-
-msgid "IP Address"
-msgstr ""
-
-msgid "IP Range (CIDR)"
-msgstr ""
-
-msgid "IPv4 Gateway"
-msgstr ""
-
-msgid "IPv4 Subnet (CIDR)"
-msgstr ""
-
-msgid "IPv4 gateway address"
-msgstr ""
-
-msgid "IPv4 subnet in CIDR notation"
-msgstr ""
-
-msgid "Image"
-msgstr ""
-
-msgid "Image ID"
-msgstr ""
-
-msgid "Image is already up-to-date"
-msgstr ""
-
-msgid "Image pulled successfully"
-msgstr ""
-
-msgid "Images"
-msgstr ""
-
-msgid "Import"
-msgstr ""
-
-msgid "Import from archive: %s"
-msgstr ""
-
-msgid "Importing volume..."
-msgstr ""
-
-msgid "Info"
-msgstr ""
-
-msgid "Information"
-msgstr ""
-
-msgid "Infra Image"
-msgstr ""
-
-msgid "Init Script"
-msgstr ""
-
-msgid "Inspect"
-msgstr ""
-
-msgid "Int"
-msgstr ""
-
-msgid "Interactive"
-msgstr ""
-
-msgid "Interface"
-msgstr ""
-
-msgid "Internal Network"
-msgstr ""
-
-msgid "Labels"
-msgstr ""
-
-msgid "Labels in key=value format, one per line"
-msgstr ""
-
-msgid "Leave empty to auto-generate"
-msgstr ""
-
-msgid "Links"
-msgstr ""
-
-msgid "Linux namespaces shared between containers in the pod. Default matches `podman pod create`."
-msgstr ""
-
-msgid "Load"
-msgstr ""
-
-msgid "Load System diagnostics"
-msgstr ""
-
-msgid "Loading init script"
-msgstr ""
-
-msgid "Loading..."
-msgstr ""
-
-msgid "Logs"
-msgstr ""
-
-msgid "Manage podman %s"
-msgstr ""
-
-msgid "Memory"
-msgstr ""
-
-msgid "Memory %"
-msgstr ""
-
-msgid "Memory + Swap Limit"
-msgstr ""
-
-msgid "Memory Limit"
-msgstr ""
-
-msgid "Memory Usage"
-msgstr ""
-
-msgid "Memory limit (e.g., 512m, 1g)"
-msgstr ""
-
-msgid "Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default."
-msgstr ""
-
-msgid "Memory limit for the pod (e.g., 512m, 1g)"
-msgstr ""
-
-msgid "Mode"
-msgstr ""
-
-msgid "Mount Options"
-msgstr ""
-
-msgid "Mountpoint"
-msgstr ""
-
-msgid "Mounts"
-msgstr ""
-
-msgid "Must be between 0 and 262144"
-msgstr ""
-
-msgid "Name"
-msgstr ""
-
-msgid "Name for the network"
-msgstr ""
-
-msgid "Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it."
-msgstr ""
-
-msgid "Name updated successfully"
-msgstr ""
-
-msgid "Network"
-msgstr ""
-
-msgid "Network I/O"
-msgstr ""
-
-msgid "Network Mode"
-msgstr ""
-
-msgid "Network Name"
-msgstr ""
-
-msgid "Network driver"
-msgstr ""
-
-msgid "Network namespace for the pod. Containers in the pod share this network."
-msgstr ""
-
-msgid "Networks"
-msgstr ""
-
-msgid "Never"
-msgstr ""
-
-msgid "No"
-msgstr ""
-
-msgid "No %s selected"
-msgstr ""
-
-msgid "No containers in this pod"
-msgstr ""
-
-msgid "No containers with auto-update label found."
-msgstr ""
-
-msgid "No new updates available."
-msgstr ""
-
-msgid "No suitable interfaces found"
-msgstr ""
-
-msgid "No unused resources found"
-msgstr ""
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0)"
-msgstr ""
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited."
-msgstr ""
-
-msgid "Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)"
-msgstr ""
-
-msgid "Number of lines"
-msgstr ""
-
-msgid "OK"
-msgstr ""
-
-msgid "Old image still used by other containers"
-msgstr ""
-
-msgid "On Failure"
-msgstr ""
-
-msgid "One per line, format: host:container[/protocol]"
-msgstr ""
-
-msgid "One per line, format: key=value"
-msgstr ""
-
-msgid "One per line. Format: source:destination[:options]. Options: ro, rw, Z, z"
-msgstr ""
-
-msgid "OpenWrt integration exists\n\nClick to remove"
-msgstr ""
-
-msgid "OpenWrt integration incomplete"
-msgstr ""
-
-msgid "OpenWrt integration requires subnet to be specified"
-msgstr ""
-
-msgid "Override the image used for the infra container"
-msgstr ""
-
-msgid "PIDs"
-msgstr ""
-
-msgid "Parent Interface"
-msgstr ""
-
-msgid "Parent interface is required for macvlan/ipvlan networks"
-msgstr ""
-
-msgid "Part of a pod (\"%s\")"
-msgstr ""
-
-msgid "Pausing pod"
-msgstr ""
-
-msgid "Pod"
-msgstr ""
-
-msgid "Pod Name"
-msgstr ""
-
-msgid "Podman Version"
-msgstr ""
-
-msgid "Pods"
-msgstr ""
-
-msgid "Port Mappings"
-msgstr ""
-
-msgid "Ports"
-msgstr ""
-
-msgid "Privileged"
-msgstr ""
-
-msgid "Privileged Mode"
-msgstr ""
-
-msgid "Processes"
-msgstr ""
-
-msgid "Pull Image"
-msgstr ""
-
-msgid "Pull did not return an image ID - pull may have failed"
-msgstr ""
-
-msgid "Pulling %s"
-msgstr ""
-
-msgid "Read: %s / Write: %s"
-msgstr ""
-
-msgid "Refreshing %s..."
-msgstr ""
-
-msgid "Registries"
-msgstr ""
-
-msgid "Registry"
-msgstr ""
-
-msgid "Reload"
-msgstr ""
-
-msgid "Remove OpenWrt integration"
-msgstr ""
-
-msgid "Remove all unused images (not just dangling)"
-msgstr ""
-
-msgid "Remove container"
-msgstr ""
-
-msgid "Remove unused volumes"
-msgstr ""
-
-msgid "Removed: %s"
-msgstr ""
-
-msgid "Removing unused resources, please wait..."
-msgstr ""
-
-msgid "Repository"
-msgstr ""
-
-msgid "Required for shared network namespace. Disable only if you know you do not need it."
-msgstr ""
-
-msgid "Resources"
-msgstr ""
-
-msgid "Restart Policy"
-msgstr ""
-
-msgid "Restart container"
-msgstr ""
-
-msgid "Restart policy updated successfully"
-msgstr ""
-
-msgid "Restarting pod"
-msgstr ""
-
-msgid "Restrict external access to the network"
-msgstr ""
-
-msgid "Run Root"
-msgstr ""
-
-msgid "Saving resource"
-msgstr ""
-
-msgid "Secret"
-msgstr ""
-
-msgid "Secret Data"
-msgstr ""
-
-msgid "Secret Name"
-msgstr ""
-
-msgid "Secret name can only contain letters, numbers, underscores, and hyphens"
-msgstr ""
-
-msgid "Secrets"
-msgstr ""
-
-msgid "Security Notice:"
-msgstr ""
-
-msgid "Select containers to update"
-msgstr ""
-
-msgid "Select network for the new container. User-created networks provide better isolation and DNS resolution between containers."
-msgstr ""
-
-msgid "Select what to clean up:"
-msgstr ""
-
-msgid "Sensitive data is hidden for security reasons."
-msgstr ""
-
-msgid "Setup OpenWrt Integration"
-msgstr ""
-
-msgid "Shared Namespaces"
-msgstr ""
-
-msgid "Shares network with another container"
-msgstr ""
-
-msgid "Show"
-msgstr ""
-
-msgid "Since"
-msgstr ""
-
-msgid "Size"
-msgstr ""
-
-msgid "Socket Path"
-msgstr ""
-
-msgid "Source"
-msgstr ""
-
-msgid "Space freed: %s"
-msgstr ""
-
-msgid "Start after creation"
-msgstr ""
-
-msgid "Start container"
-msgstr ""
-
-msgid "Start on boot"
-msgstr ""
-
-msgid "Start script disabled"
-msgstr ""
-
-msgid "Start script missing\n\nClick to generate"
-msgstr ""
-
-msgid "Start stream"
-msgstr ""
-
-msgid "Started"
-msgstr ""
-
-msgid "Started At"
-msgstr ""
-
-msgid "Starting pod"
-msgstr ""
-
-msgid "Statistics"
-msgstr ""
-
-msgid "Stats"
-msgstr ""
-
-msgid "Status"
-msgstr ""
-
-msgid "Stop container"
-msgstr ""
-
-msgid "Stop stream"
-msgstr ""
-
-msgid "Stopping pod"
-msgstr ""
-
-msgid "Subnet"
-msgstr ""
-
-msgid "Supplementary Groups"
-msgstr ""
-
-msgid "System Diagnostics"
-msgstr ""
-
-msgid "TTY"
-msgstr ""
-
-msgid "Tag"
-msgstr ""
-
-msgid "The sensitive data to store securely"
-msgstr ""
-
-msgid "To enable auto-update for a container, add the label: io.containers.autoupdate=registry"
-msgstr ""
-
-msgid "Total"
-msgstr ""
-
-msgid "Total memory limit (memory + swap). -1 = unlimited, 0 = use default."
-msgstr ""
-
-msgid "Type"
-msgstr ""
-
-msgid "Unknown"
-msgstr ""
-
-msgid "Unless Stopped"
-msgstr ""
-
-msgid "Until"
-msgstr ""
-
-msgid "Update"
-msgstr ""
-
-msgid "Update Resources"
-msgstr ""
-
-msgid "Update name"
-msgstr ""
-
-msgid "Update restart policy"
-msgstr ""
-
-msgid "Updating Images"
-msgstr ""
-
-msgid "Updating container"
-msgstr ""
-
-msgid "Upload failed: %s"
-msgstr ""
-
-msgid "Uploading file..."
-msgstr ""
-
-msgid "User"
-msgstr ""
-
-msgid "User and group to run as (UID:GID)"
-msgstr ""
-
-msgid "Value"
-msgstr ""
-
-msgid "Variable"
-msgstr ""
-
-msgid "Volume"
-msgstr ""
-
-msgid "Volume Name"
-msgstr ""
-
-msgid "Volume driver to use"
-msgstr ""
-
-msgid "Volume imported successfully"
-msgstr ""
-
-msgid "Volume name. Leave empty to auto-generate."
-msgstr ""
-
-msgid "Volumes"
-msgstr ""
-
-msgid "Working Directory"
-msgstr ""
-
-msgid "Yes"
-msgstr ""
-
-msgid "default"
-msgstr ""
-
-msgid "non-empty value"
-msgstr ""
-
-msgid "running"
-msgstr ""
-
-msgid "total"
-msgstr ""
-msgid "Are you sure to remove pod?"
-msgstr ""
-
-msgid "Cgroup parent"
-msgstr ""
-
-msgid "CID"
-msgstr ""
-
-msgid "CPU %"
-msgstr ""
-
-msgid "CPU period"
-msgstr ""
-
-msgid "CPU quota"
-msgstr ""
-
-msgid "CPU set"
-msgstr ""
-
-msgid "CPU shares"
-msgstr ""
-
-msgid "DNS options"
-msgstr ""
-
-msgid "DNS search"
-msgstr ""
-
-msgid "DNS servers"
-msgstr ""
-
-msgid "Exit policy"
-msgstr ""
-
-msgid "Extra hosts"
-msgstr ""
-
-msgid "Host network"
-msgstr ""
-
-msgid "Infra container"
-msgstr ""
-
-msgid "Memory limit"
-msgstr ""
-
-msgid "Net I/O"
-msgstr ""
-
-msgid "Pause pod"
-msgstr ""
-
-msgid "Pod is not running"
-msgstr ""
-
-msgid "Remove pod"
-msgstr ""
-
-msgid "Restart policy"
-msgstr ""
-
-msgid "Restart pod"
-msgstr ""
-
-msgid "Shared namespaces"
-msgstr ""
-
-msgid "Start pod"
-msgstr ""
-
-msgid "Static IPv4"
-msgstr ""
-
-msgid "Static MAC"
-msgstr ""
-
-msgid "Stop pod"
-msgstr ""
-
-msgid "Unlimited"
-msgstr ""
-
-msgid "Unpause pod"
-msgstr ""
-
-msgid "Stopping container"
-msgstr ""
-
-msgid "Stop failed: %s"
-msgstr ""
-
-msgid "Removing container"
-msgstr ""
-
-msgid "Remove failed: %s"
-msgstr ""
-
-msgid "Creating container"
-msgstr ""
-
-msgid "Create failed: %s"
-msgstr ""
-
-msgid "Starting container"
-msgstr ""
-
-msgid "Start failed: %s"
-msgstr ""
-
-msgid "Reinstating init script"
-msgstr ""
-
-msgid "Init script reinstate failed: %s"
-msgstr ""
-
-msgid "Updated to %s"
-msgstr ""
-
-msgid "Update image: %d/%d - %s"
-msgstr ""
-
-msgid "Removed old image %s"
-msgstr ""
-
-msgid "Done."
-msgstr ""
-
-msgid "Pause container"
-msgstr ""
-
-msgid "Unpause container"
-msgstr ""
diff --git a/luci-app-podman/po/zh-cn b/luci-app-podman/po/zh-cn
deleted file mode 120000
index 8d69574dd..000000000
--- a/luci-app-podman/po/zh-cn
+++ /dev/null
@@ -1 +0,0 @@
-zh_Hans
\ No newline at end of file
diff --git a/luci-app-podman/po/zh_Hans/podman.po b/luci-app-podman/po/zh_Hans/podman.po
deleted file mode 100644
index ee7814ee5..000000000
--- a/luci-app-podman/po/zh_Hans/podman.po
+++ /dev/null
@@ -1,1090 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: luci-app-podman\n"
-"PO-Revision-Date: 2026-06-03 05:20+0000\n"
-"Last-Translator:\n"
-"Language-Team: Chinese (Simplified Han script) \n"
-"Language: zh_Hans\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid "%d check(s) failed:"
-msgstr "%d 次检查失败:"
-
-msgid "%d updated, %d failed:"
-msgstr "%d 已更新,%d 失败:"
-
-msgid "%s created successfully"
-msgstr "%s 创建成功"
-
-msgid "%s: %d/%d"
-msgstr "%s:%d/%d"
-
-msgid "(none)"
-msgstr "(无)"
-
-msgid "-- Select %s --"
-msgstr "-- 选择 %s --"
-
-msgid "1-253 characters: letters, numbers, underscore (_), hyphen (-) only"
-msgstr "1-253 个字符:仅限字母、数字、下划线 (_) 和连字符 (-)"
-
-msgid "512m, 1g, or -1 for unlimited"
-msgstr "512m、1g 或 -1(无限制)"
-
-msgid "API Version"
-msgstr "API 版本"
-
-msgid "Add the container to an existing pod. Network, hostname and port mappings come from the pod's infra container."
-msgstr "将容器添加到现有 Pod。网络、主机名和端口映射来自 Pod 的 infra 容器。"
-
-msgid "All images updated successfully"
-msgstr "所有镜像更新成功"
-
-msgid "All volumes exported successfully"
-msgstr "所有卷已成功导出"
-
-msgid "Allocate TTY (-t)"
-msgstr "分配 TTY (-t)"
-
-msgid "Allocate container IP from this range"
-msgstr "从此范围分配容器 IP"
-
-msgid "Always"
-msgstr "始终"
-
-msgid "Apply Updates"
-msgstr "应用更新"
-
-msgid "Are you sure to delete the records?"
-msgstr "确定删除这些记录吗?"
-
-msgid "Are you sure to remove container?"
-msgstr "确定移除此容器吗?"
-
-msgid "Are you sure to remove integration?"
-msgstr "确定移除此集成吗?"
-
-msgid "Auto Remove (--rm)"
-msgstr "自动删除 (--rm)"
-
-msgid "Auto Update"
-msgstr "自动更新"
-
-msgid "Auto-Update"
-msgstr "自动更新"
-
-msgid "Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt."
-msgstr "自动配置 OpenWrt 网络接口、桥接和防火墙区域。强烈建议 勾选以在 OpenWrt 上进行正确的容器网络设置。"
-
-msgid "Automatically start the container after it is created"
-msgstr "容器创建后自动启动"
-
-msgid "Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry"
-msgstr "当有新镜像可用时自动更新容器。添加标签:io.containers.autoupdate=registry"
-
-msgid "Basic Information"
-msgstr "基本信息"
-
-msgid "Block I/O"
-msgstr "块 I/O"
-
-msgid "Boot"
-msgstr "开机自启"
-
-msgid "Bridge Interface Name"
-msgstr "网桥接口名称"
-
-msgid "CPU"
-msgstr "CPU"
-
-msgid "CPU Limit"
-msgstr "CPU 限制"
-
-msgid "CPU Set"
-msgstr "CPU 集合"
-
-msgid "CPU Shares Weight"
-msgstr "CPU 份额权重"
-
-msgid "CPU Usage"
-msgstr "CPU 使用率"
-
-msgid "CPU shares (relative weight). 0 = use default."
-msgstr "CPU 份额(相对权重)。0 = 使用默认值。"
-
-msgid "CPUs the pod is allowed to run on (e.g., \"0-3\" or \"0,2\")"
-msgstr "允许 Pod 运行的 CPU(例如 \"0-3\" 或 \"0,2\")"
-
-msgid "Cancel"
-msgstr "取消"
-
-msgid "Check"
-msgstr "检查"
-
-msgid "Check %d containers for updates?"
-msgstr "检查 %d 个容器的更新?"
-
-msgid "Check Complete"
-msgstr "检查完成"
-
-msgid "Check for Updates"
-msgstr "检查更新"
-
-msgid "Check for updates: %s/%s"
-msgstr "检查更新:%s/%s"
-
-msgid "Choose firewall zone for this network."
-msgstr "为此网络选择防火墙区域。"
-
-msgid "Clean Up Now"
-msgstr "立即清理"
-
-msgid "Cleaning up old images..."
-msgstr "正在清理旧镜像..."
-
-msgid "Cleanup / Prune"
-msgstr "清理 / 修剪"
-
-msgid "Cleanup Complete"
-msgstr "清理完成"
-
-msgid "Cleanup Unused Resources"
-msgstr "清理未使用的资源"
-
-msgid "Cleanup successful!"
-msgstr "清理成功!"
-
-msgid "Clear logs"
-msgstr "清除日志"
-
-msgid "Click icon to repair"
-msgstr "点击图标进行修复"
-
-msgid "Click to disconnect"
-msgstr "点击断开连接"
-
-msgid "Click to enable/disable"
-msgstr "点击启用/禁用"
-
-msgid "Click to reveal/hide value"
-msgstr "点击显示/隐藏值"
-
-msgid "Close"
-msgstr "关闭"
-
-msgid "Comma-separated list of supplementary group IDs"
-msgstr "以逗号分隔的附加组 ID 列表"
-
-msgid "Comma-separated ports to expose (e.g., 6052, 8080/udp)"
-msgstr "以逗号分隔的要暴露的端口(例如 6052、8080/udp)"
-
-msgid "Command"
-msgstr "命令"
-
-msgid "Command to run (space-separated)"
-msgstr "运行的命令(以空格分隔)"
-
-msgid "Configuration"
-msgstr "配置"
-
-msgid "Configure resource limits for this container."
-msgstr "为此容器配置资源限制。"
-
-msgid "Confirm"
-msgstr "确认"
-
-msgid "Connect"
-msgstr "连接"
-
-msgid "Connect to"
-msgstr "连接到"
-
-msgid "Connected successfully to %s"
-msgstr "已成功连接到 %s"
-
-msgid "Connecting container to network"
-msgstr "正在将容器连接到网络"
-
-msgid "Console"
-msgstr "控制台"
-
-msgid "Container"
-msgstr "容器"
-
-msgid "Container Name"
-msgstr "容器名称"
-
-msgid "Container image has no tag - cannot update"
-msgstr "容器镜像没有标签 - 无法更新"
-
-msgid "Container image to use"
-msgstr "要使用的容器镜像"
-
-msgid "Container is not running"
-msgstr "容器未在运行"
-
-msgid "Container updated successfully"
-msgstr "容器更新成功"
-
-msgid "Containers"
-msgstr "容器"
-
-msgid "Containers in pod %s"
-msgstr "Pod %s 中的容器"
-
-msgid "Containers updated successfully"
-msgstr "容器更新成功"
-
-msgid "Containers updated successfully."
-msgstr "容器更新成功。"
-
-msgid "Create"
-msgstr "创建"
-
-msgid "Create %s"
-msgstr "创建 %s"
-
-msgid "Create Command"
-msgstr "创建命令"
-
-msgid "Create Infra Container"
-msgstr "创建 Infra 容器"
-
-msgid "Create new zone (will be named: podman_)"
-msgstr "创建新区域(命名为:podman_<网络名称>)"
-
-msgid "Created"
-msgstr "创建时间"
-
-msgid "Creating %s"
-msgstr "正在创建 %s"
-
-msgid "Creating auto-start configuration for %s"
-msgstr "正在为 %s 创建自启动配置"
-
-msgid "DNS Search Domains"
-msgstr "DNS 搜索域"
-
-msgid "DNS Servers"
-msgstr "DNS 服务器"
-
-msgid "DNS search domains for the infra container"
-msgstr "Infra 容器的 DNS 搜索域"
-
-msgid "DNS servers for the infra container (shared with all pod containers)"
-msgstr "Infra 容器的 DNS 服务器(与 Pod 中所有容器共享)"
-
-msgid "Delete"
-msgstr "删除"
-
-msgid "Deleting records: %d/%d"
-msgstr "正在删除记录:%d/%d"
-
-msgid "Deleting records: %s/%s"
-msgstr "正在删除记录:%s/%s"
-
-msgid "Destination"
-msgstr "目的地"
-
-msgid "Device"
-msgstr "设备"
-
-msgid "Disabled"
-msgstr "已禁用"
-
-msgid "Disabling init script"
-msgstr "正在禁用初始化脚本"
-
-msgid "Disconnect container from network"
-msgstr "断开容器与网络的连接"
-
-msgid "Disconnected from %s"
-msgstr "已从 %s 断开连接"
-
-msgid "Dnsmasq"
-msgstr "Dnsmasq"
-
-msgid "Driver"
-msgstr "驱动程序"
-
-msgid "Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)"
-msgstr "特定驱动选项(逗号分隔,例如 type=tmpfs,o=size=100m)"
-
-msgid "Enable IPv6"
-msgstr "启用 IPv6"
-
-msgid "Enable IPv6 networking"
-msgstr "启用 IPv6 网络"
-
-msgid "Enabling init script"
-msgstr "正在启用初始化脚本"
-
-msgid "Enter secret data (password, token, key, etc.)"
-msgstr "输入机密数据(密码、令牌、密钥等)"
-
-msgid "Entrypoint"
-msgstr "入口点 (Entrypoint)"
-
-msgid "Environment Variables"
-msgstr "环境变量"
-
-msgid "Ephemeral (--rm flag)"
-msgstr "临时容器(--rm 标志)"
-
-msgid "Error"
-msgstr "错误"
-
-msgid "Error: %s"
-msgstr "错误:%s"
-
-msgid "Existing physical interface to use as parent. Required for macvlan/ipvlan networks."
-msgstr "用作父接口的现有物理接口。macvlan/ipvlan 网络必需。"
-
-msgid "Expecting: %s"
-msgstr "期望:%s"
-
-msgid "Export"
-msgstr "导出"
-
-msgid "Exporting selected volumes: %d/%d"
-msgstr "正在导出选定的卷:%d/%d"
-
-msgid "Expose Ports"
-msgstr "暴露端口"
-
-msgid "Failed to create container"
-msgstr "创建容器失败"
-
-msgid "Fetching information..."
-msgstr "正在获取信息..."
-
-msgid "Find updateable containers"
-msgstr "查找可更新的容器"
-
-msgid "Firewall Zone"
-msgstr "防火墙区域"
-
-msgid "Gateway"
-msgstr "网关"
-
-msgid "Generate"
-msgstr "生成"
-
-msgid "Graph Root"
-msgstr "图表根目录 (Graph Root)"
-
-msgid "Health"
-msgstr "健康状态"
-
-msgid "Hostname"
-msgstr "主机名"
-
-msgid "Hostname for the pod (defaults to pod name)"
-msgstr "Pod 的主机名(默认为 Pod 名称)"
-
-msgid "ID"
-msgstr "ID"
-
-msgid "IP Address"
-msgstr "IP 地址"
-
-msgid "IP Range (CIDR)"
-msgstr "IP 范围 (CIDR)"
-
-msgid "IPv4 Gateway"
-msgstr "IPv4 网关"
-
-msgid "IPv4 Subnet (CIDR)"
-msgstr "IPv4 子网 (CIDR)"
-
-msgid "IPv4 gateway address"
-msgstr "IPv4 网关地址"
-
-msgid "IPv4 subnet in CIDR notation"
-msgstr "CIDR 表示法的 IPv4 子网"
-
-msgid "Image"
-msgstr "镜像"
-
-msgid "Image ID"
-msgstr "镜像 ID"
-
-msgid "Image is already up-to-date"
-msgstr "镜像已是最新版本"
-
-msgid "Image pulled successfully"
-msgstr "镜像拉取成功"
-
-msgid "Images"
-msgstr "镜像"
-
-msgid "Import"
-msgstr "导入"
-
-msgid "Import from archive: %s"
-msgstr "从存档导入:%s"
-
-msgid "Importing volume..."
-msgstr "正在导入卷..."
-
-msgid "Info"
-msgstr "信息"
-
-msgid "Information"
-msgstr "信息"
-
-msgid "Infra Image"
-msgstr "Infra 镜像"
-
-msgid "Init Script"
-msgstr "Init 脚本"
-
-msgid "Inspect"
-msgstr "检查 (Inspect)"
-
-msgid "Int"
-msgstr "集成"
-
-msgid "Interactive"
-msgstr "交互式"
-
-msgid "Interface"
-msgstr "接口"
-
-msgid "Internal Network"
-msgstr "内部网络"
-
-msgid "Labels"
-msgstr "标签"
-
-msgid "Labels in key=value format, one per line"
-msgstr "标签格式为 键=值,每行一个"
-
-msgid "Leave empty to auto-generate"
-msgstr "留空以自动生成"
-
-msgid "Links"
-msgstr "链接"
-
-msgid "Linux namespaces shared between containers in the pod. Default matches `podman pod create`."
-msgstr "Pod 中容器共享的 Linux 命名空间。默认与 `podman pod create` 一致。"
-
-msgid "Load"
-msgstr "加载"
-
-msgid "Load System diagnostics"
-msgstr "加载系统诊断"
-
-msgid "Loading init script"
-msgstr "正在加载初始化脚本"
-
-msgid "Loading..."
-msgstr "正在加载..."
-
-msgid "Logs"
-msgstr "日志"
-
-msgid "Manage podman %s"
-msgstr "管理 Podman %s"
-
-msgid "Memory"
-msgstr "内存"
-
-msgid "Memory %"
-msgstr "内存 %"
-
-msgid "Memory + Swap Limit"
-msgstr "内存 + 交换限制"
-
-msgid "Memory Limit"
-msgstr "内存限制"
-
-msgid "Memory Usage"
-msgstr "内存使用情况"
-
-msgid "Memory limit (e.g., 512m, 1g)"
-msgstr "内存限制(例如 512m, 1g)"
-
-msgid "Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default."
-msgstr "内存限制(例如 512m、1g)。-1 = 无限制,0 = 默认。"
-
-msgid "Memory limit for the pod (e.g., 512m, 1g)"
-msgstr "Pod 的内存限制(例如 512m、1g)"
-
-msgid "Mode"
-msgstr "模式"
-
-msgid "Mount Options"
-msgstr "挂载选项"
-
-msgid "Mountpoint"
-msgstr "挂载点"
-
-msgid "Mounts"
-msgstr "挂载"
-
-msgid "Must be between 0 and 262144"
-msgstr "必须介于 0 到 262144 之间"
-
-msgid "Name"
-msgstr "名称"
-
-msgid "Name for the network"
-msgstr "网络名称"
-
-msgid "Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it."
-msgstr "桥接接口名称(例如 podman0, mynet0)。留空以使用:<网络名称>0。注意:如果生成的名称与现有接口冲突,OpenWrt 将自动递增。"
-
-msgid "Name updated successfully"
-msgstr "名称更新成功"
-
-msgid "Network"
-msgstr "网络"
-
-msgid "Network I/O"
-msgstr "网络 I/O"
-
-msgid "Network Mode"
-msgstr "网络模式"
-
-msgid "Network Name"
-msgstr "网络名称"
-
-msgid "Network driver"
-msgstr "网络驱动"
-
-msgid "Network namespace for the pod. Containers in the pod share this network."
-msgstr "Pod 的网络命名空间。Pod 中的容器共享此网络。"
-
-msgid "Networks"
-msgstr "网络"
-
-msgid "Never"
-msgstr "从不"
-
-msgid "No"
-msgstr "否"
-
-msgid "No %s selected"
-msgstr "未选择 %s"
-
-msgid "No containers in this pod"
-msgstr "此 Pod 中没有容器"
-
-msgid "No containers with auto-update label found."
-msgstr "沒有找到有自动更新标签的容器。"
-
-msgid "No new updates available."
-msgstr "没有新的更新可用。"
-
-msgid "No suitable interfaces found"
-msgstr "未找到合适的接口"
-
-msgid "No unused resources found"
-msgstr "未找到未使用的资源"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0)"
-msgstr "CPU 数量(例如 0.5, 1.0, 2.0)"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited."
-msgstr "CPU 数量(例如 0.5, 1.0, 2.0)。留空表示无限制。"
-
-msgid "Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)"
-msgstr "Pod 可用的 CPU 数量(例如 0.5、1.0、2.0)"
-
-msgid "Number of lines"
-msgstr "行数"
-
-msgid "OK"
-msgstr "确定"
-
-msgid "Old image still used by other containers"
-msgstr "旧镜像仍被其他容器使用"
-
-msgid "On Failure"
-msgstr "失败时"
-
-msgid "One per line, format: host:container[/protocol]"
-msgstr "每行一个,格式:主机:容器[/协议]"
-
-msgid "One per line, format: key=value"
-msgstr "每行一个,格式为:键=值"
-
-msgid "One per line. Format: source:destination[:options]. Options: ro, rw, Z, z"
-msgstr "每行一个。格式:源:目标[:选项]。选项:ro, rw, Z, z"
-
-msgid "OpenWrt integration exists\n\nClick to remove"
-msgstr "OpenWrt 集成已存在\n\n点击移除"
-
-msgid "OpenWrt integration incomplete"
-msgstr "OpenWrt 集成不完整"
-
-msgid "OpenWrt integration requires subnet to be specified"
-msgstr "OpenWrt 集成需要指定子网"
-
-msgid "Override the image used for the infra container"
-msgstr "覆盖用于 Infra 容器的镜像"
-
-msgid "PIDs"
-msgstr "PID"
-
-msgid "Parent Interface"
-msgstr "父接口"
-
-msgid "Parent interface is required for macvlan/ipvlan networks"
-msgstr "macvlan/ipvlan 网络需要父接口"
-
-msgid "Part of a pod (\"%s\")"
-msgstr "Pod 的一部分(\"%s\")"
-
-msgid "Pausing pod"
-msgstr "正在暂停 Pod"
-
-msgid "Pod"
-msgstr "Pod"
-
-msgid "Pod Name"
-msgstr "Pod 名称"
-
-msgid "Podman Version"
-msgstr "Podman 版本"
-
-msgid "Pods"
-msgstr "Pod"
-
-msgid "Port Mappings"
-msgstr "端口映射"
-
-msgid "Ports"
-msgstr "端口"
-
-msgid "Privileged"
-msgstr "特权"
-
-msgid "Privileged Mode"
-msgstr "特权模式"
-
-msgid "Processes"
-msgstr "进程"
-
-msgid "Pull Image"
-msgstr "拉取镜像"
-
-msgid "Pull did not return an image ID - pull may have failed"
-msgstr "拉取未返回镜像 ID - 拉取可能已失败"
-
-msgid "Pulling %s"
-msgstr "正在拉取 %s"
-
-msgid "Read: %s / Write: %s"
-msgstr "读:%s / 写:%s"
-
-msgid "Refreshing %s..."
-msgstr "正在刷新 %s..."
-
-msgid "Registries"
-msgstr "注册表 (Registries)"
-
-msgid "Registry"
-msgstr "注册表"
-
-msgid "Reload"
-msgstr "重新加载"
-
-msgid "Remove OpenWrt integration"
-msgstr "移除 OpenWrt 集成"
-
-msgid "Remove all unused images (not just dangling)"
-msgstr "移除所有未使用的镜像(不只是悬空的)"
-
-msgid "Remove container"
-msgstr "移除容器"
-
-msgid "Remove unused volumes"
-msgstr "移除未使用的卷"
-
-msgid "Removed: %s"
-msgstr "已移除:%s"
-
-msgid "Removing unused resources, please wait..."
-msgstr "正在移除未使用的资源,请稍候..."
-
-msgid "Repository"
-msgstr "仓库"
-
-msgid "Required for shared network namespace. Disable only if you know you do not need it."
-msgstr "共享网络命名空间所必需。仅在确认不需要时禁用。"
-
-msgid "Resources"
-msgstr "资源"
-
-msgid "Restart Policy"
-msgstr "重启策略"
-
-msgid "Restart container"
-msgstr "重启容器"
-
-msgid "Restart policy updated successfully"
-msgstr "重启策略更新成功"
-
-msgid "Restarting pod"
-msgstr "正在重启 Pod"
-
-msgid "Restrict external access to the network"
-msgstr "限制网络的外部访问"
-
-msgid "Run Root"
-msgstr "运行根目录 (Run Root)"
-
-msgid "Saving resource"
-msgstr "正在保存资源"
-
-msgid "Secret"
-msgstr "机密 (Secret)"
-
-msgid "Secret Data"
-msgstr "机密数据"
-
-msgid "Secret Name"
-msgstr "机密名称"
-
-msgid "Secret name can only contain letters, numbers, underscores, and hyphens"
-msgstr "机密名称只能包含字母、数字、下划线和连字符"
-
-msgid "Secrets"
-msgstr "机密"
-
-msgid "Security Notice:"
-msgstr "安全声明:"
-
-msgid "Select containers to update"
-msgstr "选择要更新的容器"
-
-msgid "Select network for the new container. User-created networks provide better isolation and DNS resolution between containers."
-msgstr "为新容器选择网络。用户创建的网络可提供更好的隔离性和容器间 DNS 解析。"
-
-msgid "Select what to clean up:"
-msgstr "选择要清理的内容:"
-
-msgid "Sensitive data is hidden for security reasons."
-msgstr "出于安全原因,敏感数据已隐藏。"
-
-msgid "Setup OpenWrt Integration"
-msgstr "设置 OpenWrt 集成"
-
-msgid "Shared Namespaces"
-msgstr "共享命名空间"
-
-msgid "Shares network with another container"
-msgstr "与其他容器共享网络"
-
-msgid "Show"
-msgstr "显示"
-
-msgid "Since"
-msgstr "自"
-
-msgid "Size"
-msgstr "大小"
-
-msgid "Socket Path"
-msgstr "Socket 路径"
-
-msgid "Source"
-msgstr "源"
-
-msgid "Space freed: %s"
-msgstr "已释放空间:%s"
-
-msgid "Start after creation"
-msgstr "创建后启动"
-
-msgid "Start container"
-msgstr "启动容器"
-
-msgid "Start on boot"
-msgstr "开机启动"
-
-msgid "Start script disabled"
-msgstr "启动脚本已禁用"
-
-msgid "Start script missing\n\nClick to generate"
-msgstr "启动脚本缺失\n\n点击生成"
-
-msgid "Start stream"
-msgstr "开始流"
-
-msgid "Started"
-msgstr "启动时间"
-
-msgid "Started At"
-msgstr "启动时间"
-
-msgid "Starting pod"
-msgstr "正在启动 Pod"
-
-msgid "Statistics"
-msgstr "统计"
-
-msgid "Stats"
-msgstr "统计"
-
-msgid "Status"
-msgstr "状态"
-
-msgid "Stop container"
-msgstr "停止容器"
-
-msgid "Stop stream"
-msgstr "停止流"
-
-msgid "Stopping pod"
-msgstr "正在停止 Pod"
-
-msgid "Subnet"
-msgstr "子网"
-
-msgid "Supplementary Groups"
-msgstr "附加组"
-
-msgid "System Diagnostics"
-msgstr "系统诊断"
-
-msgid "TTY"
-msgstr "TTY"
-
-msgid "Tag"
-msgstr "标签"
-
-msgid "The sensitive data to store securely"
-msgstr "要安全存储的敏感数据"
-
-msgid "To enable auto-update for a container, add the label: io.containers.autoupdate=registry"
-msgstr "要为容器启用自动更新,添加标签:io.containers.autoupdate=registry"
-
-msgid "Total"
-msgstr "总计"
-
-msgid "Total memory limit (memory + swap). -1 = unlimited, 0 = use default."
-msgstr "总内存限制(内存 + swap)。-1 = 无限制,0 = 默认。"
-
-msgid "Type"
-msgstr "类型"
-
-msgid "Unknown"
-msgstr "未知"
-
-msgid "Unless Stopped"
-msgstr "除非已停止 (Unless Stopped)"
-
-msgid "Until"
-msgstr "直到"
-
-msgid "Update"
-msgstr "更新"
-
-msgid "Update Resources"
-msgstr "更新资源"
-
-msgid "Update name"
-msgstr "更新名称"
-
-msgid "Update restart policy"
-msgstr "更新重启策略"
-
-msgid "Updating Images"
-msgstr "正在更新镜像"
-
-msgid "Updating container"
-msgstr "正在更新容器"
-
-msgid "Upload failed: %s"
-msgstr "上传失败:%s"
-
-msgid "Uploading file..."
-msgstr "正在上传文件..."
-
-msgid "User"
-msgstr "用户"
-
-msgid "User and group to run as (UID:GID)"
-msgstr "运行用户和组 (UID:GID)"
-
-msgid "Value"
-msgstr "值"
-
-msgid "Variable"
-msgstr "变量"
-
-msgid "Volume"
-msgstr "卷"
-
-msgid "Volume Name"
-msgstr "卷名称"
-
-msgid "Volume driver to use"
-msgstr "要使用的卷驱动"
-
-msgid "Volume imported successfully"
-msgstr "卷导入成功"
-
-msgid "Volume name. Leave empty to auto-generate."
-msgstr "卷名称。留空以自动生成。"
-
-msgid "Volumes"
-msgstr "卷"
-
-msgid "Working Directory"
-msgstr "工作目录"
-
-msgid "Yes"
-msgstr "是"
-
-msgid "default"
-msgstr "默认"
-
-msgid "non-empty value"
-msgstr "非空值"
-
-msgid "running"
-msgstr "正在运行"
-
-msgid "total"
-msgstr "总计"
-
-msgid "Are you sure to remove pod?"
-msgstr "确定要删除 Pod 吗?"
-
-msgid "Cgroup parent"
-msgstr "Cgroup 父级"
-
-msgid "CID"
-msgstr "CID"
-
-msgid "CPU %"
-msgstr "CPU %"
-
-msgid "CPU period"
-msgstr "CPU 周期"
-
-msgid "CPU quota"
-msgstr "CPU 配额"
-
-msgid "CPU set"
-msgstr "CPU 集合"
-
-msgid "CPU shares"
-msgstr "CPU 份额"
-
-msgid "DNS options"
-msgstr "DNS 选项"
-
-msgid "DNS search"
-msgstr "DNS 搜索"
-
-msgid "DNS servers"
-msgstr "DNS 服务器"
-
-msgid "Exit policy"
-msgstr "退出策略"
-
-msgid "Extra hosts"
-msgstr "额外主机"
-
-msgid "Host network"
-msgstr "主机网络"
-
-msgid "Infra container"
-msgstr "Infra 容器"
-
-msgid "Memory limit"
-msgstr "内存限制"
-
-msgid "Net I/O"
-msgstr "网络 I/O"
-
-msgid "Pause pod"
-msgstr "暂停 Pod"
-
-msgid "Pod is not running"
-msgstr "Pod 未运行"
-
-msgid "Remove pod"
-msgstr "删除 Pod"
-
-msgid "Restart policy"
-msgstr "重启策略"
-
-msgid "Restart pod"
-msgstr "重启 Pod"
-
-msgid "Shared namespaces"
-msgstr "共享命名空间"
-
-msgid "Start pod"
-msgstr "启动 Pod"
-
-msgid "Static IPv4"
-msgstr "静态 IPv4"
-
-msgid "Static MAC"
-msgstr "静态 MAC"
-
-msgid "Stop pod"
-msgstr "停止 Pod"
-
-msgid "Unlimited"
-msgstr "无限制"
-
-msgid "Unpause pod"
-msgstr "恢复 Pod"
-
-msgid "Stopping container"
-msgstr "正在停止容器"
-
-msgid "Stop failed: %s"
-msgstr "停止失败:%s"
-
-msgid "Removing container"
-msgstr "正在删除容器"
-
-msgid "Remove failed: %s"
-msgstr "删除失败:%s"
-
-msgid "Creating container"
-msgstr "正在创建容器"
-
-msgid "Create failed: %s"
-msgstr "创建失败:%s"
-
-msgid "Starting container"
-msgstr "正在启动容器"
-
-msgid "Start failed: %s"
-msgstr "启动失败:%s"
-
-msgid "Reinstating init script"
-msgstr "正在恢复初始化脚本"
-
-msgid "Init script reinstate failed: %s"
-msgstr "恢复初始化脚本失败:%s"
-
-msgid "Updated to %s"
-msgstr "已更新到 %s"
-
-msgid "Update image: %d/%d - %s"
-msgstr "更新镜像:%d/%d - %s"
-
-msgid "Removed old image %s"
-msgstr "已删除旧镜像 %s"
-
-msgid "Done."
-msgstr "完成。"
-
-msgid "Pause container"
-msgstr "暂停容器"
-
-msgid "Unpause container"
-msgstr "恢复容器"
diff --git a/luci-app-podman/po/zh_Hant/podman.po b/luci-app-podman/po/zh_Hant/podman.po
deleted file mode 100644
index fa7eca0d3..000000000
--- a/luci-app-podman/po/zh_Hant/podman.po
+++ /dev/null
@@ -1,1090 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: luci-app-podman\n"
-"PO-Revision-Date: 2026-05-03 11:05+0000\n"
-"Last-Translator:\n"
-"Language-Team: Chinese (Traditional Han script) \n"
-"Language: zh_Hant\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid "%d check(s) failed:"
-msgstr "%d 次檢查失敗:"
-
-msgid "%d updated, %d failed:"
-msgstr "%d 已更新,%d 失敗:"
-
-msgid "%s created successfully"
-msgstr "%s 成功建立"
-
-msgid "%s: %d/%d"
-msgstr "%s:%d/%d"
-
-msgid "(none)"
-msgstr "(無)"
-
-msgid "-- Select %s --"
-msgstr "-- 選擇 %s --"
-
-msgid "1-253 characters: letters, numbers, underscore (_), hyphen (-) only"
-msgstr "1-253 字元:僅限英文、數字、底線(_)、破折號(-)"
-
-msgid "512m, 1g, or -1 for unlimited"
-msgstr "512m、1g 或 -1(無限制)"
-
-msgid "API Version"
-msgstr "API 版本"
-
-msgid "Add the container to an existing pod. Network, hostname and port mappings come from the pod's infra container."
-msgstr "將容器加入現有 Pod。網路、主機名稱和連接埠對應來自 Pod 的 infra 容器。"
-
-msgid "All images updated successfully"
-msgstr "所有映像更新成功"
-
-msgid "All volumes exported successfully"
-msgstr "所有儲存區都成功匯出"
-
-msgid "Allocate TTY (-t)"
-msgstr "配發 TTY(-t)"
-
-msgid "Allocate container IP from this range"
-msgstr "從這個範圍配發容器 IP 地址"
-
-msgid "Always"
-msgstr "總是"
-
-msgid "Apply Updates"
-msgstr "套用更新"
-
-msgid "Are you sure to delete the records?"
-msgstr "確定刪除這些記錄嗎?"
-
-msgid "Are you sure to remove container?"
-msgstr "確定移除此容器嗎?"
-
-msgid "Are you sure to remove integration?"
-msgstr "確定移除此整合嗎?"
-
-msgid "Auto Remove (--rm)"
-msgstr "自動移除(--rm)"
-
-msgid "Auto Update"
-msgstr "自動更新"
-
-msgid "Auto-Update"
-msgstr "自動更新"
-
-msgid "Automatically configure OpenWrt network interface, bridge, and firewall zone. Highly recommended for proper container networking on OpenWrt."
-msgstr "自動設定 OpenWrt 網路界面、橋接器、以及防火牆區域。強烈建議 啟用,在 OpenWrt 上建立合適的容器網路。"
-
-msgid "Automatically start the container after it is created"
-msgstr "建立容器後自動啟動"
-
-msgid "Automatically update container when newer image is available. Adds label: io.containers.autoupdate=registry"
-msgstr "新的映像檔可用時自動更新容器。增加標籤:io.containers.autoupdate=registry"
-
-msgid "Basic Information"
-msgstr "基本資訊"
-
-msgid "Block I/O"
-msgstr "區塊 I/O"
-
-msgid "Boot"
-msgstr "開機"
-
-msgid "Bridge Interface Name"
-msgstr "橋接界面名稱"
-
-msgid "CPU"
-msgstr "中央處理器"
-
-msgid "CPU Limit"
-msgstr "CPU 上限"
-
-msgid "CPU Set"
-msgstr "CPU 集合"
-
-msgid "CPU Shares Weight"
-msgstr "CPU 分享權重"
-
-msgid "CPU Usage"
-msgstr "CPU 用量"
-
-msgid "CPU shares (relative weight). 0 = use default."
-msgstr "CPU 份額(相對權重)。0 = 使用預設值。"
-
-msgid "CPUs the pod is allowed to run on (e.g., \"0-3\" or \"0,2\")"
-msgstr "允許 Pod 執行的 CPU(例如 \"0-3\" 或 \"0,2\")"
-
-msgid "Cancel"
-msgstr "取消"
-
-msgid "Check"
-msgstr "檢查"
-
-msgid "Check %d containers for updates?"
-msgstr "檢查 %d 個容器的更新?"
-
-msgid "Check Complete"
-msgstr "檢查完成"
-
-msgid "Check for Updates"
-msgstr "檢查更新"
-
-msgid "Check for updates: %s/%s"
-msgstr "檢查更新:%s/%s"
-
-msgid "Choose firewall zone for this network."
-msgstr "為此網路選擇防火牆區域。"
-
-msgid "Clean Up Now"
-msgstr "現在清理"
-
-msgid "Cleaning up old images..."
-msgstr "正在清理舊映像..."
-
-msgid "Cleanup / Prune"
-msgstr "清理 / 裁剪"
-
-msgid "Cleanup Complete"
-msgstr "清理完成"
-
-msgid "Cleanup Unused Resources"
-msgstr "清理非使用中的資源"
-
-msgid "Cleanup successful!"
-msgstr "清理成功!"
-
-msgid "Clear logs"
-msgstr "清除日誌"
-
-msgid "Click icon to repair"
-msgstr "點擊圖示進行修復"
-
-msgid "Click to disconnect"
-msgstr "點擊斷開連接"
-
-msgid "Click to enable/disable"
-msgstr "點擊啟用/禁用"
-
-msgid "Click to reveal/hide value"
-msgstr "點擊以顯示/隱藏數值"
-
-msgid "Close"
-msgstr "關閉"
-
-msgid "Comma-separated list of supplementary group IDs"
-msgstr "以逗號分隔的附加組 ID 列表"
-
-msgid "Comma-separated ports to expose (e.g., 6052, 8080/udp)"
-msgstr "以逗號分隔的要暴露的端口(例如 6052、8080/udp)"
-
-msgid "Command"
-msgstr "指令"
-
-msgid "Command to run (space-separated)"
-msgstr "要執行的指令(使用空格字元分隔)"
-
-msgid "Configuration"
-msgstr "設定"
-
-msgid "Configure resource limits for this container."
-msgstr "為此容器配置資源限制。"
-
-msgid "Confirm"
-msgstr "確認"
-
-msgid "Connect"
-msgstr "連線"
-
-msgid "Connect to"
-msgstr "連線至"
-
-msgid "Connected successfully to %s"
-msgstr "已成功連接到 %s"
-
-msgid "Connecting container to network"
-msgstr "正在將容器連接到網路"
-
-msgid "Console"
-msgstr "終端機"
-
-msgid "Container"
-msgstr "容器"
-
-msgid "Container Name"
-msgstr "容器名稱"
-
-msgid "Container image has no tag - cannot update"
-msgstr "容器映像沒有標籤 - 無法更新"
-
-msgid "Container image to use"
-msgstr "要使用的容器映像檔"
-
-msgid "Container is not running"
-msgstr "容器未在運行"
-
-msgid "Container updated successfully"
-msgstr "容器更新成功"
-
-msgid "Containers"
-msgstr "容器"
-
-msgid "Containers in pod %s"
-msgstr "Pod %s 中的容器"
-
-msgid "Containers updated successfully"
-msgstr "容器更新成功"
-
-msgid "Containers updated successfully."
-msgstr "容器更新成功。"
-
-msgid "Create"
-msgstr "建立"
-
-msgid "Create %s"
-msgstr "建立 %s"
-
-msgid "Create Command"
-msgstr "建立命令"
-
-msgid "Create Infra Container"
-msgstr "建立 Infra 容器"
-
-msgid "Create new zone (will be named: podman_)"
-msgstr "建立新的區域(會命名為:podman_)"
-
-msgid "Created"
-msgstr "已建立"
-
-msgid "Creating %s"
-msgstr "正在建立 %s"
-
-msgid "Creating auto-start configuration for %s"
-msgstr "正在為 %s 建立自動啟動設定"
-
-msgid "DNS Search Domains"
-msgstr "DNS 搜尋網域"
-
-msgid "DNS Servers"
-msgstr "DNS 伺服器"
-
-msgid "DNS search domains for the infra container"
-msgstr "Infra 容器的 DNS 搜尋網域"
-
-msgid "DNS servers for the infra container (shared with all pod containers)"
-msgstr "Infra 容器的 DNS 伺服器(與 Pod 中所有容器共用)"
-
-msgid "Delete"
-msgstr "刪除"
-
-msgid "Deleting records: %d/%d"
-msgstr "正在刪除記錄:%d/%d"
-
-msgid "Deleting records: %s/%s"
-msgstr "正在刪除記錄:%s/%s"
-
-msgid "Destination"
-msgstr "目標"
-
-msgid "Device"
-msgstr "裝置"
-
-msgid "Disabled"
-msgstr "已停用"
-
-msgid "Disabling init script"
-msgstr "正在禁用初始化腳本"
-
-msgid "Disconnect container from network"
-msgstr "斷開容器與網路的連接"
-
-msgid "Disconnected from %s"
-msgstr "已從 %s 斷開連接"
-
-msgid "Dnsmasq"
-msgstr "Dnsmasq"
-
-msgid "Driver"
-msgstr "驅動程式"
-
-msgid "Driver-specific options (comma-separated, e.g., type=tmpfs,o=size=100m)"
-msgstr "驅動程式相關選項(逗號分隔,例如 type=tmpfs,o=size=100m)"
-
-msgid "Enable IPv6"
-msgstr "啟用 IPv6"
-
-msgid "Enable IPv6 networking"
-msgstr "啟用 IPv6 網路"
-
-msgid "Enabling init script"
-msgstr "正在啟用初始化腳本"
-
-msgid "Enter secret data (password, token, key, etc.)"
-msgstr "輸入私密資料(密碼、令牌、金鑰… 等等)"
-
-msgid "Entrypoint"
-msgstr "進入點"
-
-msgid "Environment Variables"
-msgstr "環境變數"
-
-msgid "Ephemeral (--rm flag)"
-msgstr "臨時容器(--rm 標誌)"
-
-msgid "Error"
-msgstr "錯誤"
-
-msgid "Error: %s"
-msgstr "錯誤:%s"
-
-msgid "Existing physical interface to use as parent. Required for macvlan/ipvlan networks."
-msgstr "用來當作母設備的實體界面,macvlan/ipvlan 需要它。"
-
-msgid "Expecting: %s"
-msgstr "期望:%s"
-
-msgid "Export"
-msgstr "匯出"
-
-msgid "Exporting selected volumes: %d/%d"
-msgstr "正在匯出選定的儲存區:%d/%d"
-
-msgid "Expose Ports"
-msgstr "暴露端口"
-
-msgid "Failed to create container"
-msgstr "建立容器失敗"
-
-msgid "Fetching information..."
-msgstr "獲取資訊…"
-
-msgid "Find updateable containers"
-msgstr "尋找可更新的容器"
-
-msgid "Firewall Zone"
-msgstr "防火牆區域"
-
-msgid "Gateway"
-msgstr "閘道器"
-
-msgid "Generate"
-msgstr "產生"
-
-msgid "Graph Root"
-msgstr "儲存圖根目錄"
-
-msgid "Health"
-msgstr "健康度"
-
-msgid "Hostname"
-msgstr "主機名稱"
-
-msgid "Hostname for the pod (defaults to pod name)"
-msgstr "Pod 的主機名稱(預設為 Pod 名稱)"
-
-msgid "ID"
-msgstr "ID"
-
-msgid "IP Address"
-msgstr "IP 地址"
-
-msgid "IP Range (CIDR)"
-msgstr "IP 範圍(CIDR)"
-
-msgid "IPv4 Gateway"
-msgstr "IPv4 閘道器"
-
-msgid "IPv4 Subnet (CIDR)"
-msgstr "IPv4 子網域(CIDR)"
-
-msgid "IPv4 gateway address"
-msgstr "IPv4 閘道器地址"
-
-msgid "IPv4 subnet in CIDR notation"
-msgstr "CIDR 註記的 IPv4 子網域"
-
-msgid "Image"
-msgstr "映像檔"
-
-msgid "Image ID"
-msgstr "映像檔 ID"
-
-msgid "Image is already up-to-date"
-msgstr "映像已是最新版本"
-
-msgid "Image pulled successfully"
-msgstr "映像檔成功拉回"
-
-msgid "Images"
-msgstr "映像檔"
-
-msgid "Import"
-msgstr "匯入"
-
-msgid "Import from archive: %s"
-msgstr "從存檔導入:%s"
-
-msgid "Importing volume..."
-msgstr "正在匯入儲存區…"
-
-msgid "Info"
-msgstr "資訊"
-
-msgid "Information"
-msgstr "資訊"
-
-msgid "Infra Image"
-msgstr "Infra 映像檔"
-
-msgid "Init Script"
-msgstr "初始化指令稿"
-
-msgid "Inspect"
-msgstr "檢視"
-
-msgid "Int"
-msgstr "整數"
-
-msgid "Interactive"
-msgstr "互動式"
-
-msgid "Interface"
-msgstr "介面"
-
-msgid "Internal Network"
-msgstr "內部網路"
-
-msgid "Labels"
-msgstr "標籤"
-
-msgid "Labels in key=value format, one per line"
-msgstr "使用 key=value 格式的標籤,一行一個"
-
-msgid "Leave empty to auto-generate"
-msgstr "留空會自動產生"
-
-msgid "Links"
-msgstr "連結"
-
-msgid "Linux namespaces shared between containers in the pod. Default matches `podman pod create`."
-msgstr "Pod 中容器共用的 Linux 命名空間。預設與 `podman pod create` 一致。"
-
-msgid "Load"
-msgstr "載入"
-
-msgid "Load System diagnostics"
-msgstr "載入系統診斷"
-
-msgid "Loading init script"
-msgstr "正在載入初始化腳本"
-
-msgid "Loading..."
-msgstr "正在載入…"
-
-msgid "Logs"
-msgstr "日誌"
-
-msgid "Manage podman %s"
-msgstr "管理 Podman %s"
-
-msgid "Memory"
-msgstr "記憶體"
-
-msgid "Memory %"
-msgstr "記憶體 %"
-
-msgid "Memory + Swap Limit"
-msgstr "記憶體 + 置換區限制"
-
-msgid "Memory Limit"
-msgstr "記憶體限制"
-
-msgid "Memory Usage"
-msgstr "記憶體用量"
-
-msgid "Memory limit (e.g., 512m, 1g)"
-msgstr "記憶體限制(例如 512m、1g)"
-
-msgid "Memory limit (e.g., 512m, 1g). -1 = unlimited, 0 = use default."
-msgstr "記憶體限制(例如 512m、1g)。-1 = 無限制,0 = 預設。"
-
-msgid "Memory limit for the pod (e.g., 512m, 1g)"
-msgstr "Pod 的記憶體限制(例如 512m、1g)"
-
-msgid "Mode"
-msgstr "模式"
-
-msgid "Mount Options"
-msgstr "掛載選項"
-
-msgid "Mountpoint"
-msgstr "掛載點"
-
-msgid "Mounts"
-msgstr "掛載"
-
-msgid "Must be between 0 and 262144"
-msgstr "必須介於 0 與 262144 之間"
-
-msgid "Name"
-msgstr "名稱"
-
-msgid "Name for the network"
-msgstr "網路的名稱"
-
-msgid "Name of the bridge interface (e.g., podman0, mynet0). Leave empty to use: <network-name>0. Note: If the generated name conflicts with an existing interface, OpenWrt will auto-increment it."
-msgstr "橋接器界面的名稱(例如 podman0、mynet0)。留空使用 <network-name>0。注意:如果自動產生的名稱與現有界面名稱衝突,OpenWrt 會自動增加編號。"
-
-msgid "Name updated successfully"
-msgstr "名稱更新成功"
-
-msgid "Network"
-msgstr "網路"
-
-msgid "Network I/O"
-msgstr "網路 I/O"
-
-msgid "Network Mode"
-msgstr "網路模式"
-
-msgid "Network Name"
-msgstr "網路名稱"
-
-msgid "Network driver"
-msgstr "網路驅動程式"
-
-msgid "Network namespace for the pod. Containers in the pod share this network."
-msgstr "Pod 的網路命名空間。Pod 中的容器共用此網路。"
-
-msgid "Networks"
-msgstr "網路"
-
-msgid "Never"
-msgstr "永不"
-
-msgid "No"
-msgstr "否"
-
-msgid "No %s selected"
-msgstr "沒有 %s 被選擇"
-
-msgid "No containers in this pod"
-msgstr "此 Pod 中沒有容器"
-
-msgid "No containers with auto-update label found."
-msgstr "沒有找到有自動更新標籤的容器。"
-
-msgid "No new updates available."
-msgstr "沒有新的更新可用。"
-
-msgid "No suitable interfaces found"
-msgstr "沒有適合的界面"
-
-msgid "No unused resources found"
-msgstr "沒有非使用中的資源"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0)"
-msgstr "CPU 數量(例如 0.5、1.0、2.0)"
-
-msgid "Number of CPUs (e.g., 0.5, 1.0, 2.0). Leave empty for unlimited."
-msgstr "CPU 數量(例如 0.5、1.0、2.0)。留空表示無上限。"
-
-msgid "Number of CPUs available to the pod (e.g., 0.5, 1.0, 2.0)"
-msgstr "Pod 可用的 CPU 數量(例如 0.5、1.0、2.0)"
-
-msgid "Number of lines"
-msgstr "行數"
-
-msgid "OK"
-msgstr "確定"
-
-msgid "Old image still used by other containers"
-msgstr "舊映像檔仍被其他容器使用"
-
-msgid "On Failure"
-msgstr "於錯誤發生時"
-
-msgid "One per line, format: host:container[/protocol]"
-msgstr "每行一個,格式:主機:容器[/協議]"
-
-msgid "One per line, format: key=value"
-msgstr "一行一個,格式 key=value"
-
-msgid "One per line. Format: source:destination[:options]. Options: ro, rw, Z, z"
-msgstr "每行一個。格式:源:目標[:選項]。選項:ro, rw, Z, z"
-
-msgid "OpenWrt integration exists\n\nClick to remove"
-msgstr "OpenWrt 整合已存在\n\n點擊移除"
-
-msgid "OpenWrt integration incomplete"
-msgstr "OpenWrt 整合不完整"
-
-msgid "OpenWrt integration requires subnet to be specified"
-msgstr "OpenWrt 整合需要指定子網路"
-
-msgid "Override the image used for the infra container"
-msgstr "覆寫用於 Infra 容器的映像檔"
-
-msgid "PIDs"
-msgstr "PIDs"
-
-msgid "Parent Interface"
-msgstr "母界面"
-
-msgid "Parent interface is required for macvlan/ipvlan networks"
-msgstr "macvlan/ipvlan 網路需要母界面"
-
-msgid "Part of a pod (\"%s\")"
-msgstr "Pod 的一部分(\"%s\")"
-
-msgid "Pausing pod"
-msgstr "正在暫停 Pod"
-
-msgid "Pod"
-msgstr "容器群組"
-
-msgid "Pod Name"
-msgstr "Pod 名稱"
-
-msgid "Podman Version"
-msgstr "Podman 版本"
-
-msgid "Pods"
-msgstr "容器群組"
-
-msgid "Port Mappings"
-msgstr "連接埠對應"
-
-msgid "Ports"
-msgstr "端口"
-
-msgid "Privileged"
-msgstr "有特權的"
-
-msgid "Privileged Mode"
-msgstr "特權模式"
-
-msgid "Processes"
-msgstr "進程"
-
-msgid "Pull Image"
-msgstr "獲取映像檔"
-
-msgid "Pull did not return an image ID - pull may have failed"
-msgstr "拉取未返回映像 ID - 拉取可能已失敗"
-
-msgid "Pulling %s"
-msgstr "正在拉取 %s"
-
-msgid "Read: %s / Write: %s"
-msgstr "讀取:%s / 寫入:%s"
-
-msgid "Refreshing %s..."
-msgstr "正在更新 %s…"
-
-msgid "Registries"
-msgstr "註冊表"
-
-msgid "Registry"
-msgstr "註冊表"
-
-msgid "Reload"
-msgstr "重新載入"
-
-msgid "Remove OpenWrt integration"
-msgstr "移除 OpenWrt 整合"
-
-msgid "Remove all unused images (not just dangling)"
-msgstr "移除所有未使用的映像檔(而非只是空懸的)"
-
-msgid "Remove container"
-msgstr "移除容器"
-
-msgid "Remove unused volumes"
-msgstr "移除未使用的儲存區"
-
-msgid "Removed: %s"
-msgstr "移除了:%s"
-
-msgid "Removing unused resources, please wait..."
-msgstr "正在移除未使用的資源,請稍候…"
-
-msgid "Repository"
-msgstr "儲存庫"
-
-msgid "Required for shared network namespace. Disable only if you know you do not need it."
-msgstr "共用網路命名空間所必需。僅在確認不需要時停用。"
-
-msgid "Resources"
-msgstr "資源"
-
-msgid "Restart Policy"
-msgstr "重新啟動原則"
-
-msgid "Restart container"
-msgstr "重啟容器"
-
-msgid "Restart policy updated successfully"
-msgstr "重新啟動原則成功更新"
-
-msgid "Restarting pod"
-msgstr "正在重新啟動 Pod"
-
-msgid "Restrict external access to the network"
-msgstr "限制對外部網路的操作"
-
-msgid "Run Root"
-msgstr "執行時根目錄"
-
-msgid "Saving resource"
-msgstr "正在儲存資源"
-
-msgid "Secret"
-msgstr "私密資料"
-
-msgid "Secret Data"
-msgstr "私密資料"
-
-msgid "Secret Name"
-msgstr "私密資料名稱"
-
-msgid "Secret name can only contain letters, numbers, underscores, and hyphens"
-msgstr "私密資料名稱只能包含字母、數字、底線、及破折號"
-
-msgid "Secrets"
-msgstr "私密資料"
-
-msgid "Security Notice:"
-msgstr "安全性警告:"
-
-msgid "Select containers to update"
-msgstr "選擇要更新的容器"
-
-msgid "Select network for the new container. User-created networks provide better isolation and DNS resolution between containers."
-msgstr "為新容器選擇網路。用戶建立的網路可提供更好的隔離性和容器間 DNS 解析。"
-
-msgid "Select what to clean up:"
-msgstr "選擇要清理的項目:"
-
-msgid "Sensitive data is hidden for security reasons."
-msgstr "敏感資料因安全緣故隱藏。"
-
-msgid "Setup OpenWrt Integration"
-msgstr "設定 OpenWrt 整合"
-
-msgid "Shared Namespaces"
-msgstr "共用命名空間"
-
-msgid "Shares network with another container"
-msgstr "與其他容器共享網路"
-
-msgid "Show"
-msgstr "顯示"
-
-msgid "Since"
-msgstr "自"
-
-msgid "Size"
-msgstr "大小"
-
-msgid "Socket Path"
-msgstr "通訊端路徑"
-
-msgid "Source"
-msgstr "來源"
-
-msgid "Space freed: %s"
-msgstr "釋放的空間:%s"
-
-msgid "Start after creation"
-msgstr "建立後啟動"
-
-msgid "Start container"
-msgstr "啟動容器"
-
-msgid "Start on boot"
-msgstr "開機啟動"
-
-msgid "Start script disabled"
-msgstr "啟動腳本已禁用"
-
-msgid "Start script missing\n\nClick to generate"
-msgstr "啟動腳本缺失\n\n點擊生成"
-
-msgid "Start stream"
-msgstr "開始串流"
-
-msgid "Started"
-msgstr "已啟動"
-
-msgid "Started At"
-msgstr "啟動時間"
-
-msgid "Starting pod"
-msgstr "正在啟動 Pod"
-
-msgid "Statistics"
-msgstr "統計"
-
-msgid "Stats"
-msgstr "狀態"
-
-msgid "Status"
-msgstr "狀態"
-
-msgid "Stop container"
-msgstr "停止容器"
-
-msgid "Stop stream"
-msgstr "停止串流"
-
-msgid "Stopping pod"
-msgstr "正在停止 Pod"
-
-msgid "Subnet"
-msgstr "子網路"
-
-msgid "Supplementary Groups"
-msgstr "附加組"
-
-msgid "System Diagnostics"
-msgstr "系統診斷"
-
-msgid "TTY"
-msgstr "TTY"
-
-msgid "Tag"
-msgstr "標籤"
-
-msgid "The sensitive data to store securely"
-msgstr "要被安全保存的敏感資料"
-
-msgid "To enable auto-update for a container, add the label: io.containers.autoupdate=registry"
-msgstr "要啟用容器的自動更新,增加這個標籤:io.containers.autoupdate=registry"
-
-msgid "Total"
-msgstr "總計"
-
-msgid "Total memory limit (memory + swap). -1 = unlimited, 0 = use default."
-msgstr "總記憶體限制(記憶體 + swap)。-1 = 無限制,0 = 預設。"
-
-msgid "Type"
-msgstr "類型"
-
-msgid "Unknown"
-msgstr "未知"
-
-msgid "Unless Stopped"
-msgstr "除非停止"
-
-msgid "Until"
-msgstr "直到"
-
-msgid "Update"
-msgstr "更新"
-
-msgid "Update Resources"
-msgstr "更新資源"
-
-msgid "Update name"
-msgstr "更新名稱"
-
-msgid "Update restart policy"
-msgstr "更新重啟策略"
-
-msgid "Updating Images"
-msgstr "正在更新映像"
-
-msgid "Updating container"
-msgstr "正在更新容器"
-
-msgid "Upload failed: %s"
-msgstr "上傳失敗:%s"
-
-msgid "Uploading file..."
-msgstr "正在上傳文件..."
-
-msgid "User"
-msgstr "使用者"
-
-msgid "User and group to run as (UID:GID)"
-msgstr "運行用戶和組 (UID:GID)"
-
-msgid "Value"
-msgstr "值"
-
-msgid "Variable"
-msgstr "變數"
-
-msgid "Volume"
-msgstr "儲存區"
-
-msgid "Volume Name"
-msgstr "儲存區名稱"
-
-msgid "Volume driver to use"
-msgstr "要使用的儲存區驅動器"
-
-msgid "Volume imported successfully"
-msgstr "儲存區成功匯入"
-
-msgid "Volume name. Leave empty to auto-generate."
-msgstr "儲存區名稱。留空會自動產生。"
-
-msgid "Volumes"
-msgstr "儲存區"
-
-msgid "Working Directory"
-msgstr "工作目錄"
-
-msgid "Yes"
-msgstr "是"
-
-msgid "default"
-msgstr "預設"
-
-msgid "non-empty value"
-msgstr "非空值"
-
-msgid "running"
-msgstr "執行中"
-
-msgid "total"
-msgstr "總共"
-
-msgid "Are you sure to remove pod?"
-msgstr "確定要移除 Pod 嗎?"
-
-msgid "Cgroup parent"
-msgstr "Cgroup 父層"
-
-msgid "CID"
-msgstr "CID"
-
-msgid "CPU %"
-msgstr "CPU %"
-
-msgid "CPU period"
-msgstr "CPU 週期"
-
-msgid "CPU quota"
-msgstr "CPU 配額"
-
-msgid "CPU set"
-msgstr "CPU 集合"
-
-msgid "CPU shares"
-msgstr "CPU 份額"
-
-msgid "DNS options"
-msgstr "DNS 選項"
-
-msgid "DNS search"
-msgstr "DNS 搜尋"
-
-msgid "DNS servers"
-msgstr "DNS 伺服器"
-
-msgid "Exit policy"
-msgstr "結束原則"
-
-msgid "Extra hosts"
-msgstr "額外主機"
-
-msgid "Host network"
-msgstr "主機網路"
-
-msgid "Infra container"
-msgstr "Infra 容器"
-
-msgid "Memory limit"
-msgstr "記憶體限制"
-
-msgid "Net I/O"
-msgstr "網路 I/O"
-
-msgid "Pause pod"
-msgstr "暫停 Pod"
-
-msgid "Pod is not running"
-msgstr "Pod 未在運行"
-
-msgid "Remove pod"
-msgstr "移除 Pod"
-
-msgid "Restart policy"
-msgstr "重新啟動原則"
-
-msgid "Restart pod"
-msgstr "重新啟動 Pod"
-
-msgid "Shared namespaces"
-msgstr "共用命名空間"
-
-msgid "Start pod"
-msgstr "啟動 Pod"
-
-msgid "Static IPv4"
-msgstr "靜態 IPv4"
-
-msgid "Static MAC"
-msgstr "靜態 MAC"
-
-msgid "Stop pod"
-msgstr "停止 Pod"
-
-msgid "Unlimited"
-msgstr "無限制"
-
-msgid "Unpause pod"
-msgstr "恢復 Pod"
-
-msgid "Stopping container"
-msgstr "正在停止容器"
-
-msgid "Stop failed: %s"
-msgstr "停止失敗:%s"
-
-msgid "Removing container"
-msgstr "正在移除容器"
-
-msgid "Remove failed: %s"
-msgstr "移除失敗:%s"
-
-msgid "Creating container"
-msgstr "正在建立容器"
-
-msgid "Create failed: %s"
-msgstr "建立失敗:%s"
-
-msgid "Starting container"
-msgstr "正在啟動容器"
-
-msgid "Start failed: %s"
-msgstr "啟動失敗:%s"
-
-msgid "Reinstating init script"
-msgstr "正在還原初始化指令稿"
-
-msgid "Init script reinstate failed: %s"
-msgstr "還原初始化指令稿失敗:%s"
-
-msgid "Updated to %s"
-msgstr "已更新至 %s"
-
-msgid "Update image: %d/%d - %s"
-msgstr "更新映像檔:%d/%d - %s"
-
-msgid "Removed old image %s"
-msgstr "已移除舊映像檔 %s"
-
-msgid "Done."
-msgstr "完成。"
-
-msgid "Pause container"
-msgstr "暫停容器"
-
-msgid "Unpause container"
-msgstr "恢復容器"
diff --git a/luci-app-podman/root/etc/config/luci-podman-opkg b/luci-app-podman/root/etc/config/luci-podman-opkg
deleted file mode 100644
index 52ae83bfc..000000000
--- a/luci-app-podman/root/etc/config/luci-podman-opkg
+++ /dev/null
@@ -1,3 +0,0 @@
-config luci_podman 'globals'
- option init_start_priority '100'
- option socket_path 'unix:///run/podman/podman.sock'
diff --git a/luci-app-podman/root/etc/uci-defaults/80_luci-app-podman b/luci-app-podman/root/etc/uci-defaults/80_luci-app-podman
deleted file mode 100755
index a5d245bd8..000000000
--- a/luci-app-podman/root/etc/uci-defaults/80_luci-app-podman
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# Handle config: podman-opkg is the shipped default, podman is the live config
-if [ ! -f /etc/config/luci-podman ]; then
- mv /etc/config/luci-podman-opkg /etc/config/luci-podman
-else
- echo "Existing /etc/config/luci-podman preserved. New defaults at /etc/config/luci-podman-opkg"
-fi
-
-exit 0
diff --git a/luci-app-podman/root/usr/libexec/podman-api b/luci-app-podman/root/usr/libexec/podman-api
deleted file mode 100755
index 18284eda3..000000000
--- a/luci-app-podman/root/usr/libexec/podman-api
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/usr/bin/env ucode
-
-'use strict';
-
-import { popen, writefile, unlink } from 'fs';
-import * as podman_socket from 'luci.podman_socket'; // ucode-lsp disable
-import { validate_int, validate_name, require_param } from 'luci.podman_validate'; // ucode-lsp disable
-
-function die(msg) {
- warn(`${msg}\n`);
- exit(1);
-}
-
-// Volume export/import here shells out to the local `podman` CLI, which can
-// only reach a Podman daemon running on the same host. When the user has
-// configured a remote TCP Podman, refuse upfront rather than failing weirdly.
-if (podman_socket.is_remote())
- die(`Volume operations are not supported with a remote Podman (${podman_socket.get_dest()}); the CLI helper requires a local daemon.`);
-
-// --- Main ---
-
-let action = ARGV[0];
-
-if (action === 'volume_export') {
- let volumeName = ARGV[1];
- let err = require_param('volumeName', volumeName) || validate_name(volumeName);
- if (err) die(err);
-
- // volume export outputs a tar stream - use podman CLI directly
- let escaped = replace(volumeName, /'/g, "'\\''");
- let p = popen(`/usr/bin/podman volume export '${escaped}'`, 'r');
- if (!p)
- die('Failed to run podman volume export');
-
- let chunk;
- while ((chunk = p.read(65536)) != null && length(chunk) > 0)
- print(chunk);
- p.close();
-}
-else if (action === 'volume_import') {
- let volumeName = ARGV[1];
- let compressed = ARGV[2];
- let volumeData = ARGV[3];
-
- let err = require_param('volumeName', volumeName) || validate_name(volumeName)
- || require_param('volumeData', volumeData)
- || require_param('compressed', compressed) || validate_int(compressed);
- if (err) die(err);
-
- // Validate base64 content
- if (!match(volumeData, /^[A-Za-z0-9+\/]*={0,2}$/) || (length(volumeData) % 4) !== 0)
- die('Invalid Base64 content');
-
- let decoded = b64dec(volumeData);
- if (decoded == null)
- die('Failed to decode import data');
-
- // Decompress if needed
- if (compressed === '1') {
- let tp = popen('mktemp /tmp/podman_import_XXXXXX', 'r');
- let tmppath = tp ? trim(tp.read('all') || '') : '';
- if (tp) tp.close();
- if (!tmppath)
- die('Failed to create temp file');
-
- writefile(tmppath, decoded);
-
- let p = popen(`gunzip -c '${tmppath}'`, 'r');
- decoded = p ? p.read('all') : null;
- if (p) p.close();
- unlink(tmppath);
-
- if (!decoded)
- die('Failed to decompress import data');
- }
-
- // Ensure volume exists
- let escaped = replace(volumeName, /'/g, "'\\''");
- let p = popen(`/usr/bin/podman volume exists '${escaped}' 2>/dev/null; echo $?`, 'r');
- let rc = p ? trim(p.read('all') || '') : '';
- if (p) p.close();
-
- if (rc !== '0') {
- p = popen(`/usr/bin/podman volume create '${escaped}' 2>/dev/null`, 'r');
- if (p) { p.read('all'); p.close(); }
- }
-
- // Import via stdin pipe
- p = popen(`/usr/bin/podman volume import '${escaped}' -`, 'w');
- if (!p)
- die('Failed to start volume import');
- p.write(decoded);
- let exit_code = p.close();
-
- if (exit_code) {
- // Cleanup on failure
- popen(`/usr/bin/podman volume rm '${escaped}' 2>/dev/null`, 'r')?.close();
- die('Import failed');
- }
-}
-else {
- die(`Unknown action: ${action}`);
-}
diff --git a/luci-app-podman/root/usr/share/luci/menu.d/luci-app-podman.json b/luci-app-podman/root/usr/share/luci/menu.d/luci-app-podman.json
deleted file mode 100644
index 0f6c5ff6c..000000000
--- a/luci-app-podman/root/usr/share/luci/menu.d/luci-app-podman.json
+++ /dev/null
@@ -1,166 +0,0 @@
-{
- "admin/podman": {
- "title": "Podman",
- "order": 60,
- "action": {
- "type": "firstchild"
- },
- "depends": {
- "acl": [
- "luci-app-podman"
- ]
- }
- },
- "admin/podman/overview": {
- "title": "Overview",
- "order": 10,
- "action": {
- "type": "view",
- "path": "podman/overview"
- }
- },
- "admin/podman/containers": {
- "title": "Containers",
- "order": 20,
- "action": {
- "type": "view",
- "path": "podman/containers"
- }
- },
- "admin/podman/container/*": {
- "action": {
- "type": "view",
- "path": "podman/container"
- }
- },
- "admin/podman/pods": {
- "title": "Pods",
- "order": 25,
- "action": {
- "type": "view",
- "path": "podman/pods"
- }
- },
- "admin/podman/pod/*": {
- "action": {
- "type": "view",
- "path": "podman/pod"
- }
- },
- "admin/podman/images": {
- "title": "Images",
- "order": 30,
- "action": {
- "type": "view",
- "path": "podman/images"
- }
- },
- "admin/podman/networks": {
- "title": "Networks",
- "order": 40,
- "action": {
- "type": "view",
- "path": "podman/networks"
- }
- },
- "admin/podman/volumes": {
- "title": "Volumes",
- "order": 50,
- "action": {
- "type": "view",
- "path": "podman/volumes"
- }
- },
- "admin/podman/secrets": {
- "title": "Secrets",
- "order": 60,
- "action": {
- "type": "view",
- "path": "podman/secrets"
- }
- },
- "admin/podman/stream/logs/*": {
- "action": {
- "type": "function",
- "module": "luci.controller.podman",
- "function": "container_logs"
- },
- "auth": {
- "methods": [
- "cookie:sysauth_https",
- "cookie:sysauth_http"
- ],
- "login": true
- }
- },
- "admin/podman/stream/top/*": {
- "action": {
- "type": "function",
- "module": "luci.controller.podman",
- "function": "container_top"
- },
- "auth": {
- "methods": [
- "cookie:sysauth_https",
- "cookie:sysauth_http"
- ],
- "login": true
- }
- },
- "admin/podman/stream/stats/*": {
- "action": {
- "type": "function",
- "module": "luci.controller.podman",
- "function": "container_stats"
- },
- "auth": {
- "methods": [
- "cookie:sysauth_https",
- "cookie:sysauth_http"
- ],
- "login": true
- }
- },
- "admin/podman/stream/pull": {
- "action": {
- "type": "function",
- "module": "luci.controller.podman",
- "function": "image_pull"
- },
- "auth": {
- "methods": [
- "cookie:sysauth_https",
- "cookie:sysauth_http"
- ],
- "login": true
- }
- },
- "admin/podman/stream/pod_top/*": {
- "action": {
- "type": "function",
- "module": "luci.controller.podman",
- "function": "pod_top"
- },
- "auth": {
- "methods": [
- "cookie:sysauth_https",
- "cookie:sysauth_http"
- ],
- "login": true
- }
- },
- "admin/podman/stream/pod_stats/*": {
- "action": {
- "type": "function",
- "module": "luci.controller.podman",
- "function": "pod_stats"
- },
- "auth": {
- "methods": [
- "cookie:sysauth_https",
- "cookie:sysauth_http"
- ],
- "login": true
- }
- }
-}
diff --git a/luci-app-podman/root/usr/share/podman/procd-startup-template.sh b/luci-app-podman/root/usr/share/podman/procd-startup-template.sh
deleted file mode 100755
index 8d3f9c06e..000000000
--- a/luci-app-podman/root/usr/share/podman/procd-startup-template.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-# Podman's restart policy handles runtime restarts to avoid conflicts
-
-START={start_priority}
-STOP=20
-USE_PROCD=1
-
-NAME={script_name}
-PROG=/usr/bin/podman
-
-case "{name}" in
- *[!A-Za-z0-9._-]*|'')
- logger -t "${NAME}" "Invalid container name '{name}'; only [A-Za-z0-9._-] allowed"
- exit 1
- ;;
-esac
-
-start_service() {
- # Register procd instance - socket wait happens inside command (non-blocking)
- procd_open_instance "${NAME}"
- procd_set_param command /bin/sh -c "
- # Wait for Podman socket with timeout (120s)
- max_wait=120
- count=0
- logger -t ${NAME} 'Waiting for Podman socket...'
- while [ \"\$count\" -lt \"\$max_wait\" ]; do
- [ -S /run/podman/podman.sock ] && break
- sleep 1
- count=\$((count + 1))
- done
- if [ ! -S /run/podman/podman.sock ]; then
- logger -t ${NAME} 'Timeout: Podman socket not available'
- exit 1
- fi
- logger -t ${NAME} \"Podman socket available after \${count}s\"
-
- # Check container exists
- if ! $PROG container exists '{name}' 2>/dev/null; then
- logger -t ${NAME} 'Container {name} does not exist'
- exit 1
- fi
-
- # Start container if not running
- if ! $PROG container inspect '{name}' --format '{{.State.Running}}' 2>/dev/null | grep -q true; then
- logger -t ${NAME} 'Starting container {name}'
- $PROG start '{name}' || exit 1
- else
- logger -t ${NAME} 'Container {name} already running'
- fi
- "
- # Bounded retries: if S99podman's tie-break puts it after this script,
- # the socket wait above may time out on a slow first boot. A capped
- # respawn gives extra 120s windows without looping forever.
- procd_set_param respawn 3600 5 5
- procd_close_instance
-}
-
-stop_service() {
- logger -t ${NAME} "Stopping container {name}"
- $PROG stop "{name}" 2>/dev/null || true
-}
diff --git a/luci-app-podman/root/usr/share/podman/pull-worker.uc b/luci-app-podman/root/usr/share/podman/pull-worker.uc
deleted file mode 100644
index 796087c93..000000000
--- a/luci-app-podman/root/usr/share/podman/pull-worker.uc
+++ /dev/null
@@ -1,102 +0,0 @@
-'use strict';
-
-import { open, unlink } from 'fs';
-import { urlencode, ENCODE_FULL } from 'lucihttp'; // ucode-lsp disable
-import * as podman_socket from 'luci.podman_socket'; // ucode-lsp disable
-import { API_BASE } from 'luci.podman_socket'; // ucode-lsp disable
-import { build_request, parse_status, read_headers } from 'luci.podman_http'; // ucode-lsp disable
-
-const BLOCKSIZE = 4096;
-
-const reference = ARGV[0];
-const logfile = ARGV[1];
-const pidfile = ARGV[2];
-
-/**
- * @param {string} msg
- */
-function write_error(msg) {
- let f = open(logfile, 'a');
- if (f) {
- f.write('{"error":"' + replace(replace(msg, /\\/g, '\\\\'), /"/g, '\\"') + '"}\n');
- f.flush();
- f.close();
- }
-}
-
-/**
- * @param {int} code
- */
-function cleanup(code) {
- unlink(pidfile);
- exit(code ?? 0);
-}
-
-if (!reference || !logfile || !pidfile)
- exit(1);
-
-// Write own PID to pidfile so the streaming endpoint can check if we are running
-let ps = open('/proc/self/stat', 'r');
-if (ps) {
- let pid = +(split(ps.read(200) || '0', ' ')[0]);
- ps.close();
- let pf = open(pidfile, 'w');
- if (pf) { pf.write(pid + '\n'); pf.close(); }
-}
-
-// Connect to Podman socket
-let sock = podman_socket.connect();
-if (!sock) {
- write_error('Cannot connect to Podman socket');
- cleanup(1);
-}
-
-let encoded = urlencode(reference, ENCODE_FULL);
-
-sock.send(build_request(
- 'POST',
- sprintf('%s/images/pull?reference=%s&quiet=false', API_BASE, encoded),
- null
-));
-
-// Read HTTP response headers (blocking recv - no uloop needed in standalone process)
-let lf = null;
-
-let hdrs = read_headers(sock, BLOCKSIZE);
-if (!hdrs) {
- write_error('Podman closed connection before responding');
- sock.close();
- cleanup(1);
-}
-
-let code = parse_status(hdrs.header_buf) || 502;
-let body = hdrs.body_remainder;
-
-if (code !== 200) {
- let parsed = null;
- try { parsed = json(body); } catch(e) {}
- let msg = (parsed?.message) || (parsed?.cause)
- || replace(body, /\s+$/, '')
- || sprintf('Podman error %d', code);
- write_error(msg);
- sock.close();
- cleanup(1);
-}
-
-lf = open(logfile, 'a');
-if (!lf) { sock.close(); cleanup(1); }
-
-// Write any body bytes that arrived together with headers
-if (length(body)) { lf.write(body); lf.flush(); }
-
-// Stream response body to logfile - Podman sends NDJSON, we write it as-is
-while (true) {
- let chunk = sock.recv(BLOCKSIZE);
- if (!chunk) break; // EOF or error - Podman finished
- lf.write(chunk);
- lf.flush();
-}
-
-lf.close();
-sock.close();
-cleanup(0);
diff --git a/luci-app-podman/root/usr/share/rpcd/acl.d/luci-app-podman.json b/luci-app-podman/root/usr/share/rpcd/acl.d/luci-app-podman.json
deleted file mode 100644
index f7aa1c39d..000000000
--- a/luci-app-podman/root/usr/share/rpcd/acl.d/luci-app-podman.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
- "luci-app-podman": {
- "description": "Grant access to Podman RPC methods",
- "read": {
- "cgi-io": [
- "exec"
- ],
- "file": {
- "/usr/libexec/podman-api volume_export *": [
- "exec"
- ]
- },
- "ubus": {
- "podman": [
- "containers_list",
- "container_inspect",
- "container_stats",
- "container_top",
- "container_healthcheck_run",
- "images_list",
- "image_inspect",
- "image_manifest_inspect",
- "networks_list",
- "network_inspect",
- "volumes_list",
- "volume_inspect",
- "pods_list",
- "pod_inspect",
- "secrets_list",
- "secret_inspect",
- "system_df",
- "version",
- "info",
- "init_script_status",
- "init_script_show",
- "system_debug"
- ]
- },
- "uci": [
- "luci-podman",
- "firewall",
- "network",
- "dhcp"
- ]
- },
- "write": {
- "cgi-io": [
- "exec",
- "upload"
- ],
- "file": {
- "/tmp/podman-import": [
- "write"
- ]
- },
- "ubus": {
- "podman": [
- "container_start",
- "container_stop",
- "container_restart",
- "container_pause",
- "container_unpause",
- "container_remove",
- "container_create",
- "container_rename",
- "container_update",
- "container_healthcheck_run",
- "image_remove",
- "image_pull",
- "network_create",
- "network_remove",
- "network_connect",
- "network_disconnect",
- "volume_create",
- "volume_remove",
- "volume_import",
- "pod_start",
- "pod_stop",
- "pod_kill",
- "pod_restart",
- "pod_pause",
- "pod_unpause",
- "pod_remove",
- "pod_create",
- "secret_create",
- "secret_remove",
- "system_prune",
- "init_script_generate",
- "init_script_set_enabled",
- "init_script_remove"
- ]
- },
- "uci": [
- "luci-podman",
- "firewall",
- "network",
- "dhcp"
- ]
- }
- }
-}
diff --git a/luci-app-podman/root/usr/share/rpcd/ucode/podman.uc b/luci-app-podman/root/usr/share/rpcd/ucode/podman.uc
deleted file mode 100644
index 53bd51885..000000000
--- a/luci-app-podman/root/usr/share/rpcd/ucode/podman.uc
+++ /dev/null
@@ -1,1007 +0,0 @@
-'use strict';
-
-// --- Table of Contents ---
-//
-// Infrastructure (lines 30-225)
-// Configuration, validation, HTTP client, helpers
-//
-// RPC Methods (line 228+)
-// Containers: list inspect start stop restart remove stats create rename
-// update healthcheck top
-// Images: list inspect remove manifest_inspect pull
-// Networks: list inspect remove create connect disconnect
-// Volumes: list inspect remove create import
-// Pods: list inspect start stop restart pause unpause remove create stats
-// Secrets: list inspect create remove
-// System: df prune version info debug
-// Init Scripts: generate show status set_enabled remove
-// (exempt from socket check - operate on /etc/init.d/ only)
-//
-// Socket wrapper (end of file)
-
-import { readfile, writefile, popen, stat, chmod, unlink, glob, access } from 'fs';
-import { cursor } from 'uci';
-import { urlencode, ENCODE_FULL } from 'lucihttp'; // ucode-lsp disable
-import * as podman_socket from 'luci.podman_socket'; // ucode-lsp disable
-import { API_BASE } from 'luci.podman_socket'; // ucode-lsp disable
-import {
- validate_id, validate_name, validate_image_ref, validate_query_params,
- validate_restart_policy, require_param, BODY_KEYS
-} from 'luci.podman_validate'; // ucode-lsp disable
-import {
- build_request, parse_status, parse_content_length, read_headers
-} from 'luci.podman_http'; // ucode-lsp disable
-
-import { connect } from 'ubus';
-let ubus = connect();
-
-// --- Configuration ---
-
-const uci = cursor();
-const _prio = uci.get('luci-podman', 'globals', 'init_start_priority');
-// Capped at 99: procd sorts rc.d symlinks as plain strings, so a 3-digit
-// value like 100 sorts *before* 2-digit priorities (e.g. network at 19-20).
-const INIT_START_PRIORITY = (type(_prio) === 'string' && match(_prio, /^([0-9]|[1-9][0-9])$/)) ? _prio : '99';
-uci.unload('luci-podman');
-
-// "podman" is a strict string prefix of this, so generated init scripts
-// always sort after the real /etc/init.d/podman at any tied START value.
-const INIT_SCRIPT_PREFIX = 'podman-container-';
-
-// Validators come from luci.podman_validate (imported above).
-
-// --- HTTP Client ---
-
-/**
- * @param {string} method
- * @param {string} path
- * @param {string} body
- * @param {bool} raw
- */
-function podman_request(method, path, body, raw) {
- let sock = podman_socket.connect();
- if (!sock)
- return { error: 'Failed to connect to Podman socket' };
-
- sock.send(build_request(method, path, body));
-
- let hdrs = read_headers(sock);
- if (!hdrs) {
- sock.close();
- return { error: 'Empty response from Podman API' };
- }
- let header_buf = hdrs.header_buf;
- let body_remainder = hdrs.body_remainder;
- let chunk = '';
-
- let status_code = parse_status(header_buf);
-
- // For 204 No Content (success with no body - e.g., start/stop/restart)
- if (status_code === 204) {
- sock.close();
- if (raw) return { status: 204, body: '' };
- return {};
- }
-
- let content_length = parse_content_length(header_buf);
-
- // Read body
- let resp_body = `${body_remainder}`;
- if (content_length >= 0) {
- // Read exactly content_length bytes
- while (length(resp_body) < content_length) {
- chunk = sock.recv(65536);
- if (!chunk)
- break;
- resp_body += `${chunk}`;
- }
- } else {
- // No Content-Length - read until EOF
- while (true) {
- chunk = sock.recv(65536);
- if (!chunk)
- break;
- resp_body += `${chunk}`;
- }
- }
-
- sock.close();
-
- // Raw mode: return status + body without JSON parsing
- if (raw) {
- if (status_code >= 400)
- return { error: trim(resp_body || `HTTP ${status_code}`) };
- return { status: status_code, body: resp_body };
- }
-
- // Try to parse JSON body
- if (resp_body !== '') {
- let parsed = null;
- try { parsed = json(resp_body); } catch(e) {}
-
- if (parsed != null) {
- // Wrap arrays in { data: [...] } for frontend compatibility
- if (type(parsed) === 'array')
- return { data: parsed };
- return parsed;
- }
- // Non-JSON response (e.g., plain text error)
- if (status_code >= 400)
- return { error: trim(resp_body) };
- return { data: resp_body };
- }
-
- if (status_code >= 400)
- return { error: `HTTP ${status_code}` };
-
- return {};
-}
-
-/**
- * @param {string} id
- */
-function encode_id(id) {
- return urlencode(id, ENCODE_FULL);
-}
-
-
-/**
- * @param {object} params
- */
-function build_bool_query(params) {
- let parts = [];
- for (let k in params) {
- if (params[k] === true || params[k] === 1)
- push(parts, `${k}=true`);
- }
- return length(parts) ? '?' + join('&', parts) : '';
-}
-
-/** @param {any} data */
-function to_json_body(data) {
- return (type(data) === 'string') ? data : sprintf('%J', data);
-}
-
-// --- Init Script Helpers ---
-
-/**
- * @param {string} name
- */
-function init_script_path(name) {
- return `/etc/init.d/${INIT_SCRIPT_PREFIX}${name}`;
-}
-
-// --- RPC Methods ---
-
-const methods = {
- // ==================== Containers ====================
-
- containers_list: {
- args: { query: '' },
- call: function(req) {
- let path = `${API_BASE}/containers/json`;
- if (req.args.query && req.args.query !== '') {
- let err = validate_query_params(req.args.query);
- if (err) return { error: err };
- path += `?${req.args.query}`;
- }
- return podman_request('GET', path);
- }
- },
-
- container_inspect: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/containers/${encode_id(req.args.id)}/json`);
- }
- },
-
- container_start: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/containers/${encode_id(req.args.id)}/start`);
- }
- },
-
- container_stop: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/containers/${encode_id(req.args.id)}/stop`);
- }
- },
-
- container_restart: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/containers/${encode_id(req.args.id)}/restart`);
- }
- },
-
- container_pause: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/containers/${encode_id(req.args.id)}/pause`);
- }
- },
-
- container_unpause: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/containers/${encode_id(req.args.id)}/unpause`);
- }
- },
-
- container_remove: {
- args: { id: '', force: false, depend: false },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- let query = build_bool_query({ force: req.args.force, depend: req.args.depend });
- return podman_request('DELETE', `${API_BASE}/containers/${encode_id(req.args.id)}${query}`);
- }
- },
-
- container_stats: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/containers/${encode_id(req.args.id)}/stats?stream=false`);
- }
- },
-
- container_create: {
- args: { data: {} },
- call: function(req) {
- let data = req.args.data;
- let err = require_param('data', data);
- if (err) return { error: err };
- let body = to_json_body(data);
- return podman_request('POST', `${API_BASE}/containers/create`, body);
- }
- },
-
- container_rename: {
- args: { id: '', name: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id)
- || require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- let name_enc = encode_id(req.args.name);
- return podman_request('POST', `${API_BASE}/containers/${encode_id(req.args.id)}/rename?name=${name_enc}`);
- }
- },
-
- container_update: {
- args: { id: '', data: {} },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id)
- || require_param('data', req.args.data);
- if (err) return { error: err };
-
- let data = req.args.data;
- if (type(data) === 'string')
- data = json(data);
- if (!data)
- return { error: 'Invalid JSON data' };
-
- let id_enc = encode_id(req.args.id);
-
- // Build query params for restart policy
- let query_parts = [];
- if (data.RestartPolicy) {
- let perr = validate_restart_policy(data.RestartPolicy);
- if (perr) return { error: perr };
- push(query_parts, `restartPolicy=${data.RestartPolicy}`);
- }
- if (data.RestartRetries != null)
- push(query_parts, `restartRetries=${+data.RestartRetries | 0}`);
-
- let query = length(query_parts) ? '?' + join('&', query_parts) : '';
-
- // Determine if body is needed (resource/health updates)
- let body_str = sprintf('%J', data);
- let has_body_fields = false;
- for (let k in data) {
- if (k in BODY_KEYS) { has_body_fields = true; break; }
- }
-
- return podman_request('POST', `${API_BASE}/containers/${id_enc}/update${query}`,
- has_body_fields ? body_str : '{}');
- }
- },
-
- container_healthcheck_run: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/containers/${encode_id(req.args.id)}/healthcheck`);
- }
- },
-
- container_top: {
- args: { id: '', ps_args: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_id(req.args.id);
- if (err) return { error: err };
- let path = `${API_BASE}/containers/${encode_id(req.args.id)}/top`;
- if (req.args.ps_args && req.args.ps_args !== '')
- path += `?ps_args=${encode_id(req.args.ps_args)}`;
- return podman_request('GET', path);
- }
- },
-
- // ==================== Images ====================
-
- images_list: {
- args: {},
- call: function() {
- return podman_request('GET', `${API_BASE}/images/json`);
- }
- },
-
- image_inspect: {
- args: { id: '' },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_image_ref(req.args.id);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/images/${encode_id(req.args.id)}/json`);
- }
- },
-
- image_remove: {
- args: { id: '', force: false },
- call: function(req) {
- let err = require_param('id', req.args.id) || validate_image_ref(req.args.id);
- if (err) return { error: err };
- return podman_request('DELETE', `${API_BASE}/images/${encode_id(req.args.id)}${build_bool_query({ force: req.args.force })}`);
- }
- },
-
- image_manifest_inspect: {
- args: { image: '' },
- call: function(req) {
- let err = require_param('image', req.args.image) || validate_image_ref(req.args.image);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/manifests/${encode_id(req.args.image)}/json`);
- }
- },
-
- image_pull: {
- args: { image: '' },
- call: function(req) {
- let err = require_param('image', req.args.image) || validate_image_ref(req.args.image);
- if (err) return { error: err };
-
- let image_enc = urlencode(req.args.image, ENCODE_FULL);
- let resp = podman_request('POST', `${API_BASE}/images/pull?reference=${image_enc}`, null, true);
- if (resp.error) return resp;
-
- // Response is newline-delimited JSON: {"stream":"..."} lines
- // Last line contains {"images":[...],"id":"..."}
- let body = `${resp.body || ''}`;
- let output = '';
- let images = null;
- let id = null;
-
- let lines = split(body, '\n');
- for (let i = 0; i < length(lines); i++) {
- let raw = lines[i];
- if (type(raw) !== 'string') continue;
- let line = trim(raw);
- if (!line) continue;
- let parsed = null;
- try { parsed = json(line); } catch(e) {}
- if (!parsed) continue;
-
- if (parsed.stream)
- output += parsed.stream;
- if (parsed.images)
- images = parsed.images;
- if (parsed.id)
- id = parsed.id;
- if (parsed.error)
- return { error: parsed.error };
- }
-
- return { output: output, images: images, id: id };
- }
- },
-
- // ==================== Networks ====================
-
- networks_list: {
- args: {},
- call: function() {
- return podman_request('GET', `${API_BASE}/networks/json`);
- }
- },
-
- network_inspect: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/networks/${encode_id(req.args.name)}/json`);
- }
- },
-
- network_remove: {
- args: { name: '', force: false },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('DELETE', `${API_BASE}/networks/${encode_id(req.args.name)}${build_bool_query({ force: req.args.force })}`);
- }
- },
-
- network_create: {
- args: { data: {} },
- call: function(req) {
- let data = req.args.data;
- let err = require_param('data', data);
- if (err) return { error: err };
- let body = to_json_body(data);
- return podman_request('POST', `${API_BASE}/networks/create`, body);
- }
- },
-
- network_connect: {
- args: { name: '', data: {} },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name)
- || require_param('data', req.args.data);
- if (err) return { error: err };
- let body = to_json_body(req.args.data);
- return podman_request('POST', `${API_BASE}/networks/${encode_id(req.args.name)}/connect`, body);
- }
- },
-
- network_disconnect: {
- args: { name: '', data: {} },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name)
- || require_param('data', req.args.data);
- if (err) return { error: err };
- let body = to_json_body(req.args.data);
- return podman_request('POST', `${API_BASE}/networks/${encode_id(req.args.name)}/disconnect`, body);
- }
- },
-
- // ==================== Volumes ====================
-
- volumes_list: {
- args: {},
- call: function() {
- return podman_request('GET', `${API_BASE}/volumes/json`);
- }
- },
-
- volume_inspect: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/volumes/${encode_id(req.args.name)}/json`);
- }
- },
-
- volume_remove: {
- args: { name: '', force: false },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('DELETE', `${API_BASE}/volumes/${encode_id(req.args.name)}${build_bool_query({ force: req.args.force })}`);
- }
- },
-
- volume_create: {
- args: { data: {} },
- call: function(req) {
- let data = req.args.data;
- let err = require_param('data', data);
- if (err) return { error: err };
- let body = to_json_body(data);
- return podman_request('POST', `${API_BASE}/volumes/create`, body);
- }
- },
-
- volume_import: {
- args: { name: '', compressed: false },
- call: function(req) {
- let name = req.args.name;
- let err = require_param('name', name) || validate_name(name);
- if (err) return { error: err };
-
- let filepath = '/tmp/podman-import';
- if (!stat(filepath))
- return { error: 'Upload file not found' };
-
- let existing = podman_request('GET', `${API_BASE}/volumes/${encode_id(name)}/json`);
- if (!existing.Name) {
- let created = podman_request('POST', `${API_BASE}/volumes/create`,
- sprintf('%J', { Name: name }));
- if (created.error) return created;
- }
-
- let cmd;
- if (req.args.compressed === true || req.args.compressed === 1)
- cmd = sprintf('gunzip -c "%s" | /usr/bin/podman volume import "%s" - 2>&1', filepath, name);
- else
- cmd = sprintf('/usr/bin/podman volume import "%s" "%s" 2>&1', name, filepath);
-
- let p = popen(cmd, 'r');
- let output = p ? trim(p.read('all') || '') : '';
- let exit_code = p ? p.close() : 1;
-
- unlink(filepath);
-
- if (exit_code)
- return { error: output || 'Import failed' };
-
- return {};
- }
- },
-
- // ==================== Pods ====================
-
- pods_list: {
- args: {},
- call: function() {
- return podman_request('GET', `${API_BASE}/pods/json`);
- }
- },
-
- pod_inspect: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/pods/${encode_id(req.args.name)}/json`);
- }
- },
-
- pod_start: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/pods/${encode_id(req.args.name)}/start`);
- }
- },
-
- pod_stop: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/pods/${encode_id(req.args.name)}/stop`);
- }
- },
-
- pod_kill: {
- args: { name: '', signal: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- let sig = req.args.signal || 'SIGKILL';
- return podman_request('POST', `${API_BASE}/pods/${encode_id(req.args.name)}/kill?signal=${sig}`);
- }
- },
-
- pod_restart: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/pods/${encode_id(req.args.name)}/restart`);
- }
- },
-
- pod_pause: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/pods/${encode_id(req.args.name)}/pause`);
- }
- },
-
- pod_unpause: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('POST', `${API_BASE}/pods/${encode_id(req.args.name)}/unpause`);
- }
- },
-
- pod_remove: {
- args: { name: '', force: false },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('DELETE', `${API_BASE}/pods/${encode_id(req.args.name)}${build_bool_query({ force: req.args.force })}`);
- }
- },
-
- pod_create: {
- args: { data: {} },
- call: function(req) {
- let data = req.args.data;
- let err = require_param('data', data);
- if (err) return { error: err };
- let body = to_json_body(data);
- return podman_request('POST', `${API_BASE}/pods/create`, body);
- }
- },
-
- // ==================== Secrets ====================
-
- secrets_list: {
- args: {},
- call: function() {
- return podman_request('GET', `${API_BASE}/secrets/json`);
- }
- },
-
- secret_inspect: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('GET', `${API_BASE}/secrets/${encode_id(req.args.name)}/json`);
- }
- },
-
- secret_create: {
- args: { name: '', data: '', labels: {} },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name)
- || require_param('data', req.args.data);
- if (err) return { error: err };
- let query = `?name=${encode_id(req.args.name)}`;
- let labels = req.args.labels;
- if (type(labels) === 'object' && length(labels) > 0)
- query += `&labels=${urlencode(sprintf('%J', labels), ENCODE_FULL)}`;
- return podman_request('POST', `${API_BASE}/secrets/create${query}`, `${req.args.data}`);
- }
- },
-
- secret_remove: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
- return podman_request('DELETE', `${API_BASE}/secrets/${encode_id(req.args.name)}`);
- }
- },
-
- // ==================== System ====================
-
- system_df: {
- args: {},
- call: function() {
- return podman_request('GET', `${API_BASE}/system/df`);
- }
- },
-
- system_prune: {
- args: { all: false, volumes: false },
- call: function(req) {
- let query = build_bool_query({ all: req.args.all, volumes: req.args.volumes });
- return podman_request('POST', `${API_BASE}/system/prune${query}`);
- }
- },
-
- version: {
- args: {},
- call: function() {
- return podman_request('GET', `${API_BASE}/version`);
- }
- },
-
- info: {
- args: {},
- call: function() {
- return podman_request('GET', `${API_BASE}/info`);
- }
- },
-
- // ==================== System Debug ====================
-
- system_debug: {
- args: {},
- call: function() {
- let checks = [];
-
- // 1. Podman binary
- let podman_stat = stat('/usr/bin/podman');
- if (podman_stat) {
- let proc = popen('/usr/bin/podman --version 2>/dev/null', 'r');
- let ver = proc ? trim(proc.read('line') || '') : '';
- if (proc) proc.close();
- push(checks, { name: 'podman_binary', label: 'Podman Binary', status: 'ok', detail: '/usr/bin/podman', message: ver });
- } else {
- push(checks, { name: 'podman_binary', label: 'Podman Binary', status: 'error', detail: '/usr/bin/podman', message: 'Not found or not executable' });
- }
-
- // 2. Podman socket reachable
- let dest = podman_socket.get_dest();
- let local_path = podman_socket.get_local_path();
- let socket_stat = null;
- if (!local_path) {
- push(checks, { name: 'podman_socket', label: 'Podman Socket', status: 'ok', detail: dest, message: 'Remote TCP (cannot stat)' });
- } else {
- socket_stat = stat(local_path);
- if (socket_stat && socket_stat.type === 'socket') {
- push(checks, { name: 'podman_socket', label: 'Podman Socket', status: 'ok', detail: dest, message: 'Socket file exists' });
- } else {
- push(checks, { name: 'podman_socket', label: 'Podman Socket', status: 'error', detail: dest, message: 'Socket not found' });
- }
- }
-
- // 3. Socket responsive
- if (podman_socket.is_remote() || (socket_stat && socket_stat.type === 'socket')) {
- let ping = podman_request('GET', `${API_BASE}/_ping`);
- if (ping && ping.data === 'OK') {
- push(checks, { name: 'socket_responsive', label: 'Socket Responsive', status: 'ok', detail: 'API responding', message: '' });
- } else {
- push(checks, { name: 'socket_responsive', label: 'Socket Responsive', status: 'warn', detail: 'API not responding', message: ping ? (ping.error || '') : '' });
- }
- } else {
- push(checks, { name: 'socket_responsive', label: 'Socket Responsive', status: 'error', detail: 'Skipped', message: 'Socket not available' });
- }
-
- // 4. ucode-mod-socket
- push(checks, { name: 'ucode_socket', label: 'ucode-mod-socket', status: 'ok', detail: 'Built-in', message: 'Available (running ucode)' });
-
- // 5. Init directory writable
- let init_stat = stat('/etc/init.d');
- if (init_stat && init_stat.type === 'directory') {
- // Test writability by checking we can create a temp file
- let test_path = '/etc/init.d/.podman_write_test';
- let ok = writefile(test_path, '');
- if (ok != null) {
- unlink(test_path);
- push(checks, { name: 'init_dir_writable', label: 'Init Directory', status: 'ok', detail: '/etc/init.d/', message: 'Writable' });
- } else {
- push(checks, { name: 'init_dir_writable', label: 'Init Directory', status: 'warn', detail: '/etc/init.d/', message: 'Not writable - init scripts cannot be created' });
- }
- } else {
- push(checks, { name: 'init_dir_writable', label: 'Init Directory', status: 'error', detail: '/etc/init.d/', message: 'Directory not found' });
- }
-
- // 6. Startup template
- let template = '/usr/share/podman/procd-startup-template.sh';
- let tmpl_stat = stat(template);
- if (tmpl_stat) {
- let content = readfile(template);
- if (content != null) {
- push(checks, { name: 'startup_template', label: 'Startup Template', status: 'ok', detail: template, message: 'Readable' });
- } else {
- push(checks, { name: 'startup_template', label: 'Startup Template', status: 'warn', detail: template, message: 'Exists but not readable' });
- }
- } else {
- push(checks, { name: 'startup_template', label: 'Startup Template', status: 'warn', detail: template, message: 'Not found - init script generation will fail' });
- }
-
- // 7. RPC plugin (self-check - if we're running, we exist)
- push(checks, { name: 'rpc_plugin', label: 'RPC Plugin', status: 'ok', detail: '/usr/share/rpcd/ucode/podman.uc', message: 'Running (ucode)' });
-
- // 8. Podman API helper
- let api_helper = '/usr/libexec/podman-api';
- let helper_stat = stat(api_helper);
- if (access(api_helper, 'x')) {
- push(checks, { name: 'podman_api_helper', label: 'Podman API Helper', status: 'ok', detail: api_helper, message: 'Executable' });
- } else if (stat(api_helper)) {
- push(checks, { name: 'podman_api_helper', label: 'Podman API Helper', status: 'warn', detail: api_helper, message: 'Exists but not executable' });
- } else {
- push(checks, { name: 'podman_api_helper', label: 'Podman API Helper', status: 'warn', detail: api_helper, message: 'Not found - volume export/import will fail' });
- }
-
- // 9. UCI config
- let uci_ctx = cursor();
- let socket_cfg = uci_ctx.get('luci-podman', 'globals', 'socket_path');
- let globals_ok = uci_ctx.get('luci-podman', 'globals');
- uci_ctx.unload('luci-podman');
- if (globals_ok) {
- push(checks, { name: 'uci_config', label: 'UCI Config', status: 'ok', detail: 'luci-podman.globals', message: `socket_path=${socket_cfg || 'default'}` });
- } else {
- push(checks, { name: 'uci_config', label: 'UCI Config', status: 'warn', detail: '/etc/config/luci-podman', message: 'Config not found or not loadable' });
- }
-
- // 10. Containers config
- let containers_conf = '/etc/containers/containers.conf';
- let cc_stat = stat(containers_conf);
- if (cc_stat) {
- push(checks, { name: 'containers_conf', label: 'Containers Config', status: 'ok', detail: containers_conf, message: 'Readable' });
- } else {
- push(checks, { name: 'containers_conf', label: 'Containers Config', status: 'warn', detail: containers_conf, message: 'Not found - using Podman defaults' });
- }
-
- // 11. Network config directory
- let net_dir = '/etc/containers/networks';
- let nd_stat = stat(net_dir);
- if (nd_stat && nd_stat.type === 'directory') {
- let count = length(glob('/etc/containers/networks/*.json') ?? []);
- push(checks, { name: 'network_config_dir', label: 'Network Config Dir', status: 'ok', detail: net_dir, message: `${count} network(s)` });
- } else {
- push(checks, { name: 'network_config_dir', label: 'Network Config Dir', status: 'warn', detail: net_dir, message: 'Not found' });
- }
-
- return { checks: checks };
- }
- },
-
- // ==================== Init Scripts ====================
-
- init_script_generate: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
-
- let name = `${req.args.name}`;
- let start_priority = `${INIT_START_PRIORITY}`;
- let script_name = `${INIT_SCRIPT_PREFIX}${name}`;
- let script_path = init_script_path(name);
-
- let template = readfile('/usr/share/podman/procd-startup-template.sh');
- if (!template)
- return { error: 'Failed to read startup template' };
-
- let content = replace(template, /\{name\}/g, name);
- content = replace(content, /\{start_priority\}/g, start_priority);
- content = replace(content, /\{script_name\}/g, script_name);
-
- let written = writefile(script_path, content);
- if (written == null)
- return { error: 'Failed to create init script' };
-
- chmod(script_path, 0755);
-
- return { success: true, path: script_path };
- }
- },
-
- init_script_show: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
-
- let path = init_script_path(req.args.name);
- let content = readfile(path);
- if (content == null)
- return { error: 'Init script not found' };
-
- return { content: content, path: path };
- }
- },
-
- init_script_status: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
-
- let name = `${INIT_SCRIPT_PREFIX}${req.args.name}`;
- return ubus.defer(
- 'rc', 'list', { name: name },
- function (rc, reply) {
- if (reply[name] == null) {
- req.reply({ exists: false, enabled: false });
- } else {
- req.reply({ exists: true, enabled: reply[name].enabled });
- }
- }
- );
- }
- },
-
- init_script_set_enabled: {
- args: { name: '', enabled: false },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
-
- let script_path = init_script_path(req.args.name);
- if (!stat(script_path))
- return { error: 'Init script not found. Generate it first.' };
-
- let name = `${INIT_SCRIPT_PREFIX}${req.args.name}`;
- let action = (req.args.enabled === true || req.args.enabled === 1) ? 'enable' : 'disable';
- return ubus.defer(
- 'rc', 'init', { name: name, action: action },
- function (rc, reply) {
- if (rc == 0) {
- req.reply({ success: true, enabled: (action === 'enable')});
- } else {
- req.reply({ error: `Failed to ${action} service: ${reply}`});
- }
- }
- );
- }
- },
-
- init_script_remove: {
- args: { name: '' },
- call: function(req) {
- let err = require_param('name', req.args.name) || validate_name(req.args.name);
- if (err) return { error: err };
-
- let script_path = init_script_path(req.args.name);
- if (!stat(script_path))
- return { success: true, message: 'Init script does not exist' };
-
- // Disable before removing
- let name = `${INIT_SCRIPT_PREFIX}${req.args.name}`;
- return ubus.call(
- 'rc', 'init', { name: name, action: 'disable' },
- function (rc, reply) {
- if (rc == 0) {
- unlink(script_path);
- if (stat(script_path)) {
- req.reply({ error: 'failed to remove init script' });
- } else {
- req.reply({ success: true });
- }
- } else {
- req.reply({ error: `Failed to disable service: ${reply}` });
- }
- }
- );
- }
- }
-};
-
-// --- Socket check wrapper ---
-// Wrap all methods except system_debug with a socket availability check
-
-const no_socket_check = {
- system_debug: true,
- init_script_generate: true,
- init_script_show: true,
- init_script_status: true,
- init_script_set_enabled: true,
- init_script_remove: true
-};
-
-const _local_socket_path = podman_socket.get_local_path();
-
-const wrapped_methods = {};
-for (let name in methods) {
- let method = methods[name];
- if (no_socket_check[name]) {
- wrapped_methods[name] = method;
- } else {
- wrapped_methods[name] = {
- args: method.args,
- call: function(req) {
- // Cheap pre-check for unix sockets only; TCP relies on actual connect failures.
- if (_local_socket_path) {
- let s = stat(_local_socket_path);
- if (!s || s.type !== 'socket')
- return { error: 'Podman socket not found or not accessible' };
- }
- return method.call(req);
- }
- };
- }
-}
-
-return { 'podman': wrapped_methods };
diff --git a/luci-app-podman/ucode/controller/podman.uc b/luci-app-podman/ucode/controller/podman.uc
deleted file mode 100644
index ec36bd05f..000000000
--- a/luci-app-podman/ucode/controller/podman.uc
+++ /dev/null
@@ -1,479 +0,0 @@
-'use strict';
-
-import { open, stat, unlink } from 'fs';
-import * as uloop from 'uloop';
-import * as struct from 'struct';
-import { cursor } from 'uci';
-import { connect as ubus_connect } from 'ubus';
-import * as podman_socket from 'luci.podman_socket'; // ucode-lsp disable
-import { API_BASE } from 'luci.podman_socket'; // ucode-lsp disable
-import { validate_id } from 'luci.podman_validate'; // ucode-lsp disable
-import { build_request, parse_status } from 'luci.podman_http'; // ucode-lsp disable
-
-const BLOCKSIZE = 4096;
-
-const FLUSH_SIZE = 1500;
-const PAD_STR = (() => {
- let s = ''; let i = 0;
- while (i < FLUSH_SIZE) { s += ' '; i++; }
- return s;
-})();
-
-/** @param {string} data */
-function http_write_padded(data) {
- let n = length(data);
- if (n >= FLUSH_SIZE)
- return http.write(data);
- return http.write(data + substr(PAD_STR, 0, FLUSH_SIZE - n)); // ucode-lsp disable
-}
-
-const _uci_timeouts = (() => {
- let c = cursor();
- let s = c.get('uhttpd', 'main', 'script_timeout');
- let n = c.get('uhttpd', 'main', 'network_timeout');
- c.unload('uhttpd');
- return { script: s ? +s : 60, network: n ? +n : 30 };
-})();
-
-
-/**
- * @param {int} code
- * @param {string} message
- */
-function error_response(code, message) {
- if (http.eoh) return; // ucode-lsp disable
- http.status(code, message);
- http.header('Content-Type', 'text/plain');
- http.write(message + '\n');
-}
-
-
-/**
- * @param {string} sid
- */
-function session_timer(sid) {
- let uci = cursor();
- let script_timeout = +(uci.get('uhttpd', 'main', 'script_timeout') ?? 60);
- let sessiontime = +(uci.get('luci', 'sauth', 'sessiontime') ?? 3600);
- let timeout_ms = (script_timeout - 5) * 1000;
-
- if (!sid)
- return { timeout_ms, is_final: false, on_expire: () => uloop.end() };
-
- let uconn = ubus_connect();
- let now = time();
-
- let sdat = uconn.call('session', 'get', { ubus_rpc_session: sid });
- let deadline = +(sdat?.values?.podman_stream_deadline ?? 0);
- let last_seen = +(sdat?.values?.podman_stream_last_seen ?? 0);
-
- let is_fresh = !deadline || (now - last_seen > script_timeout);
-
- if (is_fresh)
- deadline = now + sessiontime;
-
- uconn.call('session', 'set', {
- ubus_rpc_session: sid,
- values: { podman_stream_deadline: deadline, podman_stream_last_seen: now }
- });
-
- let remaining_ms = (deadline - now) * 1000;
-
- if (remaining_ms <= 0) {
- uconn.call('session', 'destroy', { ubus_rpc_session: sid });
- return null;
- }
-
- let is_final = remaining_ms <= timeout_ms;
- let fire_ms = is_final ? remaining_ms : timeout_ms;
-
- return {
- timeout_ms: fire_ms,
- is_final,
- on_expire: () => {
- if (is_final)
- uconn.call('session', 'destroy', { ubus_rpc_session: sid });
- uloop.end();
- }
- };
-}
-
-/**
- * @param {string} api_path
- * @param {function} on_data
- * @param {boolean} early_headers
- * @param {int} timer
- */
-function stream_podman(api_path, on_data, early_headers, timer) {
- let sock = podman_socket.connect();
- if (!sock) {
- error_response(502, 'Cannot connect to Podman socket');
- return;
- }
-
- sock.send(build_request('GET', api_path, null));
-
- let t = _uci_timeouts;
- let ka_ms = (t.network - 5) * 1000;
-
- uloop.init();
-
- let response_started = early_headers;
- if (early_headers) {
- http.status(200, 'OK');
- http.header('Content-Type', 'text/plain');
- http.write_headers();
- http.write('\n');
- }
-
- let buf = '';
- let podman_headers_done = false;
-
- let handle = uloop.handle(sock, () => {
- let chunk = sock.recv(BLOCKSIZE);
- if (type(chunk) !== 'string') return; // EAGAIN - keep waiting
-
- if (!podman_headers_done) {
- // Phase 1: consuming Podman's HTTP response headers
- if (!length(chunk)) {
- // EOF before Podman sent headers
- if (!response_started)
- error_response(502, 'Podman closed connection');
- uloop.end();
- return;
- }
- buf += chunk;
- if (type(buf) !== 'string') return;
- let sep = index(buf, '\r\n\r\n');
- if (type(sep) !== 'int' || sep < 0) return; // headers not complete yet
-
- let code = parse_status(buf) || 502;
- if (code != 200) {
- if (!response_started)
- error_response(code, substr(buf, sep + 4) || sprintf('Podman error %d', code));
- uloop.end();
- return;
- }
-
- sep = sep + 4;
- let body_start = substr(buf, sep);
- buf = '';
- podman_headers_done = true;
-
- if (!response_started) {
- // Stats: start our response now that Podman confirmed 200
- http.status(200, 'OK');
- http.header('Content-Type', 'application/x-ndjson');
- http.write_headers();
- http.write('\n');
- response_started = true;
- }
-
- if (body_start && length(body_start)) {
- if (!on_data(body_start)) { uloop.end(); return; }
- }
- } else {
- // Phase 2: streaming data
- if (!length(chunk)) { uloop.end(); return; } // Podman closed stream
- if (!on_data(chunk)) uloop.end();
- }
- }, uloop.ULOOP_READ);
-
- if (early_headers)
- uloop.timer(ka_ms, () => http_write_padded('\n'));
-
- let effective_timeout = early_headers ? min(timer.timeout_ms, ka_ms * 2) : timer.timeout_ms;
- uloop.timer(effective_timeout, timer.on_expire);
-
- uloop.run();
-
- handle.delete();
- sock.close();
-
- if (!response_started)
- error_response(504, 'Podman did not respond');
-}
-
-return {
- container_logs: (id) => {
- if (validate_id(id)) { error_response(400, 'Invalid container ID'); return; }
-
- let timer = session_timer(ctx?.authsession); // ucode-lsp disable
- if (!timer) { error_response(403, 'Session expired'); return; }
-
- let tail = http.formvalue('tail') || '100';
- let since = http.formvalue('since') || '';
- let until = http.formvalue('until') || '';
- let follow = http.formvalue('follow') !== 'false';
-
- if (tail !== 'all' && !match(`${tail}`, /^[0-9]+$/)) {
- error_response(400, 'Invalid tail parameter');
- return;
- }
-
- if (since && !match(`${since}`, /^[0-9]+(\.[0-9]+)?$/)) {
- error_response(400, 'Invalid since parameter');
- return;
- }
-
- if (until && !match(`${until}`, /^[0-9]+(\.[0-9]+)?$/)) {
- error_response(400, 'Invalid until parameter');
- return;
- }
-
- let api_path = sprintf(
- '%s/containers/%s/logs?follow=%s&stdout=true&stderr=true×tamps=false',
- API_BASE, id, follow ? 'true' : 'false'
- );
- if (tail) api_path += sprintf('&tail=%s', tail);
- if (since) api_path += sprintf('&since=%s', since);
- if (until) api_path += sprintf('&until=%s', until);
-
- let framebuf = '';
-
- stream_podman(api_path, (chunk) => {
- framebuf += `${chunk}`;
- let out = '';
- while (length(framebuf) >= 8) {
- let hdr = struct.unpack('!BxxxI', substr(framebuf, 0, 8));
- if (!hdr) break;
- let stream_type = hdr[0];
- let payload_len = int(`${hdr[1]}`);
- if (length(framebuf) < 8 + payload_len) break; // wait for more data
- let payload = substr(framebuf, 8, payload_len);
- framebuf = substr(framebuf, 8 + payload_len);
- // Emit stdout (1) and stderr (2); skip others
- if (stream_type >= 1 && stream_type <= 2)
- out += payload;
- }
- if (length(out)) http_write_padded(out);
- return true;
- }, true, timer);
- },
-
- container_top: (id) => {
- if (validate_id(id)) { error_response(400, 'Invalid container ID'); return; }
-
- let timer = session_timer(ctx?.authsession); // ucode-lsp disable
- if (!timer) { error_response(403, 'Session expired'); return; }
-
- let delay = http.formvalue('delay') || '5';
- let ps_args = http.formvalue('ps_args') || '';
-
- if (!match(`${delay}`, /^[0-9]+$/) || +delay < 2) {
- error_response(400, 'Invalid delay parameter');
- return;
- }
-
- if (ps_args && !match(`${ps_args}`, /^[-a-zA-Z0-9_, ]+$/)) {
- error_response(400, 'Invalid ps_args parameter');
- return;
- }
-
- let api_path = sprintf('%s/containers/%s/top?stream=true&delay=%s', API_BASE, id, delay);
-
- if (ps_args)
- api_path += sprintf('&ps_args=%s', replace(ps_args, / /g, '%20'));
-
- stream_podman(api_path, (chunk) => {
- return http_write_padded(chunk);
- }, false, timer);
- },
-
- container_stats: (id) => {
- if (validate_id(id)) { error_response(400, 'Invalid container ID'); return; }
-
- let timer = session_timer(ctx?.authsession); // ucode-lsp disable
- if (!timer) { error_response(403, 'Session expired'); return; }
-
- let interval = `${http.formvalue('interval') || '3'}`;
- if (!match(interval, /^[0-9]+$/) || +interval < 1) {
- error_response(400, 'Invalid interval parameter');
- return;
- }
- let api_path = sprintf('%s/containers/stats?containers=%s&stream=true&interval=%s',
- API_BASE, id, interval);
-
- stream_podman(api_path, (chunk) => {
- return http_write_padded(chunk);
- }, false, timer);
- },
-
- pod_top: (name) => {
- if (validate_id(name)) { error_response(400, 'Invalid pod name or ID'); return; }
-
- let timer = session_timer(ctx?.authsession); // ucode-lsp disable
- if (!timer) { error_response(403, 'Session expired'); return; }
-
- let delay = http.formvalue('delay') || '5';
-
- if (!match(`${delay}`, /^[0-9]+$/) || +delay < 2) {
- error_response(400, 'Invalid delay parameter');
- return;
- }
-
- let api_path = sprintf('%s/pods/%s/top?stream=true&delay=%s', API_BASE, name, delay);
-
- stream_podman(api_path, (chunk) => {
- return http_write_padded(chunk);
- }, false, timer);
- },
-
- pod_stats: (name) => {
- if (validate_id(name)) { error_response(400, 'Invalid pod name or ID'); return; }
-
- let timer = session_timer(ctx?.authsession); // ucode-lsp disable
- if (!timer) { error_response(403, 'Session expired'); return; }
-
- let api_path = sprintf('%s/pods/stats?namesOrIDs=%s&stream=true', API_BASE, name);
-
- stream_podman(api_path, (chunk) => {
- return http_write_padded(chunk);
- }, false, timer);
- },
-
- image_pull: () => {
- let timer = session_timer(ctx?.authsession); // ucode-lsp disable
- if (!timer) { error_response(403, 'Session expired'); return; }
-
- let reference = `${http.formvalue('reference')}`;
- if (!reference || !match(reference, /^[a-zA-Z0-9._/:@-]+$/)) {
- error_response(400, 'Invalid or missing reference parameter');
- return;
- }
-
- if (!match(reference, /[/:@]/)) {
- error_response(400, 'Reference must be a registry reference (e.g. name:tag), not a raw image ID');
- return;
- }
-
- let sid = ctx?.authsession; // ucode-lsp disable
- let ref_id = replace(reference, /[/:@]/g, '-');
- let logfile = '/tmp/podman-pull-' + ref_id + '.ndjson';
- let pidfile = '/tmp/podman-pull-' + ref_id + '.pid';
-
- // Check if a worker is already running for this reference
- let pid = 0;
- let pf = open(pidfile, 'r');
- if (pf) { pid = +(trim(pf.read(200) || '0')); pf.close(); }
- let is_running = pid > 0 && stat('/proc/' + pid);
-
- // Read (and reuse) the ubus connection for session offset
- let uconn_rw = sid ? ubus_connect() : null;
- let offset = 0;
- if (uconn_rw) {
- let sdat = uconn_rw.call('session', 'get', { ubus_rpc_session: sid });
- offset = +(sdat?.values?.['pull_' + ref_id] || 0);
- }
-
- // Check if the existing logfile has bytes we haven't sent yet
- // (worker may have just finished between two reconnects)
- let lstat = stat(logfile);
- let has_unread = lstat && offset < lstat.size;
-
- let is_completed_pull = false;
- if (!is_running && lstat && lstat.size > 0) {
- let f = open(logfile, 'r');
- if (f) {
- let tail_start = lstat.size > 512 ? lstat.size - 512 : 0;
- if (tail_start > 0) f.seek(tail_start);
- let tail = f.read(512);
- f.close();
- is_completed_pull = !!(tail && (index(tail, '"images"') >= 0 || index(tail, '"error"') >= 0));
- }
- }
-
- // Fresh start: worker not running AND (previous pull completed, OR no unread
- // progress from a prior session, OR stale offset=0 logfile from a closed tab).
- let is_fresh_start = !is_running && (is_completed_pull || !(has_unread && offset > 0));
-
- if (is_fresh_start) {
- // Clean up any stale files and reset offset
- unlink(logfile);
- unlink(pidfile);
- offset = 0;
- if (uconn_rw) {
- let vals = {};
- vals['pull_' + ref_id] = 0;
- uconn_rw.call('session', 'set', { ubus_rpc_session: sid, values: vals });
- }
- // Safety: single quotes are used as shell delimiters below.
- // The regex on line 295 already rejects them; this is a belt-and-suspenders guard.
- if (index(reference, "'") >= 0 || index(logfile, "'") >= 0 || index(pidfile, "'") >= 0) {
- error_response(400, 'Invalid characters in reference');
- return;
- }
- system(sprintf(
- "timeout 600 /usr/bin/ucode /usr/share/podman/pull-worker.uc '%s' '%s' '%s' /dev/null 2>/dev/null &",
- reference, logfile, pidfile
- ));
- }
-
- http.status(200, 'OK');
- http.header('Content-Type', 'text/plain');
- http.write_headers();
- http.write('\n');
-
- let t = _uci_timeouts;
- let ka_ms = (t.network - 5) * 1000;
- let last_saved = offset;
-
- uloop.init();
-
- let poll_fn;
- poll_fn = () => {
- // Read and forward any new bytes written to the logfile
- let lf = open(logfile, 'r');
- if (lf) {
- if (offset > 0) lf.seek(offset);
- let chunk = lf.read(8192);
- lf.close();
- if (chunk && length(chunk)) {
- if (!http_write_padded(chunk)) { uloop.end(); return; }
- offset += length(chunk);
- // Persist offset to session (rate-limited)
- if (uconn_rw && offset - last_saved >= 1024) {
- let vals = {};
- vals['pull_' + ref_id] = offset;
- uconn_rw.call('session', 'set', { ubus_rpc_session: sid, values: vals });
- last_saved = offset;
- }
- }
- }
-
- // If worker has finished and we've consumed all bytes: close cleanly
- let cpid = 0;
- let cpf = open(pidfile, 'r');
- if (cpf) { cpid = +(trim(cpf.read(200) || '0')); cpf.close(); }
- if (!cpid || !stat('/proc/' + cpid)) {
- let sf = stat(logfile);
- if (!sf || offset >= sf.size) {
- unlink(logfile);
- uloop.end();
- return;
- }
- }
-
- uloop.timer(200, poll_fn);
- };
- uloop.timer(0, poll_fn);
-
- // Self-rearming keepalive - prevents network_timeout during slow layer downloads
- let ka;
- ka = () => { http_write_padded('\n'); uloop.timer(ka_ms, ka); };
- uloop.timer(ka_ms, ka);
-
- // Session expiry timer - same pattern as other streams
- uloop.timer(timer.timeout_ms, timer.on_expire);
-
- uloop.run();
-
- // Persist final offset before this script exits (next reconnect will resume here)
- if (uconn_rw && offset !== last_saved) {
- let vals = {};
- vals['pull_' + ref_id] = offset;
- uconn_rw.call('session', 'set', { ubus_rpc_session: sid, values: vals });
- }
- },
-
-};
diff --git a/luci-app-podman/ucode/podman_http.uc b/luci-app-podman/ucode/podman_http.uc
deleted file mode 100644
index a417f5146..000000000
--- a/luci-app-podman/ucode/podman_http.uc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2026 Christopher Söllinger
-// Licensed to the public under the Apache License 2.0.
-//
-// Small helpers for the wire-format HTTP/1.0 conversation the rpcd plugin,
-// the LuCI streaming controller and the pull-worker all have with the
-// Podman API socket. None of them need a full HTTP client — just request
-// construction and a couple of header parsers.
-
-'use strict';
-
-/**
- * @param {string} method GET / POST / PUT / DELETE
- * @param {string} path Request-URI including any query string
- * @param {string|null} body JSON body (or null/empty for GET-style requests)
- * @returns {string} The complete request bytes
- */
-export function build_request(method, path, body) {
- let req = sprintf('%s %s HTTP/1.0\r\nHost: localhost\r\n', method, path);
- if (body != null && body !== '') {
- let s = `${body}`;
- req += sprintf('Content-Type: application/json\r\nContent-Length: %d\r\n', length(s));
- req += '\r\n';
- req += s;
- return req;
- }
- return req + '\r\n';
-};
-
-/**
- * Extract HTTP status code from the start of a response buffer.
- *
- * @param {string} buf Buffer that begins with the status line
- * @returns {number} Status code, or 0 if the line doesn't match
- */
-export function parse_status(buf) {
- let m = match(buf, /^HTTP\/[0-9.]+ ([0-9]+)/);
- return m ? +m[1] : 0;
-};
-
-/**
- * Extract a Content-Length value from a response header buffer.
- *
- * @param {string} buf Header buffer (status line + headers)
- * @returns {number} Bytes declared by Content-Length, or -1 if absent
- */
-export function parse_content_length(buf) {
- let m = match(buf, /[Cc]ontent-[Ll]ength:\s*([0-9]+)/);
- return m ? +m[1] : -1;
-};
-
-/**
- * Blocking read of HTTP response headers from a connected socket. Reads
- * until the \r\n\r\n separator is seen, then returns the header block
- * (without trailing CRLFCRLF) and any body bytes that arrived together
- * with the headers. Returns null if the peer closes before headers are
- * complete.
- *
- * @param {any} sock Connected socket
- * @param {number|null} blocksize recv chunk size (default 65536)
- * @returns {{header_buf:string, body_remainder:string}|null}
- */
-export function read_headers(sock, blocksize) {
- let bs = blocksize || 65536;
- let buf = '';
- while (true) {
- let chunk = sock.recv(bs);
- if (!chunk) return null;
- buf += `${chunk}`;
- let sep = index(buf, '\r\n\r\n');
- if (type(sep) !== 'int' || sep < 0) continue;
- return {
- header_buf: substr(buf, 0, sep),
- body_remainder: substr(buf, sep + 4)
- };
- }
-};
diff --git a/luci-app-podman/ucode/podman_socket.uc b/luci-app-podman/ucode/podman_socket.uc
deleted file mode 100644
index ad33534e2..000000000
--- a/luci-app-podman/ucode/podman_socket.uc
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2026 Christopher Söllinger
-// Licensed to the public under the Apache License 2.0.
-//
-// Shared Podman socket helper for the rpcd plugin, the LuCI streaming
-// controller, the pull-worker and the podman-api CLI helper. Reads the
-// destination once at module load from UCI:
-// luci-podman.globals.socket_path
-// Accepted URI schemes:
-// unix:///path/to/socket AF_UNIX
-// tcp://host:port AF_INET
-// tcp6://[::1]:port AF_INET6
-// /path/to/socket bare path, treated as unix:///path
-// Fallback: unix:///run/podman/podman.sock.
-
-'use strict';
-
-import { cursor } from 'uci';
-import * as socket from 'socket';
-
-const DEFAULT_DEST = 'unix:///run/podman/podman.sock';
-
-/** Path prefix for all libpod REST API endpoints. */
-export const API_BASE = '/v5.0.0/libpod';
-
-const _dest = (() => {
- let c = cursor();
- let v = c.get('luci-podman', 'globals', 'socket_path');
- c.unload('luci-podman');
- return v || DEFAULT_DEST;
-})();
-
-const _parsed = (() => {
- if (substr(_dest, 0, 1) === '/')
- return { scheme: 'unix', addr: _dest };
- let m = match(_dest, /^([a-z0-9]+):\/\/(.+)$/i);
- if (!m)
- return null;
- return { scheme: lc(m[1]), addr: m[2] };
-})();
-
-/** @returns {?Socket} connected socket, or null on failure */
-export function connect() {
- if (!_parsed)
- return null;
-
- if (_parsed.scheme === 'unix') {
- let sock = socket.create(socket.AF_UNIX, socket.SOCK_STREAM);
- if (!sock) return null;
- if (!sock.connect(socket.sockaddr(_parsed.addr))) {
- sock.close();
- return null;
- }
- return sock;
- }
-
- if (_parsed.scheme === 'tcp' || _parsed.scheme === 'tcp6') {
- let family = _parsed.scheme === 'tcp6' ? socket.AF_INET6 : socket.AF_INET;
- let raw = _parsed.addr;
- let colon = rindex(raw, ':');
- if (colon < 0) return null;
- let host = substr(raw, 0, colon);
- let port = +substr(raw, colon + 1);
- host = replace(host, /^\[|\]$/g, '');
- if (!port || !host) return null;
-
- let ai = socket.addrinfo(host, `${port}`, { family, socktype: socket.SOCK_STREAM });
- if (!ai || !length(ai)) return null;
- let sock = socket.create(family, socket.SOCK_STREAM);
- if (!sock) return null;
- if (!sock.connect(ai[0].addr)) {
- sock.close();
- return null;
- }
- return sock;
- }
-
- return null;
-};
-
-/** @returns {boolean} true if destination is a TCP scheme */
-export function is_remote() {
- return _parsed && (_parsed.scheme === 'tcp' || _parsed.scheme === 'tcp6');
-};
-
-/** @returns {string} the raw URI from UCI (or the default), for logging */
-export function get_dest() {
- return _dest;
-};
-
-/**
- * @returns {?string} filesystem path of the unix socket, or null for tcp/tcp6.
- * Useful for pre-flight stat() checks before connect().
- */
-export function get_local_path() {
- if (!_parsed || _parsed.scheme !== 'unix') return null;
- return _parsed.addr;
-};
diff --git a/luci-app-podman/ucode/podman_validate.uc b/luci-app-podman/ucode/podman_validate.uc
deleted file mode 100644
index c4cb2a3ea..000000000
--- a/luci-app-podman/ucode/podman_validate.uc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2026 Christopher Söllinger
-// Licensed to the public under the Apache License 2.0.
-//
-// Shared parameter validators for the rpcd plugin, the LuCI streaming
-// controller and the podman-api CLI helper.
-//
-// Convention: every exported validator returns an error message **string**
-// on failure and `null` on success, so call sites can chain with || :
-//
-// let err = require_param('name', v) || validate_name(v);
-// if (err) return { error: err };
-
-'use strict';
-
-const VALID_RESTART_POLICIES = { 'no': true, 'always': true, 'on-failure': true, 'unless-stopped': true };
-
-const CONTAINER_BODY_KEYS = {
- cpu: true, memory: true, blockIO: true, devices: true,
- hugepageLimits: true, network: true, pids: true, rdma: true, unified: true,
- BlkIOWeightDevice: true,
- DeviceReadBPs: true, DeviceReadIOPs: true,
- DeviceWriteBPs: true, DeviceWriteIOPs: true,
- Env: true, UnsetEnv: true,
- health_cmd: true, health_interval: true, health_log_destination: true,
- health_max_log_count: true, health_max_log_size: true,
- health_on_failure: true, health_retries: true, health_start_period: true,
- health_startup_cmd: true, health_startup_interval: true,
- health_startup_retries: true, health_startup_success: true,
- health_startup_timeout: true, health_timeout: true,
- no_healthcheck: true
-};
-
-/** @param {string} id */
-export function validate_id(id) {
- if (!id || type(id) !== 'string' || !match(id, /^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/))
- return 'Invalid id format';
-};
-
-/** @param {string} name */
-export function validate_name(name) {
- if (!name || type(name) !== 'string' || !match(name, /^[a-zA-Z0-9_.-]+$/))
- return 'Invalid name format';
-};
-
-/** @param {string} ref */
-export function validate_image_ref(ref) {
- if (!ref || type(ref) !== 'string' || !match(ref, /^[a-zA-Z0-9_.:\/@-]+$/))
- return 'Invalid image reference';
-};
-
-/** @param {string} query */
-export function validate_query_params(query) {
- if (!query || type(query) !== 'string' || !match(query, /^[a-zA-Z0-9=&_.,-]+$/))
- return 'Invalid query parameters';
-};
-
-/** @param {string} policy */
-export function validate_restart_policy(policy) {
- if (policy && !(policy in VALID_RESTART_POLICIES))
- return 'Invalid restart policy';
-};
-
-/** @param {string} val */
-export function validate_int(val) {
- if (!val || type(val) !== 'string' || !match(val, /^[0-9]+$/))
- return 'Invalid number';
-};
-
-/**
- * @param {string} name
- * @param {any} value
- */
-export function require_param(name, value) {
- if (value == null || value === ''
- || (type(value) === 'object' && length(keys(value)) === 0))
- return `Missing required parameter: ${name}`;
-};
-
-export const BODY_KEYS = CONTAINER_BODY_KEYS;