Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: open port failure #1518

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions console/models/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,8 +1140,8 @@ class Meta:
"平台安装中: integrating"
"平台安装完成: integrated"
"平台对接完成: interconnected")
third_db = models.BooleanField(help_text="third_db")
third_hub = models.BooleanField(help_text="third_hub")
third_db = models.BooleanField(default=False, help_text="third_db")
third_hub = models.BooleanField(default=False, help_text="third_hub")


class RKEClusterNode(BaseModel):
Expand Down
7 changes: 6 additions & 1 deletion console/views/app_config/app_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,21 @@ def get(self, request, *args, **kwargs):
} for host in body.get("list", [])]
if port_info['protocol'] == 'http':
port_info["is_outer_service"] = len(port_info["bind_domains"]) > 0
port_info["is_outer_service"] = True
port.is_outer_service = True
else:
port.is_outer_service = False
port_info["is_outer_service"] = False
port.save()
bind_tcp_domains = domain_service.get_tcp_port_bind_domains(self.service, port.container_port)
if bind_tcp_domains:
port_info["bind_tcp_domains"] = [domain.to_dict() for domain in bind_tcp_domains]
port_info["is_outer_service"] = True
port.is_outer_service = True
else:
port_info["bind_tcp_domains"] = []
port_info["is_outer_service"] = False
port.is_outer_service = False
port.save()
port_list.append(port_info)
result = general_message(200, "success", "查询成功", list=port_list)
return Response(result, status=result["code"])
Expand Down
Loading