tabby-group-server-stats 1.7.3 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,9 @@
1
1
  # 打包、本地测试与发布
2
2
 
3
- 本文面向 `tabby-group-server-stats 1.7.3` 的维护者。源码目录为 `D:\tabby-group-server-stats`;功能与预设说明见 [中文 README](README.md) / [English README](README.en.md)。
3
+ 本文面向 `tabby-group-server-stats 1.7.4` 的维护者。源码目录为 `D:\tabby-group-server-stats`;功能与预设说明见 [中文 README](README.md) / [English README](README.en.md)。
4
4
 
5
+ 1.7.4 增加布局分屏独立范围与持久化底栏开关,组编辑默认折叠,改进标签卡片与删除确认,并统一 GB 单位显示。个人布局启动命令不包含在插件包中。
6
+
5
7
  1.7.3 统一 fork 作者和维护者为 lishuainan0209,加入预设重复添加保护,并完善中英文搜索元数据与安装说明;保留上游 MIT 版权与贡献声明,包含 1.7.2 的显示修正。
6
8
 
7
9
  1.7.0 增加 GitHub 预设导入、内置项持久化排序、清晰分区与卡片边框、紧凑组分隔,并更新磁盘汇总、登录会话名单、双向网络速率及累计量和默认颜色阈值。版本号不表示已经推送或发布。
@@ -46,10 +48,10 @@ TypeScript、Angular 和 Webpack 使用项目内依赖,不需要全局安装
46
48
  ```powershell
47
49
  npm.cmd pack --dry-run
48
50
  npm.cmd pack
49
- tar -tf .\tabby-group-server-stats-1.7.3.tgz
51
+ tar -tf .\tabby-group-server-stats-1.7.4.tgz
50
52
  ```
51
53
 
52
- `prepack` 自动执行类型检查、普通测试和正式构建;任一失败会阻止打包。浏览器测试需另外运行。产物为 `tabby-group-server-stats-1.7.3.tgz`,后续本地验收与发布应使用同一份已检查的包。[npm pack 文档](https://docs.npmjs.com/cli/v11/commands/npm-pack/)
54
+ `prepack` 自动执行类型检查、普通测试和正式构建;任一失败会阻止打包。浏览器测试需另外运行。产物为 `tabby-group-server-stats-1.7.4.tgz`,后续本地验收与发布应使用同一份已检查的包。[npm pack 文档](https://docs.npmjs.com/cli/v11/commands/npm-pack/)
53
55
 
54
56
  确认包内包含:
55
57
 
@@ -72,7 +74,7 @@ Tabby 1.0.238 在发现 `Tabby.exe` 同级的 `data` 目录时将用户数据放
72
74
  ```powershell
73
75
  Set-Location -LiteralPath 'D:\tabby-group-server-stats'
74
76
  $testRoot = Join-Path (Get-Location).Path 'work\tabby-portable-test'
75
- $archive = (Resolve-Path -LiteralPath '.\tabby-group-server-stats-1.7.3.tgz').Path
77
+ $archive = (Resolve-Path -LiteralPath '.\tabby-group-server-stats-1.7.4.tgz').Path
76
78
 
77
79
  if (-not (Test-Path -LiteralPath (Join-Path $testRoot 'Tabby.exe'))) {
78
80
  throw '请先将 Tabby 便携版解压到测试目录。'
@@ -127,7 +129,7 @@ npm.cmd whoami --registry=https://registry.npmjs.org/
127
129
  验收通过后,手动发布刚才测试的同一个包:
128
130
 
129
131
  ```powershell
130
- npm.cmd publish .\tabby-group-server-stats-1.7.3.tgz --access public --registry=https://registry.npmjs.org/
132
+ npm.cmd publish .\tabby-group-server-stats-1.7.4.tgz --access public --registry=https://registry.npmjs.org/
131
133
  npm.cmd view tabby-group-server-stats version dist.tarball --registry=https://registry.npmjs.org/
132
134
  ```
133
135
 
package/README.en.md CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  [中文](README.md) | English
4
4
 
5
- SSH server monitoring for [Tabby](https://github.com/Eugeny/tabby): CPU load, memory, disk capacity, network rates and GPU memory metrics. Add custom shell commands, hover details and metric groups with overview, carousel or static layouts. The current version is **1.7.3**, adding duplicate-preset protection while retaining compact rows, three-decimal MB/s rates and aligned capacity columns.
5
+ SSH server monitoring for [Tabby](https://github.com/Eugeny/tabby): CPU load, memory, disk capacity, network rates and GPU memory metrics. Add custom shell commands, hover details and metric groups with overview, carousel or static layouts. The current version is **1.7.4**, adding duplicate-preset protection while retaining compact rows, three-decimal MB/s rates and aligned capacity columns.
6
6
 
7
7
  Fork author and maintainer: [lishuainan0209](https://github.com/lishuainan0209). This is an MIT-licensed fork of [Akkariin's tabby-server-stats](https://github.com/kasuganosoras/tabby-server-stats). The version number alone does not mean that the package has been published to npm.
8
8
 
9
+ **1.7.4 updates:** individual layout-pane scopes, linked checks for the same connection ID with individual opt-outs, bottom-bar-only display and a separate lower-left toggle in every pane.
10
+
9
11
  **The SSH hotfix from 1.6.1 is retained.** Previously, oversized SSH execution requests could disconnect the entire connection when many metrics were enabled. A fixed short command now receives the script through standard input in 8 KiB chunks, retaining the bounded completion acknowledgment. Transfer failures close only the statistics channel, without deliberately closing the terminal session or automatically rerunning user commands.
10
12
 
11
13
  ![Offline preset library](docs/images/preset-library.png)
@@ -24,11 +26,13 @@ The preview uses example configuration data and the Chinese interface.
24
26
  - **Clear section and card borders:** separate built-ins, presets, standalone labels and groups; compact line separators between displayed groups.
25
27
  - **English/Chinese UI and 26 original monitoring icons:** searchable categories, existing icon support and custom SVGs.
26
28
 
27
- The bottom bar and floating panel share the same label renderer. Built-ins use the same checks, colors, scopes and details as custom metrics.
29
+ Display is fixed to the bottom status bar, with an enable switch in settings. Legacy floating-panel preferences automatically use the bottom bar. Built-ins use the same checks, colors, scopes and details as custom metrics. Group hover-detail popups remain available.
28
30
 
29
31
  ## Create a label
30
32
 
31
- Open Tabby Settings → Server Stats, then choose **Add single label**, or find a library preset and click **Add**. Importing from GitHub or JSON loads choices into the library; adding a preset puts it into the active configuration. Use the pencil button to edit an existing item. Within a group, each main/child label opens its own editor.
33
+ Open Tabby Settings → Bottom Status Bar, then choose **Add single label**, or find a library preset and click **Add**. Importing from GitHub or JSON loads choices into the library; adding a preset puts it into the active configuration. Use the pencil button to edit an existing item. Within a group, each main/child label opens its own editor.
34
+
35
+ Group cards place the main label and child labels on separate adjacent rows. The group's pencil button opens its editor with every member collapsed; clicking a bordered label button opens that member directly. Delete buttons sit at the lower right of their cards and ask for confirmation with the item's name. Deleting a child takes effect only after saving the whole group.
32
36
 
33
37
  New labels default to **text** and checks default to **output-text comparison**. Configure commands in this order:
34
38
 
@@ -81,11 +85,13 @@ Disabling the main label does not disable its children. Disabling one child leav
81
85
 
82
86
  CPU, memory and disk are standalone labels. Network is a vertical static group with download/upload children; its main label starts disabled. All use the common commands, checks, details, scopes and color rules rather than a separate hardcoded chart collector.
83
87
 
84
- Use each card's up/down buttons to reorder CPU, memory, disk and network. The order is persisted in `builtinOrder`, shared by the bottom bar and floating panel, and retained after restarting. Custom labels and groups retain their existing relative order.
88
+ Use each card's up/down buttons to reorder CPU, memory, disk and network. The order is persisted in `builtinOrder` and retained after restarting. Custom labels and groups retain their existing relative order.
85
89
 
86
90
  **Restore defaults** removes only the selected built-in's override, preserving its top-level enable switch and ordering, and leaving other built-ins and custom labels untouched. Restoring network resets that group's main/child definitions to their factory configuration.
87
91
 
88
- Built-in CPU, memory, disk and network commands support Linux/macOS; most other library presets target Linux. Download and upload show the current received/sent rates in decimal MB/s with three fractional digits and thousands separators. Commands still return KiB/s; thresholds continue to use raw values. Each direction's hover detail shows its own cumulative GiB and the interfaces included. Default-route interfaces are preferred; without a usable default route, eligible non-loopback interfaces are used. **Totals cover the time since interface creation or counter reset, not since the current SSH login.**
92
+ Built-in CPU, memory, disk and network commands support Linux/macOS; most other library presets target Linux. Download and upload show the current received/sent rates in decimal MB/s with three fractional digits and thousands separators. Commands still return KiB/s; thresholds continue to use raw values. Each direction's hover detail shows its own cumulative GB and the interfaces included. Default-route interfaces are preferred; without a usable default route, eligible non-loopback interfaces are used. **Totals cover the time since interface creation or counter reset, not since the current SSH login.**
93
+
94
+ Capacity and cumulative traffic use the **GB** label while retaining the existing base-1024 calculation (1024³ bytes per displayed unit). Only the unit name changes; readings and alert thresholds stay the same. Network rates in MB/s remain decimal.
89
95
 
90
96
  The target system needs `timeout`, `gtimeout` or `setsid` for bounded command execution.
91
97
 
@@ -112,11 +118,11 @@ The 12 standalone presets cover uptime, temperature, system load, logged-in user
112
118
  | GPU memory | Aggregate GPU memory; eight children GPU 0–7 | All panes |
113
119
  | CPU load | Thread count; 1-minute and 5-minute load | All panes |
114
120
 
115
- Each disk group's main label shows **aggregate free GiB** across its readable system and mounted data filesystems, deduplicating filesystems so bind mounts are not counted twice. The system disk is the first child, followed by data mounts; hover shows free/total capacity. Missing mounts are omitted from the aggregate while their child labels retain a notice by default. No readable valid filesystem produces an error, not a misleading zero.
121
+ Each disk group's main label shows **aggregate free GB** across its readable system and mounted data filesystems, deduplicating filesystems so bind mounts are not counted twice. The system disk is the first child, followed by data mounts; hover shows free/total capacity. Missing mounts are omitted from the aggregate while their child labels retain a notice by default. No readable valid filesystem produces an error, not a misleading zero.
116
122
 
117
123
  The **Users** preset counts system login records from `who`, including normal tty, pts and console sessions. Hover groups and sorts counts by username, for example `alice ×2, bob ×1`. Empty records produce a primary value of `0` and a detail of `-`; missing tools or execution failures remain errors. This is neither the current connection's username nor a count of every TCP or background SSH connection.
118
124
 
119
- GPU percentages mean **VRAM usage** (`memory.used / memory.total`), not `utilization.gpu`. Details query `memory.free` directly and divide by 1024 to display free/total GiB. The main GPU label keeps a no-GPU notice; nonexistent GPU children are hidden in every view by default.
125
+ GPU percentages mean **VRAM usage** (`memory.used / memory.total`), not `utilization.gpu`. Details query `memory.free` directly, retain the division by 1024, and show free/total memory with the GB label. The main GPU label keeps a no-GPU notice; nonexistent GPU children are hidden in every view by default.
120
126
 
121
127
  The P1 host and container are separate presets bound to separate saved connections. They must not be merged merely because they share a host address and use different ports.
122
128
 
@@ -130,8 +136,8 @@ The corresponding built-ins and presets use green `#00ff00`, orange `#ffa500` an
130
136
 
131
137
  | Metric | Red | Orange | Green |
132
138
  | --- | --- | --- | --- |
133
- | Free capacity per disk (GiB) | `< 20` | `20 ≤ x ≤ 40` | `> 40` |
134
- | Total free disk capacity (GiB) | `< 50` | `50 ≤ x ≤ 100` | `> 100` |
139
+ | Free capacity per disk (GB) | `< 20` | `20 ≤ x ≤ 40` | `> 40` |
140
+ | Total free disk capacity (GB) | `< 50` | `50 ≤ x ≤ 100` | `> 100` |
135
141
  | GPU memory usage (%) | `> 80` | `50 < x ≤ 80` | `≤ 50` |
136
142
  | RAM usage (%) | `> 80` | `60 < x ≤ 80` | `≤ 60` |
137
143
  | Normalized CPU 1min / 5min load (%) | `> 150` | `100 < x ≤ 150` | `≤ 100` |
@@ -140,13 +146,21 @@ GPU thresholds measure VRAM use, not GPU compute utilization. CPU load is normal
140
146
 
141
147
  ## Connection scopes and mixed panes
142
148
 
143
- A standalone label or whole group can select multiple saved connections or layouts. The default unrestricted scope covers every supported terminal pane. Group members inherit the group's scope; an unmatched pane does not run even the object's check.
149
+ A standalone label or whole group can select saved connections, whole layouts or individual panes within layouts. Layouts expand by default with indented pane entries. A pane remains selectable after its original connection profile is deleted, as long as the saved layout retains its copy. The default unrestricted scope covers every supported terminal pane. Group members inherit the group's scope; an unmatched pane does not run even the object's check.
150
+
151
+ Checking a connection selects every entry with the **same original connection ID**; unchecking affects only that entry. Per-pane opt-outs override connection-wide or layout-wide selections and survive saving, reopening and JSON export/import. A layout checkbox selects or clears only its own panes. Equal names with different IDs do not link selections.
152
+
153
+ Matching prioritizes each pane's **original saved connection ID**, not the focused pane, tab title or a sibling connection. If an old saved layout retains an obsolete connection ID, the plugin looks for exactly one current SSH profile with the same host, port, username and jump/proxy route. Missing or ambiguous matches do not inherit a scope. Hosts and containers on different ports remain separate. This compatibility fix is included in 1.7.4.
144
154
 
145
- Matching uses each pane's **original saved connection ID**, not the focused pane, tab title, host address or a sibling connection. In a `P1 / P2 / P1` layout, P1-bound metrics appear in both P1 panes and P2-bound metrics only in the middle pane. A layout-bound metric applies to all three, executing independently in each session. Multiple selections form a union: choosing P1 plus the whole layout also includes its P2 pane.
155
+ In a `P1 / P2 / P1` layout, P1-bound metrics appear in both P1 panes and P2-bound metrics only in the middle pane. A layout-bound metric applies to all three, executing independently in each session. Multiple selections form a union: choosing P1 plus the whole layout also includes its P2 pane.
146
156
 
147
157
  Renaming preserves the association. Deleted profiles remain marked unavailable and stop matching; a new profile with the same name does not inherit the old ID. Removing the last selection does not make the metric global—you must explicitly choose all terminal panes.
148
158
 
149
- Saved layouts have IDs separate from the connections inside them. The plugin records a layout's origin when it is opened and retains that marker in recovery data. For **whole-layout bindings only**, an unmarked layout already open before installation, or a newly saved layout, must be reopened once from the saved-profile list. Direct connection-ID bindings need no such reopening.
159
+ Saved layouts have IDs separate from the connections inside them. The plugin records a layout's origin when it is opened and retains that marker in recovery data. Whole-layout and individual-pane bindings require an unmarked layout already open before installation, or a newly saved layout, to be reopened once from the saved-profile list. Direct connection-ID bindings need no such reopening.
160
+
161
+ Individual pane bindings also require that layout-origin marker; reopen an unmarked old window from its saved layout once. Pane targets combine the layout ID, saved position and original connection ID, so repeated connections can be unchecked individually. After editing a saved layout or removing/replacing panes, review unavailable scope entries and select the intended targets again.
162
+
163
+ The small lower-left button in each pane controls only that pane's entire status bar. The button remains available when the bar is hidden. Saved layouts remember visibility separately for each occurrence: three identical connections can retain an off/off/on pattern when reopened, without affecting other layouts.
150
164
 
151
165
  ## Install, develop and publish
152
166
 
@@ -167,7 +181,7 @@ npm.cmd run test:ui
167
181
  npm.cmd pack
168
182
  ```
169
183
 
170
- `npm pack` reruns type checking, unit tests and the production build, producing `tabby-group-server-stats-1.7.3.tgz`; compiled files are in `dist/`. Browser tests use real Angular components with simulated data, while command tests use a local shell. Live SSH command validation and desktop split-pane acceptance need their own recorded results.
184
+ `npm pack` reruns type checking, unit tests and the production build, producing `tabby-group-server-stats-1.7.4.tgz`; compiled files are in `dist/`. Browser tests use real Angular components with simulated data, while command tests use a local shell. Live SSH command validation and desktop split-pane acceptance need their own recorded results.
171
185
 
172
186
  This fork retains `plugin.serverStats` configuration compatibility. **Enable either the upstream plugin or this fork in a Tabby instance**, to avoid duplicate collection. An isolated portable Tabby installation is recommended for initial testing. See the [packaging, local-installation and publishing guide (Chinese)](PUBLISHING.zh-CN.md) for commands and acceptance checks.
173
187
 
@@ -189,3 +203,10 @@ Report problems or suggest improvements through [this project's Issues](https://
189
203
  - Retain Akkariin's upstream MIT copyright, source links and contributor credit.
190
204
  - Prevent duplicate preset additions using source and stable ID, including renamed or disabled items; use commands and scope to recognize legacy entries.
191
205
  - Add relevant bilingual metadata and document installation through maintainer search, without promising a search ranking.
206
+
207
+ ### 1.7.4 pane controls and editing
208
+
209
+ - Bind individual saved-layout panes, link checks for matching connection IDs and allow individual opt-outs, including legacy layout profiles.
210
+ - Use a fixed bottom bar with a persistent, independent lower-left toggle for each pane.
211
+ - Put main/child buttons together for direct editing; collapse group editors initially and move named deletion confirmations to the lower right.
212
+ - Display capacity as GB while retaining base-1024 readings and thresholds, with compatibility for legacy GiB configuration.
package/README.md CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  中文 | [English](README.en.md)
4
4
 
5
- 为 [Tabby](https://github.com/Eugeny/tabby) 提供 SSH 服务器监控(server monitoring):CPU 负载、内存、磁盘容量、网络速率和 GPU 显存指标。支持自定义 Shell 命令、悬停详情,以及概览、轮播、静态显示的多标签组(metric groups)。当前版本为 **1.7.3**,加入预设重复添加保护,保留紧凑底栏、MB/s 三位小数及容量数字分列对齐。
5
+ 为 [Tabby](https://github.com/Eugeny/tabby) 提供 SSH 服务器监控(server monitoring):CPU 负载、内存、磁盘容量、网络速率和 GPU 显存指标。支持自定义 Shell 命令、悬停详情,以及概览、轮播、静态显示的多标签组(metric groups)。当前版本为 **1.7.4**,加入预设重复添加保护,保留紧凑底栏、MB/s 三位小数及容量数字分列对齐。
6
6
 
7
7
  本 fork 作者及维护者:[lishuainan0209](https://github.com/lishuainan0209)。本项目基于 [Akkariin 的 tabby-server-stats](https://github.com/kasuganosoras/tabby-server-stats) 二次开发,继续使用 MIT 许可证。版本号不代表已经发布到 npm。
8
8
 
9
+ **1.7.4 更新**:布局内分屏可独立选择;同连接 ID 勾选联动、取消逐项生效;固定底部栏,每个分屏左下角提供独立显示开关。
10
+
9
11
  **保留 1.6.1 的 SSH 热修复**:此前指标较多时,超长 SSH 执行请求可能导致整个连接断开。执行请求已改为固定短命令,脚本通过标准输入按 8 KiB 分块传输,保留完整接收后的有时限确认。传输失败只关闭本次统计通道,不主动关闭终端会话,也不会自动重跑用户命令。
10
12
 
11
13
  ![离线预设库界面](docs/images/preset-library.png)
@@ -18,17 +20,19 @@
18
20
  - **三条命令**:对象校验 → Shell 功能命令 → 悬停扩展信息;校验失败时不执行后两条。
19
21
  - **标签组**:主标签与多个子标签,支持概览、轮播、静态横排和静态竖排。
20
22
  - **分别启用**:单标签、整个标签组、组内主标签和每个子标签都能独立开关,配置及颜色规则保留。
21
- - **按连接显示**:多选保存的连接或布局,正确区分混合分屏中的每个会话。
22
- - **可编辑、可排序的内置指标**:CPU、内存、磁盘和网络可修改命令与样式,使用上下移按钮调整两种面板的显示顺序,也可单独恢复默认。
23
+ - **按连接或布局分屏显示**:多选保存的连接、整个布局或布局内单个分屏;同连接 ID 勾选联动,取消可逐个进行。
24
+ - **可编辑、可排序的内置指标**:CPU、内存、磁盘和网络可修改命令与样式,使用上下移按钮调整底部状态栏的显示顺序,也可单独恢复默认。
23
25
  - **离线与 GitHub 标签库**:内附 20 个预设(12 个单标签、8 个标签组),支持从本 fork 的 GitHub 导入、JSON 导入导出和搜索;已添加的预设不会因重复点击而产生副本。
24
26
  - **清晰的区域与卡片边框**:内置指标、预设库、单标签、多标签组四块区域分别显示;状态栏组间采用紧凑细线分隔。
25
27
  - **中英文界面与 26 款原创图标**:图标按用途分类、可搜索,也支持原有图标和自定义 SVG。
26
28
 
27
- 底部状态栏与悬浮窗使用同一个标签显示组件,内置指标也遵循相同的校验、颜色、范围和悬停规则。
29
+ 显示方式固定为底部状态栏,设置页提供启用开关;旧配置中的浮动面板模式自动按底部栏处理。内置指标遵循与自定义标签相同的校验、颜色、范围和悬停规则,标签组的悬停详情弹窗仍保留。
28
30
 
29
31
  ## 从一个标签开始
30
32
 
31
- 在 Tabby 设置 → 服务器状态中,点击“添加单标签”,或从标签库选择一个预设后点击“添加”。从 GitHub 或 JSON 导入都只加载可选条目;点击“添加”才把对应条目加入当前配置。已有项目使用铅笔按钮编辑,组内主、子标签点击后分别展开编辑框。
33
+ 在 Tabby 设置 → 底部状态栏中,点击“添加单标签”,或从标签库选择一个预设后点击“添加”。从 GitHub 或 JSON 导入都只加载可选条目;点击“添加”才把对应条目加入当前配置。已有项目使用铅笔按钮编辑,组内主、子标签点击后分别展开编辑框。
34
+
35
+ 标签组卡片中,主标签与子标签分两行排列。点击标签组的铅笔按钮进入编辑时,主、子标签默认全部折叠;点击带边框的标签按钮则直接展开并编辑对应项目。删除按钮位于各自卡片右下角,并弹出包含名称的确认提示;子标签删除后仍需保存整个标签组才会生效。
32
36
 
33
37
  新建标签默认使用**文本值**,校验默认比较**输出文本**。每个标签的命令顺序为:
34
38
 
@@ -81,11 +85,13 @@ printf '%s\n' "$data" | awk 'NR==2 {print "available " $4 " / used " $3}'
81
85
 
82
86
  CPU、内存、磁盘是单标签;网络是静态竖排标签组,默认显示下载和上传,主标签默认关闭。它们与自定义项目使用相同的命令编辑、对象校验、扩展信息、显示范围和颜色规则,不再另走硬编码图表采集路径。
83
87
 
84
- 使用卡片右侧上下移按钮调整 CPU、内存、磁盘和网络的顺序。顺序保存在 `builtinOrder` 中,底部状态栏与悬浮窗一致,重开后保留;自定义单标签和标签组仍按各自原有顺序排列。
88
+ 使用卡片右侧上下移按钮调整 CPU、内存、磁盘和网络的顺序。顺序保存在 `builtinOrder` 中,重开后保留;自定义单标签和标签组仍按各自原有顺序排列。
85
89
 
86
90
  “恢复默认”只删除当前内置项的自定义覆盖,保留它的顶层启用开关和排列顺序,不影响其他内置项或自定义标签。网络恢复默认会恢复该组的出厂主、子标签配置。
87
91
 
88
- 内置 CPU、内存、磁盘和网络均包含 Linux/macOS 适配,多数其他离线预设面向 Linux。网络下载、上传主值分别是当前接收、发送速率,显示单位为 MB/s(十进制),固定三位小数并带千位逗号;采集命令仍输出 KiB/s,颜色规则继续按原始数值判断;各自悬停显示对应方向的累计 GiB 和参与统计的网卡。默认优先选择默认路由网卡,没有可用默认路由时回退到符合条件的非回环网卡。**累计量从接口建立或计数器重置起计算,不是本次 SSH 登录后的流量**。
92
+ 内置 CPU、内存、磁盘和网络均包含 Linux/macOS 适配,多数其他离线预设面向 Linux。网络下载、上传主值分别是当前接收、发送速率,显示单位为 MB/s(十进制),固定三位小数并带千位逗号;采集命令仍输出 KiB/s,颜色规则继续按原始数值判断;各自悬停显示对应方向的累计 GB 和参与统计的网卡。默认优先选择默认路由网卡,没有可用默认路由时回退到符合条件的非回环网卡。**累计量从接口建立或计数器重置起计算,不是本次 SSH 登录后的流量**。
93
+
94
+ 容量和累计流量统一标为 **GB**,沿用现有的 1024 进制计算口径(每单位 1024³ 字节),仅调整单位名称,数值和告警阈值保持不变;网络速率 MB/s 仍使用十进制。
89
95
 
90
96
  目标系统需要提供 `timeout`、`gtimeout` 或 `setsid` 之一,用于命令超时保护。
91
97
 
@@ -112,11 +118,11 @@ CPU、内存、磁盘是单标签;网络是静态竖排标签组,默认显
112
118
  | GPU 显存 | 全部 GPU 汇总;GPU 0–7 八个子标签 | 所有窗格 |
113
119
  | CPU负载 | 线程数;1 分钟、5 分钟负载 | 所有窗格 |
114
120
 
115
- 磁盘组主标签为**磁盘总余量 GiB**,汇总系统盘及该组有效挂载的数据盘,按文件系统去重,避免绑定挂载重复计数。系统盘是第一子标签,后接数据盘;每项悬停显示剩余/总容量。掉盘不进入汇总,其子标签默认保留“未挂载”提示;没有任何可读取的有效文件系统时显示错误,而不是伪装为 0。
121
+ 磁盘组主标签为**磁盘总余量 GB**,汇总系统盘及该组有效挂载的数据盘,按文件系统去重,避免绑定挂载重复计数。系统盘是第一子标签,后接数据盘;每项悬停显示剩余/总容量。掉盘不进入汇总,其子标签默认保留“未挂载”提示;没有任何可读取的有效文件系统时显示错误,而不是伪装为 0。
116
122
 
117
123
  “登录用户”主值统计 `who` 中的系统登录会话,包含正常 tty、pts 和控制台登录;悬停按用户名汇总并排序,例如 `alice ×2, bob ×1`。无人登录时主值为 `0`、详情为 `-`;工具缺失或执行失败保持错误提示。它不是当前连接用户名,也不等于所有 TCP 或后台 SSH 连接数。
118
124
 
119
- GPU 百分比是**显存使用率**(`memory.used / memory.total`),不是 `utilization.gpu` 计算利用率;悬停直接查询 `memory.free`,除以 1024 转为 GiB 后显示剩余/总显存。GPU 主标签无设备时保留提示,不存在的 GPU 子标签默认在所有视图隐藏。
125
+ GPU 百分比是**显存使用率**(`memory.used / memory.total`),不是 `utilization.gpu` 计算利用率;悬停直接查询 `memory.free`,沿用除以 1024 的计算口径,以 GB 标签显示剩余/总显存。GPU 主标签无设备时保留提示,不存在的 GPU 子标签默认在所有视图隐藏。
120
126
 
121
127
  整机 GPU 查询被异常设备阻断时,汇总命令会逐一查询 GPU 0–7,只汇总可读取的设备;没有可读取设备时显示“无GPU”。该提示表示查询不可用,不等同于确认机器未安装显卡。
122
128
 
@@ -130,8 +136,8 @@ P1 宿主与容器是两个独立模板,分别绑定各自连接;不能仅
130
136
 
131
137
  | 指标 | 红色 | 橙色 | 绿色 |
132
138
  | --- | --- | --- | --- |
133
- | 单盘剩余容量(GiB) | `< 20` | `20 ≤ x ≤ 40` | `> 40` |
134
- | 磁盘总剩余容量(GiB) | `< 50` | `50 ≤ x ≤ 100` | `> 100` |
139
+ | 单盘剩余容量(GB) | `< 20` | `20 ≤ x ≤ 40` | `> 40` |
140
+ | 磁盘总剩余容量(GB) | `< 50` | `50 ≤ x ≤ 100` | `> 100` |
135
141
  | GPU 显存使用率(%) | `> 80` | `50 < x ≤ 80` | `≤ 50` |
136
142
  | 内存使用率(%) | `> 80` | `60 < x ≤ 80` | `≤ 60` |
137
143
  | CPU 1min / 5min 归一化负载(%) | `> 150` | `100 < x ≤ 150` | `≤ 100` |
@@ -140,13 +146,21 @@ GPU 阈值衡量显存占用,不是 GPU 计算利用率;CPU 负载按逻辑
140
146
 
141
147
  ## 连接范围与混合分屏
142
148
 
143
- 单标签和整个标签组可以多选保存的连接或布局,默认“不限制范围”会在所有受支持的终端窗格显示。主、子标签继承组范围,范围不匹配时连校验命令也不运行。
149
+ 单标签和整个标签组可以多选保存的连接、整个布局或布局内单个分屏,默认“不限制范围”会在所有受支持的终端窗格显示。布局默认展开,分屏缩进显示;即使原连接配置已删除,只要布局中仍保留连接副本,就可以直接选择该分屏。主、子标签继承组范围,范围不匹配时连校验命令也不运行。
150
+
151
+ 勾选一项连接时,列表中**原始连接 ID 相同**的所有对应项一起选中;取消时只取消当前项。单个分屏的取消优先于连接或整个布局的选择,保存、重开和 JSON 导入导出均保留此例外。布局复选框仅用于全选或取消本布局内的分屏。相同名称但不同 ID 不会联动。
152
+
153
+ 关联优先依据每个窗格实际使用的**原始连接配置 ID**,不依据窗口标题、当前焦点或其他窗格。旧保存布局中的连接 ID 已失效时,插件会按 SSH 地址、端口、用户名及跳板/代理路径查找唯一的现有连接;找不到或存在多个候选时不自动关联。宿主机和容器使用不同端口时不会混淆。此兼容修复已包含在 1.7.4 中。
144
154
 
145
- 关联依据每个窗格实际使用的**原始连接配置 ID**,不依据窗口标题、当前焦点、主机地址或其他窗格。一个 `P1 / P2 / P1` 混合布局中,只绑定 P1 的指标在两个 P1 窗格出现;只绑定 P2 的指标只在中间窗格出现。绑定整个保存布局的公共指标在三格生效,各自在自己的会话采集。多选是并集:同时选择 P1 和整个布局会覆盖布局内的 P2。
155
+ 一个 `P1 / P2 / P1` 混合布局中,只绑定 P1 的指标在两个 P1 窗格出现;只绑定 P2 的指标只在中间窗格出现。绑定整个保存布局的公共指标在三格生效,各自在自己的会话采集。多选是并集:同时选择 P1 和整个布局会覆盖布局内的 P2。
146
156
 
147
157
  重命名不影响 ID 关联;删除连接后保留失效选择并停止匹配,同名新连接不会自动继承。删去最后一个选择也不会自动变为全局,必须明确切回“所有终端窗格”。
148
158
 
149
- 保存布局拥有独立于内部连接的 ID。插件会在打开已保存布局时记录布局来源并随恢复信息保存。只有**绑定整个布局**时,安装前已打开的未标记布局、或刚从当前分屏新保存的布局,需要从配置列表重新打开一次。按原始连接 ID 绑定不受此限制。
159
+ 保存布局拥有独立于内部连接的 ID。插件会在打开已保存布局时记录布局来源并随恢复信息保存。绑定整个布局或布局内单个分屏时,安装前已打开的未标记布局、或刚从当前分屏新保存的布局,需要从配置列表重新打开一次。按原始连接 ID 绑定不受此限制。
160
+
161
+ 布局内单个分屏的绑定也需要已记录的布局来源;未标记的旧窗口请从保存布局重新打开一次。分屏选项按布局 ID、保存时的位置和原始连接 ID 区分,同一连接重复出现也可逐个取消。修改保存布局、删除或替换分屏后,请检查范围列表中的失效项并重新选择。
162
+
163
+ 每个分屏左下角的小图标仅切换该分屏的整条状态栏。关闭后只保留图标,便于再次开启。保存布局内的开关状态按分屏独立持久化:三个相同连接可设为“关、关、开”,再次打开该布局仍保留这些状态,其他布局不受影响。
150
164
 
151
165
  ## 安装、开发与发布
152
166
 
@@ -167,7 +181,7 @@ npm.cmd run test:ui
167
181
  npm.cmd pack
168
182
  ```
169
183
 
170
- `npm pack` 会再次执行类型检查、普通测试和正式构建,生成 `tabby-group-server-stats-1.7.3.tgz`;构建文件在 `dist/`。浏览器测试使用真实 Angular 组件与模拟数据,命令测试在本机 shell 运行;真实 SSH 命令验证与 Tabby 分屏验收需要分别记录结果。
184
+ `npm pack` 会再次执行类型检查、普通测试和正式构建,生成 `tabby-group-server-stats-1.7.4.tgz`;构建文件在 `dist/`。浏览器测试使用真实 Angular 组件与模拟数据,命令测试在本机 shell 运行;真实 SSH 命令验证与 Tabby 分屏验收需要分别记录结果。
171
185
 
172
186
  本 fork 继续使用 `plugin.serverStats` 配置,方便沿用已有指标。**同一个 Tabby 实例只启用原版或本 fork 其中一个**,避免重复采集。推荐先使用独立便携版测试。完整的本地安装命令、验收项目和 npm/Tabby 发布步骤见 [打包、测试与发布](PUBLISHING.zh-CN.md)。
173
187
 
@@ -189,3 +203,10 @@ npm.cmd pack
189
203
  - 保留上游作者 Akkariin 的 MIT 版权、来源链接和贡献声明。
190
204
  - 预设按来源和稳定 ID 防止重复添加,改名或禁用后仍能识别;旧配置以命令与显示范围辅助匹配。
191
205
  - 补充中英文功能描述与相关关键词,并说明按维护者搜索安装的方法;不承诺搜索排名。
206
+
207
+ ### 1.7.4 分屏控制与编辑体验
208
+
209
+ - 布局内分屏可独立绑定,同连接 ID 勾选联动、取消逐项生效,兼容旧布局的连接副本。
210
+ - 固定底部状态栏,每个分屏左下角独立开关,保存布局重新打开后保持各自状态。
211
+ - 主、子标签按钮相邻排列,可直接编辑对应成员;组编辑默认折叠,删除移至右下角并确认名称。
212
+ - 容量统一显示 GB,保留原有 1024 进制数值与告警阈值,兼容旧 GiB 配置。