Commit 8afda0c4 by 赵天增

修改status.ftl 加上关闭按钮

parent 13c2500d
......@@ -159,6 +159,7 @@
<module>spring-cloud-netflix-ribbon</module>
<module>spring-cloud-starter-netflix</module>
<module>docs</module>
<module>testeureka</module>
</modules>
<profiles>
<profile>
......
package org.springframework.cloud.netflix.eureka.server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@EnableAutoConfiguration
@EnableEurekaServer
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
......@@ -3,8 +3,9 @@
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
<base href="<@spring.url basePath/>">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
......@@ -13,17 +14,21 @@
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="eureka/css/wro.css">
</head>
</head>
<body id="one">
<body id="one">
<#include "header.ftl">
<div class="container-fluid xd-container">
<div class="container-fluid xd-container">
<#include "navbar.ftl">
<h1>Instances currently registered with Eureka</h1>
<table id='instances' class="table table-striped table-hover">
<thead>
<tr><th>Application</th><th>AMIs</th><th>Availability Zones</th><th>Status</th></tr>
<tr>
<th>Application</th>
<th>AMIs</th>
<th>Availability Zones</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<#if apps?has_content>
......@@ -55,13 +60,16 @@
<#else>
${instance.id}
</#if><#if instance_has_next>,</#if>
<button id="cc" type="button" onclick="close(${instance.id})">关闭</button>
</#list>
</#list>
</td>
</tr>
</#list>
<#else>
<tr><td colspan="4">No instances available</td></tr>
<tr>
<td colspan="4">No instances available</td>
</tr>
</#if>
</tbody>
......@@ -71,17 +79,22 @@
<table id='generalInfo' class="table table-striped table-hover">
<thead>
<tr><th>Name</th><th>Value</th></tr>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<#list statusInfo.generalStats?keys as stat>
<tr>
<td>${stat}</td><td>${statusInfo.generalStats[stat]!""}</td>
<td>${stat}</td>
<td>${statusInfo.generalStats[stat]!""}</td>
</tr>
</#list>
<#list statusInfo.applicationStats?keys as stat>
<tr>
<td>${stat}</td><td>${statusInfo.applicationStats[stat]!""}</td>
<td>${stat}</td>
<td>${statusInfo.applicationStats[stat]!""}</td>
</tr>
</#list>
</tbody>
......@@ -91,23 +104,31 @@
<table id='instanceInfo' class="table table-striped table-hover">
<thead>
<tr><th>Name</th><th>Value</th></tr>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<thead>
<tbody>
<#list instanceInfo?keys as key>
<tr>
<td>${key}</td><td>${instanceInfo[key]!""}</td>
<td>${key}</td>
<td>${instanceInfo[key]!""}</td>
</tr>
</#list>
</tbody>
</table>
</div>
<script type="text/javascript" src="eureka/js/wro.js" ></script>
<script type="text/javascript">
$(document).ready(function() {
</div>
<script type="text/javascript" src="eureka/js/wro.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#cc').click(function () {
debugger;
alert("弹出成功")
});
$('table.stripeable tr:odd').addClass('odd');
$('table.stripeable tr:even').addClass('even');
});
</script>
</body>
</script>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>spring-cloud-netflix</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>2.0.1.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>testeureka</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.eureka</groupId>
<artifactId>eureka-client</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.eureka</groupId>
<artifactId>eureka-core</artifactId>
<exclusions>
<exclusion>
<artifactId>blitz4j</artifactId>
<groupId>com.netflix.blitz4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
</dependency>
<!-- archaius dependencies that are now runtime -->
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<optional>true</optional>
</dependency>
<!-- end archaius deps -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</dependency>
<!-- Eureka deps that are now optional in eureka -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<!-- Only needed at compile time -->
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-restassured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-wiremock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-rsa</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-eureka-server</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.ztianzeng.eureka;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@SpringBootApplication
@EnableEurekaClient
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
spring:
application:
name: yjy-server-eureka
server:
port: 6001
eureka:
client:
registerWithEureka: false
fetchRegistry: false
service-url:
defaultZone: http://localhost:8080/eureka
instance:
prefer-ip-address: true
instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${spring.application.instance_id:${server.port}}
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