Commit 3c203950 authored by zk's avatar zk
Browse files

Stabilize card layout and SSH timeout

parent 8f067d87
......@@ -94,7 +94,7 @@ npm start
- `PORT`:网页端口,默认 `3066`
- `POLL_INTERVAL_MS`:自动采集间隔,默认 `10000` 毫秒。
- `SSH_TIMEOUT_MS`:单台服务器 SSH 超时,默认 `8000` 毫秒。
- `SSH_TIMEOUT_MS`:单台服务器 SSH/采集命令超时,默认 `20000` 毫秒。NVIDIA 机器首次执行 `nvidia-smi` 较慢时可以继续调大。
- `SSH_PATH`:自定义 SSH 程序路径。Windows 默认使用 `C:\Windows\System32\OpenSSH\ssh.exe`
## 上传到 GitHub
......
......@@ -302,28 +302,31 @@ h2 {
.server-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 12px;
align-items: start;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
grid-auto-rows: auto;
gap: 16px;
align-items: stretch;
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
padding: 2px 4px 12px 2px;
padding: 2px 8px 18px 2px;
}
.server-card {
min-height: 0;
position: relative;
display: flex;
flex-direction: column;
min-height: 284px;
min-width: 0;
border: 1px solid var(--line);
border-radius: 12px;
background: #fff;
padding: 13px;
transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
transition: box-shadow 0.16s ease, border-color 0.16s ease;
}
.server-card:hover,
.server-card.selected {
transform: translateY(-2px);
border-color: rgba(15, 159, 154, 0.45);
box-shadow: 0 18px 40px rgba(30, 51, 61, 0.12);
}
......@@ -423,6 +426,7 @@ h2 {
.summary strong {
display: block;
font-size: 21px;
overflow-wrap: anywhere;
}
.summary span {
......@@ -432,7 +436,7 @@ h2 {
.gpu-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 6px;
}
......@@ -562,6 +566,7 @@ h2 {
display: flex;
flex-wrap: wrap;
gap: 6px;
align-items: center;
margin-top: 14px;
}
......@@ -885,4 +890,8 @@ select:focus {
.gpu-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.server-card {
min-height: 0;
}
}
......@@ -6,7 +6,7 @@ const crypto = require("crypto");
const PORT = Number(process.env.PORT || 3066);
const POLL_INTERVAL_MS = Number(process.env.POLL_INTERVAL_MS || 10000);
const SSH_TIMEOUT_MS = Number(process.env.SSH_TIMEOUT_MS || 8000);
const SSH_TIMEOUT_MS = Number(process.env.SSH_TIMEOUT_MS || 20000);
const ROOT = __dirname;
const DATA_DIR = path.join(ROOT, "data");
const CONFIG_PATH = path.join(DATA_DIR, "servers.json");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment