Add Local Agent dashboard SQLite history and manual updates
This commit is contained in:
@@ -4,7 +4,7 @@ import io
|
||||
from pathlib import Path
|
||||
import zipfile
|
||||
|
||||
ERP_LOCAL_AGENT_VERSION = "1.1.0"
|
||||
ERP_LOCAL_AGENT_VERSION = "1.2.0"
|
||||
ERP_LOCAL_AGENT_NAME = "ERP Local Agent"
|
||||
RUNTIME_ROOT = Path(__file__).resolve().parent / "local_agent_runtime"
|
||||
|
||||
@@ -30,7 +30,11 @@ def build_agent_env(*, erp_base_url: str, node_code: str, node_secret: str, stor
|
||||
f"TUNNEL_ENABLED={str(bool(tunnel_enabled)).lower()}\n"
|
||||
f"TUNNEL_RECONNECT_SECONDS={int(tunnel_reconnect_seconds or 10)}\n"
|
||||
"AUTO_UPDATE=true\n"
|
||||
"AUTO_INSTALL_UPDATES=false\n"
|
||||
"UPDATE_CHECK_INTERVAL_SECONDS=300\n"
|
||||
"DASHBOARD_ENABLED=true\n"
|
||||
"DASHBOARD_HOST=127.0.0.1\n"
|
||||
"DASHBOARD_PORT=8788\n"
|
||||
)
|
||||
|
||||
|
||||
@@ -47,7 +51,14 @@ def _build_zip(*, env_text: str | None, include_env: bool, include_admin_readme:
|
||||
if include_env and env_text is not None:
|
||||
dst.writestr(".env", env_text)
|
||||
if include_admin_readme:
|
||||
dst.writestr("README_ERP_LOCAL_AGENT.txt", f"ERP Local Agent {ERP_LOCAL_AGENT_VERSION}\nStorage behaviour and D:\\AuditFirmStorage are preserved. Future compatible releases self-update securely from ERP.\n")
|
||||
dst.writestr(
|
||||
"README_ERP_LOCAL_AGENT.txt",
|
||||
f"ERP Local Agent {ERP_LOCAL_AGENT_VERSION}\n"
|
||||
"Existing storage, WebSocket tunnel, Tally and accounting .act functionality are preserved.\n"
|
||||
"Local dashboard: http://127.0.0.1:8788\n"
|
||||
"The agent checks for updates automatically but installation is always initiated by the local user.\n"
|
||||
"The existing .env, data, logs, .venv and client storage are preserved during updates.\n",
|
||||
)
|
||||
return buffer.getvalue()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user