Commit 071116aa by 赵天增

success

parent 3e04856a
...@@ -55,12 +55,13 @@ ...@@ -55,12 +55,13 @@
</b></font> </b></font>
</#if> </#if>
<#list instanceInfo.instances as instance> <#list instanceInfo.instances as instance>
<span hidden>${app.name}</span>
<#if instance.isHref> <#if instance.isHref>
<a href="${instance.url}" target="_blank">${instance.id}</a> <a href="${instance.url}" target="_blank">${instance.id}</a>
<#else> <#else>
${instance.id} ${instance.id}
</#if> </#if>
<button class="cc" type="button" onclick="close()">关闭</button> <button class="cc" type="button">关闭</button>
<#if instance_has_next>,</#if> <#if instance_has_next>,</#if>
</#list> </#list>
</#list> </#list>
...@@ -123,12 +124,43 @@ ...@@ -123,12 +124,43 @@
<script type="text/javascript" src="eureka/js/wro.js"></script> <script type="text/javascript" src="eureka/js/wro.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
function domainURI(str) {
var durl = /http:\/\/([^\/]+)\//i;
domain = str.match(durl);
return domain[1];
}
$('.cc').click(function () { $('.cc').click(function () {
debugger; debugger;
/*alert("弹出成功")*/ var instance = $(this).prev().text();
var str = $(this).prev().text(); console.log(instance);
console.log(str); 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:odd').addClass('odd');
$('table.stripeable tr:even').addClass('even'); $('table.stripeable tr:even').addClass('even');
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment