Skip to content

Commit

Permalink
perf: optimized public IP display
Browse files Browse the repository at this point in the history
  • Loading branch information
teamssix committed Jun 28, 2023
1 parent 9a49462 commit 9248eb0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug 反馈 (Bug Feedback)
description: 提交一个 issue 帮助改进这个项目 (Submit an issue to help improve this project)
title: "[Bug] <在这里输入你的标题 (Enter your title here)>"
title: "[Bug] 在这里输入你的标题 (Enter your title here)"
labels: ["bug"]
assignees:
- teamssix
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 新功能反馈 (Feedback on new features)
description: 提交一个功能需求帮助完善这个项目 (Submit a feature request to help improve this project)
title: "[Feat] <在这里输入你的标题 (Enter your title here)>"
title: "[Feat] 在这里输入你的标题 (Enter your title here)"
labels: ["enhancement"]
assignees:
- teamssix
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/perf.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 功能优化反馈 (Feature optimization feedback)
description: 提交一个功能优化需求帮助改进这个项目 (Submit a feature optimization request to help improve this project)
title: "[Perf] <在这里输入你的标题 (Enter your title here)>"
title: "[Perf] 在这里输入你的标题 (Enter your title here)"
labels: ["performance"]
assignees:
- teamssix
Expand Down
2 changes: 2 additions & 0 deletions pkg/cloud/alibaba/aliecs/ecsLs.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ func DescribeInstances(region string, running bool, SpecifiedInstanceId string,
b, _ := json.Marshal(PublicIpAddressList)
if len(PublicIpAddressList) == 1 {
PublicIpAddress = i.PublicIpAddress.IpAddress[0]
} else if len(PublicIpAddressList) == 0 {
PublicIpAddress = ""
} else {
PublicIpAddress = string(b)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/cloud/tencent/tencentcvm/cvmLs.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ func DescribeInstances(region string, running bool, specifiedInstanceId string,
b, _ := json.Marshal(PublicIpAddressList)
if len(PublicIpAddressList) == 1 {
PublicIpAddress = PublicIpAddressList[0]
} else if len(PublicIpAddressList) == 0 {
PublicIpAddress = ""
} else {
PublicIpAddress = string(b)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/cloud/tencent/tencentlh/lhLs.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ func DescribeInstances(region string, running bool, specifiedInstanceId string,
b, _ := json.Marshal(PublicIpAddressList)
if len(PublicIpAddressList) == 1 {
PublicIpAddress = PublicIpAddressList[0]
} else if len(PublicIpAddressList) == 0 {
PublicIpAddress = ""
} else {
PublicIpAddress = string(b)
}
Expand Down

0 comments on commit 9248eb0

Please sign in to comment.