Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
07c74324
Commit
07c74324
authored
Aug 12, 2021
by
jiaotianqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路由配置预览
parent
0f277eec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
GrayManagerController.java
.../operation/web/controller/gray/GrayManagerController.java
+1
-1
RouteManagerController.java
...operation/web/controller/gray/RouteManagerController.java
+3
-9
No files found.
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/gray/GrayManagerController.java
View file @
07c74324
...
@@ -104,7 +104,7 @@ public class GrayManagerController {
...
@@ -104,7 +104,7 @@ public class GrayManagerController {
public
RestResponse
refreshRedisGrayConfig
(
HttpServletRequest
request
)
{
public
RestResponse
refreshRedisGrayConfig
(
HttpServletRequest
request
)
{
GrayConfigUtil
.
refreshGrayConfig
(
null
,
true
,
false
);
GrayConfigUtil
.
refreshGrayConfig
(
null
,
true
,
false
);
GrayConfigUtil
.
refreshGrayConfigChangeTimeByZk
();
GrayConfigUtil
.
refreshGrayConfigChangeTimeByZk
();
String
res
=
HttpClientUtil
.
get
(
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
()
+
"/gray-config-refresh"
);
String
res
=
HttpClientUtil
.
get
(
"https://"
+
request
.
getServerName
()
+
"/gray-config-refresh"
);
return
RestResponse
.
success
(
res
);
return
RestResponse
.
success
(
res
);
}
}
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/gray/RouteManagerController.java
View file @
07c74324
...
@@ -143,15 +143,9 @@ public class RouteManagerController {
...
@@ -143,15 +143,9 @@ public class RouteManagerController {
nginxLocationConfigStr
.
append
(
" "
).
append
(
locationConfig
).
append
(
";\r\n"
);
nginxLocationConfigStr
.
append
(
" "
).
append
(
locationConfig
).
append
(
";\r\n"
);
}
}
}
else
{
}
else
{
nginxLocationConfigStr
.
append
(
" set_by_lua_file $target_upstream $grayRoute "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
" "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
" "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
"-gray;\r\n"
);
nginxLocationConfigStr
.
append
(
" set_by_lua_file $target_upstream $grayRoute "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
" "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
" "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
"-gray 1;\r\n"
);
nginxLocationConfigStr
.
append
(
" alias /mydata/gicweb/$target_upstream/;\r\n"
);
nginxLocationConfigStr
.
append
(
" rewrite ^"
).
append
(
nginxLocationConfig
.
getLocation_route
()).
append
(
"/(.*)$ /$target_upstream/$1 break;\r\n"
);
nginxLocationConfigStr
.
append
(
" try_files $uri $uri/ /"
);
nginxLocationConfigStr
.
append
(
" try_files $uri $uri/ /$target_upstream/index.html;\r\n}\r\n\r\n\r\n"
);
if
(
StringUtil
.
isNotBlank
(
nginxLocationConfig
.
getModule_path
())){
nginxLocationConfigStr
.
append
(
nginxLocationConfig
.
getModule_path
());
}
else
{
nginxLocationConfigStr
.
append
(
nginxLocationConfig
.
getId
());
}
nginxLocationConfigStr
.
append
(
"/index.html;\r\n}\r\n\r\n\r\n"
);
}
}
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
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