监控日志服务

parent e2c9f84a
......@@ -22,6 +22,10 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
<!-- 布局功能的支持程序 thymeleaf3主程序 layout2以上版本 -->
<!-- thymeleaf2 layout1-->
<thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>
</properties>
<dependencies>
......@@ -50,6 +54,12 @@
<artifactId>druid</artifactId>
<version>1.1.8</version>
</dependency>
<!-- webSocket -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<!--lombok包-->
<dependency>
<groupId>org.projectlombok</groupId>
......@@ -67,7 +77,10 @@
<artifactId>ganymed-ssh2</artifactId>
<version>build210-hudson-1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
......
......@@ -24,6 +24,9 @@ public class ServicesRest {
private String stopRest;
//监控服务心跳
private String reportRest;
//实时日志推送
private String LogsRest;
//调用运行监控微服务shell脚本位置(注意:不建议修改)
private String shellPaht;
// 启动tomcat
......@@ -32,6 +35,10 @@ public class ServicesRest {
private String stopTomcatName;
// 监控tomcat
private String reportTomcatName;
// 监控tomcat
private String LogsTomcatName;
......
package com.cc.config;
/**
* Created by changc on 2018/9/18.
*/
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
/**
* 配置WebSocket
*/
@Configuration
//注解开启使用STOMP协议来传输基于代理(message broker)的消息,这时控制器支持使用@MessageMapping,就像使用@RequestMapping一样
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
@Override
//注册STOMP协议的节点(endpoint),并映射指定的url
public void registerStompEndpoints(StompEndpointRegistry registry) {
//注册一个STOMP的endpoint,并指定使用SockJS协议
registry.addEndpoint("/alllogs").setAllowedOrigins("*").withSockJS();
}
@Override
//配置消息代理(Message Broker)
public void configureMessageBroker(MessageBrokerRegistry registry) {
//点对点应配置一个/user消息代理,广播式应配置一个/topic消息代理
registry.enableSimpleBroker("/topic","/user");
//点对点使用的订阅前缀(客户端订阅路径上会体现出来),不设置的话,默认也是/user/
registry.setUserDestinationPrefix("/user");
}
}
\ No newline at end of file
......@@ -32,10 +32,9 @@ public class ServiceRestController {
初始化
*/
@GetMapping("/")
@ResponseBody
public String hello(Model model){
model.addAttribute("msg","你好");
return "login";
model.addAttribute("hello","你好");
return "hello";
}
/*
启动/关闭 tomcat
......
package com.cc.controller;
import com.cc.bean.Services;
import com.cc.service.ServiceService;
import com.cc.serviceutil.LogsReport;
import com.cc.serviceutil.RemoteShellLogExecutor;
import com.cc.serviceutil.ServiceReport;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpSession;
import static com.cc.serviceutil.PropertieUtil.writeProperties;
/**
* Created by changc on 2018/9/18.
*/
@Slf4j
@Controller
public class WebSocketController {
@Autowired
ServiceService serviceService;
@Autowired
LogsReport logsReport;
//初始化
@GetMapping ("/logs")
public String logs(String ip, String ipUsername, String ipPassword, String kssj, String jssj,String servletPath) throws Exception {
writeProperties("logs.properties", "ip", ip);
writeProperties("logs.properties", "ipUsername", ipUsername);
writeProperties("logs.properties", "ipPassword", ipPassword);
writeProperties("logs.properties", "servletPath", servletPath);
writeProperties("logs.properties", "kssj", "");
writeProperties("logs.properties", "jssj", "");
return "logs";
}
//条件查询
@GetMapping ("/tjlogs")
public String logstime( String kssj, String jssj) throws Exception {
if(StringUtils.isEmpty(kssj)){
writeProperties("logs.properties", "kssj", "");
writeProperties("logs.properties", "jssj", "");
}else{
writeProperties("logs.properties", "kssj", kssj);
writeProperties("logs.properties", "jssj", jssj);
}
return "logs";
}
}
......@@ -12,5 +12,7 @@ public interface ServiceService {
XzxtRestResult RemoteShellExecutor(String ip, String ipUsername, String ipPassword,
String shellPaht ,String shellname,String servletPath);
XzxtRestResult RemoteShellLogExecutor(String ip, String ipUsername, String ipPassword,
String shellPaht ,String shellname,String servletPath,String kssj,String jssj);
}
......@@ -3,6 +3,7 @@ package com.cc.service.serviceimpl;
import com.cc.service.ServiceService;
import com.cc.serviceutil.RemoteShellExecutor;
import com.cc.serviceutil.RemoteShellLogExecutor;
import com.cc.serviceutil.XzxtRestResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
......@@ -25,4 +26,18 @@ public class ServiceIServiceImpl implements ServiceService {
return XzxtRestResult.ok(202,"调用失败",null);
}
}
@Override
public XzxtRestResult RemoteShellLogExecutor(String ip, String ipUsername, String ipPassword,String shellPaht ,String shellname,String servletPath,String kssj,String jssj) {
RemoteShellLogExecutor executor = new RemoteShellLogExecutor(ip, ipUsername, ipPassword);
// 执行myTest.sh 参数为java Know dummy
try {
///usr/local/startTomcat.sh
String shell=shellPaht+shellname;
System.out.println("调用shell文件地址:====="+shell+" \""+servletPath+"\"");
return XzxtRestResult.build(201,"调用成功",executor.exec(shell+" \""+servletPath+"\" \"" + kssj + "\" \"" + jssj + "\""));
} catch (Exception e) {
e.printStackTrace();
return XzxtRestResult.ok(202,"调用失败",null);
}
}
}
package com.cc.serviceutil;
import com.cc.bean.Services;
import com.cc.bean.ServicesRest;
import com.cc.service.CrudService;
import com.cc.service.ServiceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static com.cc.serviceutil.PropertieUtil.readValue;
/**
* Created by changc on 2018/9/11.
*/
@Slf4j
@Component
public class LogsReport {
@Autowired
private SimpMessagingTemplate template;
@Autowired
private ServicesRest servicesRest;
@Autowired
ServiceService serviceService;
//日志
@Scheduled(cron = "*/15 * * * * ?") //30秒
@Async("taskExecutor")
public void sendTopicMessage() {
log.info("=====>>>>>日志推送开启========");
//调用日志服务
String ip = readValue("logs.properties", "ip");
String ipUsername = readValue("logs.properties", "ipUsername");
String ipPassword = readValue("logs.properties", "ipPassword");
String servletPath = readValue("logs.properties", "servletPath");
String kssj = readValue("logs.properties", "kssj");
String jssj = readValue("logs.properties", "jssj");
//初始化
if(StringUtils.isEmpty(kssj)){
Date day=new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
System.out.println(df.format(day).toString());
kssj = df.format(day).toString();
jssj = "";
}
log.info("=====>>>>>日志推送开启========kssj===="+kssj+"jssj==="+jssj);
String json=serviceService.RemoteShellLogExecutor(ip,ipUsername,ipPassword,servicesRest.getShellPaht(),servicesRest.getLogsTomcatName(),servletPath,kssj,jssj).getData().toString();
//格式化
/* String reg = "\\d+\\-\\d+\\-\\d+";
Pattern pattern = Pattern.compile(reg);
Matcher matcher = pattern.matcher(json);
while (matcher.find()) {
System.out.println(matcher.group());
json.replaceAll(matcher.group(), "<br>"+matcher.group());
}*/
//String json="2018-09-20 00:06:47.958 [信息] [org.apache.catalina.core.AprLifecycleListener] org.apache.catalina.core.AprLifecycleListener init The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2018-09-20 00:06:48.978 [信息] [org.apache.coyote.http11.Http11Protocol] org.apache.coyote.AbstractProtocol init Initializing ProtocolHandler [\"http-bio-8080\"] 2018-09-20 00:06:48.996 [信息] [org.apache.coyote.ajp.AjpProtocol] org.apache.coyote.AbstractProtocol init Initializing ProtocolHandler [\"ajp-bio-8009\"] 2018-09-20 00:06:49.000 [信息] [org.apache.catalina.startup.Catalina] org.apache.catalina.startup.Catalina load Initialization processed in 1818 ms 2018-09-20 00:06:49.040 [信息] [org.apache.catalina.core.StandardService] org.apache.catalina.core.StandardService startInternal Starting service Catalina 2018-09-20 00:06:49.044 [信息] ";
json = json.replaceAll("\\[信息\\]","\\[信息\\]:<br>");
json = json.replaceAll("2018","<br>2018");
Services services = new Services();
services.setServiceName("<h2 id=\"json\">"+json+"</h2>");
this.template.convertAndSend("/topic/getResponse", services);
}
}
package com.cc.serviceutil;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.Properties;
import org.apache.log4j.Logger;
public class PropertieUtil {
private static Logger logger = Logger.getLogger(PropertieUtil.class);
private PropertieUtil() {
}
/**
* 读取配置文件某属性
*/
public static String readValue(String filePath, String key) {
Properties props = new Properties();
try {
// 注意路径以 / 开始,没有则处理
if (!filePath.startsWith("/"))
filePath = "/" + filePath;
InputStream in = PropertieUtil.class.getResourceAsStream(filePath);
props.load(in);
String value = props.getProperty(key);
return value;
} catch (Exception e) {
logger.error(e);
return null;
}
}
/**
* 打印配置文件全部内容(filePath,配置文件名,如果有路径,props/test.properties)
*/
public static void readProperties(String filePath) {
Properties props = new Properties();
try {
// 注意路径以 / 开始,没有则处理
if (!filePath.startsWith("/"))
filePath = "/" + filePath;
InputStream in = PropertieUtil.class.getResourceAsStream(filePath);
props.load(in);
Enumeration<?> en = props.propertyNames();
// 遍历打印
while (en.hasMoreElements()) {
String key = (String) en.nextElement();
String Property = props.getProperty(key);
logger.info(key + ":" + Property);
}
} catch (Exception e) {
logger.error(e);
}
}
/**
* 将值写入配置文件
*/
public static void writeProperties(String fileName, String parameterName, String parameterValue) throws Exception {
// 本地测试特别注意,如果是maven项目,请到\target目录下查看文件,而不是源代码下
// 注意路径不能加 / 了,加了则移除掉
if (fileName.startsWith("/"))
fileName.substring(1);
String filePath = PropertieUtil.class.getResource("/").getPath()+fileName;
// 获取配置文件
Properties pps = new Properties();
InputStream in = new BufferedInputStream(new FileInputStream(filePath));
pps.load(in);
in.close();
OutputStream out = new FileOutputStream(filePath);
// 设置配置名称和值
pps.setProperty(parameterName, parameterValue);
// comments 等于配置文件的注释
pps.store(out, "Update " + parameterName + " name");
out.flush();
out.close();
}
public static void main(String[] args) throws Exception {
// readProperties("application.properties");
// logger.info(readValue("jdbc.properties", "JAVABLOG_WRITE_URL"));
writeProperties("application.properties", "serviceid", "2");
logger.info(readValue("application.properties", "serviceid"));
}
}
\ No newline at end of file
......@@ -11,6 +11,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RemoteShellExecutor {
......@@ -81,7 +83,7 @@ public class RemoteShellExecutor {
session.waitForCondition(ChannelCondition.EXIT_STATUS, TIME_OUT);
//System.out.print("outStr==================" + outStr);
System.out.print("outStr==================" + outStr);
if(outStr.indexOf("success")>0){
ret="success";
}else{
......@@ -119,11 +121,20 @@ public class RemoteShellExecutor {
return sb.toString();
}
public static void main(String args[]) throws Exception {
RemoteShellExecutor executor = new RemoteShellExecutor("192.168.193.133", "root", "18234077206");
// 执行myTest.sh 参数为java Know dummy
// ./startTomcat.sh "/usr/local/tomcat-portal"
System.out.println(executor.exec("/usr/local/reportTomcat.sh \"/usr/local/tomcat-portal\""));
//RemoteShellExecutor executor = new RemoteShellExecutor("192.168.193.133", "root", "18234077206");
// 执行myTest.sh 参数为java Know dummy
// ./startTomcat.sh "/usr/local/tomcat-portal"
//System.out.println(executor.exec("/usr/local/reportTomcat.sh \"/usr/local/tomcat-portal\""));
//System.out.println(executor.exec("/usr/local/tomcatLogs.sh \"/usr/local/tomcat-portal\" \"\" \"\" "));
//System.out.println(executor.exec("/usr/local/startTomcat.sh \"/usr/local/tomcat-portal11\""));
// System.out.println(executor.exec("/usr/local/shutTomcat.sh \"/usr/local/tomcat-portal\""));
// System.out.println(executor.exec("/usr/local/shutTomcat.sh \"/usr/local/tomcat-portal\""));
String str = "2018-09-20 00:06:47.958 [信息] [org.apache.catalina.core.AprLifecycleListener] org.apache.catalina.core.A";
String reg = "\\d+\\-\\d+\\-\\d+";
Pattern pattern = Pattern.compile(reg);
Matcher matcher = pattern.matcher(str);
while (matcher.find()) {
System.out.println(matcher.group());
}
}
}
\ No newline at end of file
package com.cc.serviceutil;
import ch.ethz.ssh2.ChannelCondition;
import ch.ethz.ssh2.Connection;
import ch.ethz.ssh2.Session;
import ch.ethz.ssh2.StreamGobbler;
import org.apache.commons.io.IOUtils;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.Stack;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RemoteShellLogExecutor {
private Connection conn;
/** 远程机器IP */
private String ip;
/** 用户名 */
private String osUsername;
/** 密码 */
private String password;
private String charset = Charset.defaultCharset().toString();
private static final int TIME_OUT = 1000 * 5 * 60;
/**
* 构造函数
* @param ip
* @param usr
* @param pasword
*/
public RemoteShellLogExecutor(String ip, String usr, String pasword) {
this.ip = ip;
this.osUsername = usr;
this.password = pasword;
}
/**
* 登录
* @return
* @throws IOException
*/
private boolean login() throws Exception {
conn = new Connection(ip);
try {
conn.connect();
boolean connect=conn.authenticateWithPassword(osUsername, password);
return connect;
} catch (IOException e) {
throw new MyException("服务端远程机器未启动" + ip); // 自定义异常类 实现略
}
}
/**
* 执行脚本
*
* @param cmds
* @return
* @throws Exception
*/
public String exec(String cmds) throws Exception {
InputStream stdOut = null;
InputStream stdErr = null;
String outStr = "";
String outErr = "";
String ret = "";
try {
if (login()) {
// Open a new {@link Session} on this connection
Session session = conn.openSession();
// Execute a command on the remote machine.
session.execCommand(cmds);
stdOut = new StreamGobbler(session.getStdout());
outStr = processStream(stdOut, charset);
stdErr = new StreamGobbler(session.getStderr());
outErr = processStream(stdErr, charset);
session.waitForCondition(ChannelCondition.EXIT_STATUS, TIME_OUT);
//System.out.print("outStr==================" + outStr);
/* if(outStr.indexOf("success")>0){
ret="success";
}else{
ret="failed";
}*/
ret=outStr;
//System.out.println("outErr==================" + outErr);
//System.out.println("result==============>" + ret);
} else {
throw new MyException("登录远程机器失败" + ip); // 自定义异常类 实现略
}
} finally {
if (conn != null) {
conn.close();
}
IOUtils.closeQuietly(stdOut);
IOUtils.closeQuietly(stdErr);
}
return ret;
}
/**
* @param in
* @param charset
* @return
* @throws IOException
* @throws UnsupportedEncodingException
*/
private String processStream(InputStream in, String charset) throws Exception {
byte[] buf = new byte[1024];
StringBuilder sb = new StringBuilder();
while (in.read(buf) != -1) {
sb.append(new String(buf, charset));
}
return sb.toString();
}
public static void main(String args[]) throws Exception {
RemoteShellLogExecutor executor = new RemoteShellLogExecutor("192.168.193.133", "root", "18234077206");
// 执行myTest.sh 参数为java Know dummy
// ./startTomcat.sh "/usr/local/tomcat-portal"
//System.out.println(executor.exec("/usr/local/reportTomcat.sh \"/usr/local/tomcat-portal\""));
// executor.exec("/usr/local/tomcatLogs.sh \"/usr/local/tomcat-portal\" \"2018-09-20 00:06:57\" \"2018-09-20 00:07:02\" ");
// System.out.println(executor.exec("/usr/local/tomcatLogs.sh \"/usr/local/tomcat-portal\" \"2018-09-20 00:07:02\" \"2018-09-20 00:07:02\" "));
//System.out.println(executor.exec("/usr/local/startTomcat.sh \"/usr/local/tomcat-portal11\""));
// System.out.println(executor.exec("/usr/local/shutTomcat.sh \"/usr/local/tomcat-portal\""));
String json="2018-09-20 00:06:47.958 [信息] [org.apache.catalina.core.AprLifecycleListener] org.apache.catalina.core.AprLifecycleListener init The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2018-09-20 00:06:48.978 [信息] [org.apache.coyote.http11.Http11Protocol] org.apache.coyote.AbstractProtocol init Initializing ProtocolHandler [\"http-bio-8080\"] 2018-09-20 00:06:48.996 [信息] [org.apache.coyote.ajp.AjpProtocol] org.apache.coyote.AbstractProtocol init Initializing ProtocolHandler [\"ajp-bio-8009\"] 2018-09-20 00:06:49.000 [信息] [org.apache.catalina.startup.Catalina] org.apache.catalina.startup.Catalina load Initialization processed in 1818 ms 2018-09-20 00:06:49.040 [信息] [org.apache.catalina.core.StandardService] org.apache.catalina.core.StandardService startInternal Starting service Catalina 2018-09-20 00:06:49.044 [信息] ";
//json.replaceAll("[信息]", "22222");
// String s1 = json.replaceAll("信息","22");
// String s2 = json.replaceAll("信息","333");
String regex = "(?<=\\[)(\\S+)(?=\\])";
json = json.replaceAll("\\[信息\\]","\\[信息\\]<br>");
json = json.replaceAll("2018","<br>2018");
/* Pattern pattern = Pattern.compile (regex);
Matcher matcher = pattern.matcher (json);
while (matcher.find ())
{
System.out.println (matcher.group ().replaceAll(matcher.group (),matcher.group ()+"<br>"));
}*/
System.out.println(json);
}
}
\ No newline at end of file
......@@ -32,8 +32,8 @@ public class ServiceReport {
//心跳机制
@Scheduled(cron = "*/30 * * * * ?") //30秒
//@Scheduled(cron = "0 */1 * * * ?") //一分钟
//@Scheduled(cron = "*/30 * * * * ?") //30秒
@Scheduled(cron = "0 */1 * * * ?") //一分钟
@Async("taskExecutor")
public XzxtRestResult ServiceReport(){
//System.out.println("心跳开始------------------------------------》");
......
......@@ -29,15 +29,10 @@ mybatis:
# 指定sql映射文件位置
mapper-locations: classpath:mybatis/mapper/*.xml
service-rest:
startRest: "http://127.0.0.1:8081/service-rest/start"
stopRest: "http://127.0.0.1:8081/service-rest/stop"
reportRest: "http://127.0.0.1:8081/service-rest/report"
# 调用运行监控微服务shell脚本位置(注意:不建议修改)
shellPaht: "/usr/local/"
# 调用运行监控微服务shell脚本
startTomcatName: "startTomcat.sh"
stopTomcatName: "shutTomcat.sh"
reportTomcatName: "reportTomcat.sh"
LogsTomcatName: "tomcatLogs.sh"
ThreadPool:
#核心线程数
corePoolSize: 20
......
#洢ķϢ
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
var stompClient = null;
//加载完浏览器后 调用connect(),打开双通道
$(function(){
//打开双通道
connect()
$(window).resize(function(){
$("iframe").contents().find('body').css({"min-height":$(document).height()-104});
$("iframe").height($(document).height()-104);
})
})
//强制关闭浏览器 调用websocket.close(),进行正常关闭
window.onunload = function() {
disconnect()
}
function connect(){
var socket = new SockJS('http://localhost:8081/service-rest/alllogs'); //连接SockJS的endpoint名称为"endpointOyzc"
var res="";
stompClient = Stomp.over(socket);//使用STMOP子协议的WebSocket客户端
stompClient.connect({},function(frame){//连接WebSocket服务端
console.log('Connected:' + frame);
//通过stompClient.subscribe订阅/topic/getResponse 目标(destination)发送的消息
stompClient.subscribe('/topic/getResponse',function(response){
res=showResponse(JSON.parse(response.body));
});
});
return res
}
//关闭双通道
function disconnect(){
if(stompClient != null) {
stompClient.disconnect();
}
console.log("Disconnected");
}
function showResponse(message){
var response = $("#response");
var str=message.serviceName;
//富文本
layui.use('layedit', function(){
var layedit = layui.layedit;
var index =layedit.build('response'); //建立编辑器
layedit.setContent(index, str);
//$('#response').val(str);
console.log($("iframe").contents().find('body')[0].scrollHeight);
var scrollheight=$("iframe").contents().find('body')[0].scrollHeight;
$("iframe").contents().find('body').scrollTop(scrollheight);
$("iframe").contents().find('body').css({"min-height":$(document).height()-104});
$("iframe").height($(document).height()-104);
});
}
\ No newline at end of file
/** layui-v2.4.3 MIT License By https://www.layui.com */
blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')} .layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} .layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important} .layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important} .layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1} .layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0} .layui-edge{border-style:dashed;border-color:transparent;overflow:hidden} .layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap} .layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none} .layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important} .layui-circle{border-radius:100%} .layui-show{display:block!important} .layui-hide{display:none!important} .layui-upload-iframe{border:0;visibility:hidden} .layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)} @-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}} @keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}} .layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale} @-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}} @keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}} .layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up} @-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}} @keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}} .layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left} @-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}} @keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}} .layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right} @-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}} @keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}} .layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout} @-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}} @keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}} .layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout} .layui-m-layer{position:relative;z-index:19891014} .layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box} .layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%} .layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto} .layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none} .layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center} .layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s} .layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px} .layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0} .layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff} .layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center} .layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap} .layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center} .layui-m-layer1 .layui-m-layercont{padding:0;text-align:left} .layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0} .layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both} .layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px} .layui-m-layer2 .layui-m-layercont p{margin-top:20px} @-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}} @keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}} .layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s} .layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s} .layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px} .layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2} .layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer} .layui-m-layerbtn span[yes]{color:#40AFFE} .layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px} .layui-m-layerbtn span:active{background-color:#F6F6F6} .layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px} .layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px} .layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)} body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0} .layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)} .layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none} .layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)} .layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px} .layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px} body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff} .layui-m-layer-msg .layui-m-layercont{padding:10px 20px}
\ No newline at end of file
/** layui-v2.4.3 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
\ No newline at end of file
/** layui-v2.4.3 MIT License By https://www.layui.com */
.laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment