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
zhengyouwei
9 years ago
Commit
efc03e6a0aaca30b8fb169aeb8630379e6f1e375
1 parent
ba4c0899
新增nginx修改结果
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
37 deletions
monitor-ui-web/src/main/webapp/script/nginx_switch.js
monitor-ui-web/src/main/webapp/script/nginx_switch.js
View file @
efc03e6
$
(
function
()
{
$
(
"#validateTokenRltInfo"
).
hide
();
$
(
function
()
{
$
(
"#validateTokenRltInfo"
).
hide
();
});
function
initSwitch
(
cloudName
,
target
){
var
dialog
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog
.
dialog
({
title
:
"你确定切换吗"
,
backdrop
:
"static"
,
content
:
"你确定要将"
+
cloudName
+
"上的流量切向"
+
target
+
"吗?"
,
buttons
:
[{
text
:
"否"
,
className
:
"btn-danger"
,
onclick
:
function
()
{
$
(
dialog
).
dialog
(
"hide"
);
}
},
{
text
:
"是"
,
className
:
"btn-success"
,
onclick
:
function
()
{
var
param
=
{
cloudName
:
cloudName
,
target
:
target
}
$
.
ajax
({
type
:
'post'
,
url
:
'switchNginxConf'
,
data
:
param
,
dataType
:
'text'
,
success
:
function
(
resp
)
{
window
.
location
.
href
=
getUrlBasePath
()
+
"/nginxswitch/toNginxSwitch"
;
},
error
:
function
(
data
)
{
layer
.
msg
(
"Token异常"
,
{
icon
:
2
});
}
});
}
}]
});
function
initSwitch
(
cloudName
,
target
)
{
var
dialog
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog
.
dialog
({
title
:
"你确定切换吗"
,
backdrop
:
"static"
,
content
:
"你确定要将"
+
cloudName
+
"上的流量切向"
+
target
+
"吗?"
,
buttons
:
[{
text
:
"否"
,
className
:
"btn-danger"
,
onclick
:
function
()
{
$
(
dialog
).
dialog
(
"hide"
);
}
},
{
text
:
"是"
,
className
:
"btn-success"
,
onclick
:
function
()
{
var
param
=
{
cloudName
:
cloudName
,
target
:
target
}
$
.
ajax
({
type
:
'post'
,
url
:
'switchNginxConf'
,
data
:
param
,
dataType
:
'text'
,
success
:
function
(
resp
)
{
$
(
dialog
).
dialog
(
"hide"
);
var
dialog2
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog2
.
dialog
({
title
:
"切换结果"
,
backdrop
:
"static"
,
content
:
resp
.
data
,
buttons
:
[{
text
:
"确定"
,
className
:
"btn-danger"
,
onclick
:
function
()
{
window
.
location
.
href
=
getUrlBasePath
()
+
"/nginxswitch/toNginxSwitch"
;
}
}]
});
},
error
:
function
(
data
)
{
layer
.
msg
(
"Token异常"
,
{
icon
:
2
});
}
});
}
}]
});
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment