Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
zk
gpu-dcu-monitor
Commits
3c203950
Commit
3c203950
authored
May 27, 2026
by
zk
Browse files
Stabilize card layout and SSH timeout
parent
8f067d87
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
README.md
README.md
+1
-1
public/styles.css
public/styles.css
+17
-8
server.js
server.js
+1
-1
No files found.
README.md
View file @
3c203950
...
...
@@ -94,7 +94,7 @@ npm start
-
`PORT`
:网页端口,默认
`3066`
。
-
`POLL_INTERVAL_MS`
:自动采集间隔,默认
`10000`
毫秒。
-
`SSH_TIMEOUT_MS`
:单台服务器 SSH
超时,默认
`
8
000`
毫秒。
-
`SSH_TIMEOUT_MS`
:单台服务器 SSH
/采集命令
超时,默认
`
20
000`
毫秒。
NVIDIA 机器首次执行
`nvidia-smi`
较慢时可以继续调大。
-
`SSH_PATH`
:自定义 SSH 程序路径。Windows 默认使用
`C:\Windows\System32\OpenSSH\ssh.exe`
。
## 上传到 GitHub
...
...
public/styles.css
View file @
3c203950
...
...
@@ -302,28 +302,31 @@ h2 {
.server-grid
{
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
280px
,
1
fr
));
gap
:
12px
;
align-items
:
start
;
grid-template-columns
:
repeat
(
auto-fit
,
minmax
(
min
(
100%
,
300px
),
1
fr
));
grid-auto-rows
:
auto
;
gap
:
16px
;
align-items
:
stretch
;
flex
:
1
1
auto
;
min-height
:
0
;
overflow-y
:
auto
;
padding
:
2px
4
px
1
2
px
2px
;
padding
:
2px
8
px
1
8
px
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
,
1
fr
));
grid-template-columns
:
repeat
(
4
,
minmax
(
0
,
1
fr
));
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
,
1
fr
));
}
.server-card
{
min-height
:
0
;
}
}
server.js
View file @
3c203950
...
...
@@ -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
||
8
000
);
const
SSH_TIMEOUT_MS
=
Number
(
process
.
env
.
SSH_TIMEOUT_MS
||
20
000
);
const
ROOT
=
__dirname
;
const
DATA_DIR
=
path
.
join
(
ROOT
,
"
data
"
);
const
CONFIG_PATH
=
path
.
join
(
DATA_DIR
,
"
servers.json
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment