diff --git a/static/web_panel/pages/projects.html b/static/web_panel/pages/projects.html index 7b778fa..7b0347e 100644 --- a/static/web_panel/pages/projects.html +++ b/static/web_panel/pages/projects.html @@ -38,7 +38,7 @@ var projects=[]; function showTab(e,t){document.querySelectorAll("#tab-running,#tab-add,#tab-git").forEach(el=>el.style.display="none");document.getElementById("tab-"+t).style.display="block";document.querySelectorAll(".tab").forEach(el=>el.classList.remove("active"));e.target.classList.add("active")} async function refresh(){ - try{var r=await fetch("/SenSu/api/projects");var d=await r.json();projects=d.projects;var h="";for(var p of projects){var cls=p.status==="running"?"status-running":p.status==="error"?"status-error":"status-stopped";h+='
'+p.name+'
'+p.status+" PID:"+(p.pid||"-")+" :"+(p.port||"-")+" "+(p.uptime?p.uptime+"s":"")+(p.proxy?" → "+p.proxy:"")+'
'}document.getElementById("project-list").innerHTML=h||"暂无项目"}catch(e){console.error(e)} + try{var r=await fetch("/SenSu/api/projects");var d=await r.json();projects=d.projects;var h="";for(var p of projects){var cls=p.status==="running"?"status-running":p.status==="error"?"status-error":"status-stopped";h+='
'+p.name+'
'+p.status+" PID:"+(p.pid||"-")+" :"+(p.port||"-")+" "+(p.uptime?p.uptime+"s":"")+(p.proxy?" → "+p.proxy:"")+'
'}document.getElementById("project-list").innerHTML=h||"
暂无项目
"}catch(e){document.getElementById("project-list").innerHTML="
引擎未就绪 (API 错误)
"} } async function addProject(){ var n=document.getElementById("proj-name").value,cmd=document.getElementById("proj-cmd").value; diff --git a/static/web_panel/pages/proxy.html b/static/web_panel/pages/proxy.html index 8637ce0..2a94408 100644 --- a/static/web_panel/pages/proxy.html +++ b/static/web_panel/pages/proxy.html @@ -14,12 +14,14 @@