mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-17 12:58:51 +08:00
fix: resolve network connection count always showing 0 in process list
This commit is contained in:
parent
e4fbd3cf86
commit
916fe4849e
2 changed files with 5 additions and 0 deletions
|
|
@ -206,6 +206,10 @@ func getProcessData(processConfig PsProcessConfig) (res []byte, err error) {
|
||||||
procData.RssValue = 0
|
procData.RssValue = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if connections, err := proc.Connections(); err == nil {
|
||||||
|
procData.NumConnections = len(connections)
|
||||||
|
}
|
||||||
|
|
||||||
resultMutex.Lock()
|
resultMutex.Lock()
|
||||||
result = append(result, procData)
|
result = append(result, procData)
|
||||||
resultMutex.Unlock()
|
resultMutex.Unlock()
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,7 @@ const columns = ref([
|
||||||
title: i18n.global.t('process.numConnections'),
|
title: i18n.global.t('process.numConnections'),
|
||||||
dataKey: 'numConnections',
|
dataKey: 'numConnections',
|
||||||
width: 100,
|
width: 100,
|
||||||
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'status',
|
key: 'status',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue