Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Rainbond Console
Commits
4480f8e1
Unverified
Commit
4480f8e1
authored
6 years ago
by
barnettZQG
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #42 from 27-1/V5.0
[FIX] fix upgrade domain bug
parents
a82d3079
c3dffd83
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
console/views/app_config/app_domain.py
+17
-10
console/views/app_config/app_domain.py
console/views/public_areas.py
+3
-3
console/views/public_areas.py
console/views/service_share.py
+3
-3
console/views/service_share.py
console/views/services_toplogical.py
+6
-6
console/views/services_toplogical.py
with
29 additions
and
22 deletions
+29
-22
console/views/app_config/app_domain.py
+
17
-
10
View file @
4480f8e1
...
...
@@ -388,19 +388,23 @@ class HttpStrategyView(RegionTenantHeaderView):
domain
=
domain_repo
.
get_service_domain_by_http_rule_id
(
http_rule_id
)
if
domain
:
bean
=
domain
.
to_dict
()
service
=
service_repo
.
get_service_by_service_id
(
domain
.
service_id
)
service_alias
=
service
.
service_cname
if
service
else
''
group_name
=
''
g_id
=
0
if
service
:
gsr
=
group_service_relation_repo
.
get_group_by_service_id
(
service
.
service_id
)
if
gsr
:
group
=
group_repo
.
get_group_by_id
(
int
(
gsr
.
group_id
))
group_name
=
group
.
group_name
if
group
else
''
g_id
=
int
(
gsr
.
group_id
)
if
domain
.
certificate_id
:
certificate_info
=
domain_repo
.
get_certificate_by_pk
(
int
(
domain
.
certificate_id
))
service
=
service_repo
.
get_service_by_service_id
(
domain
.
service_id
)
service_alias
=
service
.
service_cname
if
service
else
''
group_name
=
''
if
service
:
gsr
=
group_service_relation_repo
.
get_group_by_service_id
(
service
.
service_id
)
if
gsr
:
group
=
group_repo
.
get_group_by_id
(
int
(
gsr
.
group_id
))
group_name
=
group
.
group_name
if
group
else
''
bean
.
update
({
"certificate_name"
:
certificate_info
.
alias
})
bean
.
update
({
"service_alias"
:
service_alias
})
bean
.
update
({
"group_name"
:
group_name
})
bean
.
update
({
"service_alias"
:
service_alias
})
bean
.
update
({
"group_name"
:
group_name
})
bean
.
update
({
"g_id"
:
g_id
})
else
:
bean
=
dict
()
result
=
general_message
(
200
,
"success"
,
"查询成功"
,
bean
=
bean
)
...
...
@@ -851,13 +855,16 @@ class ServiceTcpDomainView(RegionTenantHeaderView):
service
=
service_repo
.
get_service_by_service_id
(
tcpdomain
.
service_id
)
service_alias
=
service
.
service_cname
if
service
else
''
group_name
=
''
g_id
=
0
if
service
:
gsr
=
group_service_relation_repo
.
get_group_by_service_id
(
service
.
service_id
)
if
gsr
:
group
=
group_repo
.
get_group_by_id
(
int
(
gsr
.
group_id
))
group_name
=
group
.
group_name
if
group
else
''
g_id
=
int
(
gsr
.
group_id
)
bean
.
update
({
"service_alias"
:
service_alias
})
bean
.
update
({
"group_name"
:
group_name
})
bean
.
update
({
"g_id"
:
g_id
})
result
=
general_message
(
200
,
"success"
,
"查询成功"
,
bean
=
bean
)
else
:
bean
=
dict
()
...
...
This diff is collapsed.
Click to expand it.
console/views/public_areas.py
+
3
-
3
View file @
4480f8e1
...
...
@@ -180,9 +180,9 @@ class GroupServiceView(RegionTenantHeaderView):
team_id
=
self
.
team
.
tenant_id
group_count
=
group_repo
.
get_group_count_by_team_id_and_group_id
(
team_id
=
team_id
,
group_id
=
group_id
)
if
group_count
==
0
:
code
=
400
result
=
general_message
(
code
,
"group is not yours!"
,
"当前组已删除或您无权限查看!"
)
return
Response
(
result
,
status
=
502
)
code
=
202
result
=
general_message
(
code
,
"group is not yours!"
,
"当前组已删除或您无权限查看!"
,
bean
=
{}
)
return
Response
(
result
,
status
=
200
)
group_service_list
=
service_repo
.
get_group_service_by_group_id
(
group_id
=
group_id
,
region_name
=
self
.
response_region
,
team_id
=
self
.
team
.
tenant_id
,
...
...
This diff is collapsed.
Click to expand it.
console/views/service_share.py
+
3
-
3
View file @
4480f8e1
...
...
@@ -74,9 +74,9 @@ class ServiceShareRecordView(RegionTenantHeaderView):
team_id
=
self
.
team
.
tenant_id
group_count
=
group_repo
.
get_group_count_by_team_id_and_group_id
(
team_id
=
team_id
,
group_id
=
group_id
)
if
group_count
==
0
:
code
=
400
result
=
general_message
(
code
,
"group is not yours!"
,
"当前组已删除或您无权限查看!"
)
return
Response
(
result
,
status
=
code
)
code
=
202
result
=
general_message
(
code
,
"group is not yours!"
,
"当前组已删除或您无权限查看!"
,
bean
=
{}
)
return
Response
(
result
,
status
=
200
)
# 判断是否满足分享条件
data
=
share_service
.
check_service_source
(
team
=
self
.
team
,
...
...
This diff is collapsed.
Click to expand it.
console/views/services_toplogical.py
+
6
-
6
View file @
4480f8e1
...
...
@@ -102,9 +102,9 @@ class TopologicalGraphView(ToplogicalBaseView):
team_id
=
self
.
team
.
tenant_id
group_count
=
group_repo
.
get_group_count_by_team_id_and_group_id
(
team_id
=
team_id
,
group_id
=
group_id
)
if
group_count
==
0
:
code
=
400
result
=
general_message
(
code
,
"group is not yours!"
,
"当前组已删除或您无权限查看!"
)
return
Response
(
result
,
status
=
502
)
code
=
202
result
=
general_message
(
code
,
"group is not yours!"
,
"当前组已删除或您无权限查看!"
,
bean
=
{}
)
return
Response
(
result
,
status
=
200
)
topological_info
=
topological_service
.
get_group_topological_graph
(
group_id
=
group_id
,
region
=
self
.
response_region
,
team_name
=
self
.
team_name
,
...
...
@@ -183,9 +183,9 @@ class TopologicalInternetView(ToplogicalBaseView):
team_id
=
self
.
team
.
tenant_id
group_count
=
group_repo
.
get_group_count_by_team_id_and_group_id
(
team_id
=
team_id
,
group_id
=
group_id
)
if
group_count
==
0
:
code
=
400
result
=
general_message
(
code
,
"group is not yours!"
,
"当前组已删除或您无权限查看!"
)
return
Response
(
result
,
status
=
502
)
code
=
202
result
=
general_message
(
code
,
"group is not yours!"
,
"当前组已删除或您无权限查看!"
,
bean
=
{
"json_svg"
:
{},
"json_data"
:
{}}
)
return
Response
(
result
,
status
=
200
)
else
:
data
=
topological_service
.
get_internet_topological_graph
(
group_id
=
group_id
,
team_name
=
team_name
)
result
=
general_message
(
code
,
"Obtain topology internet success."
,
"获取拓扑图Internet成功"
,
bean
=
data
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help