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
0f277eec
Commit
0f277eec
authored
Aug 12, 2021
by
jiaotianqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
灰度管理
parent
b515f7e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
GrayManagerController.java
.../operation/web/controller/gray/GrayManagerController.java
+5
-2
RouteManagerController.java
...operation/web/controller/gray/RouteManagerController.java
+1
-1
No files found.
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/gray/GrayManagerController.java
View file @
0f277eec
...
...
@@ -4,6 +4,7 @@ import com.gic.api.base.commons.Constant;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.exception.BaseRuntimeException
;
import
com.gic.commons.exception.ExceptionManager
;
import
com.gic.commons.httpclient.HttpClientUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.dsmongo.api.dto.Criteria
;
import
com.gic.dsmongo.api.dto.MongoDelBatchDTO
;
...
...
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -99,10 +101,11 @@ public class GrayManagerController {
@RequestMapping
(
"/refresh-redis-gray-config"
)
public
RestResponse
refreshRedisGrayConfig
()
{
public
RestResponse
refreshRedisGrayConfig
(
HttpServletRequest
request
)
{
GrayConfigUtil
.
refreshGrayConfig
(
null
,
true
,
false
);
GrayConfigUtil
.
refreshGrayConfigChangeTimeByZk
();
return
RestResponse
.
success
();
String
res
=
HttpClientUtil
.
get
(
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
()
+
"/gray-config-refresh"
);
return
RestResponse
.
success
(
res
);
}
...
...
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/gray/RouteManagerController.java
View file @
0f277eec
...
...
@@ -143,7 +143,7 @@ public class RouteManagerController {
nginxLocationConfigStr
.
append
(
" "
).
append
(
locationConfig
).
append
(
";\r\n"
);
}
}
else
{
nginxLocationConfigStr
.
append
(
" set_by_lua_file $target_upstream $grayRoute "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
" "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
" "
).
append
(
nginxLocationConfig
.
getId
()).
append
(
";\r\n"
);
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
(
" alias /mydata/gicweb/$target_upstream/;\r\n"
);
nginxLocationConfigStr
.
append
(
" try_files $uri $uri/ /"
);
if
(
StringUtil
.
isNotBlank
(
nginxLocationConfig
.
getModule_path
())){
...
...
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