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
xuhui
8 years ago
Commit
24e247899cd36a85d8aafedc584d119947daaba9
1 parent
7b3ee82f
腾讯云nginx伸缩
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
5 deletions
monitor-ui-web/src/main/webapp/script/autoscaling/autoscaling.js
monitor-ui-web/src/main/webapp/script/autoscaling/autoscaling.js
View file @
24e2478
...
...
@@ -352,11 +352,56 @@ function deploy(instanceIds){
}
writeToText
(
">>>正在部署系统,请稍后..."
);
//3:根据ip部署项目,得到消息id
var
messageId
=
deployProject
(
ips
);
writeToText
(
"第 3 步:项目正在部署!"
)
//3.1:发布项目的同时获取发布的消息,由于定时器是异步行为,故下一步骤智能在内部进行
deployProjectGetMsg
(
messageId
,
ips
);
if
(
scalingGroupName
.
indexOf
(
"nginx"
)){
$
.
ajax
({
url
:
getUrlBasePath
()
+
"/nginxSync/pushTask"
,
type
:
"post"
,
dataType
:
"json"
,
data
:
{
type
:
1
,
select
:
$
(
"#cloudType"
).
val
()
},
success
:
function
(
response
)
{
var
intervalNginx
=
setInterval
(
function
()
{
$
.
ajax
({
url
:
"/nginxSync/getTaskLog"
,
type
:
'POST'
,
dataType
:
'json'
,
data
:
{
taskId
:
response
.
data
.
taskId
},
success
:
function
(
data3
)
{
console
.
log
(
data3
);
var
messagedata
=
data3
.
data
;
var
logList
=
messagedata
.
log
;
if
(
logList
!=
""
)
{
writeToText
(
logList
);
}
//code为2 ,则结束
var
code
=
messagedata
.
isFinished
;
if
(
code
==
1
)
{
clearInterval
(
intervalNginx
);
writeToText
(
"完毕.........."
);
}
},
error
:
function
(
e
)
{
requestError
(
url
);
}
});
},
3000
);
},
error
:
function
(
e
)
{
requestError
(
url
);
}
});
}
else
{
//3:根据ip部署项目,得到消息id
var
messageId
=
deployProject
(
ips
);
writeToText
(
"第 3 步:项目正在部署!"
)
//3.1:发布项目的同时获取发布的消息,由于定时器是异步行为,故下一步骤智能在内部进行
deployProjectGetMsg
(
messageId
,
ips
);
}
}
//发布成功和失败都执行
...
...
Please
register
or
login
to post a comment