Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
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
openSource
spring-cloud-netflix
Commits
071116aa
Commit
071116aa
authored
Jul 02, 2018
by
赵天增
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
success
parent
3e04856a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
4 deletions
+36
-4
status.ftl
...eka-server/src/main/resources/templates/eureka/status.ftl
+36
-4
No files found.
spring-cloud-netflix-eureka-server/src/main/resources/templates/eureka/status.ftl
View file @
071116aa
...
...
@@ -55,12 +55,13 @@
</b></font>
</
#
if>
<
#
list
instanceInfo
.
instances
as
instance
>
<span
hidden
>
${app.name}
</span>
<
#
if
instance
.
isHref
>
<a
href=
"${instance.url}"
target=
"_blank"
>
${instance.id}
</a>
<
#
else
>
${instance.id}
</
#
if>
<button
class=
"cc"
type=
"button"
onclick=
"close()"
>
关闭
</button>
<button
class=
"cc"
type=
"button"
>
关闭
</button>
<
#
if
instance_has_next
>
,
</
#
if>
</
#
list>
</
#
list>
...
...
@@ -123,12 +124,43 @@
<script
type=
"text/javascript"
src=
"eureka/js/wro.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
function
domainURI
(
str
)
{
var
durl
=
/http:
\/\/([^\/]
+
)\/
/i
;
domain
=
str
.
match
(
durl
);
return
domain
[
1
];
}
$
(
'.cc'
).
click
(
function
()
{
debugger
;
/*alert("弹出成功")*/
var
str
=
$
(
this
).
prev
().
text
();
console
.
log
(
str
);
var
instance
=
$
(
this
).
prev
().
text
();
console
.
log
(
instance
);
var
appName
=
$
(
this
).
prev
().
prev
().
text
();
console
.
log
(
appName
);
var
stopUrl
=
domainURI
(
$
(
this
).
prev
().
attr
(
"href"
));
console
.
log
(
stopUrl
);
var
host
=
window
.
location
.
href
;
$
.
ajax
({
url
:
host
+
'eureka/apps/'
+
appName
+
'/'
+
instance
,
type
:
'DELETE'
,
success
:
function
()
{
alert
(
"从eureka删除实例成功"
);
},
error
:
function
()
{
alert
(
"删除失败"
)
}
});
$
.
ajax
({
url
:
"http://"
+
stopUrl
+
'/actuator/shutdown'
,
type
:
'POST'
,
success
:
function
()
{
alert
(
"停止实例成功"
);
},
error
:
function
()
{
alert
(
"删除失败"
)
}
});
});
$
(
'table.stripeable tr:odd'
).
addClass
(
'odd'
);
$
(
'table.stripeable tr:even'
).
addClass
(
'even'
);
});
...
...
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