sync more
This commit is contained in:
parent
3cb8b07bdf
commit
82177dde58
|
|
@ -11,8 +11,8 @@ message AckSpan {
|
|||
int32 statusCode = 5;
|
||||
string exceptionStack = 6;
|
||||
string viewpointId = 7;
|
||||
string userId = 8;
|
||||
string applicationId = 9;
|
||||
string username = 8;
|
||||
string applicationCode = 9;
|
||||
|
||||
int32 routeKey = 10;
|
||||
}
|
||||
|
|
@ -26,8 +26,8 @@ message RequestSpan {
|
|||
string spanTypeDesc = 6;
|
||||
string callType = 7;
|
||||
uint32 spanType = 8;
|
||||
string applicationId = 9;
|
||||
string userId = 10;
|
||||
string applicationCode = 9;
|
||||
string username = 10;
|
||||
string businessKey = 11;
|
||||
int32 processNo = 13;
|
||||
string address = 14;
|
||||
|
|
@ -35,11 +35,11 @@ message RequestSpan {
|
|||
int32 routeKey = 15;
|
||||
}
|
||||
|
||||
message TraceId{
|
||||
message TraceId {
|
||||
repeated int64 segments = 1;
|
||||
}
|
||||
|
||||
message Span{
|
||||
message Span {
|
||||
TraceId traceId = 1;
|
||||
string levelId = 2; // parentLevelId + "." + levelId
|
||||
string viewpoint = 3;
|
||||
|
|
@ -50,8 +50,8 @@ message Span{
|
|||
string spanTypeDesc = 8;
|
||||
string callType = 9;
|
||||
int32 spanType = 10;
|
||||
string applicationId = 11;
|
||||
string userId = 12;
|
||||
string applicationCode = 11;
|
||||
string username = 12;
|
||||
string businessKey = 13;
|
||||
int32 processNo = 14;
|
||||
string address = 15;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.a.eye.skywalking.conf;
|
|||
public class Config {
|
||||
|
||||
public static class SkyWalking {
|
||||
public static String USER_ID = "";
|
||||
public static String USERNAME = "";
|
||||
|
||||
public static String APPLICATION_CODE = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@ public class ConfigInitializer {
|
|||
logger.error("Failed to read the config file, sky-walking api run in default config.", e);
|
||||
}
|
||||
}
|
||||
Config.SkyWalking.USER_ID = System.getProperty("userId");
|
||||
Config.SkyWalking.USERNAME = System.getProperty("username");
|
||||
Config.SkyWalking.APPLICATION_CODE = System.getProperty("applicationCode");
|
||||
Config.SkyWalking.SERVERS = System.getProperty("servers");
|
||||
|
||||
if(StringUtil.isEmpty(Config.SkyWalking.USER_ID)){
|
||||
throw new ExceptionInInitializerError("'-DuserId=' is missing.");
|
||||
if(StringUtil.isEmpty(Config.SkyWalking.USERNAME)){
|
||||
throw new ExceptionInInitializerError("'-Dusername=' is missing.");
|
||||
}
|
||||
if(StringUtil.isEmpty(Config.SkyWalking.APPLICATION_CODE)){
|
||||
throw new ExceptionInInitializerError("'-DapplicationCode=' is missing.");
|
||||
|
|
|
|||
|
|
@ -61,27 +61,27 @@ public class Span {
|
|||
/**
|
||||
* 应用编码
|
||||
*/
|
||||
private String applicationId;
|
||||
private String applicationCode;
|
||||
/**
|
||||
* 归属用户
|
||||
*/
|
||||
private String userId;
|
||||
private String username;
|
||||
private String viewPointId;
|
||||
private int routeKey;
|
||||
private int routeKey;
|
||||
|
||||
public Span(TraceId traceId, String applicationId, String userId) {
|
||||
public Span(TraceId traceId, String applicationCode, String username) {
|
||||
this.traceId = traceId;
|
||||
this.applicationId = applicationId;
|
||||
this.userId = userId;
|
||||
this.applicationCode = applicationCode;
|
||||
this.username = username;
|
||||
this.parentLevel = "";
|
||||
}
|
||||
|
||||
public Span(TraceId traceId, String parentLevel, int levelId, String applicationId, String userId) {
|
||||
public Span(TraceId traceId, String parentLevel, int levelId, String applicationCode, String username) {
|
||||
this.traceId = traceId;
|
||||
this.parentLevel = parentLevel;
|
||||
this.levelId = levelId;
|
||||
this.applicationId = applicationId;
|
||||
this.userId = userId;
|
||||
this.applicationCode = applicationCode;
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public TraceId getTraceId() {
|
||||
|
|
@ -172,20 +172,20 @@ public class Span {
|
|||
this.businessKey = businessKey;
|
||||
}
|
||||
|
||||
public String getApplicationId() {
|
||||
return applicationId;
|
||||
public String getApplicationCode() {
|
||||
return applicationCode;
|
||||
}
|
||||
|
||||
public void setApplicationId(String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
public void setApplicationCode(String applicationCode) {
|
||||
this.applicationCode = applicationCode;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public void setViewPointId(String viewPointId) {
|
||||
|
|
@ -197,15 +197,15 @@ public class Span {
|
|||
}
|
||||
|
||||
public RequestSpan.Builder buildRequestSpan(RequestSpan.Builder builder) {
|
||||
builder.setTraceId(this.traceId).setParentLevel(this.parentLevel).setLevelId(this.levelId).setSpanType(this.spanType).setApplicationId(this.applicationId)
|
||||
.setUserId(this.userId).setRouteKey(routeKey);
|
||||
builder.setTraceId(this.traceId).setParentLevel(this.parentLevel).setLevelId(this.levelId).setSpanType(this.spanType).setApplicationCode(this.applicationCode)
|
||||
.setUsername(this.username).setRouteKey(routeKey);
|
||||
return builder;
|
||||
}
|
||||
|
||||
public AckSpan.Builder buildAckSpan(AckSpan.Builder builder){
|
||||
builder.setTraceId(this.traceId).setParentLevel(this.parentLevel).setLevelId(this.levelId)
|
||||
.setCost(System.currentTimeMillis() - this.startDate).setStatusCode(this.statusCode)
|
||||
.setExceptionStack(this.exceptionStack).setUserId(this.userId).setApplicationId(this.applicationId)
|
||||
.setExceptionStack(this.exceptionStack).setUsername(this.username).setApplicationCode(this.applicationCode)
|
||||
.setViewpointId(this.viewPointId).setRouteKey(routeKey);
|
||||
return builder;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class ContextGenerator {
|
|||
public static Span generateSpanFromContextData(ContextData context, Identification id) {
|
||||
Span spanData = CurrentThreadSpanStack.peek();
|
||||
if (context != null && context.getTraceId() != null && spanData == null) {
|
||||
spanData = new Span(context.getTraceId(), context.getParentLevel(), context.getLevelId(), Config.SkyWalking.APPLICATION_CODE, Config.SkyWalking.USER_ID);
|
||||
spanData = new Span(context.getTraceId(), context.getParentLevel(), context.getLevelId(), Config.SkyWalking.APPLICATION_CODE, Config.SkyWalking.USERNAME);
|
||||
} else {
|
||||
spanData = getSpanFromThreadLocal(id);
|
||||
}
|
||||
|
|
@ -44,14 +44,14 @@ public final class ContextGenerator {
|
|||
int routeKey;
|
||||
if (parentSpan == null) {
|
||||
// 不存在,新创建一个Context
|
||||
span = new Span(TraceIdGenerator.generate(), Config.SkyWalking.APPLICATION_CODE, Config.SkyWalking.USER_ID);
|
||||
span = new Span(TraceIdGenerator.generate(), Config.SkyWalking.APPLICATION_CODE, Config.SkyWalking.USERNAME);
|
||||
routeKey = RoutingKeyGenerator.generate(id.getViewPoint());
|
||||
} else {
|
||||
|
||||
// 根据ParentContextData的TraceId和RPCID
|
||||
// LevelId是由SpanNode类的nextSubSpanLevelId字段进行初始化的.
|
||||
// 所以在这里不需要初始化
|
||||
span = new Span(parentSpan.getTraceId(), Config.SkyWalking.APPLICATION_CODE, Config.SkyWalking.USER_ID);
|
||||
span = new Span(parentSpan.getTraceId(), Config.SkyWalking.APPLICATION_CODE, Config.SkyWalking.USERNAME);
|
||||
if (!StringUtil.isEmpty(parentSpan.getParentLevel())) {
|
||||
span.setParentLevel(parentSpan.getParentLevel() + "." + parentSpan.getLevelId());
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用编码
|
||||
skywalking.application_code=test
|
||||
#skywalking auth的环境变量名字
|
||||
skywalking.auth_system_env_name=SKYWALKING_RUN
|
||||
#skywalking数据编码
|
||||
skywalking.charset=UTF-8
|
||||
skywalking.auth_override=true
|
||||
|
||||
#是否打印数据
|
||||
buriedpoint.printf=false
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
#过滤异常
|
||||
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
|
||||
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#最大发送的副本数量
|
||||
sender.max_copy_num=2
|
||||
#发送的最大长度
|
||||
sender.max_send_length=20000
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
sender.retry_get_sender_wait_interval=2000
|
||||
|
||||
|
||||
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=0
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
#自定义本地方法插件是否开启
|
||||
plugin.customlocalmethodinterceptorplugin.is_enable=true
|
||||
#自定义插件拦截的包前缀
|
||||
plugin.customlocalmethodinterceptorplugin.package_prefix=test.com.ai.test.*
|
||||
#自定义插件是否记录入参
|
||||
plugin.customlocalmethodinterceptorplugin.record_param_enable=false
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="error">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
<Console name="Console2" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console" />
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用编码
|
||||
skywalking.application_code=test
|
||||
#skywalking auth的环境变量名字
|
||||
skywalking.auth_system_env_name=SKYWALKING_RUN
|
||||
#skywalking数据编码
|
||||
skywalking.charset=UTF-8
|
||||
skywalking.auth_override=true
|
||||
#是否打印数据
|
||||
buriedpoint.printf=true
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
#过滤异常
|
||||
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
|
||||
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#最大发送的副本数量
|
||||
sender.max_copy_num=2
|
||||
#发送的最大长度
|
||||
sender.max_send_length=20000
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
sender.retry_get_sender_wait_interval=2000
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=0
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
|
|
@ -49,8 +49,8 @@ public class RequestSpanData extends AbstractSpanData {
|
|||
return requestSpan.getAddress();
|
||||
}
|
||||
|
||||
public String getApplicationId() {
|
||||
return requestSpan.getApplicationId();
|
||||
public String getApplicationCode() {
|
||||
return requestSpan.getApplicationCode();
|
||||
}
|
||||
|
||||
public int getProcessNo() {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class SpanDataHelper {
|
|||
|
||||
private Span mergeSpan(RequestSpanData requestSpanData, AckSpanData ackSpanData) {
|
||||
Span.Builder builder = Span.newBuilder().setAddress(requestSpanData.getAddress())
|
||||
.setApplicationId(requestSpanData.getApplicationId()).setBusinessKey(requestSpanData.getBusinessKey())
|
||||
.setApplicationCode(requestSpanData.getApplicationCode()).setBusinessKey(requestSpanData.getBusinessKey())
|
||||
.setCallType(requestSpanData.getCallType()).setCost(ackSpanData.getCost());
|
||||
if (ackSpanData.getExceptionStack() != null && ackSpanData.getExceptionStack().length() > 0) {
|
||||
builder = builder.setExceptionStack(ackSpanData.getExceptionStack());
|
||||
|
|
|
|||
|
|
@ -67,16 +67,6 @@
|
|||
<version>1.2.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-1.2-api</artifactId>
|
||||
<version>2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class UserMaintainController extends BaseController {
|
|||
return result.toJSONString();
|
||||
}
|
||||
|
||||
logger.info("The userId[{}] has been login", dbLoginInfo.getUid());
|
||||
logger.info("The username[{}] has been login", dbLoginInfo.getUid());
|
||||
result.put("code", "200");
|
||||
result.put("message", "Login success");
|
||||
//
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class ApplicationsMaintainDao implements IApplicationsMaintainDao {
|
|||
|
||||
@Override
|
||||
public ApplicationInfo loadApplication(String applicationId, String uid) throws SQLException {
|
||||
String sqlQuery = "select a.app_id,a.uid,a.app_code,a.create_time,a.sts,a.app_desc,a.update_time from application_info a where a.app_id = ? and a.uid = ? and a.sts= 'A'";
|
||||
String sqlQuery = "select a.app_id,a.uid,a.app_code,a.create_time,a.sts,a.update_time from application_info a where a.app_id = ? and a.uid = ? and a.sts= 'A'";
|
||||
Connection connection = dbConnectUtil.getConnection();
|
||||
ApplicationInfo application = null;
|
||||
try {
|
||||
|
|
@ -41,7 +41,6 @@ public class ApplicationsMaintainDao implements IApplicationsMaintainDao {
|
|||
application.setAppCode(resultSet.getString("app_code"));
|
||||
application.setCreateTime(resultSet.getTimestamp("create_time"));
|
||||
application.setSts(resultSet.getString("sts"));
|
||||
application.setAppDesc(resultSet.getString("app_desc"));
|
||||
application.setUpdateTime(resultSet.getTimestamp("update_time"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
@ -55,7 +54,7 @@ public class ApplicationsMaintainDao implements IApplicationsMaintainDao {
|
|||
|
||||
@Override
|
||||
public void saveApplication(ApplicationInfo application) throws SQLException {
|
||||
final String sql = "insert into application_info(uid,app_code,create_time,sts,update_time,app_desc) values(?,?,?,?,?,?)";
|
||||
final String sql = "insert into application_info(uid,app_code,create_time,sts,update_time) values(?,?,?,?,?)";
|
||||
Connection connection = dbConnectUtil.getConnection();
|
||||
int key = -1;
|
||||
try {
|
||||
|
|
@ -66,7 +65,6 @@ public class ApplicationsMaintainDao implements IApplicationsMaintainDao {
|
|||
pstmt.setTimestamp(++i, application.getCreateTime());
|
||||
pstmt.setString(++i, application.getSts());
|
||||
pstmt.setTimestamp(++i, application.getUpdateTime());
|
||||
pstmt.setString(++i, application.getAppDesc());
|
||||
|
||||
pstmt.executeUpdate();
|
||||
ResultSet results = pstmt.getGeneratedKeys();
|
||||
|
|
@ -88,15 +86,14 @@ public class ApplicationsMaintainDao implements IApplicationsMaintainDao {
|
|||
|
||||
@Override
|
||||
public void modifyApplication(Application application) throws SQLException {
|
||||
String sqlQuery = "update application_info set app_desc=?, update_time=? where app_id=? and uid = ? and sts= 'A'";
|
||||
String sqlQuery = "update application_info set update_time=? where app_id=? and uid = ? and sts= 'A'";
|
||||
Connection connection = dbConnectUtil.getConnection();
|
||||
|
||||
try {
|
||||
PreparedStatement pstmt = connection.prepareStatement(sqlQuery);
|
||||
pstmt.setString(1, application.getAppDesc());
|
||||
pstmt.setTimestamp(2, application.getUpdateTime());
|
||||
pstmt.setString(3, application.getAppId());
|
||||
pstmt.setString(4, application.getUId());
|
||||
pstmt.setTimestamp(1, application.getUpdateTime());
|
||||
pstmt.setString(2, application.getAppId());
|
||||
pstmt.setString(3, application.getUId());
|
||||
|
||||
pstmt.executeUpdate();
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public class FullSpan {
|
|||
protected String exceptionStack;
|
||||
protected byte statusCode = 0;
|
||||
protected String spanTypeDesc;
|
||||
protected String userId;
|
||||
protected String username;
|
||||
protected long startDate;
|
||||
protected String spanType;
|
||||
protected String address = "";
|
||||
|
|
@ -35,11 +35,11 @@ public class FullSpan {
|
|||
}
|
||||
this.traceId = traceId.substring(0, traceId.length() - 1);
|
||||
this.levelId = span.getLevelId();
|
||||
this.applicationId = span.getApplicationId();
|
||||
this.applicationId = span.getApplicationCode();
|
||||
this.callType = span.getCallType();
|
||||
this.businessKey = span.getBusinessKey();
|
||||
this.spanTypeDesc = span.getSpanTypeDesc();
|
||||
this.userId = span.getUserId();
|
||||
this.username = span.getUsername();
|
||||
this.startDate = span.getStarttime();
|
||||
this.viewPointId = span.getViewpoint();
|
||||
this.spanType = span.getSpanType() + "";
|
||||
|
|
@ -103,12 +103,12 @@ public class FullSpan {
|
|||
this.spanTypeDesc = spanTypeDesc;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public long getStartDate() {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ public class Application {
|
|||
private Timestamp createTime;
|
||||
|
||||
private ConfigArgs configArgs;
|
||||
private String appDesc;
|
||||
|
||||
public Application(String applicationId) {
|
||||
this.appId = applicationId;
|
||||
|
|
@ -79,12 +78,4 @@ public class Application {
|
|||
}
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public String getAppDesc() {
|
||||
return appDesc;
|
||||
}
|
||||
|
||||
public void setAppDesc(String appDesc) {
|
||||
this.appDesc = appDesc;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
jdbc.driverClassName=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://10.1.241.20:31306/sw_db
|
||||
jdbc.url=jdbc:mysql://localhost:3306/sw_db
|
||||
jdbc.username=sw_dbusr
|
||||
jdbc.password=sw_dbusr
|
||||
jdbc.maxTotal=200
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@
|
|||
<property name="locations">
|
||||
<list>
|
||||
<value>classpath:jdbc.properties</value>
|
||||
<value>classpath:config.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
|
|||
|
|
@ -29,32 +29,6 @@ CREATE TABLE IF NOT EXISTS `user_info` (
|
|||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `user_info_ext`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `user_info_ext` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `user_info_ext` (
|
||||
`eid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`uid` INT NOT NULL,
|
||||
`email` VARCHAR(200) NULL,
|
||||
`create_time` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`eid`))
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `login_log`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `login_log` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `login_log` (
|
||||
`log_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`uid` INT NOT NULL,
|
||||
`login_time` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`log_id`))
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `application_info`
|
||||
|
|
@ -67,30 +41,11 @@ CREATE TABLE IF NOT EXISTS `application_info` (
|
|||
`app_code` VARCHAR(200) NOT NULL,
|
||||
`create_time` DATETIME NULL,
|
||||
`sts` VARCHAR(2) NULL,
|
||||
`update_time` DATETIME NULL,
|
||||
PRIMARY KEY (`app_id`))
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `data_info`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `data_info` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `data_info` (
|
||||
`did` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`tab_info` VARCHAR(45) NOT NULL,
|
||||
`col_info` VARCHAR(45) NOT NULL,
|
||||
`code` VARCHAR(45) NOT NULL,
|
||||
`word` VARCHAR(45) NOT NULL,
|
||||
`code_desc` VARCHAR(200) NULL,
|
||||
`order_id` INT UNSIGNED NULL,
|
||||
`create_time` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`sts` VARCHAR(2) NULL,
|
||||
`modify_time` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`parent_did` INT UNSIGNED NULL,
|
||||
PRIMARY KEY (`did`))
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `alarm_rule`
|
||||
|
|
@ -141,21 +96,6 @@ CREATE TABLE IF NOT EXISTS `exclude_rule` (
|
|||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `email_expression`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `email_expression` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `email_expression` (
|
||||
`tid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`expr_name` VARCHAR(100) NOT NULL,
|
||||
`expr_val` VARCHAR(100) NOT NULL,
|
||||
`create_time` DATETIME NULL,
|
||||
`sts` VARCHAR(2) NULL,
|
||||
PRIMARY KEY (`tid`))
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `system_config`
|
||||
-- -----------------------------------------------------
|
||||
|
|
@ -175,30 +115,3 @@ CREATE TABLE IF NOT EXISTS `system_config` (
|
|||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `app_auth_info`
|
||||
-- -----------------------------------------------------
|
||||
DROP TABLE IF EXISTS `app_auth_info` ;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `app_auth_info` (
|
||||
`info_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`app_id` VARCHAR(45) NOT NULL,
|
||||
`auth_json` VARCHAR(3000) NOT NULL,
|
||||
`create_time` DATETIME NULL,
|
||||
`sts` VARCHAR(45) NULL,
|
||||
`modify_time` DATETIME NULL,
|
||||
PRIMARY KEY (`info_id`))
|
||||
ENGINE = InnoDB;
|
||||
|
||||
|
||||
SET SQL_MODE=@OLD_SQL_MODE;
|
||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
||||
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
||||
|
||||
|
||||
# alter table since 2016-4-8
|
||||
ALTER TABLE `application_info`
|
||||
ADD COLUMN `update_time` DATETIME NULL AFTER `sts`,
|
||||
ADD COLUMN `app_desc` VARCHAR(1024) NULL AFTER `update_time`;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,219 +0,0 @@
|
|||
<#macro analysisResult>
|
||||
<script type="text/x-jsrender" id="analysisResultPanelTmpl">
|
||||
<div class="row">
|
||||
<div class="col-md-4 ">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false"><span id="analyTypeDropDown">Action</span><span
|
||||
class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:void(0);" name="analyTypeDropDownOption" value="HOUR">时报表</a></li>
|
||||
<li><a href="javascript:void(0);" name="analyTypeDropDownOption" value="DAY">日报表</a></li>
|
||||
<li><a href="javascript:void(0);" name="analyTypeDropDownOption" value="MONTH">月报表</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="text" class="form-control" readonly id="analyDate">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="showAnalyResultBtn">Go!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<span><a href="javascript:void(0);" id="previousHourBtn">上个小时</a></span>
|
||||
<span><a href="javascript:void(0);" id="yesterdayBtn">昨天</a></span>
|
||||
<span><a href="javascript:void(0);" id="currentMonthBtn">本月</a></span>
|
||||
<span><a href="javascript:void(0);" id="previousMonthBtn">上月</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<input type="hidden" id="treeId" value="{{>treeId}}"/>
|
||||
<input type="hidden" id="analyType" value=""/>
|
||||
<table class="gridtable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="10%">LevelId</th>
|
||||
<th width="62%">ViewPoint</th>
|
||||
<th width="7%">调用次数</th>
|
||||
<th width="7%">正确次数</th>
|
||||
<th width="5%">正确率</th>
|
||||
<th width="7%">平均耗时</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="dataBody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr/>
|
||||
</script>
|
||||
</#macro>
|
||||
|
||||
<#macro analysisResultTableTmpl>
|
||||
<script type="text/x-jsrender" id="analysisResultTableTmpl">
|
||||
<tr>
|
||||
{{if isPrintLevelId}}
|
||||
<td rowspan="{{>rowSpanCount}}" valign="middle">{{>traceLevelId}}</td>
|
||||
{{/if}}
|
||||
<td>
|
||||
<a href="javascript:pickUpViewPoint('{{>nodeToken}}');"> {{>viewPoint}}</a>
|
||||
<span style="display:none" id="{{>nodeToken}}ViewPoint">{{>viewPointStr}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{>anlyResult.totalCall}}</td>
|
||||
<td>{{>anlyResult.correctNumber}}</td>
|
||||
<td>
|
||||
<span class="
|
||||
{{if anlyResult.correctRate >= 99.00}}
|
||||
text-success
|
||||
{{else anlyResult.correctRate >= 97}}
|
||||
text-warning
|
||||
{{else}}
|
||||
text-danger
|
||||
{{/if}}
|
||||
">
|
||||
<strong>{{>anlyResult.correctRate}}%</strong></span></td>
|
||||
<td>{{>anlyResult.averageCost}}ms
|
||||
<span id="{{>nodeToken}}" style="display:none">{{>anlyResultStr}}</span></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</script>
|
||||
</#macro>
|
||||
|
||||
|
||||
<#macro viewPointPickUp>
|
||||
<div class="modal fade" id="viewPointPickupModal" tabindex="-1" role="dialog" aria-labelledby="viewPointPickupModal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">节点详情</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<label>viewpoint:</label><br/>
|
||||
<span style="word-wrap:break-word;" id="viewpointStr"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="showTypicalCallTreeBtn" type="button" class="btn btn-primary" value="{{>nodeToken}}">
|
||||
查看调用链
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#macro>
|
||||
|
||||
<#macro typicalCallChainTrees>
|
||||
<script type="text/x-jsrender" id="typicalCallChainTreesTmpl">
|
||||
<br/>
|
||||
<div class="row">
|
||||
<small> <a href="javascript:void(0);" id="rebackCallChainTreeBtn">{{>entryViewPoint}}</a> </small>
|
||||
<br/>
|
||||
<small> {{>currentViewPoint}}</small>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="row" id="typicalCheckBoxDiv">
|
||||
</div>
|
||||
<br/>
|
||||
<table class="gridtable" style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>LevelId</th>
|
||||
<th>ViewPoint</th>
|
||||
<th>调用次数</th>
|
||||
<th>正确次数</th>
|
||||
<th>正确率</th>
|
||||
<th>平均耗时</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="typicalTreeTableDataBody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
</script>
|
||||
</#macro>
|
||||
|
||||
<#macro typicalCallChainCheckBox>
|
||||
<script type="text/x-jsrender" id="typicalTreeCheckBoxTmpl">
|
||||
<span> 归属该节点下所有的典型调用链:</span>
|
||||
{{for typicalTreeIds}}
|
||||
<input name="typicalTreeCheckBox" type="checkbox" checked value="{{>callTreeToken}}"/>典型调用链{{: #index}}
|
||||
{{/for}}
|
||||
|
||||
</script>
|
||||
</#macro>
|
||||
|
||||
<#macro typicalCallChainTreeTable>
|
||||
<script type="text/x-jsrender" id="typicalTreeTableTmpl">
|
||||
<tr>
|
||||
{{if isPrintLevelId}}
|
||||
<td rowspan="{{>rowSpanCount}}" valign="middle">{{>traceLevelId}}</td>
|
||||
{{/if}}
|
||||
<td>
|
||||
<a href="javascript:typicalCallChainTreeViewPointPickUp('{{>nodeToken}}');">{{>viewPoint}}</a>
|
||||
<span style="display:none" id="{{>nodeToken}}TypicalCallChainViewPoint">{{>viewPointStr}}</span>
|
||||
</td>
|
||||
<td>{{>anlyResult.totalCall}}</td>
|
||||
<td>{{>anlyResult.correctNumber}}</td>
|
||||
<td>
|
||||
<span class="
|
||||
{{if anlyResult.correctRate >= 99.00}}
|
||||
text-success
|
||||
{{else anlyResult.correctRate >= 97}}
|
||||
text-warning
|
||||
{{else}}
|
||||
text-danger
|
||||
{{/if}}
|
||||
">
|
||||
<strong>{{>anlyResult.correctRate}}%</strong></span></td>
|
||||
<td>{{>anlyResult.averageCost}}ms
|
||||
<span id="{{>nodeToken}}" style="display:none">{{>anlyResultStr}}</span></td>
|
||||
</tr>
|
||||
|
||||
</script>
|
||||
</#macro>
|
||||
|
||||
<#macro typicalCallTreeViewPointPickUp>
|
||||
<div class="modal fade" id="typicalCallTreeViewPointPickUpModal" tabindex="-1" role="dialog" aria-labelledby="typicalCallTreeViewPointPickUpModal"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">节点详情</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<label>viewpoint:</label><br/>
|
||||
<span style="word-wrap:break-word;" id="typicalCallTreeViewpointStr"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</#macro>
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
<#macro anlyResultTmpl>
|
||||
<script type="text/x-jsrender" id="anlyResultPanelTmpl">
|
||||
<div class="row">
|
||||
<div class="col-md-8" id="anlyResultmPanel">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
</script>
|
||||
</#macro>
|
||||
|
||||
<#macro anlyResultDisplayTmpl>
|
||||
<script type="text/x-jsrender" id="anlyResultDisplayTmpl">
|
||||
<div class="row">
|
||||
<h4><a href="${_base}/mainPage?loadType=showAnalysisResult&key=analysisresult:{{>treeId}}">{{>entranceViewpoint}}</a></h4>
|
||||
<p>
|
||||
{{for nodes}}
|
||||
{{if isPrintSlipDot}}
|
||||
<span style="margin-left:15%">....</span></br>
|
||||
{{/if}}
|
||||
<span style="margin-left:{{>marginLeftSize}}px" data={{>traceLevelId}}>{{>viewPoint}}</span></br>
|
||||
{{/for}}
|
||||
<span style="margin-left:15%">....</span></br>
|
||||
</p>
|
||||
<p style="font-color">{{>entranceAnlyResult.yearOfAnlyResult}}年{{>entranceAnlyResult.monthOfAnlyResult}}月已经被调用{{>entranceAnlyResult.totalCall}}次
|
||||
成功<span class="text-success"><strong>{{>entranceAnlyResult.correctNumber}}</strong></span>次
|
||||
失败<span class="text-danger"><strong>{{>entranceAnlyResult.humanInterruptionNumber}}</strong></span>次
|
||||
成功调用率<span class="
|
||||
{{if correctRate >= 99.00}}
|
||||
text-success
|
||||
{{else correctRate >= 97}}
|
||||
text-warning
|
||||
{{else}}
|
||||
text-danger
|
||||
{{/if}}
|
||||
"><strong>{{>correctRate}}%</strong></span>
|
||||
<a class="pull-right" href="${_base}/mainPage?loadType=showAnalysisResult&key=analysisresult:{{>treeId}}"><ins>more</ins></a></p>
|
||||
<hr/>
|
||||
</div>
|
||||
</script>
|
||||
</#macro>
|
||||
|
||||
<#macro pageInfoTmpl>
|
||||
<script type="text/x-jsrender" id="pageInfoTmpl">
|
||||
<input type="hidden" value="{{>pageSize}}" id="pageSize"/>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
{{if hasPreviousPage}}
|
||||
<li><a href="javascript:void(0);" id="doPreviousPageBtn">Previous</a></li>
|
||||
{{/if}}
|
||||
{{if hasNextPage}}
|
||||
<li disabled><a href="javascript:void(0);" id="doNextPageBtn">Next</a></li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</nav>
|
||||
</script>
|
||||
</#macro>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<div class="input-group" style="margin-top:3%">
|
||||
<input type="text" class="form-control" value="${key!''}" id="searchKey">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="searchBtn">搜索</button>
|
||||
<button class="btn btn-default" type="button" id="searchBtn">Search</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -33,11 +33,11 @@
|
|||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
<li><a href="javascript:void(0);" onclick="loadContent('applicationList')">系统配置</a></li>
|
||||
<li><a href="javascript:void(0);" onclick="loadContent('applicationList')">Edit Applications</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="javascript:void(0);" onclick="loadContent('addApplication')">新增应用</a></li>
|
||||
<li><a href="javascript:void(0);" onclick="loadContent('addApplication')">Add Application</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="javascript:void(0);" id="logoutBtn">退出</a></li>
|
||||
<li><a href="javascript:void(0);" id="logoutBtn">Sign Out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<#else>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<li class="list-group-item"><strong>调用类型:</strong>{{>spanTypeName}}</li>
|
||||
<li class="list-group-item"><strong>花费时间:</strong>{{>cost}}<strong>毫秒</strong></li>
|
||||
<li class="list-group-item" style="word-wrap: break-word;word-break: normal;"><strong>业务字段:</strong>{{>businessKey}}</li>
|
||||
<li class="list-group-item"><strong>应用Code:</strong>{{>applicationId}}</li>
|
||||
<li class="list-group-item"><strong>应用Code:</strong>{{>applicationCode}}</li>
|
||||
<li class="list-group-item" style="word-wrap: break-word;word-break: normal;"><strong>主机信息:</strong>{{>address}}}</li>
|
||||
<li class="list-group-item"><strong>调用进程号:</strong>{{>processNo}}</li>
|
||||
<li class="list-group-item" style="word-wrap: break-word;word-break: normal;"><strong>异常堆栈:</strong>
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
<li class="list-group-item"><strong>调用时间:</strong>{{>startDate}}</li>
|
||||
<li class="list-group-item"><strong>花费时间:</strong>{{>cost}}<strong>毫秒</strong></li>
|
||||
<li class="list-group-item"><strong>业务字段:</strong>{{>businessKey}}</li>
|
||||
<li class="list-group-item"><strong>应用Code:</strong>{{>applicationId}}</li>
|
||||
<li class="list-group-item"><strong>应用Code:</strong>{{>applicationCode}}</li>
|
||||
<li class="list-group-item"><strong>主机信息:</strong>{{>address}}}</li>
|
||||
<li class="list-group-item"><strong>调用进程号:</strong>{{>processNo}}</li>
|
||||
<li class="list-group-item"><strong>异常堆栈:</strong>
|
||||
|
|
@ -180,4 +180,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</script>
|
||||
</#macro>
|
||||
</#macro>
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@
|
|||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
<li><a href="${_base}/mainPage?loadType=applicationList">系统配置</a></li>
|
||||
<li><a href="${_base}/mainPage?loadType=applicationList">Edit Applications</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="${_base}/mainPage?loadType=addApplication">新增应用</a></li>
|
||||
<li><a href="${_base}/mainPage?loadType=addApplication">Add Application</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="javascript:void(0);" id="logoutBtn">退出</a></li>
|
||||
<li><a href="javascript:void(0);" id="logoutBtn">Sign Out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
<div class="input-group col-md-6 col-md-offset-3 col-">
|
||||
<input type="text" class="form-control" id="key">
|
||||
<a class="input-group-addon btn" href="javascript:void(0);" id="searchBtn">搜索</a>
|
||||
<a class="input-group-addon btn" href="javascript:void(0);" id="searchBtn">Search</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
<#import "./common/commons.ftl" as common>
|
||||
<#import "./common/traceInfo.ftl" as traceInfo>
|
||||
<#import "./usr/applications/applicationMaintain.ftl" as applicationMaintain>
|
||||
<#import "./usr/authfile/auth.ftl" as auth>
|
||||
<#import "anls-result/analysisSearchResult.ftl" as anlySearchResult>
|
||||
<#import "anls-result/analysisResult.ftl" as anlyResult>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
|
|
@ -39,17 +36,6 @@
|
|||
<@applicationMaintain.addApplication/>
|
||||
<@applicationMaintain.createglobalConfig/>
|
||||
<@applicationMaintain.modifyApplication/>
|
||||
<@auth.downloadAuth/>
|
||||
<@anlySearchResult.anlyResultTmpl/>
|
||||
<@anlySearchResult.anlyResultDisplayTmpl/>
|
||||
<@anlySearchResult.pageInfoTmpl/>
|
||||
<@anlyResult.analysisResult/>
|
||||
<@anlyResult.analysisResultTableTmpl/>
|
||||
<@anlyResult.typicalCallChainTrees/>
|
||||
<@anlyResult.typicalCallChainTreeTable/>
|
||||
<@anlyResult.typicalCallChainCheckBox/>
|
||||
<@anlyResult.viewPointPickUp/>
|
||||
<@anlyResult.typicalCallTreeViewPointPickUp/>
|
||||
<p id="baseUrl" style="display: none">${_base}</p>
|
||||
<div class="container" id="mainPanel">
|
||||
<p id="searchType" style="display: none">${searchType!''}</p>
|
||||
|
|
@ -82,31 +68,6 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (loadType == "showAnlySearchResult") {
|
||||
var template = $.templates("#anlyResultPanelTmpl");
|
||||
var htmlOutput = template.render({});
|
||||
$("#mainPanel").empty();
|
||||
$("#mainPanel").html(htmlOutput);
|
||||
var searchKey = $("#searchKey").val();
|
||||
var index = searchKey.indexOf(':');
|
||||
if (index != -1) {
|
||||
searchKey = searchKey.substr(index + 1);
|
||||
}
|
||||
toSearchAnlyResult(searchKey);
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadType == "showAnalysisResult") {
|
||||
var searchKey = $("#searchKey").val();
|
||||
var index = searchKey.indexOf(':');
|
||||
if (index != -1) {
|
||||
searchKey = searchKey.substr(index + 1);
|
||||
}
|
||||
viewResolver = new AnalysisResultViewResolver({baseUrl: "${_base}", treeId: searchKey});
|
||||
viewResolver.loadMainPage();
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadType == "applicationList") {
|
||||
loadAllApplications();
|
||||
return;
|
||||
|
|
@ -139,16 +100,6 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (loadType == "downloadAuthFile") {
|
||||
var template = $.templates("#downloadAuthFileTmpl");
|
||||
var htmlOutput = template.render({applicationCode: param});
|
||||
$("#mainPanel").empty();
|
||||
$("#mainPanel").html(htmlOutput);
|
||||
toDownloadAuthFile();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$("#mainPanel").empty();
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
<#macro downloadAuth>
|
||||
<script type="text/x-jsrender" id="downloadAuthFileTmpl">
|
||||
<div class="row" style="display: none;" id="warningAlter">
|
||||
<div class="col-md-6 col-md-offset-2">
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
|
||||
aria-hidden="true">×</span></button>
|
||||
<strong>Warning!</strong> <p id="message"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-2">
|
||||
<div class="row">
|
||||
<form class="form-horizontal" role="form">
|
||||
<input type='hidden' id="applicationId" value="{{:applicationCode}}">
|
||||
<div class="form-group">
|
||||
<label for="exclusiveException" class="col-sm-3 control-label">需要排除的异常:</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="exclusiveException"
|
||||
placeholder="java.lang.Exception,java.io.IOException">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="authType" class="col-sm-3 control-label">授权文件类型:</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="authType" name="authType">
|
||||
<option value="1">外网</option>
|
||||
<option value="0">内网</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-1">
|
||||
<button type="button" id="downloadBtn" data-loading-text="Loading..."
|
||||
class="btn btn-primary"
|
||||
autocomplete="off">
|
||||
<strong>
|
||||
<ins>Download</ins>
|
||||
</strong>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-offset-1 col-sm-1">
|
||||
<button type="button" class="btn btn-default" onclick="loadContent('applicationList');"><strong>
|
||||
<ins>Cancle</ins>
|
||||
</strong></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="authFiledownLoad"></div>
|
||||
</div>
|
||||
</script>
|
||||
</#macro>
|
||||
Loading…
Reference in New Issue