🐞 fix(server): 没有端口的容器重建页面异常

This commit is contained in:
小吾立 2024-06-05 10:48:53 +08:00
parent bb40c34ae7
commit 02214e72dd
2 changed files with 16 additions and 5 deletions

View File

@ -1,5 +1,16 @@
# 🚀 版本日志
## 2.11.6.2-beta
### 🐣 新增功能
### 🐞 解决BUG、优化功能
1. 【server】修复 没有端口的容器重建页面异常(感谢@冰淇淋还是冰激凌)
------
## 2.11.6.1-beta (2024-06-04)
### 🐣 新增功能

View File

@ -516,21 +516,21 @@ export default {
}
},
getPortsFromPorts(ports) {
const _ports = ports.map((item) => {
const _ports = ports?.map((item) => {
item.disabled = item.privatePort !== null
item.port = item.privatePort
return item
})
return _ports.length > 0 ? _ports : null
return _ports?.length > 0 ? _ports : null
},
getPortsFromExposedPorts(exposedPorts) {
const _ports = exposedPorts.map((item) => {
const _ports = exposedPorts?.map((item) => {
item.disabled = item.port !== null
item.ip = '0.0.0.0'
item.scheme = item.scheme || 'tcp'
return item
})
return _ports.length > 0 ? _ports : null
return _ports?.length > 0 ? _ports : null
},
getVolumesFromMounts(mounts) {
const _mounts = mounts.map((item) => {
@ -668,7 +668,7 @@ export default {
})
.join(',')
//
temp.exposedPorts = (this.temp.exposedPorts || [])
temp.exposedPorts = (this.temp?.exposedPorts || [])
.filter((item) => {
return item.publicPort && item.ip
})