mirror of
https://gitee.com/huoyo/ko-time.git
synced 2025-12-06 16:58:26 +08:00
更新pom依赖
更新jdk基础依赖为jdk17 更新spring-boot依赖为3 重新整理配置文件DefaultConfig, KoTimeConfig, KoTimeRunner, LoadConfig 更新界面容量显示为易读, 调整显示样式
This commit is contained in:
parent
5965c682b4
commit
00ada5121b
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,4 +4,3 @@ rebel.xml
|
||||
target/
|
||||
.txlcn
|
||||
*.log
|
||||
/.idea/
|
||||
|
||||
29
pom.xml
29
pom.xml
@ -6,35 +6,41 @@
|
||||
|
||||
<groupId>cn.langpy</groupId>
|
||||
<artifactId>ko-time</artifactId>
|
||||
<version>2.4.4</version>
|
||||
<version>3.0.0</version>
|
||||
<name>KoTime</name>
|
||||
|
||||
<description>A springboot tool for tracking the paths of the methods,which can help you find method's performances easily.</description>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU Lesser General Public License v2.1</name>
|
||||
<url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<url>https://gitee.com/huoyo/ko-time</url>
|
||||
|
||||
<scm>
|
||||
<tag>master</tag>
|
||||
<url>https://gitee.com/huoyo/ko-time.git</url>
|
||||
<connection>scm:git:https://gitee.com/huoyo/ko-time.git</connection>
|
||||
<developerConnection>scm:git:https://gitee.com/huoyo/ko-time.git</developerConnection>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<aspecttj.version>1.9.9.1</aspecttj.version>
|
||||
<tomcat.version>9.0.43</tomcat.version>
|
||||
<spring-context.version>5.3.24</spring-context.version>
|
||||
<spring-web.version>5.3.24</spring-web.version>
|
||||
<spring-webmvc.version>5.3.24</spring-webmvc.version>
|
||||
<spring-boot.version>2.7.4</spring-boot.version>
|
||||
<spring-redis.version>2.6.2</spring-redis.version>
|
||||
<spring-mail.version>2.7.3</spring-mail.version>
|
||||
<tomcat.version>10.1.12</tomcat.version>
|
||||
<spring-context.version>6.0.11</spring-context.version>
|
||||
<spring-web.version>6.0.11</spring-web.version>
|
||||
<spring-webmvc.version>6.0.11</spring-webmvc.version>
|
||||
<spring-boot.version>3.1.3</spring-boot.version>
|
||||
<spring-redis.version>3.1.3</spring-redis.version>
|
||||
<spring-mail.version>3.1.3</spring-mail.version>
|
||||
<fastjson.version>2.0.9</fastjson.version>
|
||||
<oshi-core.version>6.2.2</oshi-core.version>
|
||||
<byte-agent.version>1.12.13</byte-agent.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
@ -100,12 +106,14 @@
|
||||
<version>${oshi-core.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>ZhangChang</name>
|
||||
<email>1729913829@qq.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@ -113,8 +121,8 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@ -175,6 +183,7 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>snapshots</id>
|
||||
|
||||
@ -2,6 +2,7 @@ package cn.langpy.kotime.config;
|
||||
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@ -9,43 +10,177 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "ko-time")
|
||||
@Lazy(value = false)
|
||||
public class DefaultConfig {
|
||||
private Boolean enable;
|
||||
private String language;
|
||||
/**
|
||||
* to enable kotime
|
||||
*/
|
||||
private Boolean enable = true;
|
||||
|
||||
|
||||
/**
|
||||
* to select language for viewer, chinese
|
||||
*/
|
||||
private String language = "chinese";
|
||||
@Deprecated
|
||||
private String logLanguage;
|
||||
private Boolean logEnable;
|
||||
private Boolean versionNotice;
|
||||
private Double threshold;
|
||||
private Double discardRate;
|
||||
private String pointcut;
|
||||
private Boolean exceptionEnable;
|
||||
private Boolean paramAnalyse;
|
||||
private String saver;
|
||||
|
||||
/**
|
||||
* false
|
||||
* to print log in console
|
||||
*/
|
||||
private Boolean logEnable = false;
|
||||
|
||||
/**
|
||||
* "defaultValue": true,
|
||||
* "description": "to enable version-notice",
|
||||
*/
|
||||
private Boolean versionNotice = true;
|
||||
|
||||
/**
|
||||
* red will appear if avgRunTime>threshold
|
||||
*/
|
||||
private Double threshold = 800.0;
|
||||
|
||||
|
||||
/**
|
||||
* data will be discard if Math.random()<discard-rate
|
||||
*/
|
||||
private Double discardRate = 0.3;
|
||||
|
||||
/**
|
||||
* pointcut for aop
|
||||
* execution(* com.example..*.*(..))
|
||||
*/
|
||||
private String pointcut = "execution(* com.example..*.*(..))";
|
||||
|
||||
/**
|
||||
* to enable exception listener
|
||||
* "defaultValue": false,
|
||||
*/
|
||||
private Boolean exceptionEnable = false;
|
||||
|
||||
/**
|
||||
* the charger of analysing params
|
||||
*/
|
||||
private Boolean paramAnalyse = true;
|
||||
|
||||
/**
|
||||
* a place to store data
|
||||
* memory
|
||||
*/
|
||||
private String saver = "memory";
|
||||
|
||||
/**
|
||||
* datasource
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* StringRedisTemplate‘s bean
|
||||
*/
|
||||
private String redisTemplate;
|
||||
private Integer threadNum;
|
||||
private String contextPath;
|
||||
|
||||
/**
|
||||
* number of thread to store data
|
||||
*/
|
||||
private Integer threadNum = 2;
|
||||
|
||||
/**
|
||||
* server url for static resources
|
||||
* http://localhost:8080
|
||||
*/
|
||||
private String contextPath = "";
|
||||
|
||||
/**
|
||||
* dataPrefix
|
||||
*/
|
||||
private String dataPrefix;
|
||||
private Boolean dataReset;
|
||||
private Boolean authEnable;
|
||||
|
||||
/**
|
||||
* to delete all data
|
||||
*/
|
||||
private Boolean dataReset = false;
|
||||
|
||||
/**
|
||||
* to enable authentication
|
||||
*/
|
||||
private Boolean authEnable = false;
|
||||
|
||||
/**
|
||||
* userName for authentication
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* password for authentication
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* static token of html
|
||||
*/
|
||||
private String staticToken;
|
||||
|
||||
private Long authExpire;
|
||||
/**
|
||||
* expire within 43200 s
|
||||
*/
|
||||
private Long authExpire = 43200L;
|
||||
|
||||
private Boolean mailEnable;
|
||||
private String mailHost;
|
||||
private Integer mailPort;
|
||||
private String mailProtocol;
|
||||
private String mailEncoding;
|
||||
/**
|
||||
* to enable email
|
||||
*/
|
||||
private Boolean mailEnable = false;
|
||||
|
||||
/**
|
||||
* host of email
|
||||
*/
|
||||
private String mailHost = "smtp.qq.com";
|
||||
|
||||
/**
|
||||
* port of email
|
||||
*/
|
||||
private Integer mailPort = 587;
|
||||
|
||||
/**
|
||||
* protocol of email
|
||||
*/
|
||||
private String mailProtocol = "smtp";
|
||||
|
||||
/**
|
||||
* encoding of email
|
||||
*/
|
||||
private String mailEncoding = "UTF-8";
|
||||
|
||||
/**
|
||||
* sender of email
|
||||
*/
|
||||
private String mailUser;
|
||||
|
||||
/**
|
||||
* code of email
|
||||
*/
|
||||
private String mailCode;
|
||||
|
||||
/**
|
||||
* receivers of email
|
||||
*/
|
||||
private String mailReceivers;
|
||||
private Integer mailThreshold;
|
||||
private String mailScope;
|
||||
private String propertyFile;
|
||||
|
||||
/**
|
||||
* trigger thresold of email
|
||||
*/
|
||||
private Integer mailThreshold = 4;
|
||||
|
||||
/**
|
||||
* trigger scope of email
|
||||
*/
|
||||
private String mailScope = "Controller";
|
||||
|
||||
/**
|
||||
* dynamic.properties
|
||||
*/
|
||||
private String propertyFile = "dynamic.properties";
|
||||
|
||||
public String getPropertyFile() {
|
||||
return propertyFile;
|
||||
|
||||
36
src/main/java/cn/langpy/kotime/config/KoTimeConfig.java
Normal file
36
src/main/java/cn/langpy/kotime/config/KoTimeConfig.java
Normal file
@ -0,0 +1,36 @@
|
||||
package cn.langpy.kotime.config;
|
||||
|
||||
import cn.langpy.kotime.handler.RunTimeHandler;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author ccz
|
||||
* @date 2024-7-5 03:16:56
|
||||
*/
|
||||
@Configuration
|
||||
public class KoTimeConfig {
|
||||
private static Logger log = Logger.getLogger(KoTimeConfig.class.toString());
|
||||
|
||||
@Value("${koTime.pointcut:execution(* cn.langpy.kotime.controller.KoTimeController.*(..))}")
|
||||
private String pointcut;
|
||||
|
||||
@Resource
|
||||
private DefaultConfig defaultConfig;
|
||||
|
||||
@Bean
|
||||
public AspectJExpressionPointcutAdvisor configurabledvisor() {
|
||||
log.info("kotime=>loading method listener");
|
||||
AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor();
|
||||
String cutRange = defaultConfig.getPointcut() == null ? pointcut : defaultConfig.getPointcut();
|
||||
cutRange = cutRange + " && !@annotation(cn.langpy.kotime.annotation.KoListener)";
|
||||
advisor.setExpression(cutRange);
|
||||
advisor.setAdvice(new RunTimeHandler());
|
||||
return advisor;
|
||||
}
|
||||
}
|
||||
23
src/main/java/cn/langpy/kotime/config/KoTimeRunner.java
Normal file
23
src/main/java/cn/langpy/kotime/config/KoTimeRunner.java
Normal file
@ -0,0 +1,23 @@
|
||||
package cn.langpy.kotime.config;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* @author ccz
|
||||
* @date 2024-7-5 03:17:13
|
||||
*/
|
||||
@ComponentScan("cn.langpy.kotime")
|
||||
@AutoConfiguration
|
||||
public class KoTimeRunner implements ApplicationRunner {
|
||||
@Resource
|
||||
private LoadConfig loadConfig;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
loadConfig.initConfig();
|
||||
}
|
||||
}
|
||||
@ -1,30 +1,27 @@
|
||||
package cn.langpy.kotime.config;
|
||||
|
||||
import cn.langpy.kotime.annotation.KoListener;
|
||||
import cn.langpy.kotime.handler.RunTimeHandler;
|
||||
import cn.langpy.kotime.handler.InvokedHandler;
|
||||
import cn.langpy.kotime.service.GraphService;
|
||||
import cn.langpy.kotime.service.InvokedQueue;
|
||||
import cn.langpy.kotime.util.Common;
|
||||
import cn.langpy.kotime.util.Context;
|
||||
import cn.langpy.kotime.util.DataBaseException;
|
||||
import org.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.beans.factory.NoUniqueBeanDefinitionException;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import javax.sql.DataSource;
|
||||
import java.io.*;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
@ -32,8 +29,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* zhangchang
|
||||
*/
|
||||
@ComponentScan("cn.langpy.kotime")
|
||||
@Configuration
|
||||
@Component
|
||||
public class LoadConfig {
|
||||
private static Logger log = Logger.getLogger(LoadConfig.class.toString());
|
||||
|
||||
@ -56,7 +52,6 @@ public class LoadConfig {
|
||||
@Value("${server.servlet.context-path:}")
|
||||
private String serverContext;
|
||||
|
||||
|
||||
@Value("${ko-time.mail-enable:false}")
|
||||
private Boolean mailEnable;
|
||||
|
||||
@ -65,8 +60,6 @@ public class LoadConfig {
|
||||
@Resource
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
|
||||
@PostConstruct
|
||||
public void initConfig() {
|
||||
DefaultConfig config = improveConfig();
|
||||
|
||||
@ -215,15 +208,4 @@ public class LoadConfig {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public AspectJExpressionPointcutAdvisor configurabledvisor() {
|
||||
log.info("kotime=>loading method listener");
|
||||
AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor();
|
||||
String cutRange = defaultConfig.getPointcut() == null ? pointcut : defaultConfig.getPointcut();
|
||||
cutRange = cutRange + " && !@annotation(cn.langpy.kotime.annotation.KoListener)";
|
||||
advisor.setExpression(cutRange);
|
||||
advisor.setAdvice(new RunTimeHandler());
|
||||
return advisor;
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ import cn.langpy.kotime.service.ThreadUsageService;
|
||||
import cn.langpy.kotime.util.Context;
|
||||
import cn.langpy.kotime.util.InvalidAuthInfoException;
|
||||
import cn.langpy.kotime.util.KoUtil;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@ -18,8 +20,6 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.logging.Logger;
|
||||
@ -44,6 +44,7 @@ public class KoTimeController {
|
||||
private final String metricFlowJsText = getResourceText("kostatic/Metricflow.js");
|
||||
private final String jQueryJsText = getResourceText("kostatic/JQuery.min.js");
|
||||
private final String uiKitIconsJs = getResourceText("kostatic/uikit-icons.js");
|
||||
private final String KoTimeUtil = getResourceText("kostatic/util.js");
|
||||
|
||||
@PostMapping("/login")
|
||||
@ResponseBody
|
||||
@ -132,6 +133,8 @@ public class KoTimeController {
|
||||
line = line.replace("staticTokenVisitValue", staticTokenVisit + "");
|
||||
} else if (line.indexOf("staticTokenValue") > -1) {
|
||||
line = line.replace("staticTokenValue", "'" + kotoken + "'");
|
||||
} else if (line.indexOf("KoTimeUtil") > -1) {
|
||||
line = line.replace("KoTimeUtil", KoTimeUtil);
|
||||
}
|
||||
stringBuilder.append(line + "\n");
|
||||
}
|
||||
|
||||
@ -0,0 +1 @@
|
||||
cn.langpy.kotime.config.KoTimeRunner
|
||||
10
src/main/resources/kostatic/util.js
Normal file
10
src/main/resources/kostatic/util.js
Normal file
@ -0,0 +1,10 @@
|
||||
function getSize(size) {
|
||||
let sizes = [' Bytes', ' KB', ' MB', ' GB',
|
||||
' TB', ' PB', ' EB', ' ZB', ' YB'];
|
||||
|
||||
for (let i = 1; i < sizes.length; i++) {
|
||||
if (size < Math.pow(1024, i))
|
||||
return (Math.round((size / Math.pow(1024, i - 1)) * 100) / 100) + sizes[i - 1];
|
||||
}
|
||||
return size;
|
||||
}
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>KoTime</title>
|
||||
@ -14,6 +13,7 @@
|
||||
uiKitIconsJs;
|
||||
MetricFlowJs;
|
||||
jQueryJs;
|
||||
KoTimeUtil;
|
||||
var graph;
|
||||
var d = 180;
|
||||
var globalThreshold = globalThresholdValue;
|
||||
@ -65,7 +65,8 @@
|
||||
let className = data[i]['className'];
|
||||
let message = data[i]['message'];
|
||||
html += "<li onclick=\"showExceptions('" + id + "','" + message + "')\" style='' id=\"" + id + "\"><span style='font-size: 16px;font-weight: 500;'>" + className + "</span>   <span style='font-size: 10px;' class=\"uk-label uk-label-danger\">" + message + "</span></li>";
|
||||
};
|
||||
}
|
||||
;
|
||||
element.innerHTML = html;
|
||||
});
|
||||
}
|
||||
@ -89,7 +90,8 @@
|
||||
} else {
|
||||
html += "<li onclick=\"showMethods('" + apiId + "')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\"" + apiId + "-list\">" + className + "#<span style='font-size: 16px;font-weight: 500;'>" + methodName + "</span>   <span style='font-size: 10px;text-transform: lowercase' class=\"uk-label uk-label-" + color + "\">平均响应 " + avgRunTime + " ms</span></li>";
|
||||
}
|
||||
};
|
||||
}
|
||||
;
|
||||
element.innerHTML = html;
|
||||
});
|
||||
}
|
||||
@ -115,7 +117,8 @@
|
||||
document.getElementById("systemAvgRunTime").style.color = '#cc0c0c';
|
||||
} else {
|
||||
document.getElementById("systemAvgRunTime").style.color = '#29da93';
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
let maxRunTime = data['maxRunTime'];
|
||||
let systemMaxRunTime = document.getElementById("systemMaxRunTime");
|
||||
@ -124,7 +127,8 @@
|
||||
document.getElementById("systemMaxRunTime").style.color = '#cc0c0c';
|
||||
} else {
|
||||
document.getElementById("systemMaxRunTime").style.color = '#29da93';
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
let minRunTime = data['minRunTime'];
|
||||
@ -134,44 +138,86 @@
|
||||
document.getElementById("systemMinRunTime").style.color = '#cc0c0c';
|
||||
} else {
|
||||
document.getElementById("systemMinRunTime").style.color = '#29da93';
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function addConfigEvent() {
|
||||
document.getElementById('kotimeEnable').onclick = function () {
|
||||
$.ajax({type:'POST',url:concatToken('contextPath/koTime/updateConfig'),data:JSON.stringify({enable:document.getElementById('kotimeEnable').checked}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: concatToken('contextPath/koTime/updateConfig'),
|
||||
data: JSON.stringify({enable: document.getElementById('kotimeEnable').checked}),
|
||||
dataType: 'json',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
});
|
||||
UIkit.notification("<font color='green'>设置成功</font>", {});
|
||||
};
|
||||
|
||||
document.getElementById('exceptionEnable').onclick = function () {
|
||||
$.ajax({type:'POST',url:concatToken('contextPath/koTime/updateConfig'),data:JSON.stringify({exceptionEnable:document.getElementById('exceptionEnable').checked}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: concatToken('contextPath/koTime/updateConfig'),
|
||||
data: JSON.stringify({exceptionEnable: document.getElementById('exceptionEnable').checked}),
|
||||
dataType: 'json',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
});
|
||||
UIkit.notification("<font color='green'>设置成功</font>", {});
|
||||
};
|
||||
|
||||
document.getElementById('logEnable').onclick = function () {
|
||||
$.ajax({type:'POST',url:concatToken('contextPath/koTime/updateConfig'),data:JSON.stringify({logEnable:document.getElementById('logEnable').checked}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: concatToken('contextPath/koTime/updateConfig'),
|
||||
data: JSON.stringify({logEnable: document.getElementById('logEnable').checked}),
|
||||
dataType: 'json',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
});
|
||||
UIkit.notification("<font color='green'>设置成功</font>", {});
|
||||
};
|
||||
|
||||
document.getElementById('mailEnable').onclick = function () {
|
||||
$.ajax({type:'POST',url:concatToken('contextPath/koTime/updateConfig'),data:JSON.stringify({mailEnable:document.getElementById('mailEnable').checked}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: concatToken('contextPath/koTime/updateConfig'),
|
||||
data: JSON.stringify({mailEnable: document.getElementById('mailEnable').checked}),
|
||||
dataType: 'json',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
});
|
||||
UIkit.notification("<font color='green'>设置成功</font>", {});
|
||||
};
|
||||
|
||||
document.getElementById('languageSwitch').onchange = function () {
|
||||
let selectedObj = document.getElementById('languageSwitch');
|
||||
$.ajax({type:'POST',url:concatToken('contextPath/koTime/updateConfig'),data:JSON.stringify({language:selectedObj.options[selectedObj.selectedIndex].value}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: concatToken('contextPath/koTime/updateConfig'),
|
||||
data: JSON.stringify({language: selectedObj.options[selectedObj.selectedIndex].value}),
|
||||
dataType: 'json',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
});
|
||||
UIkit.notification("<font color='green'>设置成功</font>", {});
|
||||
};
|
||||
|
||||
document.getElementById("timeThresholdYes").onclick = function () {
|
||||
$.ajax({type:'POST',url:concatToken('contextPath/koTime/updateConfig'),data:JSON.stringify({threshold:document.getElementById('timeThreshold').value}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: concatToken('contextPath/koTime/updateConfig'),
|
||||
data: JSON.stringify({threshold: document.getElementById('timeThreshold').value}),
|
||||
dataType: 'json',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
});
|
||||
UIkit.notification("<font color='green'>设置成功</font>", {});
|
||||
};
|
||||
document.getElementById("clearDataYes").onclick = function () {
|
||||
$.ajax({type:'POST',url:concatToken('contextPath/koTime/clearData'),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: concatToken('contextPath/koTime/clearData'),
|
||||
dataType: 'json',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
});
|
||||
UIkit.notification("<font color='green'>清除成功</font>", {});
|
||||
};
|
||||
}
|
||||
@ -214,11 +260,13 @@
|
||||
}
|
||||
|
||||
let methodParamMap = new Map();
|
||||
|
||||
function paramGraph(e) {
|
||||
let clickNode = e.currentTarget;
|
||||
if (clickNode == null) {
|
||||
return
|
||||
};
|
||||
}
|
||||
;
|
||||
let clickNodeId = clickNode.id;
|
||||
if (methodParamMap.has(clickNodeId + "ana")) {
|
||||
graph.removeNode(clickNodeId + "ana")
|
||||
@ -228,7 +276,8 @@
|
||||
let datas = []
|
||||
for (let key in data) {
|
||||
datas.push({"name": key + ":平均 " + data[key]['avgRunTime'] + " ms"})
|
||||
};
|
||||
}
|
||||
;
|
||||
let paramGraphData = {
|
||||
"id": clickNodeId + "ana",
|
||||
"from": clickNodeId,
|
||||
@ -249,6 +298,7 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function formData(data) {
|
||||
if (data['avgRunTime'] > globalThreshold) {
|
||||
data['style'] = {
|
||||
@ -257,15 +307,15 @@
|
||||
'data-font-size': '10px',
|
||||
'title-font-size': '12px'
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
data['style'] = {
|
||||
'title-color': '#375d46',
|
||||
'border-color': '#375d46',
|
||||
'data-font-size': '10px',
|
||||
'title-font-size': '12px'
|
||||
}
|
||||
};
|
||||
}
|
||||
;
|
||||
data['title'] = {'name': data['name']};
|
||||
data['data'] = [
|
||||
{'name': '<span style="color:gray">类型:</span>' + data['methodType']},
|
||||
@ -321,7 +371,8 @@
|
||||
if (data.length - 1 > i) {
|
||||
html += '<hr class="uk-divider-icon">'
|
||||
}
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
let exceptionDetailDom = document.getElementById('exception-detail');
|
||||
exceptionDetailDom.innerHTML = html;
|
||||
@ -359,6 +410,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function searchTip(e) {
|
||||
let question = $('#searchText').val()
|
||||
$.get(concatToken('contextPath/koTime/getApiTips?question=' + question), function (data) {
|
||||
@ -366,7 +418,8 @@
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let name = data[i];
|
||||
$("#condidates").append('<option value="' + name + '"/>');
|
||||
};
|
||||
}
|
||||
;
|
||||
});
|
||||
}
|
||||
|
||||
@ -390,7 +443,8 @@
|
||||
} else {
|
||||
html += "<li onclick=\"showMethods('" + apiId + "')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\"" + apiId + "-list\">" + className + "#<span style='font-size: 16px;font-weight: 500;'>" + methodName + "</span>   <span style='font-size: 10px;text-transform: lowercase' class=\"uk-label uk-label-" + color + "\">平均响应 " + avgRunTime + " ms</span></li>";
|
||||
}
|
||||
};
|
||||
}
|
||||
;
|
||||
element.innerHTML = html;
|
||||
});
|
||||
$('#searchText').val('');
|
||||
@ -435,7 +489,8 @@
|
||||
UIkit.notification("<font color='red'>更新失败</font>", {});
|
||||
location.reload();
|
||||
},
|
||||
complete: function () {}
|
||||
complete: function () {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -486,9 +541,11 @@
|
||||
},
|
||||
error: function (XmlHttpRequest, textStatus, errorThrown) {
|
||||
},
|
||||
complete: function () {}
|
||||
complete: function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadCpuInfo() {
|
||||
$.get(concatToken('contextPath/koTime/getCpuInfo'), function (data) {
|
||||
let systemLoad = data['systemLoad'] * 100;
|
||||
@ -501,7 +558,8 @@
|
||||
systemLoadDom.style.color = '#cc0c0c';
|
||||
} else {
|
||||
systemLoadDom.style.color = '#29da93';
|
||||
};
|
||||
}
|
||||
;
|
||||
systemLoadDom.innerHTML = `${systemLoad.toFixed(2)}%`;
|
||||
document.querySelector("#cpuSysRate").innerHTML = `${sysRate.toFixed(2)}%`;
|
||||
document.querySelector("#cpuUserRate").innerHTML = `${userRate.toFixed(2)}%`;
|
||||
@ -509,40 +567,52 @@
|
||||
document.querySelector("#cpuWaitRate").innerHTML = `${waitRate.toFixed(2)}%`;
|
||||
});
|
||||
}
|
||||
|
||||
function loadHeapMemoryInfo() {
|
||||
$.get(concatToken('contextPath/koTime/getHeapMemoryInfo'), function (data) {
|
||||
let initValue = data['initValue']/1024/1024;
|
||||
let maxValue = data['maxValue']/1024/1024;
|
||||
let usedValue = data['usedValue']/1024/1024;
|
||||
// let initValue = data['initValue'] / 1024 / 1024;
|
||||
// let maxValue = data['maxValue'] / 1024 / 1024;
|
||||
// let usedValue = data['usedValue'] / 1024 / 1024;
|
||||
let initValue = getSize(data['initValue']);
|
||||
let maxValue = getSize(data['maxValue']);
|
||||
let usedValue = getSize(data['usedValue']);
|
||||
let usedRate = data['usedRate'] * 100;
|
||||
var heapUsedRateDom = document.querySelector("#heapUsedRate");
|
||||
if (usedRate > 50) {
|
||||
heapUsedRateDom.style.color = '#cc0c0c';
|
||||
} else {
|
||||
heapUsedRateDom.style.color = '#29da93';
|
||||
};
|
||||
document.querySelector("#heapInit").innerHTML = `${initValue.toFixed()}M`;
|
||||
document.querySelector("#heapMax").innerHTML = `${maxValue.toFixed()}M`;
|
||||
document.querySelector("#heapUsed").innerHTML = `${usedValue.toFixed()}M`;
|
||||
}
|
||||
;
|
||||
document.querySelector("#heapInit").innerHTML = initValue;
|
||||
document.querySelector("#heapMax").innerHTML = maxValue;
|
||||
document.querySelector("#heapUsed").innerHTML = usedValue;
|
||||
heapUsedRateDom.innerHTML = `${usedRate.toFixed(2)}%`;
|
||||
});
|
||||
}
|
||||
|
||||
function loadPhysicalMemoryInfo() {
|
||||
$.get(concatToken('contextPath/koTime/getPhysicalMemoryInfo'), function (data) {
|
||||
let initValue = data['initValue']/1024/1024;
|
||||
let thisUsedValue = data['thisUsedValue']/1024/1024;
|
||||
let usedValue = data['usedValue']/1024/1024;
|
||||
// let initValue = data['initValue'] / 1024 / 1024;
|
||||
// let thisUsedValue = data['thisUsedValue'] / 1024 / 1024;
|
||||
// let usedValue = data['usedValue'] / 1024 / 1024;
|
||||
|
||||
let initValue = getSize(data['initValue']);
|
||||
let thisUsedValue = getSize(data['thisUsedValue']);
|
||||
let usedValue = getSize(data['usedValue']);
|
||||
|
||||
let usedRate = data['usedRate'] * 100;
|
||||
var physicalUsedRateDom = document.querySelector("#physicalUsedRate");
|
||||
if (usedRate > 50) {
|
||||
physicalUsedRateDom.style.color = '#cc0c0c';
|
||||
} else {
|
||||
physicalUsedRateDom.style.color = '#29da93';
|
||||
};
|
||||
}
|
||||
;
|
||||
physicalUsedRateDom.innerHTML = `${usedRate.toFixed(2)}%`;
|
||||
document.querySelector("#physicalAmount").innerHTML = `${initValue.toFixed()}M`;
|
||||
document.querySelector("#physicalUsed").innerHTML = `${usedValue.toFixed()}M`;
|
||||
document.querySelector("#thisUsed").innerHTML = `${thisUsedValue.toFixed()}M`;
|
||||
document.querySelector("#physicalAmount").innerHTML = initValue;
|
||||
document.querySelector("#physicalUsed").innerHTML = usedValue;
|
||||
document.querySelector("#thisUsed").innerHTML = thisUsedValue;
|
||||
});
|
||||
}
|
||||
|
||||
@ -551,6 +621,7 @@
|
||||
'YELLOW': '#f0ad4e',
|
||||
'LIGHT_BLUE': '#5bc0de'
|
||||
};
|
||||
|
||||
function getCpuUsageColor(usage) {
|
||||
if (usage > 50) {
|
||||
return cpuUsageColorMap['RED'];
|
||||
@ -562,6 +633,7 @@
|
||||
}
|
||||
|
||||
let threadMap = new Map();
|
||||
|
||||
function loadThreadsInfo(queryState) {
|
||||
queryState = queryState || '';
|
||||
$.get(concatToken('contextPath/koTime/getThreadsInfo?state=' + queryState), function (data) {
|
||||
@ -626,7 +698,6 @@
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<!--endreplace-->
|
||||
@ -636,7 +707,9 @@
|
||||
<nav class="uk-navbar-container" style="background-color: #404b67;height: 85px" uk-navbar>
|
||||
<div class="uk-navbar-center">
|
||||
<div class="uk-grid-small" uk-grid>
|
||||
<div title="刷新数据" style="margin-top: 20px;font-size: 24px;color: white;cursor: pointer" class="uk-width-expand" onclick="refreshData()" >KoTime调用链路追踪</div>
|
||||
<div title="刷新数据" style="margin-top: 20px;font-size: 24px;color: white;cursor: pointer"
|
||||
class="uk-width-expand" onclick="refreshData()">KoTime调用链路追踪
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@ -648,7 +721,11 @@
|
||||
<li><a href="#" style="color: #edeef1;font-size: 14px">线程列表</a></li>
|
||||
<li><a href="#" style="color: #edeef1;font-size: 14px">热更新</a></li>
|
||||
<li><a href="#" style="color: #edeef1;font-size: 14px">配置</a></li>
|
||||
<li><a href="#" style="color: #edeef1;font-size: 14px">技术支持</a><span title="点击查看版本发布信息" style="position: absolute;top:-10px;left: 90%;border-radius: 5px;text-transform: unset" class="uk-label" id="version-notice" onclick="window.location.href='http://www.kotime.cn/docs/kaiyuan#/v220/introduce'"></span></li>
|
||||
<li><a href="#" style="color: #edeef1;font-size: 14px">技术支持</a><span title="点击查看版本发布信息"
|
||||
style="position: absolute;top:-10px;left: 90%;border-radius: 5px;text-transform: unset"
|
||||
class="uk-label" id="version-notice"
|
||||
onclick="window.location.href='http://www.kotime.cn/docs/kaiyuan#/v220/introduce'"></span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="uk-switcher uk-margin">
|
||||
@ -658,20 +735,23 @@
|
||||
</ul>
|
||||
<div style="margin-top: 20px;" class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid>
|
||||
<div>
|
||||
<div id="systemTotalNum-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div id="systemTotalNum-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">接口数</span><br>
|
||||
<span style="font-size: 30px;color: #020718;font-weight: bold" id="systemTotalNum">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="systemDelayNum-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div id="systemDelayNum-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">延迟响应数</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #cc0c0c;font-weight: bold" id="systemDelayNum">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="systemNormalNum-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div id="systemNormalNum-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">正常响应数</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #29da93;font-weight: bold" id="systemNormalNum">0</span></div>
|
||||
@ -683,19 +763,22 @@
|
||||
</ul>
|
||||
<div style="margin-top: 10px;" class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid>
|
||||
<div>
|
||||
<div id="systemAvgRunTime-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div id="systemAvgRunTime-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">平均响应(ms)</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #020718;font-weight: bold" id="systemAvgRunTime">0</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="systemMaxRunTime-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div id="systemMaxRunTime-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">最大响应(ms)</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #020718;font-weight: bold" id="systemMaxRunTime">0</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="systemMinRunTime-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div id="systemMinRunTime-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">最小响应(ms)</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #020718;font-weight: bold" id="systemMinRunTime">0</span></div>
|
||||
@ -706,35 +789,56 @@
|
||||
</ul>
|
||||
<div style="margin-top: 20px;" class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid>
|
||||
<div>
|
||||
<div id="cpuInfo-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 12px;color: #3b3f4f;justify-content: space-around;" id="cpuLogicalAmount">CPU使用率:</span><span style="font-size: 15px;color: #020718;font-weight: bold" id="systemLoad" >0</span>
|
||||
<div id="cpuInfo-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px; text-align: left;"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 12px;color: #3b3f4f;justify-content: space-around;" id="cpuLogicalAmount">CPU使用率:</span><span
|
||||
style="font-size: 15px;color: #020718;font-weight: bold" id="systemLoad">0</span>
|
||||
<hr style="margin-top: 7px">
|
||||
<ul class="uk-list-bullet" style="text-align: left;margin-top: -13px;">
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">用户使用率:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="cpuUserRate" >0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">系统使用率:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="cpuSysRate" >0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">IO 等待率:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="cpuWaitRate" >0</span></li>
|
||||
<ul class="uk-list-bullet" style="text-align: left;margin-top: -13px; margin-left: -40px;">
|
||||
<li style="margin-top: -2px;"><span
|
||||
style="font-size: 8px;color: #3b3f4f;">用户使用率:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="cpuUserRate">0</span></li>
|
||||
<li style="margin-top: -2px;"><span
|
||||
style="font-size: 8px;color: #3b3f4f;">系统使用率:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="cpuSysRate">0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">IO 等待率:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="cpuWaitRate">0</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="heapMemory-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 12px;color: #3b3f4f;justify-content: space-around;">堆内存:</span><span style="font-size: 15px;color: #020718;font-weight: bold" id="heapUsedRate" >0</span>
|
||||
<div id="heapMemory-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px; text-align: left;"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 12px;color: #3b3f4f;justify-content: space-around;">堆内存:</span><span
|
||||
style="font-size: 15px;color: #020718;font-weight: bold" id="heapUsedRate">0</span>
|
||||
<hr style="margin-top: 7px">
|
||||
<ul class="uk-list-bullet" style="text-align: left;margin-top: -13px">
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">初始值:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="heapInit" >0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">最大值:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="heapMax" >0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">已使用:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="heapUsed" >0</span></li>
|
||||
<ul class="uk-list-bullet" style="text-align: left;margin-top: -13px; margin-left: -40px;">
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">初始值:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="heapInit">0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">最大值:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="heapMax">0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">已使用:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="heapUsed">0</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="physicalMemory-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 12px;color: #3b3f4f;justify-content: space-around;">物理内存:</span><span style="font-size: 15px;color: #020718;font-weight: bold" id="physicalUsedRate" >0</span>
|
||||
<div id="physicalMemory-div" style="border-radius: 10px;background-color: #fefffe;padding: 20px; text-align: left;"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 12px;color: #3b3f4f;justify-content: space-around;">物理内存:</span><span
|
||||
style="font-size: 15px;color: #020718;font-weight: bold" id="physicalUsedRate">0</span>
|
||||
<hr style="margin-top: 7px">
|
||||
<ul class="uk-list-bullet" style="text-align: left;margin-top: -13px">
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">总物理内存:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="physicalAmount" >0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">已使用内存:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="physicalUsed" >0</span></li>
|
||||
<li style="margin-top: -2px;"><span style="font-size: 8px;color: #3b3f4f;">此程序占用:</span><span style="font-size: 12px;color: #020718;font-weight: bold" id="thisUsed" >0</span></li>
|
||||
<ul class="uk-list-bullet" style="text-align: left;margin-top: -13px; margin-left: -40px;">
|
||||
<li style="margin-top: -2px;"><span
|
||||
style="font-size: 8px;color: #3b3f4f;">总物理内存:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="physicalAmount">0</span>
|
||||
</li>
|
||||
<li style="margin-top: -2px;"><span
|
||||
style="font-size: 8px;color: #3b3f4f;">已使用内存:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="physicalUsed">0</span></li>
|
||||
<li style="margin-top: -2px;"><span
|
||||
style="font-size: 8px;color: #3b3f4f;">此程序占用:</span><span
|
||||
style="font-size: 12px;color: #020718;font-weight: bold" id="thisUsed">0</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -748,16 +852,22 @@
|
||||
<li style="margin-left: 20%;margin-right: 20%;">
|
||||
<div style="left: 35%;width: 350px;" class="uk-search uk-search-default">
|
||||
<span uk-search-icon></span>
|
||||
<input list="condidates" id="searchText" style="border-top: none;border-right: none;border-left: none;border-bottom: 1px solid lightgreen;color:#213121" class="uk-search-input" type="search" placeholder="搜索方法名或者类文件..." oninput="searchTip(event);" onkeydown="searchApis(event);">
|
||||
<input list="condidates" id="searchText"
|
||||
style="border-top: none;border-right: none;border-left: none;border-bottom: 1px solid lightgreen;color:#213121"
|
||||
class="uk-search-input" type="search" placeholder="搜索方法名或者类文件..."
|
||||
oninput="searchTip(event);" onkeydown="searchApis(event);">
|
||||
<datalist id="condidates" onkeydown="searchApis(event);">
|
||||
</datalist>
|
||||
</div>
|
||||
<ul id="apiList" style="background-color: rgba(245,242,242,0.96);padding: 10px;overflow-y: auto;max-height: 70%" class="uk-list uk-list-divider">
|
||||
<ul id="apiList" style="background-color: rgba(245,242,242,0.96);padding: 10px;overflow-y: auto;max-height: 70%"
|
||||
class="uk-list uk-list-divider">
|
||||
<li>method 1 1 <span class="uk-label uk-label-success">0</span></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li style="margin-left: 20%;margin-right: 20%;">
|
||||
<ul id="exceptionList" style="background-color: rgba(245,242,242,0.96);padding: 10px;overflow-y: auto;max-height: 73%" class="uk-list uk-list-divider">
|
||||
<ul id="exceptionList"
|
||||
style="background-color: rgba(245,242,242,0.96);padding: 10px;overflow-y: auto;max-height: 73%"
|
||||
class="uk-list uk-list-divider">
|
||||
<li>exception 1 1 <span class="uk-label uk-label-danger">未开启</span></li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -767,32 +877,42 @@
|
||||
</ul>
|
||||
<div style="margin-top: 20px;" class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid>
|
||||
<div>
|
||||
<div onclick="loadThreadsInfo('')" id="threadNum-div" style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div onclick="loadThreadsInfo('')" id="threadNum-div"
|
||||
style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">ALL</span><br>
|
||||
<span style="font-size: 30px;color: #020718;font-weight: bold" id="threadNum">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div onclick="loadThreadsInfo('RUNNABLE')" id="runnableNum-div" style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div onclick="loadThreadsInfo('RUNNABLE')" id="runnableNum-div"
|
||||
style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">RUNNABLE</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #29da93;font-weight: bold" id="runnableNum">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div onclick="loadThreadsInfo('BLOCKED')" id="blockedNum-div" style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div onclick="loadThreadsInfo('BLOCKED')" id="blockedNum-div"
|
||||
style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">BLOCKED</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #cc0c0c;font-weight: bold" id="blockedNum">0</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<div onclick="loadThreadsInfo('WAITING')" id="waitingNum-div" style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div onclick="loadThreadsInfo('WAITING')" id="waitingNum-div"
|
||||
style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">WAITING</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #ad7070;font-weight: bold" id="waitingNum">0</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<div onclick="loadThreadsInfo('TIMED_WAITING')" id="timedWaitingNum-div" style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px" class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<div onclick="loadThreadsInfo('TIMED_WAITING')" id="timedWaitingNum-div"
|
||||
style="cursor:pointer;border-radius: 10px;background-color: #fefffe;padding: 20px"
|
||||
class="uk-card uk-card-default uk-card-body uk-label-success">
|
||||
<span style="font-size: 10px;color: #3b3f4f">TIMED_WAITING</span>
|
||||
<br>
|
||||
<span style="font-size: 30px;color: #ad7070;font-weight: bold" id="timedWaitingNum">0</span></div>
|
||||
@ -801,7 +921,9 @@
|
||||
<ul class="uk-flex-left" uk-tab>
|
||||
<li class="uk-active"><a href="#">线程列表</a></li>
|
||||
</ul>
|
||||
<ul id="threadList" style="background-color: rgba(245,242,242,0.96);padding: 10px;overflow-y: auto;max-height: 65%" class="uk-list uk-list-divider">
|
||||
<ul id="threadList"
|
||||
style="background-color: rgba(245,242,242,0.96);padding: 10px;overflow-y: auto;max-height: 65%"
|
||||
class="uk-list uk-list-divider">
|
||||
<li>thread 1 1 <span class="uk-label uk-label-success">0</span></li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -810,14 +932,19 @@
|
||||
<div id="classForm">
|
||||
<div uk-form-custom="target: true" class="uk-form-controls">
|
||||
<input id="classFile" name="classFile" type="file">
|
||||
<input id="form-file" style="width: 500px;border-radius: 5px" class="uk-input" type="text" placeholder="更新的类文件:编译过的.class文件" >
|
||||
<input id="form-file" style="width: 500px;border-radius: 5px" class="uk-input" type="text"
|
||||
placeholder="更新的类文件:编译过的.class文件">
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<input id="className" name="className" style="width: 500px;border-radius: 5px" class="uk-input" type="text" placeholder="更新的类全名:com.xx.xx.TestService" >
|
||||
<input id="className" name="className" style="width: 500px;border-radius: 5px" class="uk-input"
|
||||
type="text" placeholder="更新的类全名:com.xx.xx.TestService">
|
||||
<br>
|
||||
<br>
|
||||
<button type="button" onclick="updateClass();" style="width: 500px;background-color: #19985d;border-radius: 5px" class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom">确定</button>
|
||||
<button type="button" onclick="updateClass();"
|
||||
style="width: 500px;background-color: #19985d;border-radius: 5px"
|
||||
class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom">确定
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@ -828,7 +955,9 @@
|
||||
</ul>
|
||||
<ul class="uk-switcher uk-margin">
|
||||
<li>
|
||||
<div style="margin-top: 20px;" class="uk-grid-small uk-child-width-expand@s uk-text-left uk-card uk-card-default uk-card-body" style="border-radius: 5px" uk-grid>
|
||||
<div style="margin-top: 20px;"
|
||||
class="uk-grid-small uk-child-width-expand@s uk-text-left uk-card uk-card-default uk-card-body"
|
||||
style="border-radius: 5px" uk-grid>
|
||||
<div class="layui-tab-item">
|
||||
<label>开启koTime:</label> <input id='kotimeEnable' type="checkbox" checked>
|
||||
<br>
|
||||
@ -844,9 +973,15 @@
|
||||
<option value="english">英文</option>
|
||||
</select>
|
||||
<br>
|
||||
<label >方法运行时间阈值:</label> <input id='timeThreshold' type="input"><button style="background-color: #177ce1;border: 1px solid #177ce1;cursor: pointer;color: white" id="timeThresholdYes">确认</button>
|
||||
<label>方法运行时间阈值:</label> <input id='timeThreshold' type="input">
|
||||
<button style="background-color: #177ce1;border: 1px solid #177ce1;cursor: pointer;color: white"
|
||||
id="timeThresholdYes">确认
|
||||
</button>
|
||||
<br>
|
||||
<label >清空链路数据:</label><button style="background-color: #177ce1;border: 1px solid #177ce1;cursor: pointer;color: white" id="clearDataYes">确认</button>
|
||||
<label>清空链路数据:</label>
|
||||
<button style="background-color: #177ce1;border: 1px solid #177ce1;cursor: pointer;color: white"
|
||||
id="clearDataYes">确认
|
||||
</button>
|
||||
<br>
|
||||
<br>
|
||||
<div class="uk-alert-success" uk-alert>
|
||||
@ -858,10 +993,14 @@
|
||||
</li>
|
||||
<li>
|
||||
<div class="uk-card uk-card-default uk-card-body" style="border-radius: 5px">
|
||||
<textarea id="dynamicText" class="uk-textarea" placeholder="" wrap="off" style="overflow-y: auto;height: 65%;resize: none;overflow-x: auto"></textarea>
|
||||
<textarea id="dynamicText" class="uk-textarea" placeholder="" wrap="off"
|
||||
style="overflow-y: auto;height: 65%;resize: none;overflow-x: auto"></textarea>
|
||||
<br>
|
||||
<br>
|
||||
<button type="button" onclick="updateDynamicProperties();" style="width: 100%;background-color: #19985d;border-radius: 5px" class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom">更新</button>
|
||||
<button type="button" onclick="updateDynamicProperties();"
|
||||
style="width: 100%;background-color: #19985d;border-radius: 5px"
|
||||
class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom">更新
|
||||
</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@ -871,12 +1010,29 @@
|
||||
<script src='https://gitee.com/huoyo/ko-time/widget_preview' async defer></script>
|
||||
<div id="osc-gitee-widget-tag"></div>
|
||||
<style>
|
||||
.osc_pro_color {color: #ffffff !important;}
|
||||
.osc_panel_color {background-color: #1e252b !important;}
|
||||
.osc_background_color {background-color: #323d47 !important;}
|
||||
.osc_border_color {border-color: #455059 !important;}
|
||||
.osc_desc_color {color: #d7deea !important;}
|
||||
.osc_link_color * {color: #99a0ae !important;}
|
||||
.osc_pro_color {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.osc_panel_color {
|
||||
background-color: #1e252b !important;
|
||||
}
|
||||
|
||||
.osc_background_color {
|
||||
background-color: #323d47 !important;
|
||||
}
|
||||
|
||||
.osc_border_color {
|
||||
border-color: #455059 !important;
|
||||
}
|
||||
|
||||
.osc_desc_color {
|
||||
color: #d7deea !important;
|
||||
}
|
||||
|
||||
.osc_link_color * {
|
||||
color: #99a0ae !important;
|
||||
}
|
||||
</style>
|
||||
<br>
|
||||
<div class="uk-alert-success" uk-alert>
|
||||
@ -892,7 +1048,9 @@
|
||||
<div class="uk-modal-dialog" style="width: 75%">
|
||||
<button class="uk-modal-close-default" type="button" uk-close></button>
|
||||
<div class="uk-modal-body uk-margin-auto-vertical" uk-overflow-auto>
|
||||
<ul id="thread-detail" style="background-color: rgba(245,242,242,0.96);padding: 10px;overflow-y: auto;max-height: 70%" class="uk-list uk-list-divider">
|
||||
<ul id="thread-detail"
|
||||
style="background-color: rgba(245,242,242,0.96);padding: 10px;overflow-y: auto;max-height: 70%"
|
||||
class="uk-list uk-list-divider">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="uk-modal-footer uk-text-right">
|
||||
@ -958,7 +1116,8 @@
|
||||
</div>
|
||||
<div class="uk-margin">
|
||||
<div class="uk-inline">
|
||||
<a class="uk-button uk-button-default uk-label-success" style="border-radius: 5px" onclick="login();" >确定</a>
|
||||
<a class="uk-button uk-button-default uk-label-success" style="border-radius: 5px"
|
||||
onclick="login();">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -974,8 +1133,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--<div class="uk-margin-medium-bottom" style="position:absolute;top:95%;left:45%;text-align:center;">-->
|
||||
<!-- <ul class="uk-flex-center" uk-tab>-->
|
||||
<!-- <li class=""><a style="font-size: 7px;text-transform:capitalize" href="#">@2021 Huoyo</a></li>-->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user