diff --git a/app.py b/app.py index 8a0b05b..2e97507 100644 --- a/app.py +++ b/app.py @@ -434,7 +434,7 @@ HTML_TEMPLATE = ''' ${typeInfo.name} (${projs.length}) -
+
`; projs.forEach(p => { @@ -544,32 +544,42 @@ HTML_TEMPLATE = ''' } return ` -
-
-
-
-
-

${p.name}

- ${p.type.toUpperCase()} - ${p.version ? `${p.version}` : ''} -
-

${p.description || ''}

- ${portsHtml} -
- ${linksHtml} -
-
-
- ${statusInfo.text} - ${p.status?.health !== null && p.status?.health !== undefined ? ` -
- - ${p.status.health ? '健康' : '异常'} -
- ` : ''} +
+
+
+
+

${p.name}

+ ${statusInfo.text}
- ${actionsHtml} + ${p.ports && p.ports.length > 0 ? ` +
+ ${p.ports.map(port => { + const portStatus = p.status?.ports?.[port]; + const isRunning = portStatus?.running; + return `${port}`; + }).join('')} + ${p.admin_url ? `后台` : ''} +
+ ` : ''} + ${p.type === 'web' ? ` +
+ ${(p.status?.status === 'running' || p.status?.status === 'partial') ? ` + + + ` : ` + + `} + +
+ ` : ''} + ${p.type === 'cron' ? ` +
+ + ${p.status?.cron_configured ? '已配置' : '未配置'} + ${p.cron ? ` · ${p.cron}` : ''} +
+ ` : ''}
`; }