Skip to content

Commit 34c841c

Browse files
author
root
committed
improve monitor, terminal
1 parent 8ce329c commit 34c841c

144 files changed

Lines changed: 8285 additions & 2221 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,8 @@ run:
240240
@docker cp backend/appos $(CONTAINER):/usr/local/bin/appos
241241
@docker cp web/dist/. $(CONTAINER):/usr/share/nginx/html/web/
242242
@docker cp build/nginx.conf $(CONTAINER):/etc/nginx/nginx.conf
243-
@docker cp build/netdata/exporting.conf $(CONTAINER):/usr/local/share/appos/netdata-defaults/exporting.conf
244-
@docker cp build/netdata/exporting.conf $(CONTAINER):/appos/data/netdata/etc/exporting.conf
245243
@docker exec $(CONTAINER) nginx -t
246-
@docker exec $(CONTAINER) supervisorctl -c /etc/supervisor/supervisord.conf restart appos nginx netdata
244+
@docker exec $(CONTAINER) supervisorctl -c /etc/supervisor/supervisord.conf restart appos nginx
247245
@echo "✓ Hot reload complete"
248246
@echo " → http://127.0.0.1:$(PORT_EFFECTIVE)/"
249247

Note.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ Settings(配置层)
6969
- 隧道连接
7070
- 网关转发...
7171

72-
## UI 通用
73-
74-
- 大文本光标问题
7572

7673
## 每日
7774

@@ -146,14 +143,9 @@ Prerequisites
146143

147144
除了 story29.xx 名称的前缀之外,文件名称最多不超过3个单词
148145

149-
150-
151-
Docker tab 的 container
152-
153-
1. 点击 container 详情后,state 列有点跳动,即详情会导致列表显示发生变化
154-
2. 分页 <> 中的页号与分页操作图标之间建议保持一个字符的距离即可
155-
146+
ports tab 不稳定,经常打开显示 somethins wrong
156147

157148

158149

159-
ports tab 不稳定,经常打开显示 somethins wrong
150+
addons 的 netdata restart 报错
151+
addons 针对于没有安装的服务器,打开超过10s才显示数据

backend/docs/openapi/api.yaml

Lines changed: 120 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5865,7 +5865,7 @@ paths:
58655865
- Monitoring
58665866
/api/monitor/servers/{id}/container-telemetry:
58675867
get:
5868-
description: Returns latest and time-series telemetry for containers on one managed server. The optional containerId query parameter may be repeated; containerName may be repeated in the same order to enable raw cgroup fallback.
5868+
description: Returns latest and time-series telemetry for containers on one managed server. For the current Netdata-backed MVP, AppOS matches telemetry primarily by normalized containerName; containerId remains a request correlation key and fallback when no name is provided.
58695869
operationId: get_api_monitor_servers_id_container-telemetry
58705870
parameters:
58715871
- description: server record ID
@@ -5874,13 +5874,13 @@ paths:
58745874
required: true
58755875
schema:
58765876
type: string
5877-
- description: container ID filter; repeat to request multiple containers
5877+
- description: request correlation key; repeat to request multiple containers
58785878
in: query
58795879
name: containerId
58805880
required: false
58815881
schema:
58825882
type: string
5883-
- description: container name fallback hint; repeat in the same order as containerId
5883+
- description: container name used as the primary telemetry identity; repeat in the same order as containerId
58845884
in: query
58855885
name: containerName
58865886
required: false
@@ -10685,6 +10685,11 @@ paths:
1068510685
required: false
1068610686
schema:
1068710687
type: string
10688+
- in: query
10689+
name: session_id
10690+
required: false
10691+
schema:
10692+
type: string
1068810693
- description: shell binary
1068910694
in: query
1069010695
name: shell
@@ -10732,6 +10737,113 @@ paths:
1073210737
summary: Local WebSocket terminal
1073310738
tags:
1073410739
- Terminal
10740+
/api/terminal/sessions:
10741+
get:
10742+
description: Returns active in-memory terminal session summaries owned by the current authenticated user.
10743+
operationId: get_api_terminal_sessions
10744+
responses:
10745+
"200":
10746+
content:
10747+
application/json:
10748+
schema:
10749+
additionalProperties: true
10750+
type: object
10751+
description: OK
10752+
"401":
10753+
content:
10754+
application/json:
10755+
schema:
10756+
additionalProperties: true
10757+
type: object
10758+
description: Unauthorized
10759+
security:
10760+
- bearerAuth: []
10761+
summary: List terminal sessions
10762+
tags:
10763+
- Terminal
10764+
/api/terminal/sessions/{sessionId}:
10765+
delete:
10766+
description: Explicitly closes an active terminal session owned by the current authenticated user.
10767+
operationId: delete_api_terminal_sessions_sessionid
10768+
parameters:
10769+
- description: terminal session ID
10770+
in: path
10771+
name: sessionId
10772+
required: true
10773+
schema:
10774+
type: string
10775+
responses:
10776+
"200":
10777+
content:
10778+
application/json:
10779+
schema:
10780+
additionalProperties: true
10781+
type: object
10782+
description: OK
10783+
"400":
10784+
content:
10785+
application/json:
10786+
schema:
10787+
additionalProperties: true
10788+
type: object
10789+
description: Bad Request
10790+
"401":
10791+
content:
10792+
application/json:
10793+
schema:
10794+
additionalProperties: true
10795+
type: object
10796+
description: Unauthorized
10797+
security:
10798+
- bearerAuth: []
10799+
summary: Close terminal session
10800+
tags:
10801+
- Terminal
10802+
/api/terminal/sessions/{sessionId}/workspace:
10803+
patch:
10804+
description: Stores the current file manager workspace snapshot for an active terminal session owned by the current authenticated user.
10805+
operationId: patch_api_terminal_sessions_sessionid_workspace
10806+
parameters:
10807+
- description: terminal session ID
10808+
in: path
10809+
name: sessionId
10810+
required: true
10811+
schema:
10812+
type: string
10813+
requestBody:
10814+
content:
10815+
application/json:
10816+
schema:
10817+
$ref: '#/components/schemas/GenericRequest'
10818+
description: workspace snapshot payload
10819+
required: true
10820+
responses:
10821+
"200":
10822+
content:
10823+
application/json:
10824+
schema:
10825+
additionalProperties: true
10826+
type: object
10827+
description: OK
10828+
"400":
10829+
content:
10830+
application/json:
10831+
schema:
10832+
additionalProperties: true
10833+
type: object
10834+
description: Bad Request
10835+
"401":
10836+
content:
10837+
application/json:
10838+
schema:
10839+
additionalProperties: true
10840+
type: object
10841+
description: Unauthorized
10842+
security:
10843+
- bearerAuth: []
10844+
summary: Update terminal session workspace snapshot
10845+
tags:
10846+
- Terminal
1073510847
/api/terminal/sftp/{serverId}/chmod:
1073610848
post:
1073710849
description: Sets file permissions (octal mode) on a remote path. Superuser only.
@@ -11622,6 +11734,11 @@ paths:
1162211734
required: true
1162311735
schema:
1162411736
type: string
11737+
- in: query
11738+
name: session_id
11739+
required: false
11740+
schema:
11741+
type: string
1162511742
- description: auth token (for WebSocket clients that cannot set headers)
1162611743
in: query
1162711744
name: token

backend/docs/openapi/ext-api.yaml

Lines changed: 117 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4351,7 +4351,7 @@ paths:
43514351
get:
43524352
tags: [Monitoring]
43534353
summary: Get server container telemetry
4354-
description: "Returns latest and time-series telemetry for containers on one managed server. The optional containerId query parameter may be repeated; containerName may be repeated in the same order to enable raw cgroup fallback."
4354+
description: "Returns latest and time-series telemetry for containers on one managed server. For the current Netdata-backed MVP, AppOS matches telemetry primarily by normalized containerName; containerId remains a request correlation key and fallback when no name is provided."
43554355
operationId: get_api_monitor_servers_id_container-telemetry
43564356
parameters:
43574357
- name: id
@@ -4362,13 +4362,13 @@ paths:
43624362
type: string
43634363
- name: containerId
43644364
in: query
4365-
description: "container ID filter; repeat to request multiple containers"
4365+
description: "request correlation key; repeat to request multiple containers"
43664366
required: false
43674367
schema:
43684368
type: string
43694369
- name: containerName
43704370
in: query
4371-
description: "container name fallback hint; repeat in the same order as containerId"
4371+
description: "container name used as the primary telemetry identity; repeat in the same order as containerId"
43724372
required: false
43734373
schema:
43744374
type: string
@@ -8985,6 +8985,11 @@ paths:
89858985
required: false
89868986
schema:
89878987
type: string
8988+
- name: session_id
8989+
in: query
8990+
required: false
8991+
schema:
8992+
type: string
89888993
- name: shell
89898994
in: query
89908995
description: "shell binary"
@@ -9028,6 +9033,110 @@ paths:
90289033
schema:
90299034
type: object
90309035
additionalProperties: true
9036+
/api/terminal/sessions:
9037+
get:
9038+
tags: [Terminal]
9039+
summary: List terminal sessions
9040+
description: "Returns active in-memory terminal session summaries owned by the current authenticated user."
9041+
operationId: get_api_terminal_sessions
9042+
security:
9043+
- bearerAuth: [] # superuser required
9044+
responses:
9045+
"200":
9046+
description: OK
9047+
content:
9048+
application/json:
9049+
schema:
9050+
type: object
9051+
additionalProperties: true
9052+
"401":
9053+
description: Unauthorized
9054+
content:
9055+
application/json:
9056+
schema:
9057+
type: object
9058+
additionalProperties: true
9059+
/api/terminal/sessions/{sessionId}:
9060+
delete:
9061+
tags: [Terminal]
9062+
summary: Close terminal session
9063+
description: "Explicitly closes an active terminal session owned by the current authenticated user."
9064+
operationId: delete_api_terminal_sessions_sessionid
9065+
parameters:
9066+
- name: sessionId
9067+
in: path
9068+
description: "terminal session ID"
9069+
required: true
9070+
schema:
9071+
type: string
9072+
security:
9073+
- bearerAuth: [] # superuser required
9074+
responses:
9075+
"200":
9076+
description: OK
9077+
content:
9078+
application/json:
9079+
schema:
9080+
type: object
9081+
additionalProperties: true
9082+
"401":
9083+
description: Unauthorized
9084+
content:
9085+
application/json:
9086+
schema:
9087+
type: object
9088+
additionalProperties: true
9089+
"400":
9090+
description: Bad Request
9091+
content:
9092+
application/json:
9093+
schema:
9094+
type: object
9095+
additionalProperties: true
9096+
/api/terminal/sessions/{sessionId}/workspace:
9097+
patch:
9098+
tags: [Terminal]
9099+
summary: Update terminal session workspace snapshot
9100+
description: "Stores the current file manager workspace snapshot for an active terminal session owned by the current authenticated user."
9101+
operationId: patch_api_terminal_sessions_sessionid_workspace
9102+
parameters:
9103+
- name: sessionId
9104+
in: path
9105+
description: "terminal session ID"
9106+
required: true
9107+
schema:
9108+
type: string
9109+
requestBody:
9110+
description: "workspace snapshot payload"
9111+
required: true
9112+
content:
9113+
application/json:
9114+
schema:
9115+
$ref: '#/components/schemas/GenericRequest'
9116+
security:
9117+
- bearerAuth: [] # superuser required
9118+
responses:
9119+
"200":
9120+
description: OK
9121+
content:
9122+
application/json:
9123+
schema:
9124+
type: object
9125+
additionalProperties: true
9126+
"401":
9127+
description: Unauthorized
9128+
content:
9129+
application/json:
9130+
schema:
9131+
type: object
9132+
additionalProperties: true
9133+
"400":
9134+
description: Bad Request
9135+
content:
9136+
application/json:
9137+
schema:
9138+
type: object
9139+
additionalProperties: true
90319140
/api/terminal/sftp/{serverId}/chmod:
90329141
post:
90339142
tags: [Terminal]
@@ -9903,6 +10012,11 @@ paths:
990310012
required: true
990410013
schema:
990510014
type: string
10015+
- name: session_id
10016+
in: query
10017+
required: false
10018+
schema:
10019+
type: string
990610020
- name: token
990710021
in: query
990810022
description: "auth token (for WebSocket clients that cannot set headers)"

backend/docs/openapi/group-matrix.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ groups:
442442
- server.go
443443
- terminal_containers.go
444444
- terminal_files.go
445+
- terminal_sessions.go
445446
- terminal_shell.go
446447
nativeRefs: []
447448

0 commit comments

Comments
 (0)