feat(web,server): expose server version and commit hash in Profile page

Add version and commit_hash fields to the /ping endpoint response,
sourced from the existing internal/version package (ldflags or
Go build info). The frontend capabilities store reads these values
and displays them as badges at the bottom of the Profile page.
This commit is contained in:
Acbox
2026-03-29 17:38:33 +08:00
parent 13d2f668f5
commit 6c2da4b2f5
10 changed files with 83 additions and 17 deletions
+6
View File
@@ -10960,6 +10960,9 @@ const docTemplate = `{
"handlers.PingResponse": {
"type": "object",
"properties": {
"commit_hash": {
"type": "string"
},
"container_backend": {
"type": "string"
},
@@ -10968,6 +10971,9 @@ const docTemplate = `{
},
"status": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
+6
View File
@@ -10951,6 +10951,9 @@
"handlers.PingResponse": {
"type": "object",
"properties": {
"commit_hash": {
"type": "string"
},
"container_backend": {
"type": "string"
},
@@ -10959,6 +10962,9 @@
},
"status": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
+4
View File
@@ -1445,12 +1445,16 @@ definitions:
type: object
handlers.PingResponse:
properties:
commit_hash:
type: string
container_backend:
type: string
snapshot_supported:
type: boolean
status:
type: string
version:
type: string
type: object
handlers.ProbeResponse:
properties: