Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ops
/
monitor-ui
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
qinchao
7 years ago
Commit
f2e37ec24604d5f10e8ac646ce8a1eb7b0ae8acf
1 parent
5aaffaba
修改bug 自动切换node nginx
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
monitor-ui-web/src/main/webapp/jsp/project/docker_build.jsp
monitor-ui-web/src/main/webapp/jsp/project/docker_project.jsp
monitor-ui-web/src/main/webapp/jsp/project/docker_build.jsp
View file @
f2e37ec
...
...
@@ -312,13 +312,13 @@
writeToText
(
textareaId
,
"查询服务启动完成..........over!"
);
if
(
"az2AutoSwitchOnlineCheck"
==
$
(
"#az2AutoSwitchOnlineCheck"
).
val
()){
writeToText
(
textareaId
,
"
gray环境发布master分支
完成,开始关闭灰度!"
);
writeToText
(
textareaId
,
"
发布
完成,开始关闭灰度!"
);
//自动切换到online
var
dialog
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog
.
dialog
({
title
:
"关闭灰度"
,
backdrop
:
"static"
,
content
:
$
(
"#az2AutoSwitchOnlineCheck_project"
).
val
()
+
"项目
gray环境发布master分支
完成,需要执行关闭灰度操作?"
,
content
:
$
(
"#az2AutoSwitchOnlineCheck_project"
).
val
()
+
"项目
发布
完成,需要执行关闭灰度操作?"
,
buttons
:
[{
text
:
"否"
,
className
:
"btn-danger"
,
...
...
monitor-ui-web/src/main/webapp/jsp/project/docker_project.jsp
View file @
f2e37ec
...
...
@@ -412,7 +412,7 @@
checkedFlag
=
" checked "
;
}
htmlContent
+=
'<div class="ckbox ckbox-primary" style="display: inline">'
+
' <input type="checkbox" id="dockerOnlineClusterId_'
+
key
+
'" name="dockerOnlineClusterId" '
+
' <input
readonly
type="checkbox" id="dockerOnlineClusterId_'
+
key
+
'" name="dockerOnlineClusterId" '
+
checkedFlag
+
' value="'
+
key
+
'"/>'
+
' <label for="dockerOnlineClusterId_'
+
key
+
'">'
+
global_all_clusters
[
key
]
+
'</label> </div>'
;
...
...
@@ -428,7 +428,7 @@
checkedFlag
=
" checked "
;
}
htmlContent
+=
'<div class="ckbox ckbox-primary" style="display: inline">'
+
' <input type="checkbox" id="dockerGrayClusterId_'
+
key
+
'" name="dockerGrayClusterId" '
+
' <input
readonly
type="checkbox" id="dockerGrayClusterId_'
+
key
+
'" name="dockerGrayClusterId" '
+
checkedFlag
+
' value="'
+
key
+
'"/>'
+
' <label for="dockerGrayClusterId_'
+
key
+
'">'
+
global_all_clusters
[
key
]
+
'</label> </div>'
;
...
...
@@ -633,7 +633,7 @@
var
layerMirror
=
layer
.
open
(
{
type
:
3
,
//area: ['800px', '500px'],
content
:
"
镜像制作中
"
,
content
:
"
准备发布,通知Jenkins制作镜像
"
,
time
:
0
//不自动关闭
});
...
...
@@ -652,7 +652,7 @@
layer
.
close
(
layerMirror
);
//失败
if
(
response
==
null
){
mirrorFail
(
"
制作镜像
失败!"
);
mirrorFail
(
"
发布
失败!"
);
}
else
{
mirrorFail
(
response
.
message
);
}
...
...
@@ -676,23 +676,22 @@
param
.
workid_name
=
$
(
"input[name='workid_name']"
).
val
();
param
.
clusters_name
=
$
(
"input[name='clusters_name']"
).
val
();
param
.
clusters_text
=
$
(
"input[name='clusters_text']"
).
val
();
//三个node项目发布灰度环境时,如果发master分支,自动加到online,如果非master分支,自动断开
param
.
az2AutoSwitchOnlineCheck
=
""
;
if
(
param
.
environment_name
.
indexOf
(
"gray"
)
>
0
&&
(
"yohoblk-wap"
==
param
.
project_name
||
"yohobuywap-node"
==
param
.
project_name
||
"yohobuy-node"
==
param
.
project_name
)){
//三个node项目发布灰度环境时,自动启用灰度,发布online环境时,自动关闭灰度
param
.
az2AutoSwitchOnlineCheck
=
""
;
if
(
"yohoblk-wap"
==
param
.
project_name
||
"yohobuywap-node"
==
param
.
project_name
||
"yohobuy-node"
==
param
.
project_name
){
$
(
'#confirmSubmitDivId'
).
modal
(
'hide'
);
var
dialog
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
var
alertContent
=
"发布开始前会自动启用az2-"
+
param
.
project_name
+
"灰度环境,确定发布?"
;
if
(
"master"
==
param
.
branch_name
){
//alertContent="发布成功后会自动关闭az2-"+param.project_name+"灰度环境,确定发布?";
if
(
param
.
environment_name
.
indexOf
(
"gray"
)
<
0
){
//发布线上环境,则在发布成功后,自动切到online
param
.
az2AutoSwitchOnlineCheck
=
"az2AutoSwitchOnlineCheck"
;
mirrorAndDeploy
(
param
);
}
else
{
//发布灰度环境,自动启用灰度
var
dialog
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog
.
dialog
({
title
:
"你确定执行发布吗"
,
backdrop
:
"static"
,
content
:
alertContent
,
content
:
"发布开始前会自动启用az2-"
+
param
.
project_name
+
"灰度环境,确定发布?"
,
buttons
:
[{
text
:
"否"
,
className
:
"btn-danger"
,
...
...
@@ -709,7 +708,7 @@
var
layerSwitch
=
layer
.
open
(
{
type
:
3
,
//area: ['800px', '500px'],
content
:
"
切换中"
,
content
:
"
灰度环境
切换中"
,
time
:
0
//不自动关闭
});
...
...
Please
register
or
login
to post a comment