All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.plumelog.js.app.eefc547c.js Maven / Gradle / Ivy

The newest version!
(function(e){function t(t){for(var s,r,o=t[0],l=t[1],c=t[2],u=0,h=[];u0?a("tr",[a("td",{staticClass:"key"},[e._v("扩展字段")]),a("td",[a("Select",{staticStyle:{width:"150px","margin-right":"10px"},attrs:{"label-in-value":"",placeholder:"选择扩展字段"},on:{"on-change":e.selectExtendHandler},model:{value:e.select_extend,callback:function(t){e.select_extend=t},expression:"select_extend"}},e._l(e.extendList,(function(t){return a("Option",{key:t.field,attrs:{value:t.field}},[e._v(e._s(t.fieldName))])})),1),a("Input",{staticClass:"txt",staticStyle:{width:"478px"},attrs:{clearable:!0,placeholder:"输入查询内容"},on:{"on-enter":e.addExtendTag},model:{value:e.extendTag,callback:function(t){e.extendTag=t},expression:"extendTag"}}),a("Button",{staticStyle:{"margin-left":"10px",width:"100px"},attrs:{icon:"md-add"},on:{click:e.addExtendTag}},[e._v("添加")])],1)]):e._e(),e.extendOptions.length>0?a("tr",[a("td"),a("td",e._l(e.extendOptions,(function(t,s){return a("Tag",{key:s,attrs:{closable:"",size:"medium"},on:{"on-close":function(t){return e.closeExtendTag(s)}}},[s>0?[e._v(e._s(t.type)+" ")]:e._e(),e._v(" "+e._s(t.label)+":"+e._s(t.tag)+" ")],2)})),1)]):e._e(),e.useSearchQuery?e._e():a("tr",[a("td",{staticClass:"key"},[e._v("内容")]),a("td",[a("Input",{staticStyle:{width:"720px"},attrs:{clearable:!0,placeholder:"输入搜索内容"},on:{"on-enter":function(t){return e.doSearch()}},model:{value:e.searchKey,callback:function(t){e.searchKey=t},expression:"searchKey"}}),a("a",{staticClass:"link_changeModal",attrs:{href:"javascript:void(0)"},on:{click:function(t){e.useSearchQuery=!0}}},[e._v("切换为条件模式")])],1)]),e.useSearchQuery?a("tr",[a("td",{staticClass:"key"},[e._v("条件")]),a("td",[e.searchOptions.length>0?a("Select",{staticStyle:{width:"80px","margin-right":"10px"},model:{value:e.selectOption,callback:function(t){e.selectOption=t},expression:"selectOption"}},[a("Option",{key:"AND",attrs:{value:"AND"}},[e._v("AND")]),a("Option",{key:"OR",attrs:{value:"OR"}},[e._v("OR")]),a("Option",{key:"NOT",attrs:{value:"NOT"}},[e._v("NOT")])],1):e._e(),a("Input",{staticClass:"txt",staticStyle:{width:"224px"},attrs:{clearable:!0,placeholder:"输入搜索条件"},on:{"on-enter":function(t){return e.addTag()}},model:{value:e.tag,callback:function(t){e.tag=t},expression:"tag"}}),a("Button",{staticStyle:{"margin-left":"10px"},attrs:{icon:"md-add"},on:{click:e.addTag}},[e._v("添加")]),a("a",{staticClass:"link_changeModal",attrs:{href:"javascript:void(0)"},on:{click:function(t){e.useSearchQuery=!1}}},[e._v("切换为内容模式")])],1)]):e._e(),e.useSearchQuery?a("tr",[a("td"),a("td",e._l(e.searchOptions,(function(t,s){return a("Tag",{key:s,attrs:{closable:""},on:{"on-close":function(t){return e.closeTag(s)}}},[s>0?[e._v(e._s(t.type)+" ")]:e._e(),e._v(" "+e._s(t.tag)+" ")],2)})),1)]):e._e(),a("tr",[a("td"),a("td",{staticStyle:{"padding-top":"8px",position:"relative"}},[a("Button",{staticStyle:{"margin-right":"10px"},attrs:{type:"primary",icon:"ios-search"},on:{click:e.doSearch}},[e._v("查询")]),a("Button",{on:{click:e.clear}},[e._v("重置")])],1)])])]),a("Carousel",{attrs:{arrow:"never"},model:{value:e.slideIndex,callback:function(t){e.slideIndex=t},expression:"slideIndex"}},[a("CarouselItem",[a("div",{staticClass:"chart",attrs:{id:"myChart"}})]),a("CarouselItem",[a("div",{staticClass:"chart",attrs:{id:"errorChart"}})])],1)]:e._e(),a("div",{staticStyle:{clear:"both"}})],2),a("div",{staticClass:"pnl_content"},[e.showFilter?a("div",{staticClass:"icon_arrow up",on:{click:e.setShowFilter}},[a("Icon",{directives:[{name:"show",rawName:"v-show",value:e.showFilter,expression:"showFilter"}],attrs:{type:"ios-arrow-up"}}),a("span",{staticClass:"text"},[e._v("收起")])],1):e._e(),a("div",{staticStyle:{position:"absolute",top:"-30px",right:"20px"}},[e._v("共 "),a("b",[e._v(e._s(e.totalCount))]),e._v(" 条数据")]),e.tableModel?a("div",[a("div",{staticClass:"tip_table"},[a("Icon",{attrs:{size:"14",type:"md-star-outline"}}),e._v(" 表格字段宽度可拖拽调节,双击或点击箭头可查看详情 ")],1),a("Table",{attrs:{size:"small",border:"","highlight-row":"",columns:e.showColumns,content:e.self,"row-class-name":e.getRowName,data:e.list.hits},on:{"on-row-dblclick":e.dblclick},scopedSlots:e._u([{key:"className",fn:function(t){var s=t.row;return[e._v(" "+e._s(e._f("substr")(s.className))+" "),s.className?a("Icon",{attrs:{type:"ios-search"},on:{click:function(t){return e.doSearch("className",s)}}}):e._e()]}},{key:"logLevel",fn:function(t){var s=t.row;return[e._v(" "+e._s(s.logLevel)+" "),s.logLevel?a("Icon",{attrs:{type:"ios-search"},on:{click:function(t){return e.doSearch("logLevel",s)}}}):e._e()]}},{key:"serverName",fn:function(t){var s=t.row;return[e._v(" "+e._s(s.serverName)+" "),s.serverName?a("Icon",{attrs:{type:"ios-search"},on:{click:function(t){return e.doSearch("serverName",s)}}}):e._e()]}},{key:"appName",fn:function(t){var s=t.row;return[e._v(" "+e._s(s.appName)+" "),s.appName?a("Icon",{attrs:{type:"ios-search"},on:{click:function(t){return e.doSearch("appName",s)}}}):e._e()]}},{key:"env",fn:function(t){var s=t.row;return[e._v(" "+e._s(s.env)+" "),s.env?a("Icon",{attrs:{type:"ios-search"},on:{click:function(t){return e.doSearch("env",s)}}}):e._e()]}},{key:"traceId",fn:function(t){var s=t.row;return[a("a",{attrs:{href:"./#/trace?traceId="+s.traceId+"&timeRange="+JSON.stringify(e.dateTimeRange),title:"点击查看链路追踪"}},[e._v(e._s(s.traceId))]),s.traceId?a("Icon",{attrs:{type:"ios-shuffle"},on:{click:function(t){return e.doSearchByTraceId(s)}}}):e._e()]}},{key:"content",fn:function(t){var s=t.row;return[a("div",{staticStyle:{"white-space":"pre-wrap","max-height":"100px"}},e._l(e.highLightCode(s.highlightCnt||s.content,!!s.highlightCnt),(function(t){return a("span",[t.isH?a("span",{domProps:{innerHTML:e._s(t.content)}}):a("span",[e._v(e._s(t.content))])])})),0)]}}],null,!1,1571767208)})],1):a("div",{style:this.darkMode&&!this.autoWordWrap?"padding:0 0 0 10px":"padding:0 10px"},[a("div",{staticClass:"log_model_normal",class:[e.autoWordWrap?"auto_word_wrap":"word_inline",e.darkMode?"dark_mode":"bright_mode"]},e._l(e.list.hits,(function(t){return a("div",{staticClass:"log_model_normal_row",on:{mouseenter:function(t){return e.logModelNormalRowMouseEnter(t)},mouseleave:function(t){return e.logModelNormalRowMouseLeave(t)}}},[a("div",{staticClass:"log_model_normal_row_selector row_over_flow_hidden"},[a("Tooltip",{attrs:{placement:"top-start",delay:"1500"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("table",[a("tbody",[a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("logTime:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(e.dateFormat(t.dtTime)))])]),t.dateTime?a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("serverTime:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.dateTime))])]):e._e(),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("logLevel:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.logLevel))])]),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("appName:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.appName))])]),t.env?a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("env:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.env))])]):e._e(),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("serverName:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.serverName))])]),t.threadName?a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("threadName:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.threadName))])]):e._e(),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("traceId:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.traceId))])]),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("className:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.className+"."+t.method))])])])])]),a("span",{class:t.logLevel},[a("span",{attrs:{title:"日志时间: "+e.dateFormat(t.dtTime)}},[e._v(e._s(e.dateFormat(t.dtTime)))]),e.showTheColumn("logLevel")?a("span",{staticClass:"row_underline row_search",attrs:{title:"点击查询日志等级: "+t.logLevel},on:{click:function(a){return e.doSearch("logLevel",t)}}},[e._v(e._s(t.logLevel))]):e._e(),e.showTheColumn("appName")?a("span",{staticClass:"row_app_name row_underline row_search",attrs:{title:"点击查询应用名称: "+t.appName},on:{click:function(a){return e.doSearch("appName",t)}}},[e._v(e._s(t.appName))]):e._e(),t.env&&e.showTheColumn("env")?a("span",{staticClass:"row_env row_underline row_search",attrs:{title:"点击查询应用环境: "+t.env},on:{click:function(a){return e.doSearch("env",t)}}},[e._v(e._s(t.env))]):e._e(),e.showTheColumn("serverName")?a("span",{staticClass:"row_server_name row_underline row_search",attrs:{title:"点击查询服务器名称: "+t.serverName},on:{click:function(a){return e.doSearch("serverName",t)}}},[e._v(e._s(t.serverName))]):e._e(),t.traceId&&e.showTheColumn("traceId")?a("span",{staticClass:"row_trace_id row_underline row_search",attrs:{title:"点击查询TraceId: "+t.traceId},on:{click:function(a){return e.doSearchByTraceId(t)}}},[e._v(e._s(t.traceId))]):e._e(),e.showTheColumn("className")?a("span",{staticClass:"row_class_name row_underline row_search",attrs:{title:"点击查询类名: "+t.className},on:{click:function(a){return e.doSearch("className",t)}}},[e._v(e._s(t.className+"."+t.method))]):e._e(),a("span",[e._v(": "+e._s(t.content)),a("a",{staticClass:"row_pick_up_text"},[e._v("[点击收起]")])])])])],1)])})),0)])]),a("nav",{staticClass:"page_nav",attrs:{"aria-label":"Page navigation example"}},[a("div",{staticClass:"pnl_select"},[a("span",{staticClass:"name"},[e._v("显示字段:")]),a("Select",{staticStyle:{width:"270px"},attrs:{multiple:"",placeholder:"选择要显示的字段","max-tag-count":2},on:{"on-change":e.columnsChange},model:{value:e.showColumnTitles,callback:function(t){e.showColumnTitles=t},expression:"showColumnTitles"}},e._l(e.allColumns,(function(t){return a("Option",{key:t.value,attrs:{value:t.value}},[e._v(e._s(t.label))])})),1)],1),a("div",{staticClass:"pnl_select",staticStyle:{"margin-left":"20px"}},[e.tableModel?a("Button",{staticStyle:{"font-size":"12px"},on:{click:e.tableModelChange}},[e._v("切换至普通模式")]):e._e(),e.tableModel?e._e():a("Button",{staticStyle:{"font-size":"12px"},on:{click:e.tableModelChange}},[e._v("切换至表格模式")])],1),a("div",{staticClass:"pnl_select",staticStyle:{"margin-left":"20px"}},[!e.tableModel&&e.autoWordWrap?a("Button",{staticStyle:{"font-size":"12px"},on:{click:e.autoWordWrapChange}},[e._v("切换至单行模式")]):e._e(),e.tableModel||e.autoWordWrap?e._e():a("Button",{staticStyle:{"font-size":"12px"},on:{click:e.autoWordWrapChange}},[e._v("切换至自动换行")])],1),a("div",{staticClass:"pnl_select",staticStyle:{"margin-left":"20px"}},[!e.tableModel&&e.darkMode?a("Button",{staticStyle:{"font-size":"12px"},on:{click:e.darkModeChange}},[e._v("切换至日间模式")]):e._e(),e.tableModel||e.darkMode?e._e():a("Button",{staticStyle:{"font-size":"12px"},on:{click:e.darkModeChange}},[e._v("切换至夜间换行")])],1),e.totalCount?a("ul",{staticClass:"pagination justify-content-center",staticStyle:{float:"right","margin-right":"30px"}},[a("li",{staticClass:"page-item",class:{disabled:!e.isShowLastPage}},[a("a",{staticClass:"page-link",attrs:{href:"javascript:void(0)",tabindex:"-1"},on:{click:e.prevPage}},[e._v("上一页")])]),a("li",{staticClass:"page-item",class:{disabled:!e.haveNextPage}},[a("a",{staticClass:"page-link",attrs:{href:"javascript:void(0)"},on:{click:e.nextPage}},[e._v("下一页")])]),a("li",{staticClass:"page-item"},[a("div",{staticClass:"page-count"},[e._v("每页 "),a("Select",{staticStyle:{width:"100px"},attrs:{size:"small"},on:{"on-change":e.doSearch},model:{value:e.size,callback:function(t){e.size=t},expression:"size"}},e._l(e.sizeList,(function(t){return a("Option",{key:t.value,attrs:{value:t.value}},[e._v(e._s(t.label))])})),1),e._v(" 条 ")],1)]),a("li",{staticClass:"page-item"},[a("div",{staticClass:"page-count"},[e._v("跳转至第 "),a("InputNumber",{staticStyle:{width:"80px"},attrs:{size:"small",min:1,max:parseInt(e.totalCount/e.size)+1},model:{value:e.jumpPageIndex,callback:function(t){e.jumpPageIndex=t},expression:"jumpPageIndex"}}),e._v(" 页 "),a("Button",{staticStyle:{"font-size":"12px"},attrs:{size:"small"},on:{click:e.goPage}},[e._v("确定")])],1)]),a("li",{staticClass:"page-item"},[a("div",{staticClass:"page-count"},[e._v("第"+e._s(parseInt(e.from/e.size)+1)+"页 / 共"+e._s(parseInt(e.totalCount/e.size)+(e.totalCount%e.size===0?0:1))+"页")])]),a("li",{staticClass:"page-item"},[a("div",{staticClass:"page-count"},[a("a",{staticStyle:{"margin-right":"10px"},attrs:{href:"javascript:void(0)"},on:{click:e.goDown}},[e._v("去往底部")]),a("a",{attrs:{href:"javascript:void(0)"},on:{click:e.goTop}},[e._v("返回顶部")])])])]):e._e()])])},p=[],m=(a("99af"),a("4de4"),a("7db0"),a("caad"),a("c975"),a("a15b"),a("d81d"),a("a434"),a("b0c0"),a("d3b7"),a("ac1f"),a("2532"),a("3ca3"),a("466d"),a("5319"),a("1276"),a("ddb0"),a("5530")),f=a("ade3"),g=a("2909"),v=a("b85c"),_=a("bc3a"),b=a.n(_),y=a("f825"),w=a.n(y);b.a.defaults.timeout=3e5,b.a.defaults.withCredentials=!0,b.a.defaults.crossDomain=!0,b.a.interceptors.request.use((function(e){return e}),(function(e){return Promise.reject(e)})),b.a.interceptors.response.use((function(e){return 401==e.data.code?(vt.replace({path:"login"}),w.a.LoadingBar.finish(),Promise.reject("未登陆")):e}),(function(e){return Promise.reject(e)}));var k=b.a,C=a("2ef0"),x=a.n(C),N=a("c1df"),S=a.n(N),T=(a("e42c"),a("fccc"),a("f8ce"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("nav",{staticClass:"navbar navbar-dark bg-dark"},[a("a",{staticClass:"navbar-brand icon_log",attrs:{target:"_blank",href:"http://www.plumelog.com"}}),a("ul",{staticClass:"navbar-nav"},[a("li",{staticClass:"nav-item ",class:{active:"Home"==e.pageName}},[a("a",{staticClass:"nav-link",attrs:{href:"./#/"}},[a("Icon",{attrs:{type:"logo-buffer"}}),e._v("日志查询")],1)]),a("li",{staticClass:"nav-item",class:{active:"Trace"==e.pageName}},[a("a",{staticClass:"nav-link",attrs:{href:"./#/trace"}},[a("Icon",{attrs:{type:"md-git-merge"}}),e._v("链路追踪")],1)]),a("li",{staticClass:"nav-item ",class:{active:"Console"==e.pageName}},[a("a",{staticClass:"nav-link",attrs:{href:"./#/console"}},[a("Icon",{attrs:{type:"logo-buffer"}}),e._v("滚动日志")],1)]),"lite"!==e.config.modeName?a("li",{staticClass:"nav-item",class:{active:"Expand"==e.pageName}},[a("a",{staticClass:"nav-link",attrs:{href:"./#/expand"}},[a("Icon",{attrs:{type:"md-barcode"}}),e._v("扩展字段")],1)]):e._e(),"lite"!==e.config.modeName?a("li",{staticClass:"nav-item",class:{active:"Errors"==e.pageName}},[a("a",{staticClass:"nav-link",attrs:{href:"./#/errors"}},[a("Icon",{attrs:{type:"md-pie"}}),e._v("错误统计")],1)]):e._e(),"lite"!==e.config.modeName?a("li",{staticClass:"nav-item",class:{active:"Warn"==e.pageName}},[a("a",{staticClass:"nav-link",attrs:{href:"./#/warn"}},[a("Icon",{attrs:{type:"md-alert"}}),e._v("报警管理")],1)]):e._e(),a("li",{staticClass:"nav-item",class:{active:"Size"==e.pageName}},[a("a",{staticClass:"nav-link",attrs:{href:"./#/size"}},[a("Icon",{attrs:{type:"md-settings"}}),e._v("管理")],1)]),a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{target:"_blank",href:"https://gitee.com/plumeorg/plumelog/blob/master/HELP.md"}},[a("Icon",{staticStyle:{"font-size":"16px"},attrs:{type:"md-help-circle"}})],1)]),a("li",{staticClass:"nav-item"},["lite"===e.config.modeName?a("span",{staticClass:"nav-link"},[e._v("Lite")]):e._e()])]),a("span",{staticClass:"quit"},[a("a",{attrs:{href:"./#/login"}},[a("Icon",{staticStyle:{"font-size":"16px"},attrs:{type:"md-exit"}}),e._v("退出")],1)]),e._m(0)])}),D=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("span",{staticClass:"version"},[a("a",{attrs:{target:"_blank",href:"https://gitee.com/plumeorg/plumelog"}},[e._v("Version 3.5")])])}],I=a("2f62"),j={name:"Nav",data:function(){return{}},computed:Object(m["a"])({pageName:function(){return this.$route.name}},Object(I["b"])(["config"])),mounted:function(){}},E=j,M=(a("cf95"),Object(o["a"])(E,T,D,!1,null,null,null)),O=M.exports,R=(a("5b8f"),{shortcuts:[{text:"15分钟内",value:function(){var e=S()(S()((new Date).getTime()).format("YYYY-MM-DD 23:59:59")).toDate(),t=new Date;return t.setTime(t.getTime()-9e5),[t,e]}},{text:"30分钟内",value:function(){var e=S()(S()((new Date).getTime()).format("YYYY-MM-DD 23:59:59")).toDate(),t=new Date;return t.setTime(t.getTime()-18e5),[t,e]}},{text:"1小时内",value:function(){var e=S()(S()((new Date).getTime()).format("YYYY-MM-DD 23:59:59")).toDate(),t=new Date;return t.setTime(t.getTime()-36e5),[t,e]}},{text:"24小时内",value:function(){var e=S()(S()((new Date).getTime()).format("YYYY-MM-DD 23:59:59")).toDate(),t=new Date;return t.setTime(t.getTime()-864e5),[t,e]}},{text:"1周内",value:function(){var e=S()(S()((new Date).getTime()).format("YYYY-MM-DD 23:59:59")).toDate(),t=new Date;return t.setTime(t.getTime()-6048e5),[t,e]}},{text:"当天",value:function(){var e=S()(S()((new Date).getTime()).format("YYYY-MM-DD 23:59:59")).toDate(),t=new Date;return t.setTime(t.setHours(0,0)),[t,e]}}],disabledDate:function(e){return e&&e.valueOf()>Date.now()}}),A=a("1157"),z=a.n(A),L=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Row",{staticClass:"expand-row"},[a("Col",{attrs:{span:"24"}},[a("span",{staticClass:"expand-value"},[a("table",{staticClass:"detail_table"},[a("tr",[a("td",{staticClass:"key"},[e._v("服务器时间")]),a("td",{staticClass:"value"},[e._v(e._s(e.row.dateTime))])]),a("tr",[a("td",{staticClass:"key"},[e._v("类名")]),a("td",{staticClass:"value"},[e._v(e._s(e.row.className))])]),a("tr",[a("td",{staticClass:"key"},[e._v("方法名")]),a("td",{staticClass:"value"},[e._v(e._s(e.row.method))])]),e.row.threadName?a("tr",[a("td",{staticClass:"key"},[e._v("线程名")]),a("td",{staticClass:"value"},[e._v(e._s(e.row.threadName))])]):e._e(),a("tr",[a("td",{staticClass:"key"},[e._v("内容")]),a("td",{staticClass:"value"},[a("div",{staticStyle:{"white-space":"pre-wrap"}},e._l(e.highLightCode(e.row.highlightCnt||e.row.content,!!e.row.highlightCnt),(function(t){return a("span",[t.isH?a("span",{domProps:{innerHTML:e._s(t.content)}}):a("span",[e._v(e._s(t.content))])])})),0)])])])])])],1)],1)},F=[],$=/<\/?[a-z][\s\S]*>/i,W={props:{searchKey:String,row:Object},methods:{highLightCode:function(e,t){e=e.replace(/\\n/g,"\n").replace(/\\t/g,"\t");var a=[];if(e.indexOf("java.")>-1){var s='
'+Prism.highlight(e.replace(/\n/g,"
").replace(/\t/g,"  "),Prism.languages.stackjava,"stackjava").replace(/</g,"<").replace(/>/g,">")+"
";return a.push({isH:!0,content:s}),a}if($.test(e)){var n=e;if(t){var i=[],r=e.match(/([\s\S]*?)<\/em>/g);e=e.replace(/([\s\S]*?)<\/em>/g,"@Highlight@");var o=e.split("@");o=o.filter((function(e){return!!e}));for(var l=0,c=0;c").replace(/\t/g,"  ")+"
";return a.push({isH:!0,content:h}),a}}},q=W,H=(a("38ac"),Object(o["a"])(q,L,F,!1,null,"97c214c4",null)),Y=H.exports,P=/<\/?[a-z][\s\S]*>/i,B={name:"Home",data:function(){var e=this;return this.slotColumns=["logLevel","serverName","appName","env","traceId","className"],{sizeList:[{label:"30",value:30},{label:"50",value:50},{label:"100",value:100},{label:"200",value:200},{label:"500",value:500}],isSearching:!1,tag:"",extendTag:"",extendList:[],extendOptions:[],select_extend:"",select_extend_label:"",completeFilterLoading:!1,appNameWithEnvMap:{},envWithAppNameMap:{},allAppNames:[],allEnvs:[],appNameComplete:[],envComplete:[],useSearchQuery:!1,selectOption:"AND",isExclude:!1,slideIndex:0,self:this,jumpPageIndex:1,chartData:[],searchOptions:[],showColumnTitles:["appName","traceId"],allColumns:[{label:"日志等级",value:"logLevel",width:90},{label:"应用名称",value:"appName",width:150},{label:"应用环境",value:"env",width:100},{label:"服务器名称",value:"serverName",width:150},{label:"类名",value:"className",width:270},{label:"追踪码",value:"traceId",width:170}],tableModel:!0,autoWordWrap:!0,darkMode:!0,showFilter:!0,api:Object({VUE_APP_API:".",NODE_ENV:"production",BASE_URL:""}).api,dateOption:R,dateTimeRange:[S()((new Date).getTime()-36e5).format("YYYY-MM-DD HH:mm:ss"),S()(new Date).format("YYYY-MM-DD 23:59:59")],content:{_source:{}},searchKey:"",danger_str:"",filter:{logLevel:"",appName:"",env:"",traceId:"",className:"",serverName:""},list:{hits:[]},size:100,from:0,columns:[{type:"expand",width:50,render:function(t,a){return t(Y,{props:{row:a.row,searchKey:e.searchKey}})}},{title:"时间",key:"dtTime",sortable:!0,width:180,resizable:!0,render:function(e,t){return e("div",S()(parseInt(t.row.dtTime)).format("YYYY-MM-DD HH:mm:ss.SSS"))}},{title:"日志等级",key:"logLevel",align:"center",slot:"logLevel",className:"icon",resizable:!0,sortable:!0,width:90},{title:"服务器名称",align:"center",key:"serverName",slot:"serverName",className:"icon",sortable:!0,resizable:!0,width:150},{title:"应用名称",align:"center",key:"appName",slot:"appName",className:"icon",sortable:!0,resizable:!0,width:150},{title:"应用环境",align:"center",key:"env",slot:"env",className:"icon",sortable:!0,resizable:!0,width:100},{title:"追踪码",align:"center",key:"traceId",width:170,className:"icon",sortable:!0,resizable:!0,slot:"traceId"},{title:"类名",align:"center",key:"className",slot:"className",className:"icon",sortable:!0,resizable:!0,width:270},{title:"内容",align:"left",key:"content",slot:"content"}],sort:[{dtTime:"desc"},{seq:"desc"}]}},components:{logHeader:O,expandRow:Y},filters:{substr:function(e){return e.length>30?e.substring(0,30)+"...":e},filterTime:function(e){return S()(e).format("YYYY-MM-DD HH:mm:ss")}},computed:{searchQuery:function(){for(var e="",t=0;t0&&(e+=" "+a.type+" "),e+='"'+a.tag+'"'}return e},showColumns:function(){var e,t=this,a=[this.columns[0],this.columns[1]],s=Object(v["a"])(this.showColumnTitles);try{var n=function(){var s=e.value,n=x.a.find(t.columns,["key",s]);if(n)a.push(n);else{var i=x.a.find(t.allColumns,(function(e){return e.value===s}));if(i){var r={title:i.label,align:"center",resizable:!0,key:i.value,className:"icon"};t.slotColumns.includes(i.value)&&(r.slot=i.value),i.width?r.width=i.width:r.width=200,a.push(r)}}};for(s.s();!(e=s.n()).done;)n()}catch(i){s.e(i)}finally{s.f()}return a.push(x.a.find(this.columns,["key","content"])),this.columns=a,a},chartInterval:function(){if(this.dateTimeRange.length>0){var e=new Date(this.dateTimeRange[0]),t=new Date(this.dateTimeRange[1]),a=new Date;t>a&&(t=a);var s=t.getTime()-e.getTime();return s>6048e5?{format:"MM-DD",value:864e5}:s>2592e5?{format:"MM-DD HH:mm",value:432e5}:s>864e5||s>=432e5?{format:"MM-DD HH:mm",value:36e5}:s>=216e5?{format:"MM-DD HH:mm",value:9e5}:s>=36e5||s>=18e5?{format:"MM-DD HH:mm",value:6e4}:s>=9e5?{format:"MM-DD HH:mm:ss",value:3e4}:{format:"MM-DD HH:mm",value:36e5}}return{format:"MM-DD HH:mm",value:36e5}},totalCount:function(){return x.a.get(this.list,"total.value",x.a.get(this.list,"total",0))},isShowLastPage:function(){return this.from>0},haveNextPage:function(){return this.totalCount>this.from+this.size}},methods:{dateFormat:function(e){return S()(parseInt(e)).format("YYYY-MM-DD HH:mm:ss.SSS")},tableModelChange:function(){this.tableModel=!this.tableModel,this.localStorageChange("tableModel",this.tableModel)},autoWordWrapChange:function(){this.autoWordWrap=!this.autoWordWrap,this.localStorageChange("autoWordWrap",this.autoWordWrap),this.darkMode&&!this.autoWordWrap?document.querySelector("html").style.cssText="background: #2b2b2b;":document.querySelector("html").style.cssText="background: #ffffff;"},darkModeChange:function(){this.darkMode=!this.darkMode,this.localStorageChange("darkMode",this.darkMode),this.darkMode&&!this.autoWordWrap?document.querySelector("html").style.cssText="background: #2b2b2b;":document.querySelector("html").style.cssText="background: #ffffff;"},showTheColumn:function(e){return this.showColumnTitles.indexOf(e)>-1},highLightCode:function(e,t){e=e.replace(/\\n/g,"\n").replace(/\\t/g,"\t");var a=[];if(e.indexOf("java.")>-1){var s='
'+e.replace(/\n/g,"
").replace(/\t/g,"  ").replace(/</g,"<").replace(/>/g,">")+"
";return a.push({isH:!0,content:s}),a}if(P.test(e)){var n=e;if(t){var i=[],r=e.match(/([\s\S]*?)<\/em>/g);e=e.replace(/([\s\S]*?)<\/em>/g,"@Highlight@");var o=e.split("@");o=o.filter((function(e){return!!e}));for(var l=0,c=0;c").replace(/\t/g,"  ")+"
";return a.push({isH:!0,content:h}),a},appNameChange:function(){this.getExtendList(),this.filter.appName?(this.envComplete=this.appNameWithEnvMap[this.filter.appName]||[],0===this.envComplete.length&&(this.envComplete=this.allEnvs)):this.envComplete=this.allEnvs},envChange:function(){this.filter.env?(this.appNameComplete=this.envWithAppNameMap[this.filter.env]||[],0===this.appNameComplete.length&&(this.appNameComplete=this.allAppNames)):this.appNameComplete=this.allAppNames},getExtendList:function(){var e=this;this.allColumns=Object(g["a"])(this.allColumns),this.filter.appName?k.post("./getExtendfieldList?appName="+this.filter.appName).then((function(t){var a=x.a.get(t,"data",{}),s=[];for(var n in a)a.hasOwnProperty(n)&&(s.push({field:n,fieldName:a[n]}),e.allColumns.push({label:a[n],value:n}));e.extendList=s})):(this.extendList=[],this.extendOptions=[])},completeFilter:function(e,t){return 0===t.indexOf(e)},searchAppName:function(){var e=this;0===this.appNameComplete.length&&(sessionStorage["cache_appNameWithEnvs"]&&sessionStorage["cache_appNameWithEnvs_time"]&&sessionStorage["cache_appNameWithEnvs_time"]>(new Date).getTime()-18e5?this.analysisAppNameWithEnv():(this.completeFilterLoading=!0,k.post("./queryAppNames?appNameWithEnv",{size:0,aggregations:{dataCount:{terms:{size:1e3,field:"appNameWithEnv"}}}}).then((function(t){e.completeFilterLoading=!1,sessionStorage["cache_appNameWithEnvs"]=JSON.stringify(t.data),sessionStorage["cache_appNameWithEnvs_time"]=(new Date).getTime(),e.analysisAppNameWithEnv()}))))},analysisAppNameWithEnv:function(){var e=JSON.parse(sessionStorage["cache_appNameWithEnvs"]);this.appNameWithEnvMap={},this.envWithAppNameMap={};for(var t=0,a=e.length;t1&&""!==s[1]&&(this.appNameWithEnvMap[s[0]].push(s[1]),this.envWithAppNameMap[s[1]]||(this.envWithAppNameMap[s[1]]=[]),this.envWithAppNameMap[s[1]].push(s[0]))}for(var n in this.allAppNames=[],this.appNameWithEnvMap)this.appNameWithEnvMap.hasOwnProperty(n)&&this.allAppNames.push(n);for(var i in this.allAppNames.sort((function(e,t){return e.localeCompare(t)})),this.appNameComplete=this.allAppNames,this.allEnvs=[],this.envWithAppNameMap)this.envWithAppNameMap.hasOwnProperty(i)&&this.allEnvs.push(i);this.allEnvs.sort((function(e,t){return e.localeCompare(t)})),this.envComplete=this.allEnvs},closeExtendTag:function(e){this.extendOptions.splice(e,1)},closeTag:function(e){this.searchOptions.splice(e,1)},selectExtendHandler:function(e){this.select_extend=e.value,this.select_extend_label=e.label},addExtendTag:function(){if(this.extendTag){for(var e=!1,t=0;tt?e.substring(0,t)+"...":e},getRowName:function(e){return e.logLevel+" "+e.id},dblclick:function(e){var t=z()("."+e.id);t.find(".ivu-table-cell-expand").click()},sortChange:function(e){var t=e.key,a=e.order,s={};s[t]=a,this.sort=[s],z()(".row_detail").remove(),this.doSearch()},setShowFilter:function(){var e=this;this.showFilter=!this.showFilter,this.showFilter&&this.$nextTick((function(){e.drawLine()}))},drawLine:function(){var e=this,t=this.$echarts.init(document.getElementById("myChart"));if(0===this.chartData.length)return t.clear(),!1;window.addEventListener("resize",(function(){t.resize()})),t.setOption({grid:{x:70,y:10},tooltip:{formatter:function(e){return"时间:"+e.name+"
数量:"+e.value+"条"},position:function(e){return[e[0]-50,e[1]-50]},extraCssText:"text-align:left"},xAxis:{data:x.a.map(this.chartData,(function(t){return S()(t.key).format(e.chartInterval.format)})),axisLabel:{fontSize:12,color:"#666"}},yAxis:{axisLabel:{fontSize:12,color:"#666",formatter:function(e){return e>1e3?e/1e3+"k":e}}},series:[{name:"数量",type:"bar",data:x.a.map(this.chartData,(function(e){return e.doc_count})),itemStyle:{borderColor:"rgb(110, 173, 193)",color:"rgba(110, 173, 193,0.6)"}}]})},drawErrorLine:function(e){var t=this,a=this.$echarts.init(document.getElementById("errorChart"));0!==e.length?(window.addEventListener("resize",(function(){a.resize()})),a.setOption({grid:{x:70,y:10},tooltip:{formatter:function(e){return"时间:"+e.name+"
错误数:"+e.value},position:function(e){return[e[0]-50,e[1]-50]},extraCssText:"text-align:left"},xAxis:{data:x.a.map(e,(function(e){return S()(e.key).format(t.chartInterval.format)})),axisLabel:{fontSize:12,color:"#666"}},yAxis:{axisLabel:{fontSize:12,color:"#666",formatter:function(e){return e>1e3?e/1e3+"k":e}}},series:[{name:"数量",type:"bar",data:x.a.map(e,(function(e){return e.doc_count})),itemStyle:{borderColor:"rgb(255, 0, 0)",color:"rgba(255, 0, 0,0.6)"}}]})):a.clear()},getShouldFilter:function(){var e=[];for(var t in this.filter)if(this.filter.hasOwnProperty(t)){if(this.isExclude&&"appName"===t)continue;if(this.filter[t]){var a=this.filter[t],s="";Array.isArray(a)?(s=a.join(","),s&&e.push({query_string:{query:s,default_field:t}})):(s=a.replace(/,/g," "),e.push({match_phrase:Object(f["a"])({},t,{query:s})}))}}var n,i=Object(v["a"])(this.extendOptions);try{for(i.s();!(n=i.n()).done;){var r=n.value;e.push({match_phrase:Object(f["a"])({},r.field,{query:r.tag})})}}catch(d){i.e(d)}finally{i.f()}if((this.searchQuery&&this.useSearchQuery||this.searchKey&&!this.useSearchQuery)&&e.push({query_string:{query:this.useSearchQuery?this.searchQuery:this.searchKey,default_field:"content"}}),this.dateTimeRange.length>0&&""!==this.dateTimeRange[0]){var o=new Date,l=new Date(this.dateTimeRange[0]),c=new Date(this.dateTimeRange[1]);c>o&&(c=o),e.push({range:{dtTime:{gte:Date.parse(l),lt:Date.parse(c)}}})}return e},clear:function(){this.filter={logLevel:"",appName:"",env:"",traceId:""},this.searchKey="",this.dateTimeRange=[S()((new Date).getTime()-36e5).format("YYYY-MM-DD HH:mm:ss"),S()(new Date).format("YYYY-MM-DD 23:59:59")],this.$refs.datePicker.internalValue=x.a.clone(this.dateTimeRange),this.doSearch()},dateChange:function(){if(this.dateTimeRange.length>0)if(""!==this.dateTimeRange[0]&&""!==this.dateTimeRange[1]){var e=new Date(this.dateTimeRange[0]),t=new Date(this.dateTimeRange[1]);0===e.getHours()&&0===e.getMinutes()&&0===t.getHours()&&0===t.getMinutes()&&(this.dateTimeRange[1].setHours(23,59),this.$refs.datePicker.internalValue=x.a.clone(this.dateTimeRange))}else if(""!==this.dateTimeRange[0]){var a=new Date(this.dateTimeRange[0]);this.dateTimeRange[1]=S()(a).format("YYYY-MM-DD 23:59:59"),this.$refs.datePicker.internalValue=x.a.clone(this.dateTimeRange)}else if(""!==this.dateTimeRange[1]){var s=new Date(this.dateTimeRange[1]);this.dateTimeRange[0]=S()(s).format("YYYY-MM-DD 00:00:00"),this.$refs.datePicker.internalValue=x.a.clone(this.dateTimeRange)}},doSearchByTraceId:function(e){var t=this;if(this.localStorageChange("size",this.size),this.isSearching)return!1;var a=[{match_phrase:{traceId:{query:e.traceId}}}],s="./clientQuery?clientStartDate="+Date.parse(this.dateTimeRange[0])+"&clientEndDate="+Date.parse(this.dateTimeRange[1]),n={query:{bool:{must:[].concat(a)}}};if(this.isExclude&&this.filter["appName"]){var i,r=[],o=Object(v["a"])(this.filter["appName"].split(","));try{for(o.s();!(i=o.n()).done;){var l=i.value;r.push({match_phrase:{appName:{query:l.replace(/,/g," ")}}})}}catch(p){o.e(p)}finally{o.f()}n.query.bool["must_not"]=r}var c=this.sort;c=[{dtTime:"asc"},{seq:"asc"}];var d=Object(m["a"])(Object(m["a"])({},n),{},{highlight:{fields:{content:{fragment_size:2147483647}}},sort:c});this.$Loading.start();var u=s+"&size="+this.size+"&from="+this.from;this.isSearching=!0,k.post(u,d).then((function(e){t.isSearching=!1,t.$Loading.finish();var a=x.a.get(e,"data.hits",{total:0,hits:[]});a.hits=x.a.map(a.hits,(function(e){return Object(m["a"])({id:e._id,highlightCnt:x.a.get(e,"highlight.content[0]","")},e._source)})),t.list=a}));var h={query:{bool:{must:[].concat(a)}},aggregations:{2:{date_histogram:{field:"dtTime",interval:this.chartInterval.value,min_doc_count:0}}}};k.post("./clientQuery?clientStartDate="+Date.parse(this.dateTimeRange[0])+"&clientEndDate="+Date.parse(this.dateTimeRange[1])+"&from=0&size=0&chartData",h).then((function(e){t.chartData=x.a.get(e,"data.aggregations.2.buckets",[]),t.drawLine()})),this.getErrorRate().then((function(e){t.drawErrorLine(e)}))},doSearch:function(e,t){var a=this;if(this.localStorageChange("size",this.size),this.isSearching)return!1;e&&t&&("appName"===e&&this.isExclude&&this.filter[e]?this.filter[e]+=","+t[e]:this.filter[e]=t[e]);var s=this.getShouldFilter(),n="./clientQuery?clientStartDate="+Date.parse(this.dateTimeRange[0])+"&clientEndDate="+Date.parse(this.dateTimeRange[1]),i={query:{bool:{must:Object(g["a"])(s)}}};if(this.isExclude&&this.filter["appName"]){var r,o=[],l=Object(v["a"])(this.filter["appName"].split(","));try{for(l.s();!(r=l.n()).done;){var c=r.value;o.push({match_phrase:{appName:{query:c.replace(/,/g," ")}}})}}catch(f){l.e(f)}finally{l.f()}i.query.bool["must_not"]=o}var d=this.sort;""!==this.filter.traceId&&(d=[{dtTime:"asc"},{seq:"asc"}]);var u=Object(m["a"])(Object(m["a"])({},i),{},{highlight:{fields:{content:{fragment_size:2147483647}}},sort:d});this.$Loading.start();var h=n+"&size="+this.size+"&from="+this.from;this.isSearching=!0,k.post(h,u).then((function(e){a.isSearching=!1,a.$Loading.finish();var t=x.a.get(e,"data.hits",{total:0,hits:[]});t.hits=x.a.map(t.hits,(function(e){return Object(m["a"])({id:e._id,highlightCnt:x.a.get(e,"highlight.content[0]","")},e._source)})),a.list=t}));var p={query:{bool:{must:Object(g["a"])(s)}},aggregations:{2:{date_histogram:{field:"dtTime",interval:this.chartInterval.value,min_doc_count:0}}}};k.post("./clientQuery?clientStartDate="+Date.parse(this.dateTimeRange[0])+"&clientEndDate="+Date.parse(this.dateTimeRange[1])+"&from=0&size=0&chartData",p).then((function(e){a.chartData=x.a.get(e,"data.aggregations.2.buckets",[]),a.drawLine()})),this.getErrorRate().then((function(e){a.drawErrorLine(e)}))},getErrorRate:function(){var e=new Date,t=new Date(this.dateTimeRange[0]),a=new Date(this.dateTimeRange[1]);a>e&&(a=e);var s=[],n={aggregations:{dataCount:{date_histogram:{field:"dtTime",interval:this.chartInterval.value,min_doc_count:0}}}};Object(m["a"])({query:{bool:{must:[{range:{dtTime:{gte:Date.parse(t),lt:Date.parse(a)}}}]}}},n);var i=Object(m["a"])({query:{bool:{must:[{range:{dtTime:{gte:Date.parse(t),lt:Date.parse(a)}}},{match_phrase:{logLevel:{query:"ERROR"}}}]}}},n),r="./clientQuery?clientStartDate="+Date.parse(this.dateTimeRange[0])+"&clientEndDate="+Date.parse(this.dateTimeRange[1])+"&from=0&size=0&errChat";return s.push(k.post(r,i).then((function(e){return x.a.get(e,"data.aggregations.dataCount.buckets",[])}))),Promise.all(s).then((function(e){var t=e[0];if(0===t.length)return[];for(var a=[],s=0;s=0&&this.doSearch()},init:function(){var e=this,t=localStorage["cache_plumeLogParams"];if(t?this.$nextTick((function(){var a=JSON.parse(t);void 0!==a["showColumnTitles"]&&(e.showColumnTitles=a["showColumnTitles"]),void 0!==a["tableModel"]&&(e.tableModel=a["tableModel"]),void 0!==a["autoWordWrap"]&&(e.autoWordWrap=a["autoWordWrap"]),void 0!==a["darkMode"]&&(e.darkMode=a["darkMode"]),void 0!==a["size"]&&(e.size=a["size"]),e.tableModel||!e.darkMode||e.autoWordWrap?document.querySelector("html").style.cssText="background: #ffffff;":document.querySelector("html").style.cssText="background: #2b2b2b;"})):localStorage["cache_plumeLogParams"]="{}",this.$route.query.appName&&(this.filter["appName"]=this.$route.query.appName),this.$route.query.env&&(this.filter["env"]=this.$route.query.env),this.$route.query.className&&(this.filter["className"]=this.$route.query.className),this.$route.query.traceId&&(this.filter["traceId"]=this.$route.query.traceId),this.$route.query.logLevel&&(this.filter["logLevel"]=[this.$route.query.logLevel]),this.$route.query.serverName&&(this.filter["serverName"]=[this.$route.query.serverName]),this.$route.query.time){var a=this.$route.query.time.split(",");a.length>1&&(this.dateTimeRange=[S()(parseInt(a[0])).format("YYYY-MM-DD HH:mm:ss"),S()(parseInt(a[1])).format("YYYY-MM-DD HH:mm:ss")],this.$refs.datePicker.internalValue=x.a.clone(this.dateTimeRange))}this.$route.query.searchKey&&(this.searchKey=this.$route.query.searchKey),this.isSearching=!1,setTimeout((function(){e.doSearch(),e.searchAppName(),e.getExtendList()}),0)},queryFilterCheck:function(e,t,a){""!==a?e[t]=a:e[t]&&delete e[t]},localStorageChange:function(e,t){var a=localStorage["cache_plumeLogParams"],s=a?JSON.parse(a):{};s[e]=t,localStorage["cache_plumeLogParams"]=JSON.stringify(s)},logModelNormalRowMouseEnter:function(e){e.currentTarget.className="log_model_normal_row_enter"},logModelNormalRowMouseLeave:function(e){e.currentTarget.className="log_model_normal_row"},goTop:function(){var e=setInterval((function(){var t=document.documentElement.scrollTop||document.body.scrollTop,a=Math.floor(-t/5);a>-100&&(a=-100),document.documentElement.scrollTop=document.body.scrollTop=t+a,t<=0&&clearInterval(e)}),30)},goDown:function(){var e=setInterval((function(){var t=document.documentElement.scrollTop||document.body.scrollTop,a=document.documentElement.scrollHeight-z()(window).height(),s=Math.floor((a-t)/5);s<100&&(s=100),document.documentElement.scrollTop=document.body.scrollTop=t+s,t>=a&&clearInterval(e)}),30)}},watch:{filter:{handler:function(){var e=Object(m["a"])({},this.$route.query);for(var t in this.filter)this.filter.hasOwnProperty(t)&&this.queryFilterCheck(e,t,this.filter[t]);this.$router.push({query:Object(m["a"])({},e)}).catch((function(e){return e})),this.from=0},deep:!0},dateTimeRange:{handler:function(){var e=Object(m["a"])({},this.$route.query);if(this.dateTimeRange.length>0)if(""!==this.dateTimeRange[0]&&""!==this.dateTimeRange[1]){var t=S()(this.dateTimeRange[0]).valueOf(),a=S()(this.dateTimeRange[1]).valueOf();this.queryFilterCheck(e,"time",[t,a].join())}else if(""!==this.dateTimeRange[0]){var s=S()(this.dateTimeRange[0]).valueOf();this.queryFilterCheck(e,"time",[s,""].join())}else if(""!==this.dateTimeRange[1]){var n=S()(this.dateTimeRange[1]).valueOf();this.queryFilterCheck(e,"time",["",n].join())}else this.queryFilterCheck(e,"time","");else this.queryFilterCheck(e,"time","");this.$router.push({query:Object(m["a"])({},e)}).catch((function(e){return e}))},deep:!0},searchKey:{handler:function(){var e=Object(m["a"])({},this.$route.query);this.queryFilterCheck(e,"searchKey",this.searchKey),this.$router.push({query:Object(m["a"])({},e)}).catch((function(e){return e})),this.from=0}},"$route.path":function(e,t){("/"===e&&"/login"===t||"/"===e&&"/warn"===t)&&this.init()},list:function(){this.$nextTick((function(){this.tableModel||z()(".log_model_normal_row_selector").each((function(){var e=z()(this);if(e.find(".ivu-tooltip-rel")[0].offsetHeight>72){var t=function t(a){"A"!==a.target.nodeName&&a.target.className.indexOf("row_search")<0&&(a.preventDefault(),e.hasClass("row_over_flow_hidden")?e.removeClass("row_over_flow_hidden can_click").removeAttr("title").off("click"):e.addClass("row_over_flow_hidden can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)})))};e.addClass("can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)})),z()(e.find(".row_pick_up_text")[0]).show().on("click",(function(a){if(a.preventDefault(),!e.hasClass("row_over_flow_hidden")){var s=e[0].offsetTop+document.getElementsByClassName("pnl_content")[0].offsetTop;s<(document.documentElement.scrollTop||document.body.scrollTop)&&(document.documentElement.scrollTop=document.body.scrollTop=s),e.addClass("row_over_flow_hidden can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)}))}}))}else z()(e.find(".row_pick_up_text")[0]).hide()}))}))}},activated:function(){},mounted:function(){this.init()}},K=B,Q=(a("de16"),a("1473"),a("3d88"),Object(o["a"])(K,h,p,!1,null,"58ad0fe6",null)),J=Q.exports,U=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper"},[a("div",{staticClass:"pnl_filters"},[[a("log-header"),a("div",{staticStyle:{width:"1000px"}},[a("table",{staticClass:"tbl_filters",staticStyle:{width:"100%"}},[a("tbody",[a("tr",[a("td",{staticClass:"key"},[e._v("应用名称")]),a("td",{staticStyle:{width:"245px"}},[a("AutoComplete",{staticClass:"txt",attrs:{data:e.appNameComplete,placeholder:"应用名称,可搜索",clearable:!0,"filter-method":e.completeFilter},on:{"on-change":e.appNameChange},model:{value:e.appName,callback:function(t){e.appName=t},expression:"appName"}})],1),a("td",{staticClass:"key"},[e._v("显示行数")]),a("td",{staticStyle:{width:"245px"}},[a("RadioGroup",{attrs:{type:"button","button-style":"solid"},model:{value:e.rowLen,callback:function(t){e.rowLen=t},expression:"rowLen"}},[a("Radio",{attrs:{label:300}}),a("Radio",{attrs:{label:500}}),a("Radio",{attrs:{label:800}}),a("Radio",{attrs:{label:1e3}})],1)],1)])])])])],a("div",{staticStyle:{clear:"both"}})],2),a("div",{staticClass:"pnl_content",attrs:{id:"plume-console"}},[a("div",{staticClass:"log_model_normal auto_word_wrap dark_mode",staticStyle:{"min-height":"calc(100vh)"}},e._l(e.list,(function(t){return a("div",{staticClass:"log_model_normal_row",on:{mouseenter:function(t){return e.logModelNormalRowMouseEnter(t)},mouseleave:function(t){return e.logModelNormalRowMouseLeave(t)}}},[a("div",{staticClass:"log_model_normal_row_selector row_over_flow_hidden"},[a("Tooltip",{attrs:{placement:"top-start",delay:1500}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("table",[a("tbody",[a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("logTime:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(e.dateFormat(t.dtTime)))])]),t.dateTime?a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("serverTime:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.dateTime))])]):e._e(),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("logLevel:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.logLevel))])]),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("appName:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.appName))])]),t.env?a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("env:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.env))])]):e._e(),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("serverName:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.serverName))])]),t.threadName?a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("threadName:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.threadName))])]):e._e(),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("traceId:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.traceId))])]),a("tr",[a("td",{staticClass:"tooltip_table_td_key"},[e._v("className:")]),a("td",{staticClass:"tooltip_table_td_value"},[e._v(e._s(t.className+"."+t.method))])])])])]),a("span",{class:t.logLevel},[a("span",{attrs:{title:"日志时间: "+e.dateFormat(t.dtTime)}},[e._v(e._s(e.dateFormat(t.dtTime)))]),a("span",{staticClass:"row_underline row_search",attrs:{title:"点击查询日志等级: "+t.logLevel}},[e._v(e._s(t.logLevel))]),a("span",{staticClass:"row_app_name row_underline row_search",attrs:{title:"点击查询应用名称: "+t.appName},on:{click:function(a){return e.doSearch("appName",t)}}},[e._v(e._s(t.appName))]),a("span",{staticClass:"row_env row_underline row_search",attrs:{title:"点击查询应用环境: "+t.env}},[e._v(e._s(t.env))]),a("span",{staticClass:"row_server_name row_underline row_search",attrs:{title:"点击查询服务器名称: "+t.serverName}},[e._v(e._s(t.serverName))]),t.traceId?a("span",{staticClass:"row_trace_id row_underline row_search",attrs:{title:"点击查询TraceId: "+t.traceId}},[e._v(e._s(t.traceId))]):e._e(),a("span",{staticClass:"row_class_name row_underline row_search",attrs:{title:"点击查询类名: "+t.className}},[e._v(e._s(t.className+"."+t.method))]),a("span",[e._v(": "+e._s(t.content)),a("a",{staticClass:"row_pick_up_text"},[e._v("[点击收起]")])])])])],1)])})),0)])])},G=[],V=(a("fb6a"),{name:"Home",data:function(){return{rowLen:300,appNameComplete:[],appName:"",list:[],messageList:[],ws:null,allAppNames:[],appNameWithEnvMap:{},envWithAppNameMap:{},allEnvs:[],stop:!1,inited:!1}},components:{logHeader:O,expandRow:Y},destroyed:function(){console.log("destory")},methods:{completeFilter:function(e,t){return 0===t.indexOf(e)},dateFormat:function(e){return S()(parseInt(e)).format("YYYY-MM-DD HH:mm:ss.SSS")},doSearch:function(){this.ws.send(this.appName)},appNameChange:function(){},searchAppName:function(){var e=this;0===this.appNameComplete.length&&(sessionStorage["cache_appNameWithEnvs"]&&sessionStorage["cache_appNameWithEnvs_time"]&&sessionStorage["cache_appNameWithEnvs_time"]>(new Date).getTime()-18e5?this.analysisAppNameWithEnv():k.post("./queryAppNames?appNameWithEnv",{size:0,aggregations:{dataCount:{terms:{size:1e3,field:"appNameWithEnv"}}}}).then((function(t){sessionStorage["cache_appNameWithEnvs"]=JSON.stringify(t.data),sessionStorage["cache_appNameWithEnvs_time"]=(new Date).getTime(),e.analysisAppNameWithEnv()})))},analysisAppNameWithEnv:function(){var e=JSON.parse(sessionStorage["cache_appNameWithEnvs"]);this.appNameWithEnvMap={},this.envWithAppNameMap={};for(var t=0,a=e.length;t1&&""!==s[1]&&(this.appNameWithEnvMap[s[0]].push(s[1]),this.envWithAppNameMap[s[1]]||(this.envWithAppNameMap[s[1]]=[]),this.envWithAppNameMap[s[1]].push(s[0]))}for(var n in this.allAppNames=[],this.appNameWithEnvMap)this.appNameWithEnvMap.hasOwnProperty(n)&&this.allAppNames.push(n);for(var i in this.allAppNames.sort((function(e,t){return e.localeCompare(t)})),this.appNameComplete=this.allAppNames,this.allEnvs=[],this.envWithAppNameMap)this.envWithAppNameMap.hasOwnProperty(i)&&this.allEnvs.push(i);this.allEnvs.sort((function(e,t){return e.localeCompare(t)})),this.envComplete=this.allEnvs},init:function(){var e=this;this.searchAppName();var t=document.getElementById("plume-console");if("WebSocket"in window){var a=window.location.host,s="https:"==document.location.protocol,n="ws://"+a+"/plumelog/websocket";s&&(n="wss://"+a+"/plumelog/websocket");var i=new WebSocket(n);i.onerror=function(t){e.list.push({dtTime:(new Date).getTime(),content:"链接异常 ".concat(JSON.stringify(t)),logLevel:"ERROR",appName:"",className:"",method:""})},i.onopen=function(){e.list.push({dtTime:(new Date).getTime(),content:"链接成功",logLevel:"INFO",appName:"",className:"",method:""})},i.onmessage=function(a){e.list.length>e.rowLen&&(e.list=e.list.slice(e.list.length-20)),e.messageList.push(JSON.parse(a.data)),e.$nextTick((function(){var a;e.messageList.length>10?((a=e.list).push.apply(a,Object(g["a"])(e.messageList)),e.messageList=[]):setTimeout((function(){var t;e.messageList.length<10&&((t=e.list).push.apply(t,Object(g["a"])(e.messageList)),e.messageList=[])}),1e3);!e.stop&&(t.scrollTop=t.scrollHeight)}))},i.onclose=function(){e.list.push({dtTime:(new Date).getTime(),content:"链接关闭",logLevel:"INFO",appName:"",className:"",method:""})},this.ws=i}else alert("浏览器不支持")},logModelNormalRowMouseEnter:function(e){this.stop=!0,e.currentTarget.className="log_model_normal_row_enter"},logModelNormalRowMouseLeave:function(e){this.stop=!1,e.currentTarget.className="log_model_normal_row"},queryFilterCheck:function(e,t,a){""!==a?e[t]=a:e[t]&&delete e[t]}},watch:{appName:{handler:function(){this.doSearch()},deep:!0},dateTimeRange:{handler:function(){var e=Object(m["a"])({},this.$route.query);if(this.dateTimeRange.length>0)if(""!==this.dateTimeRange[0]&&""!==this.dateTimeRange[1]){var t=S()(this.dateTimeRange[0]).valueOf(),a=S()(this.dateTimeRange[1]).valueOf();this.queryFilterCheck(e,"time",[t,a].join())}else if(""!==this.dateTimeRange[0]){var s=S()(this.dateTimeRange[0]).valueOf();this.queryFilterCheck(e,"time",[s,""].join())}else if(""!==this.dateTimeRange[1]){var n=S()(this.dateTimeRange[1]).valueOf();this.queryFilterCheck(e,"time",["",n].join())}else this.queryFilterCheck(e,"time","");else this.queryFilterCheck(e,"time","");this.$router.push({query:Object(m["a"])({},e)}).catch((function(e){return e}))},deep:!0},searchKey:{handler:function(){var e=Object(m["a"])({},this.$route.query);this.queryFilterCheck(e,"searchKey",this.searchKey),this.$router.push({query:Object(m["a"])({},e)}).catch((function(e){return e})),this.from=0}},"$route.path":function(e,t){("/"===e&&"/login"===t||"/"===e&&"/warn"===t)&&this.init()},list:function(){this.$nextTick((function(){this.tableModel||z()(".log_model_normal_row_selector").each((function(){var e=z()(this);if(e.find(".ivu-tooltip-rel")[0].offsetHeight>72){var t=function t(a){"A"!==a.target.nodeName&&a.target.className.indexOf("row_search")<0&&(a.preventDefault(),e.hasClass("row_over_flow_hidden")?e.removeClass("row_over_flow_hidden can_click").removeAttr("title").off("click"):e.addClass("row_over_flow_hidden can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)})))};e.addClass("can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)})),z()(e.find(".row_pick_up_text")[0]).show().on("click",(function(a){if(a.preventDefault(),!e.hasClass("row_over_flow_hidden")){var s=e[0].offsetTop+document.getElementsByClassName("pnl_content")[0].offsetTop;s<(document.documentElement.scrollTop||document.body.scrollTop)&&(document.documentElement.scrollTop=document.body.scrollTop=s),e.addClass("row_over_flow_hidden can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)}))}}))}else z()(e.find(".row_pick_up_text")[0]).hide()}))}))}},deactivated:function(){this.ws&&this.ws.close(),this.list=[],this.messageList=[]},activated:function(){this.init()}}),Z=V,X=(a("4c75"),a("2c22"),a("0270"),Object(o["a"])(Z,U,G,!1,null,"3cd99d1a",null)),ee=(X.exports,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper"},[a("div",{staticClass:"pnl_filters"},[a("log-header"),a("table",{staticClass:"tbl_filters"},[a("tbody",[a("tr",[a("td",{staticClass:"key"},[e._v("追踪码")]),a("td",[a("Input",{staticClass:"txt",attrs:{name:"appName",placeholder:"输入追踪码",clearable:!0},model:{value:e.traceId,callback:function(t){e.traceId=t},expression:"traceId"}})],1),a("td",{staticStyle:{"padding-left":"20px"}},[a("Button",{attrs:{type:"primary",icon:"ios-search"},on:{click:e.doSearch}},[e._v("查询")])],1)])])]),a("div",{staticStyle:{clear:"both"}})],1),e._l(e.traces,(function(e){return a("div",{key:e.method,staticStyle:{width:"1020px","margin-top":"5px","margin-left":"50px"}},[a("tree",{attrs:{info:e}})],1)}))],2)}),te=[],ae=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mm_tree"},[a("div",{staticClass:"info",class:{closed:e.close}},[a("i",{on:{click:e.toggle}},[a("Tooltip",{staticClass:"icon",class:{disable:""==e.toolTip},attrs:{disabled:""==e.toolTip,offset:"-22",placement:"left-start",content:e.toolTip}})],1),a("div",{staticClass:"title"},[e._v(e._s(e.data.method))]),a("div",{staticClass:"time"},[e._v(" 应用名称:"+e._s(e.data.appName)+" "),e.data.serverName?a("b",[e._v("("+e._s(e.data.serverName)+")")]):e._e(),a("span",{domProps:{innerHTML:e._s(e.spendTime)}})])]),e.close?e._e():a("div",{staticClass:"children"},[e.data.children&&e.data.children.length?[e._l(e.data.children,(function(e){return[a("Tree",{key:e.name,attrs:{info:e}})]}))]:e._e()],2)])},se=[],ne={name:"Tree",props:{info:{type:Object,required:!0}},data:function(){return{data:{},close:!1}},computed:{spendTime:function(){var e=x.a.get(this.data,"end_time",0)-x.a.get(this.data,"start_time",0),t="green";return e>=1e3?t="red":e>=500&&(t="yellow"),e>=0?'  花费时间:').concat(e,"ms"):""},toolTip:function(){return this.data.children&&this.data.children.length?this.close?"点击展开":"点击收起":""}},methods:{toggle:function(){this.data.children.length>0&&(this.close?this.close=!1:this.close=!0)}},mounted:function(){this.data=this.info,this.data.zIndex>1&&this.data.children.length>0?this.close=!0:this.close=!1}},ie=ne,re=(a("d385"),a("e04b"),Object(o["a"])(ie,ae,se,!1,null,"69ccb8f3",null)),oe=re.exports,le={name:"Trace",data:function(){return{traces:[],traceId:"",timeRange:[]}},components:{tree:oe,logHeader:O},methods:{formartTrace:function(e){var t=0,a=[];function s(e,s){for(var n=a,i=0;i"==e[n]["position"]&&(t--,s(e[n],!1));return a},doSearch:function(){var e=this;this.traces=[],sessionStorage["cache_traceId"]=this.traceId;var t="./clientQuery?size=1000&from=0&trace=true&clientStartDate="+Date.parse(this.timeRange[0])+"&clientEndDate="+Date.parse(this.timeRange[1]),a={query:{bool:{must:[{match:{traceId:{query:this.traceId}}}]}},sort:[{time:"asc",positionNum:"asc"}]};this.$Loading.start(),k.post(t,a).then((function(t){e.$Loading.finish();var a=[],s=[];s=x.a.get(t,"data.hits.hits",[]),s.map((function(e){a.push(e._source)})),a.length>0&&(e.traces=e.formartTrace(a))}))}},mounted:function(){this.$route.query.traceId?this.traceId=this.$route.query.traceId:sessionStorage["cache_traceId"]&&(this.traceId=sessionStorage["cache_traceId"]),this.$route.query.timeRange&&(this.timeRange=JSON.parse(x.a.get(this.$route.query,"timeRange","[]"))),this.traceId&&this.doSearch()}},ce=le,de=(a("9a3e"),Object(o["a"])(ce,ee,te,!1,null,"2a65f2be",null)),ue=de.exports,he=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper"},[a("div",{staticClass:"pnl_filters"},[a("log-header"),a("div",{staticStyle:{clear:"both"}})],1),a("Row",[a("Col",{attrs:{span:8}},[e._v(" 请选择日期:"),a("DatePicker",{ref:"datePicker",staticStyle:{width:"200px"},attrs:{type:"date",format:"yyyy-MM-dd",placeholder:"选择日期"},on:{"on-change":e.dateChange},model:{value:e.currentDate,callback:function(t){e.currentDate=t},expression:"currentDate"}}),a("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",shape:"circle",icon:"ios-search"},on:{click:e.dateChange}})],1)],1),a("div",{staticClass:"pnl_sizes"},[a("Tabs",{attrs:{"active-key":"运行数据"},on:{"on-click":e.changeTab}},[a("Tab-pane",{key:"运行数据",attrs:{icon:"logo-buffer",label:"运行数据",name:"run"}},[e.sizeInfo.length>0?a("div",{staticClass:"pnl_size"},[a("Table",{attrs:{height:"600",content:e.self,columns:e.columns_size,data:e.sizeInfo},on:{"on-selection-change":e.changeSizeSelect},scopedSlots:e._u([{key:"action",fn:function(t){t.row;var s=t.index;return[a("Button",{attrs:{type:"info",size:"small"},on:{click:function(t){return e.showDetail(s)}}},[e._v("详情")])]}}],null,!1,1394952810)})],1):e._e()]),a("Tab-pane",{key:"链路数据",attrs:{icon:"md-git-merge",label:"链路数据",name:"trace"}},[e.traceInfo.length>0?a("div",{staticClass:"pnl_size"},[a("Table",{attrs:{height:"600",content:e.self,columns:e.columns_size,data:e.traceInfo},on:{"on-selection-change":e.changeTraceSelect},scopedSlots:e._u([{key:"action",fn:function(t){t.row;var s=t.index;return[a("Button",{attrs:{type:"error",size:"small"},on:{click:function(t){return e.remove(s)}}},[e._v("删除")])]}}],null,!1,1973224239)})],1):e._e()])],1),a("Button",{staticClass:"btn_delete",attrs:{icon:"ios-trash",disabled:e.isDisabled,type:"error"},on:{click:e.checkRemove}},[e._v("清空日志")]),a("Button",{staticClass:"btn_rest",attrs:{icon:"ios-redo",disabled:e.isDisabled,type:"info"},on:{click:e.restSelect}},[e._v("重置索引")])],1),e.showModal?a("div",{staticClass:"modal fade show model_pwd",staticStyle:{display:"block"},attrs:{tabindex:"-1",role:"dialog"}},[a("div",{staticClass:"modal-dialog",attrs:{role:"document"}},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[a("h5",{staticClass:"modal-title"},[e._v("管理密码")]),a("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"},on:{click:e.closeModal}},[a("span",{attrs:{"aria-hidden":"true"}},[e._v("×")])])]),a("div",{staticClass:"modal-body"},[a("p",[a("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"form-control",attrs:{type:"password",autofocus:"",placeholder:"输入管理员密码"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})])]),a("div",{staticClass:"modal-footer"},[a("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"},on:{click:e.closeModal}},[e._v("关闭")]),a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.confirmModal}},[e._v("确认")])])])])]):e._e(),"redis"===e.config.modeName?a("Row",{staticStyle:{"margin-top":"20px"},attrs:{type:"flex",justify:"start"}},[a("Col",{attrs:{span:8}},[a("span",{staticStyle:{padding:"10px"}},[e._v("当前队列大小 日志队列:"+e._s(e.runSize)+" 追踪队列: "+e._s(e.traceSize))]),a("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"error",icon:"ios-trash"},on:{click:e.clearRedisQueue}},[e._v("清空队列")])],1)],1):e._e(),e.showModal?a("div",{staticClass:"modal-backdrop fade show"}):e._e()],1)},pe=[],me=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Row",{staticClass:"expand-row"},[a("Col",{staticStyle:{"min-height":"50px","max-height":"200px",overflow:"scroll"},attrs:{span:"24"}},[a("ul",{staticStyle:{padding:"5px 0"}},e._l(e.list,(function(t){return a("li",[a("span",{staticClass:"key"},[e._v(e._s(t.key))]),e._v(" "),a("span",{staticClass:"value"},[e._v(e._s(t.doc_count)+"条")])])})),0)])],1)],1)},fe=[],ge={props:{index:String,row:Object},data:function(){return{list:[]}},methods:{getAppNameCount:function(e){var t=this,a={size:0,aggregations:{dataCount:{terms:{size:1e3,field:"appName"}}}},s="./query?size=0&from=0&index="+e;k.post(s,a).then((function(e){t.list=x.a.get(e,"data.aggregations.dataCount.buckets",[])}))}},mounted:function(){this.getAppNameCount(this.row.index)}},ve=ge,_e=(a("4832"),Object(o["a"])(ve,me,fe,!1,null,"65fb9361",null)),be=_e.exports,ye={name:"Size",data:function(){return{runSize:0,traceSize:0,timer:null,clearQueue:!1,currentDate:null,showModal:!1,password:"",self:this,size_selection:[],trace_selection:[],currentTab:"run",columns_size:[{type:"selection",width:60,align:"center"},{type:"expand",width:50,render:function(e,t){return e(be,{props:{row:t.row}})}},{title:"健康",key:"health",width:100,render:function(e,t){return e("div",[e("i",{class:t.row.health})])}},{title:"时间",key:"index",sortable:!0,sortType:"desc",render:function(e,t){var a=t.row.index.replace("plume_log_trace_","").replace("plume_log_run_","");return 8==a.length?a=a.substring(0,4)+"-"+a.substring(4,6)+"-"+a.substring(6,8):10==a.length&&(a=a.substring(0,4)+"-"+a.substring(4,6)+"-"+a.substring(6,8)+" "+a.substring(8,10)),e("span",a)}},{title:"条数",key:"docs.count",sortable:!0},{title:"大小",key:"pri.store.size",sortable:!0,render:function(e,t){return e("div",[e("span",t.row["pri.store.size"]+"("+t.row["store.size"]+")")])}}],sizeInfo:[],traceInfo:[]}},computed:Object(m["a"])(Object(m["a"])({},Object(I["b"])(["config"])),{},{isDisabled:function(){var e=!0;return("run"==this.currentTab&&this.size_selection.length>0||"trace"==this.currentTab&&this.trace_selection.length>0)&&(e=!1),e}}),components:{logHeader:O,expandRow:be},methods:{dateChange:function(){this.getTraceInfo()},closeModal:function(){this.showModal=!1,this.clearQueue=!1,this.password=""},changeTab:function(e){this.currentTab=e},checkRemove:function(){this.showModal=!0},confirmModal:function(){this.showModal=!1,this.clearQueue?this.clearQueueHandler():this.removeSelect()},clearRedisQueue:function(){this.showModal=!0,this.clearQueue=!0},clearQueueHandler:function(){var e=this;this.clearQueue=!1,k.post("./deleteQueue?adminPassWord="+this.password).then((function(t){t.data.acknowledged&&(alert("删除成功"),e.password="")}))},getQueueSize:function(){var e=this;"redis"===this.config.modeName?k.post("./getQueueCounts").then((function(t){t.data.runSize>-1&&(e.runSize=t.data.runSize,e.traceSize=t.data.traceSize)})):this.timer&&clearInterval(this.timer)},removeSelect:function(){var e,t=this,a="run"==this.currentTab?this.size_selection:this.trace_selection,s=[],n=Object(v["a"])(a);try{for(n.s();!(e=n.n()).done;){var i=e.value;s.push(k.post("./deleteIndex?index="+i.index+"&adminPassWord="+this.password))}}catch(r){n.e(r)}finally{n.f()}Promise.all(s).then((function(e){var a,s=[],n=Object(v["a"])(e);try{for(n.s();!(a=n.n()).done;){var i=a.value;i.data.acknowledged&&s.push(i)}}catch(r){n.e(r)}finally{n.f()}s.length==e.length?(alert("删除成功"),t.password=""):alert(e[0].data.message),t.getTraceInfo()}))},restSelect:function(){var e,t=this,a="run"==this.currentTab?this.size_selection:this.trace_selection,s=[],n=Object(v["a"])(a);try{for(n.s();!(e=n.n()).done;){var i=e.value;s.push(k.post("./resetIndex?index="+i.index))}}catch(r){n.e(r)}finally{n.f()}Promise.all(s).then((function(e){var a,s=[],n=Object(v["a"])(e);try{for(n.s();!(a=n.n()).done;){var i=a.value;i.data.acknowledged&&s.push(i)}}catch(r){n.e(r)}finally{n.f()}s.length==e.length?(alert("重置成功"),t.password=""):alert(e[0].data.message),t.getTraceInfo()}))},changeSizeSelect:function(e){this.size_selection=e},changeTraceSelect:function(e){this.trace_selection=e},getTraceInfo:function(){var e=this;this.size_selection=[],this.trace_selection=[],this.$Loading.start(),this.currentDate||(this.currentDate=new Date),k.post("./getServerInfo?index=plume_log_run_"+S()(this.currentDate).format("YYYYMMDD")+"*").then((function(t){e.$Loading.finish(),e.sizeInfo=x.a.get(t,"data",[])})),k.post("./getServerInfo?index=plume_log_trace_"+S()(this.currentDate).format("YYYYMMDD")+"*").then((function(t){e.$Loading.finish(),e.traceInfo=x.a.get(t,"data",[])}))}},mounted:function(){var e=this;this.getTraceInfo(),this.getQueueSize(),this.timer=setInterval((function(){e.getQueueSize()}),1e3)},beforeDestroy:function(){clearInterval(this.timer)}},we=ye,ke=(a("34ed"),a("abe9"),Object(o["a"])(we,he,pe,!1,null,"c3781a90",null)),Ce=ke.exports,xe=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper"},[a("div",{staticClass:"pnl_filters"},[a("log-header"),a("div",{staticStyle:{clear:"both"}})],1),a("div",{staticClass:"pnl_chart"},[e._v(" 日期和时间: "),a("DatePicker",{ref:"datePicker",staticStyle:{width:"280px"},attrs:{type:"datetimerange",options:e.dateOption,format:"yyyy-MM-dd HH:mm",placeholder:"选择日期与时间"},on:{"on-change":e.dateChange},model:{value:e.dateTimeRange,callback:function(t){e.dateTimeRange=t},expression:"dateTimeRange"}}),a("Button",{staticClass:"btn_search",attrs:{type:"primary",icon:"ios-search"},on:{click:e.doSearch}},[e._v("查询")]),a("div",{staticStyle:{clear:"both"}}),a("br"),a("br"),a("div",{staticClass:"chart",attrs:{id:"chart_error"}}),a("div",{staticClass:"chart",attrs:{id:"chart_errorRate"}})],1)])},Ne=[],Se=(a("b680"),{name:"Chart",data:function(){return{dateTimeRange:[S()(new Date).format("YYYY-MM-DD 00:00:00"),S()(new Date).format("YYYY-MM-DD 23:59:59")],dateOption:R}},computed:{chartInterval:function(){if(this.dateTimeRange.length>0){var e=new Date(this.dateTimeRange[1]).getTime()-new Date(this.dateTimeRange[0]).getTime();return e>6048e5?{format:"MM-DD",value:864e5}:e>2592e5?{format:"MM-DD HH:mm",value:432e5}:e>864e5?{format:"MM-DD HH:mm",value:216e5}:e<864e5?{format:"HH:mm",value:6e4}:{format:"MM-DD HH:mm",value:36e5}}return{format:"MM-DD HH:mm",value:36e5}}},components:{logHeader:O},methods:{dateChange:function(){var e=new Date(this.dateTimeRange[0]),t=new Date(this.dateTimeRange[1]);0==e.getHours()&&0==e.getMinutes()&&0==t.getHours()&&0==t.getMinutes()&&(this.dateTimeRange[1].setHours(23,59),this.$refs.datePicker.internalValue=x.a.clone(this.dateTimeRange))},draw:function(e,t){if(0==e.length)return!1;var a=this.$echarts.init(document.getElementById(t.chartId));window.addEventListener("resize",(function(){a.resize()})),a.setOption(t)},getChartData:function(){var e={},t=x.a.clone(new Date(this.dateTimeRange[0])),a=new Date(this.dateTimeRange[1]);e={query:{bool:{must:[{range:{dtTime:{gte:Date.parse(t),lt:Date.parse(a)}}}]}}},e.aggs={dataCount:{date_histogram:{field:"dtTime",interval:this.chartInterval.value,min_doc_count:0}}};var s="./clientQuery?size=1000&from=0&clientStartDate="+Date.parse(this.dateTimeRange[0])+"&clientEndDate="+Date.parse(this.dateTimeRange[1]);return k.post(s,e).then((function(e){var t=x.a.get(e,"data.aggregations.dataCount.buckets",[]);return x.a.map(t,(function(e){return{name:e.key,value:e.doc_count}}))}))},getErrorRate:function(){var e=x.a.clone(new Date(this.dateTimeRange[0])),t=new Date(this.dateTimeRange[1]),a=[],s={},n={dataCount:{date_histogram:{field:"dtTime",interval:this.chartInterval.value,min_doc_count:0}}};s={query:{bool:{must:[{range:{dtTime:{gte:Date.parse(e),lt:Date.parse(t)}}}]}},aggs:n};var i={query:{bool:{must:[{range:{dtTime:{gte:Date.parse(e),lt:Date.parse(t)}}},{match_phrase:{logLevel:{query:"ERROR"}}}]}},aggs:n},r="./clientQuery?size=1000&from=0&clientStartDate="+Date.parse(this.dateTimeRange[0])+"&clientEndDate="+Date.parse(this.dateTimeRange[1]);return a.push(k.post(r,s).then((function(e){return x.a.get(e,"data.aggregations.dataCount.buckets",[])}))),a.push(k.post(r,i).then((function(e){return x.a.get(e,"data.aggregations.dataCount.buckets",[])}))),Promise.all(a).then((function(e){var t=e[0],a=e[1];if(0==a.length||a.length数量:"+e.value+"条"},extraCssText:"text-align:left"},xAxis:{data:x.a.map(t,(function(t){return S()(t.name).format(e.chartInterval.format)})),axisLabel:{fontSize:12,color:"#666"}},yAxis:{axisLabel:{fontSize:12,color:"#666"}},series:[{name:"数量",type:"bar",data:x.a.map(t,(function(e){return e.value})),itemStyle:{borderColor:"rgb(110, 173, 193)",color:"rgba(110, 173, 193,0.6)"}}]})})),this.getErrorRate().then((function(t){console.log(t),e.draw(t,{chartId:"chart_errorRate",title:{text:"错误率",left:"center",top:20,textStyle:{color:"#333"}},tooltip:{formatter:function(e,t){return"时间:"+e.name+"
错误率:"+100*e.value+"%"},extraCssText:"text-align:left"},xAxis:{data:x.a.map(t,(function(t){return S()(t.name).format(e.chartInterval.format)})),axisLabel:{fontSize:12,color:"#666"}},yAxis:{axisLabel:{fontSize:12,color:"#666"}},series:[{name:"数量",type:"bar",data:x.a.map(t,(function(e){return e.value})),itemStyle:{borderColor:"rgb(255, 0, 0)",color:"rgba(255, 0, 0,0.6)"}}]})}))}},mounted:function(){this.doSearch()}}),Te=Se,De=(a("5953"),a("5797"),Object(o["a"])(Te,xe,Ne,!1,null,"46a17aa6",null)),Ie=De.exports,je=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper"},[a("log-header"),a("Modal",{attrs:{title:"报警设置"},on:{"on-ok":function(t){e.showDialog=!1},"on-cancel":function(t){e.showDialog=!1}},model:{value:e.showDialog,callback:function(t){e.showDialog=t},expression:"showDialog"}},[a("Form",{ref:"dataForm",attrs:{model:e.dataInfo,"label-width":80}},[a("FormItem",{attrs:{label:"应用名称",required:""}},[a("Input",{attrs:{placeholder:"输入应用名称"},model:{value:e.dataInfo.appName,callback:function(t){e.$set(e.dataInfo,"appName",t)},expression:"dataInfo.appName"}})],1),a("FormItem",{attrs:{label:"应用环境"}},[a("Input",{attrs:{placeholder:"输入应用环境"},model:{value:e.dataInfo.env,callback:function(t){e.$set(e.dataInfo,"env",t)},expression:"dataInfo.env"}})],1),a("FormItem",{attrs:{label:"应用分类"}},[a("Input",{attrs:{placeholder:"输入应用分类"},model:{value:e.dataInfo.appCategory,callback:function(t){e.$set(e.dataInfo,"appCategory",t)},expression:"dataInfo.appCategory"}})],1),a("FormItem",{attrs:{label:"模块名称(类路径)"}},[a("Input",{attrs:{placeholder:"输入模块名称(类路径)"},model:{value:e.dataInfo.className,callback:function(t){e.$set(e.dataInfo,"className",t)},expression:"dataInfo.className"}})],1),a("FormItem",{attrs:{label:"接收者",required:""}},[a("Input",{attrs:{type:"textarea",rows:4,placeholder:"输入接收者(逗号分隔); 如果包含all表示@所有人"},model:{value:e.dataInfo.receiver,callback:function(t){e.$set(e.dataInfo,"receiver",t)},expression:"dataInfo.receiver"}})],1),a("FormItem",{attrs:{label:"平台",required:""}},[a("Select",{attrs:{placeholder:"请选择报警平台"},model:{value:e.dataInfo.hookServe,callback:function(t){e.$set(e.dataInfo,"hookServe",t)},expression:"dataInfo.hookServe"}},e._l(e.hookServeList,(function(t){return a("Option",{key:t.value,attrs:{value:t.value}},[e._v(e._s(t.label)+" ")])})),1)],1),a("FormItem",{attrs:{label:"钩子",required:""}},[a("Input",{attrs:{placeholder:"输入钩子地址"},model:{value:e.dataInfo.webhookUrl,callback:function(t){e.$set(e.dataInfo,"webhookUrl",t)},expression:"dataInfo.webhookUrl"}})],1),a("FormItem",{attrs:{label:"错误数量",required:""}},[a("Input",{attrs:{type:"number",placeholder:"输入错误数量"},model:{value:e.dataInfo.errorCount,callback:function(t){e.$set(e.dataInfo,"errorCount",t)},expression:"dataInfo.errorCount"}})],1),a("FormItem",{attrs:{label:"时间间隔",required:""}},[a("Input",{attrs:{type:"number",placeholder:"输入时间间隔(s)"},model:{value:e.dataInfo.time,callback:function(t){e.$set(e.dataInfo,"time",t)},expression:"dataInfo.time"}})],1),a("FormItem",{attrs:{label:"状态"}},[a("i-switch",{attrs:{size:"large"},model:{value:e.dataInfo.status,callback:function(t){e.$set(e.dataInfo,"status",t)},expression:"dataInfo.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[e._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[e._v("关闭")])])],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"},on:{click:function(t){e.showDialog=!1}}},[e._v("关闭 ")]),a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.save}},[e._v(e._s(e.isEdit?"保存":"添加"))])])],1),a("Tabs",{attrs:{"active-key":"报警设置"}},[a("Tab-pane",{key:"报警设置",attrs:{icon:"md-settings",label:"报警设置"}},[a("Row",[a("Col",{staticStyle:{"margin-left":"10px"},attrs:{span:4}},[e._v(" 选择应用名称: "),a("Select",{staticStyle:{width:"200px"},attrs:{filterable:"",clearable:"",placeholder:"选择应用名称"},on:{"on-change":e.handleSearchSetting},model:{value:e.searchKey,callback:function(t){e.searchKey=t},expression:"searchKey"}},e._l(e.appNames,(function(t){return a("Option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("Button",{staticClass:"btn_add",attrs:{icon:"ios-add"},on:{click:e.add}},[e._v("添加")]),a("Button",{staticClass:"btn_delete",attrs:{icon:"ios-trash",disabled:e.isDisabled,type:"error"},on:{click:e.removeSelect}},[e._v("删除所选")])],1),a("Table",{attrs:{height:"600",content:e.self,columns:e.columns,data:e.showData},on:{"on-selection-change":e.changeSelect},scopedSlots:e._u([{key:"action",fn:function(t){t.row;var s=t.index;return[a("Button",{attrs:{size:"small"},on:{click:function(t){return e.edit(s)}}},[e._v("修改")]),e._v(" "),a("Button",{attrs:{type:"error",size:"small"},on:{click:function(t){return e.del(s)}}},[e._v("删除")])]}}])}),a("Row",{staticStyle:{"text-align":"right","margin-top":"5px","margin-right":"10px"}},[a("Page",{attrs:{total:e.warnData.length,"show-total":"","page-size":15},on:{"on-change":e.handlePageChange}})],1)],1),a("Tab-pane",{key:"报警记录",attrs:{icon:"md-alert",label:"报警记录"}},[e.logs.length>0?a("div",[a("Row",[a("Button",{staticClass:"btn_clear",attrs:{icon:"ios-trash"},on:{click:e.clearWarn}},[e._v("清空记录")])],1),a("ul",{staticClass:"logList"},e._l(e.logs,(function(t,s){return a("li",{key:s},[a("div",{staticClass:"time"},[e._v(e._s(e.formatTime(t.dataTime)))]),a("div",{staticClass:"cnt"},[a("span",{staticClass:"key"},[e._v("应用名称: ")]),e._v(e._s(t.appName))]),a("div",{staticClass:"cnt"},[a("span",{staticClass:"key"},[e._v("应用环境: ")]),e._v(e._s(t.env))]),a("div",{staticClass:"cnt"},[a("span",{staticClass:"key"},[e._v("类名: ")]),e._v(e._s(t.className))]),a("div",{staticClass:"cnt"},[a("span",{staticClass:"key"},[e._v("时间区间: ")]),e._v(e._s(t.time)+"秒")]),a("div",{staticClass:"cnt"},[a("span",{staticClass:"key"},[e._v("实际错误: ")]),e._v(e._s(t.errorCount)+"条")]),a("div",{staticClass:"cnt"},[a("span",{staticClass:"key"},[e._v("错误信息: ")]),e._v(" "+e._s(t.errorContent))]),a("div",{staticClass:"btn_showDetail"},[a("a",{attrs:{href:"javascript:void(0)"},on:{click:function(a){return e.doSearch(t)}}},[e._v("查看详情>>")])])])})),0),e.showMore?a("Button",{staticClass:"btn_more",on:{click:e.getMore}},[e._v("加载更多")]):e._e()],1):a("div",{staticStyle:{"text-align":"center","padding-top":"50px"}},[e._v("暂无数据")])])],1),a("confirm-delete",{on:{"on-confirm":e.confirmPassword},model:{value:e.showConfirm,callback:function(t){e.showConfirm=t},expression:"showConfirm"}})],1)},Ee=[],Me=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.show?a("div",{staticClass:"modal fade show model_pwd",staticStyle:{display:"block"},attrs:{tabindex:"-1",role:"dialog"}},[a("div",{staticClass:"modal-dialog",attrs:{role:"document"}},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[a("h5",{staticClass:"modal-title"},[e._v("管理密码")]),a("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"},on:{click:e.closeModal}},[a("span",{attrs:{"aria-hidden":"true"}},[e._v("×")])])]),a("div",{staticClass:"modal-body"},[a("p",[a("input",{directives:[{name:"model",rawName:"v-model",value:e.password,expression:"password"}],staticClass:"form-control",attrs:{type:"password",autofocus:"",placeholder:"输入管理员密码"},domProps:{value:e.password},on:{input:function(t){t.target.composing||(e.password=t.target.value)}}})])]),a("div",{staticClass:"modal-footer"},[a("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-dismiss":"modal"},on:{click:e.closeModal}},[e._v("关闭")]),a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.confirmModal}},[e._v("确认")])])])])]):e._e(),e.show?a("div",{staticClass:"modal-backdrop fade show"}):e._e()])},Oe=[],Re={name:"confirmDelete",data:function(){return{show:this.value,password:""}},props:{value:{type:Boolean,default:!1}},watch:{value:function(e){this.show=e},show:function(e){this.$emit("input",e)}},computed:{},mounted:function(){},methods:{closeModal:function(){this.show=!1,this.password=""},confirmModal:function(){this.show=!1,this.$emit("on-confirm",this.password),this.password=""}}},Ae=Re,ze=Object(o["a"])(Ae,Me,Oe,!1,null,null,null),Le=ze.exports,Fe={name:"Warn",data:function(){var e=this;return{searchKey:"",warnLogSearchKey:"",appNames:[],selection:[],showConfirm:!1,hookServeList:[{value:1,label:"钉钉"},{value:2,label:"企业微信"},{value:3,label:"飞书"},{value:4,label:"其他"}],hookServeMap:{1:"钉钉",2:"企业微信",3:"飞书",4:"其他"},dataInfo:{appName:"",env:"",appCategory:"",className:"",receiver:"",webhookUrl:"",time:60,hookServe:1,status:!1},pageSize:50,from:0,logs:[],warnData:[],showData:[],showDialog:!1,columns:[{type:"selection",width:60,align:"center"},{title:"ID",width:150,key:"id"},{title:"index",width:150,key:"index"},{title:"应用名称",key:"appName"},{title:"应用环境",key:"env"},{title:"应用分类",key:"appCategory"},{title:"模块名称",key:"className"},{title:"接收者",width:150,key:"receiver"},{title:"错误数量",width:150,key:"errorCount"},{title:"平台",key:"hookServe",width:100,render:function(t,a){return t("span",e.hookServeMap[a.row.hookServe])}},{title:"webHook",key:"webhookUrl"},{title:"时间",width:100,key:"time"},{title:"操作",slot:"action",width:150,align:"center"}],self:this,showMore:!0,isEdit:!1}},computed:{isDisabled:function(){return 0==this.selection.length}},components:{logHeader:O,confirmDelete:Le},methods:{handleSearchSetting:function(){var e=this;this.searchKey?this.showData=this.warnData.filter((function(t){return t.appName.includes(e.searchKey)||t.appCategory.includes(e.searchKey)||t.className.includes(e.searchKey)})):this.showData=this.warnData},handlePageChange:function(e){var t=15*(e-1),a=t+15;this.showData=this.warnData.slice(t,a)},removeSelect:function(){var e=this;if(this.selection.length>0&&confirm("确认要删除所选的监控么")){var t,a=[],s=Object(v["a"])(this.selection);try{for(s.s();!(t=s.n()).done;){var n=t.value;a.push(this.delIndex(n))}}catch(i){s.e(i)}finally{s.f()}Promise.all(a).then((function(){e.$Message.success("删除成功"),e.getData()}))}},changeSelect:function(e){this.selection=e},add:function(){this.initDataInfo(),this.isEdit=!1,this.showDialog=!0},delIndex:function(e){return new Promise((function(t,a){k.post("./deleteWarningRule?id="+e.id).then((function(e){e.data.success?t():a()}))}))},del:function(e){var t=this,a=this.showData[e];confirm("确认要删除ID为 "+a.id+" 的监控么")&&this.delIndex(a).then((function(){t.$Message.success("删除成功"),t.getData()}))},edit:function(e){this.dataInfo=this.showData[e],this.isEdit=!0,this.showDialog=!0},save:function(){return""==this.dataInfo.appName?(this.$Message.error("请填写应用名称"),!1):""==this.dataInfo.receiver?(this.$Message.error("请填写接收者"),!1):""==this.dataInfo.webhookUrl?(this.$Message.error("请填写钩子地址"),!1):""==this.dataInfo.errorCount?(this.$Message.error("请填写错误数量"),!1):""==this.dataInfo.time?(this.$Message.error("请填写间隔时间"),!1):(""==this.dataInfo.env&&(this.dataInfo.env="default"),void this.setData(this.dataInfo))},getAppNames:function(){var e=this;sessionStorage["cache_appNames"]&&sessionStorage["cache_appNames_time"]&&sessionStorage["cache_appNames_time"]>(new Date).getTime()-18e5?this.appNames=JSON.parse(sessionStorage["cache_appNames"]):k.post("./queryAppName?from=0&size=0",{size:0,aggregations:{dataCount:{terms:{size:1e3,field:"appName"}}}}).then((function(t){var a=x.a.get(t,"data.aggregations.dataCount.buckets",[]).map((function(e){return e.key}));sessionStorage["cache_appNames"]=JSON.stringify(a),sessionStorage["cache_appNames_time"]=(new Date).getTime(),e.appNames=a}))},initDataInfo:function(){this.dataInfo={appName:"",env:"",appCategory:"",className:"",receiver:"",webhookUrl:"",errorCount:10,errorContent:"",status:!0,time:60}},setData:function(e){var t=this,a=x.a.clone(e),s=a.id||Date.now();a.status=a.status?1:0,k.post("./saveWarningRuleList?id="+s,a).then((function(e){e.data.success&&(t.$Message.success("保存成功"),t.showDialog=!1,t.getData())}))},getData:function(){var e=this;this.$Loading.start(),k.post("./getWarningRuleList").then((function(t){e.$Loading.finish();var a=x.a.get(t,"data",[]).map((function(e){return Object(m["a"])(Object(m["a"])({},e),{},{status:1==e.status})}));e.warnData=a,e.showData=a.slice(0,15)}))},formatTime:function(e){return e?S()(e).format("YYYY-MM-DD HH:mm:ss"):""},getLog:function(){var e=this;k.post("./query?index=plumelog_monitor_message_key&from="+this.from+"&size="+this.pageSize,{query:{match_all:{}},sort:[{dataTime:"desc"}]}).then((function(t){var a=x.a.get(t,"data.hits.hits",[]).map((function(e){return Object(m["a"])({},e._source)}));a.length==e.pageSize?e.showMore=!0:e.showMore=!1,e.logs=a}))},getMore:function(){this.from+=this.pageSize,this.getLog()},doSearch:function(e){this.$emit("init",{}),this.$router.push({name:"Home",query:{className:e.className,appName:e.appName,env:e.env,time:e.dataTime-6e4+","+e.dataTime,logLevel:"ERROR"}})},clearWarn:function(){this.showConfirm=!0},confirmPassword:function(e){var t=this;k.post("./deleteIndex?index=plumelog_monitor_message_key&adminPassWord="+e).then((function(e){console.log(e),e.data.acknowledged?(alert("删除成功"),t.logs=[]):alert(results[0].data.message)}))}},mounted:function(){this.getAppNames(),this.getData(),this.getLog()}},$e=Fe,We=(a("0872"),Object(o["a"])($e,je,Ee,!1,null,null,null)),qe=We.exports,He=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper"},[a("div",{staticClass:"pnl_filters"},[a("log-header"),a("div",{staticStyle:{clear:"both"}}),a("div",{staticClass:"pnl_selectAppName"},[e._v(" 选择应用名称: "),a("Select",{staticStyle:{width:"200px"},attrs:{filterable:"",placeholder:"选择应用名称"},on:{"on-change":e.getExtendList},model:{value:e.currentAppName,callback:function(t){e.currentAppName=t},expression:"currentAppName"}},e._l(e.appNames,(function(t){return a("Option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),e.currentAppName?a("div",{staticClass:"pnl_data"},[a("div",{staticClass:"pnl_controls"},[a("Button",{staticClass:"btn_addField",staticStyle:{float:"right"},attrs:{icon:"md-add"},on:{click:e.addField}},[e._v("添加字段")]),a("div",{staticStyle:{clear:"both"}})],1),a("Table",{attrs:{height:"600",content:e.self,columns:e.columns,data:e.extendList},scopedSlots:e._u([{key:"action",fn:function(t){var s=t.row;return[a("Button",{attrs:{type:"error",size:"small"},on:{click:function(t){return e.removeExtend(s.field)}}},[e._v("删除")])]}}],null,!1,1746045187)})],1):e._e()],1),a("Modal",{attrs:{title:"添加扩展字段","ok-text":"添加"},on:{"on-ok":e.confirmModal,"on-cancel":function(t){e.showDialog=!1}},model:{value:e.showDialog,callback:function(t){e.showDialog=t},expression:"showDialog"}},[a("Form",{attrs:{model:e.formItem,"label-width":100}},[a("FormItem",{attrs:{label:"扩展字段名"}},[a("Input",{attrs:{placeholder:"输入扩展字段名"},model:{value:e.formItem.field,callback:function(t){e.$set(e.formItem,"field",t)},expression:"formItem.field"}})],1),a("FormItem",{attrs:{label:"字段显示名"}},[a("Input",{attrs:{placeholder:"输入扩展字段显示名"},model:{value:e.formItem.fieldName,callback:function(t){e.$set(e.formItem,"fieldName",t)},expression:"formItem.fieldName"}})],1)],1)],1)],1)},Ye=[],Pe={name:"Expand",data:function(){return{showDialog:!1,self:this,extendList:[],appNames:[],currentAppName:"",formItem:{field:"",fieldName:""},columns:[{title:"扩展字段",key:"field"},{title:"字段名",key:"fieldName"},{title:"操作",width:100,slot:"action"}]}},computed:{},components:{logHeader:O},methods:{confirmModal:function(){var e=this;this.formItem.field&&this.formItem.fieldName?k.post("./addExtendfield?appName="+this.currentAppName+"&field="+this.formItem.field+"&fieldName="+this.formItem.fieldName).then((function(t){x.a.get(t,"data",!1)?(e.$Message.success("添加成功"),e.getExtendList(e.currentAppName),e.formItem={field:"",fieldName:""}):e.$Message.error("添加失败")})):(this.$Message.warning("请把扩展字段数据填写完整"),setTimeout((function(){e.showDialog=!0}),10))},addField:function(){this.showDialog=!0},removeExtend:function(e){var t=this;confirm("确认要删除应用 "+this.currentAppName+" 下的扩展字段 "+e+" 吗?")&&k.post("./delExtendfield?appName="+this.currentAppName+"&field="+e).then((function(e){x.a.get(e,"data",!1)?(t.$Message.success("删除成功"),t.getExtendList(t.currentAppName)):t.$Message.error("删除失败")}))},getExtendList:function(e){var t=this;e&&(this.$Loading.start(),k.post("./getExtendfieldList?appName="+e).then((function(e){var a=x.a.get(e,"data",{}),s=[];for(var n in a)s.push({field:n,fieldName:a[n]});t.extendList=s,t.$Loading.finish()})))},getAppNames:function(){var e=this;sessionStorage["cache_appNames"]&&sessionStorage["cache_appNames_time"]&&sessionStorage["cache_appNames_time"]>(new Date).getTime()-18e5?this.appNames=JSON.parse(sessionStorage["cache_appNames"]):k.post("./queryAppName?from=0&size=0",{size:0,aggregations:{dataCount:{terms:{size:1e3,field:"appName"}}}}).then((function(t){var a=x.a.get(t,"data.aggregations.dataCount.buckets",[]).map((function(e){return e.key}));sessionStorage["cache_appNames"]=JSON.stringify(a),sessionStorage["cache_appNames_time"]=(new Date).getTime(),e.appNames=a}))}},mounted:function(){this.getAppNames()}},Be=Pe,Ke=(a("9a92"),Object(o["a"])(Be,He,Ye,!1,null,null,null)),Qe=Ke.exports,Je=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper"},[a("div",{staticClass:"pnl_filters"},[a("log-header"),a("Row",[a("div",{staticClass:"pnl_selectAppName",staticStyle:{display:"inline-block",float:"left","margin-left":"10px"}},[e._v(" 选择应用名称:"+e._s(this.loadType)+" "),a("Select",{staticStyle:{width:"220px"},attrs:{filterable:"",clearable:"",placeholder:"选择应用名称"},on:{"on-change":e.handleSelectAppName},model:{value:e.currentAppName,callback:function(t){e.currentAppName=t},expression:"currentAppName"}},e._l(e.appNames,(function(t){return a("Option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("div",{staticStyle:{display:"inline-block",float:"left","margin-left":"10px"}},[a("RadioGroup",{attrs:{type:"button"},on:{"on-change":e.handleRangeChange},model:{value:e.range,callback:function(t){e.range=t},expression:"range"}},[a("Radio",{attrs:{label:"week"}},[e._v("近7天")]),a("Radio",{attrs:{label:"month"}},[e._v("近30天")])],1)],1)]),a("Row",{staticStyle:{"margin-top":"10px","padding-left":"37px"}},[a("RadioGroup",{staticStyle:{float:"left"},attrs:{type:"button"},on:{"on-change":e.handleIndexChange},model:{value:e.indexKey,callback:function(t){e.indexKey=t},expression:"indexKey"}},e._l(e.indexStore,(function(t){return a("Radio",{key:t.key,attrs:{label:t.key}},[e._v(e._s(t.key))])})),1)],1),a("div",{staticClass:"chart",attrs:{id:"errorChart"}}),a("div",{staticClass:"chart",attrs:{id:"classErrorChart"}})],1)])},Ue=[],Ge=(a("baa5"),{name:"Errors",data:function(){return{range:"week",showDialog:!1,self:this,extendList:[],indexStore:[],appNames:[],currentAppName:"",formItem:{field:"",fieldName:""},loadType:"all",selectedIndex:null,indexKey:null}},computed:{},components:{logHeader:O},methods:{isNumber:function(e){var t=/^\d+(\.\d+)?$/,a=/^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/;return!(!t.test(e)&&!a.test(e))},handleIndexChange:function(e){var t=this;this.loadType="day",this.indexKey=e,this.selectedIndex="plume_log_run_"+e+"*",this.getErrorRate(this.selectedIndex).then((function(e){t.drawErrorLine(e)})),this.getClassErrorRate(this.selectedIndex).then((function(e){t.drawClassErrorLine(e)}))},handleSelectAppName:function(){var e=this;this.currentAppName?(this.loadType="app",this.selectedIndex=null,this.indexKey=null):(this.loadType="all",this.selectedIndex=null,this.indexKey=null,this.indexStore=[]),this.getErrorRate(this.selectedIndex).then((function(t){e.drawErrorLine(t),e.currentAppName&&(e.indexStore=t.filter((function(e){return e.doc_count>0})))})),this.getClassErrorRate(this.selectedIndex).then((function(t){e.drawClassErrorLine(t)}))},handleRangeChange:function(){var e=this;this.currentAppName?this.loadType="app":(this.loadType="all",this.selectedIndex=null,this.indexStore=[]),this.getErrorRate().then((function(t){e.drawErrorLine(t),e.currentAppName&&(e.indexStore=t.filter((function(e){return e.doc_count>0})))})),this.getClassErrorRate(this.selectedIndex).then((function(t){e.drawClassErrorLine(t)}))},drawErrorLine:function(e){var t=this,a=this.$echarts.init(document.getElementById("errorChart"));a.off("click"),0!=e.length?(a.on("click",(function(e){"all"===t.loadType?(t.loadType="app",t.currentAppName=e.name,t.getErrorRate().then((function(e){t.drawErrorLine(e),t.indexStore=e.filter((function(e){return e.doc_count>0}))})),t.getClassErrorRate(t.selectedIndex).then((function(e){t.drawClassErrorLine(e)}))):"app"===t.loadType&&(t.loadType="day",t.selectedIndex="plume_log_run_"+e.name+"*",t.indexKey=e.name,t.getErrorRate(t.selectedIndex).then((function(e){t.drawErrorLine(e)})),t.getClassErrorRate(t.selectedIndex).then((function(e){t.drawClassErrorLine(e)})))})),window.addEventListener("resize",(function(){a.resize()})),a.setOption({grid:{x:70,y:10,y2:200},tooltip:{position:function(e){return[e[0]-50,e[1]-50]},extraCssText:"text-align:left"},xAxis:{data:x.a.map(e,(function(e){return t.isNumber(e.key)?"number"===typeof e.key?S()(e.key).format("MM-DD HH:mm"):e.key:e.key.substring(e.key.lastIndexOf(".")+1)})),axisLabel:{fontSize:12,color:"#666",interval:0,rotate:30}},yAxis:{axisLabel:{fontSize:12,color:"#666",formatter:function(e){return e>1e3?e/1e3+"k":e}}},series:[{name:"数量",type:"bar",data:x.a.map(e,(function(e){return e.doc_count})),itemStyle:{borderColor:"rgb(255,0,0)",color:"rgba(255, 0, 0,0.6)"}}]})):a.clear()},drawClassErrorLine:function(e){var t=this.$echarts.init(document.getElementById("classErrorChart"));0!=e.length?(window.addEventListener("resize",(function(){t.resize()})),t.setOption({title:{text:"类统计",left:20},grid:{x:70,y:70,y2:200},tooltip:{position:function(e){return[e[0]-50,e[1]-50]},extraCssText:"text-align:left"},xAxis:{data:x.a.map(e,(function(e){return e.key.substring(e.key.lastIndexOf(".")+1)?e.key.substring(e.key.lastIndexOf(".")+1):e.key})),axisLabel:{fontSize:12,color:"#666",interval:0,rotate:30}},yAxis:{axisLabel:{fontSize:12,color:"#666",formatter:function(e){return e>1e3?e/1e3+"k":e}}},series:[{name:"数量",type:"bar",data:x.a.map(e,(function(e){return e.doc_count})),itemStyle:{borderColor:"rgb(255,0,0)",color:"rgba(255, 0, 0,0.6)"}}]})):t.clear()},getClassErrorRate:function(e){var t=this;this.$Loading.start();var a=[],s={query:{bool:{must:[{term:{logLevel:"ERROR"}}]}},aggs:{dataCount:{terms:{size:20,min_doc_count:0}}}},n=[e];this.currentAppName&&s.query.bool.must.push({term:{appName:this.currentAppName}});var i="";"all"!==this.loadType&&"app"!==this.loadType||(i=this.range),"app"!==this.loadType&&"day"!==this.loadType||(s.aggs.dataCount.terms["field"]="className.keyword",s.aggs.dataCount.terms["size"]=20);var r="./query?index="+n.join(",")+"&range="+i+"&size=0&from=0&classErrChat";return a.push(k.post(r,s).then((function(e){return x.a.get(e,"data.aggregations.dataCount.buckets",[])}))),Promise.all(a).then((function(e){var a=e[0];if(t.$Loading.finish(),0==a.length)return[];for(var s=[],n=0;n0?s.filter((function(e){return e.key===t}))[0].doc_count:s.push({key:t,doc_count:0}):s.filter((function(e){return e.key===t})).length>0?s.filter((function(e){return e.key===t}))[0].doc_count:s.push({key:t,doc_count:n})},i=0;i(new Date).getTime()-18e5?this.appNames=JSON.parse(sessionStorage["cache_appNames"]):k.post("./queryAppName?from=0&size=0",{size:0,aggregations:{dataCount:{terms:{size:1e3,field:"appName"}}}}).then((function(t){var a=x.a.get(t,"data.aggregations.dataCount.buckets",[]).map((function(e){return e.key}));sessionStorage["cache_appNames"]=JSON.stringify(a),sessionStorage["cache_appNames_time"]=(new Date).getTime(),e.appNames=a}))}},mounted:function(){var e=this;this.getAppNames(),this.getErrorRate().then((function(t){e.drawErrorLine(t)}))}}),Ve=Ge,Ze=(a("6496"),Object(o["a"])(Ve,Je,Ue,!1,null,null,null)),Xe=Ze.exports,et=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper"},[a("div",{staticClass:"layer bg",attrs:{id:"login"}}),e._m(0),a("div",{staticClass:"flex-center pnl_content"},[e._m(1),a("div",{staticClass:"pnl_login"},[a("div",{staticClass:"title"},[e._v("登录")]),a("div",{staticClass:"pnl_input"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.formData.username,expression:"formData.username"}],attrs:{type:"text",placeholder:"输入用户名",id:"txtUserName"},domProps:{value:e.formData.username},on:{input:function(t){t.target.composing||e.$set(e.formData,"username",t.target.value)}}}),a("br"),a("input",{directives:[{name:"model",rawName:"v-model",value:e.formData.password,expression:"formData.password"}],attrs:{type:"password",placeholder:"输入密码",id:"txtPassWord"},domProps:{value:e.formData.password},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.submit(t)},input:function(t){t.target.composing||e.$set(e.formData,"password",t.target.value)}}}),a("br"),a("input",{attrs:{type:"button",value:"提交",id:"btn_login"},on:{click:e.submit}})])])])])},tt=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("nav",{staticClass:"navbar navbar-dark bg-dark"},[a("a",{staticClass:"navbar-brand icon_log",attrs:{target:"_blank",href:"http://www.plumelog.com"}}),a("ul",{staticClass:"navbar-nav"},[a("li",{staticClass:"nav-item "},[a("a",{staticClass:"nav-link",attrs:{target:"_blank",href:"http://www.plumelog.com"}},[e._v("官网")])]),a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{target:"_blank",href:"https://gitee.com/plumeorg/plumelog/blob/master/FASTSTART.md"}},[e._v("文档")])]),a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{target:"_blank",href:"https://gitee.com/plumeorg/plumelog"}},[e._v("社区")])])])])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_desc"},[a("a",{staticClass:"icon_log",attrs:{target:"_blank",href:"http://www.plumelog.com"}}),a("p",[e._v("A simple and easy to use Java log component")]),a("p",[e._v("Support 10 billion logs")]),a("p",[e._v("It is more convenient to query the log")])])}],at={particles:{number:{value:160,density:{enable:!0,value_area:800}},color:{value:"#ffffff"},shape:{type:"circle",stroke:{width:0,color:"#000000"},polygon:{nb_sides:5}},opacity:{value:1,random:!0,anim:{enable:!0,speed:1,opacity_min:0,sync:!1}},size:{value:3,random:!0,anim:{enable:!1,speed:4,size_min:.3,sync:!1}},line_linked:{enable:!1,distance:150,color:"#ffffff",opacity:.4,width:1},move:{enable:!0,speed:1,direction:"none",random:!0,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:600,rotateY:600}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"bubble"},onclick:{enable:!0,mode:"repulse"},resize:!0},modes:{grab:{distance:400,line_linked:{opacity:1}},bubble:{distance:250,size:0,duration:2,opacity:0,speed:3},repulse:{distance:400,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0};a("572f");var st={name:"Login",data:function(){return{formData:{username:null,password:null}}},mounted:function(){particlesJS("login",at),b.a.post("./logout").then((function(e){console.log(e.data)}))},methods:{submit:function(){b.a.post("./login",this.formData).then((function(e){402===e.data.code?alert("用户名或密码错误!"):vt.replace({path:"/"})}))}}},nt=st,it=(a("79e4"),Object(o["a"])(nt,et,tt,!1,null,"6359534e",null)),rt=it.exports,ot=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pnl_wraper",staticStyle:{"padding-bottom":"0"}},[a("div",{staticClass:"pnl_filters"},[[a("log-header"),a("div",{staticStyle:{width:"1300px"}},[a("table",{staticClass:"tbl_filters",staticStyle:{width:"100%"}},[a("tbody",[a("tr",[a("td",{staticClass:"key"},[e._v("应用名称")]),a("td",{staticStyle:{width:"245px"}},[a("AutoComplete",{staticClass:"txt",attrs:{data:e.appNameComplete,placeholder:"应用名称,可搜索",clearable:!0,"filter-method":e.completeFilter},on:{"on-change":e.appNameChange},model:{value:e.filter.appName,callback:function(t){e.$set(e.filter,"appName",t)},expression:"filter.appName"}})],1),a("td",{staticClass:"key"},[e._v("应用环境")]),a("td",{staticStyle:{width:"245px"}},[a("AutoComplete",{staticClass:"txt",attrs:{data:e.envComplete,placeholder:"项目的环境",clearable:!0,"filter-method":e.completeFilter},model:{value:e.filter.env,callback:function(t){e.$set(e.filter,"env",t)},expression:"filter.env"}})],1),a("td",{staticClass:"key"},[e._v("日志等级")]),a("td",{staticStyle:{width:"180px"}},[a("Select",{staticStyle:{width:"162px"},attrs:{placeholder:"请选择日志等级"},model:{value:e.filter.logLevel,callback:function(t){e.$set(e.filter,"logLevel",t)},expression:"filter.logLevel"}},[a("Option",{key:"ALL",attrs:{value:""}},[e._v("所有")]),a("Option",{key:"INFO",attrs:{value:"INFO"}},[e._v("INFO")]),a("Option",{key:"ERROR",attrs:{value:"ERROR"}},[e._v("ERROR")]),a("Option",{key:"WARN",attrs:{value:"WARN"}},[e._v("WARN")]),a("Option",{key:"DEBUG",attrs:{value:"DEBUG"}},[e._v("DEBUG")])],1)],1),a("td",{staticClass:"key"},[e._v("服务器")]),a("td",{staticStyle:{width:"180px"}},[a("Input",{staticClass:"txt",staticStyle:{width:"162px"},attrs:{name:"serverName",placeholder:"服务器Ip或者host",clearable:!0},model:{value:e.filter.serverName,callback:function(t){e.$set(e.filter,"serverName",t)},expression:"filter.serverName"}})],1),a("td",{staticStyle:{width:"180px"}},[a("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:e.connect}},[e._v("连接")]),a("Button",{staticStyle:{"margin-left":"10px"},on:{click:e.closeHandler}},[e._v("停止")])],1)])])])])],a("div",{staticStyle:{clear:"both"}})],2),a("div",{staticClass:"pnl_content",attrs:{id:"plume-console"}},[a("div",{ref:"terminal",staticStyle:{width:"100%",height:"100%"},attrs:{id:"terminal-container"}})])])},lt=[],ct=a("fcf3"),dt=(a("abb2"),a("47d0")),ut={name:"Home",data:function(){return{rowLen:300,appNameComplete:[],filter:{appName:"",env:"",logLevel:""},list:[],messageList:[],ws:null,allAppNames:[],appNameWithEnvMap:{},envWithAppNameMap:{},allEnvs:[],envComplete:[],stop:!1,inited:!1,shellWs:"",term:"",rows:40,cols:100}},components:{logHeader:O,expandRow:Y},destroyed:function(){console.log("destory")},methods:{completeFilter:function(e,t){return 0===t.indexOf(e)},dateFormat:function(e){return S()(parseInt(e)).format("YYYY-MM-DD HH:mm:ss.SSS")},doSearch:function(){this.ws.send(this.appName)},appNameChange:function(){},searchAppName:function(){var e=this;0===this.appNameComplete.length&&(sessionStorage["cache_appNameWithEnvs"]&&sessionStorage["cache_appNameWithEnvs_time"]&&sessionStorage["cache_appNameWithEnvs_time"]>(new Date).getTime()-18e5?this.analysisAppNameWithEnv():k.post("./queryAppNames?appNameWithEnv",{size:0,aggregations:{dataCount:{terms:{size:1e3,field:"appNameWithEnv"}}}}).then((function(t){sessionStorage["cache_appNameWithEnvs"]=JSON.stringify(t.data),sessionStorage["cache_appNameWithEnvs_time"]=(new Date).getTime(),e.analysisAppNameWithEnv()})))},analysisAppNameWithEnv:function(){var e=JSON.parse(sessionStorage["cache_appNameWithEnvs"]);this.appNameWithEnvMap={},this.envWithAppNameMap={};for(var t=0,a=e.length;t1&&""!==s[1]&&(this.appNameWithEnvMap[s[0]].push(s[1]),this.envWithAppNameMap[s[1]]||(this.envWithAppNameMap[s[1]]=[]),this.envWithAppNameMap[s[1]].push(s[0]))}for(var n in this.allAppNames=[],this.appNameWithEnvMap)this.appNameWithEnvMap.hasOwnProperty(n)&&this.allAppNames.push(n);for(var i in this.allAppNames.sort((function(e,t){return e.localeCompare(t)})),this.appNameComplete=this.allAppNames,this.allEnvs=[],this.envWithAppNameMap)this.envWithAppNameMap.hasOwnProperty(i)&&this.allEnvs.push(i);this.allEnvs.sort((function(e,t){return e.localeCompare(t)})),this.envComplete=this.allEnvs},init:function(){if(this.searchAppName(),!this.term){var e=this;document.querySelector(".pnl_content");this.rows=document.querySelector(".pnl_content").clientHeight/16-6,this.cols=document.querySelector(".pnl_content").clientWidth/14;var t=new ct["Terminal"]({fontSize:14,rendererType:"canvas",rows:parseInt(e.rows),cols:parseInt(e.cols),convertEol:!0,disableStdin:!1,cursorStyle:"underline",cursorBlink:!0,theme:{foreground:"#7e9192",background:"#002833",cursor:"help",lineHeight:16}}),a=new dt["FitAddon"];t.loadAddon(a),t.open(this.$refs["terminal"]),a.fit(),e.term=t}},closeHandler:function(){this.ws&&this.ws.close(),this.ws=null},connect:function(){var e=this;if(this.ws)this.ws.send(JSON.stringify(this.filter));else if("WebSocket"in window){var t=window.document.location.host,a=window.document.location.pathname,s=a.substring(0,a.substr(1).indexOf("/")+1),n=t;"/plumelog"!=s&&(n=t+s);var i="https:"==document.location.protocol,r="ws://"+n+"/plumelog/websocket";i&&(r="wss://"+n+"/plumelog/websocket");var o=new WebSocket(r);o.onerror=function(t){e.term.writeln(" ".concat(l["ERROR"]," ").concat(e.dateFormat((new Date).getTime())," 链接异常"))},o.onopen=function(){e.term.writeln(" ".concat(e.dateFormat((new Date).getTime())," 链接成功")),e.ws.send(JSON.stringify(e.filter))};var l={ERROR:"",INFO:"",WARN:"",DEBUG:""},c={ERROR:"1",INFO:"1",WARN:"1",DEBUG:"2"},d={ERROR:"[ERROR]",INFO:"[INFO ]",WARN:"[WARN ]",DEBUG:"[DEBUG]"};o.onmessage=function(t){var a=JSON.parse(t.data);e.term.writeln(" [".concat(c[a.logLevel],";37m").concat(e.dateFormat(a.dtTime)," ").concat(l[a.logLevel]).concat(d[a.logLevel]," [").concat(c[a.logLevel],";34m").concat(a.appName," [").concat(c[a.logLevel],";33m").concat(a.serverName," [").concat(c[a.logLevel],";32m").concat(a.className,".").concat(a.method," ").concat(l[a.logLevel]).concat(a.content))},o.onclose=function(){e.term.writeln(" ".concat(e.dateFormat((new Date).getTime())," 链接关闭"))},this.ws=o}else alert("浏览器不支持")},logModelNormalRowMouseEnter:function(e){this.stop=!0,e.currentTarget.className="log_model_normal_row_enter"},logModelNormalRowMouseLeave:function(e){this.stop=!1,e.currentTarget.className="log_model_normal_row"},queryFilterCheck:function(e,t,a){""!==a?e[t]=a:e[t]&&delete e[t]}},watch:{appName:{handler:function(){this.doSearch()},deep:!0},dateTimeRange:{handler:function(){var e=Object(m["a"])({},this.$route.query);if(this.dateTimeRange.length>0)if(""!==this.dateTimeRange[0]&&""!==this.dateTimeRange[1]){var t=S()(this.dateTimeRange[0]).valueOf(),a=S()(this.dateTimeRange[1]).valueOf();this.queryFilterCheck(e,"time",[t,a].join())}else if(""!==this.dateTimeRange[0]){var s=S()(this.dateTimeRange[0]).valueOf();this.queryFilterCheck(e,"time",[s,""].join())}else if(""!==this.dateTimeRange[1]){var n=S()(this.dateTimeRange[1]).valueOf();this.queryFilterCheck(e,"time",["",n].join())}else this.queryFilterCheck(e,"time","");else this.queryFilterCheck(e,"time","");this.$router.push({query:Object(m["a"])({},e)}).catch((function(e){return e}))},deep:!0},searchKey:{handler:function(){var e=Object(m["a"])({},this.$route.query);this.queryFilterCheck(e,"searchKey",this.searchKey),this.$router.push({query:Object(m["a"])({},e)}).catch((function(e){return e})),this.from=0}},"$route.path":function(e,t){("/"===e&&"/login"===t||"/"===e&&"/warn"===t)&&this.init()},list:function(){this.$nextTick((function(){this.tableModel||z()(".log_model_normal_row_selector").each((function(){var e=z()(this);if(e.find(".ivu-tooltip-rel")[0].offsetHeight>72){var t=function t(a){"A"!==a.target.nodeName&&a.target.className.indexOf("row_search")<0&&(a.preventDefault(),e.hasClass("row_over_flow_hidden")?e.removeClass("row_over_flow_hidden can_click").removeAttr("title").off("click"):e.addClass("row_over_flow_hidden can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)})))};e.addClass("can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)})),z()(e.find(".row_pick_up_text")[0]).show().on("click",(function(a){if(a.preventDefault(),!e.hasClass("row_over_flow_hidden")){var s=e[0].offsetTop+document.getElementsByClassName("pnl_content")[0].offsetTop;s<(document.documentElement.scrollTop||document.body.scrollTop)&&(document.documentElement.scrollTop=document.body.scrollTop=s),e.addClass("row_over_flow_hidden can_click").attr("title","点击显示完整信息").on("click",(function(e){t(e)}))}}))}else z()(e.find(".row_pick_up_text")[0]).hide()}))}))}},deactivated:function(){this.ws&&this.ws.close(),this.ws=null},activated:function(){this.init()}},ht=ut,pt=(a("4f36"),a("92df"),a("c79a"),Object(o["a"])(ht,ot,lt,!1,null,"7e4229ed",null)),mt=pt.exports;n["default"].use(u["a"]);var ft=[{path:"/login",name:"Login",component:rt},{path:"/trace",name:"Trace",component:ue},{path:"/",name:"Home",component:J},{path:"/console",name:"Console",component:mt},{path:"/top",name:"Home",component:J},{path:"/size",name:"Size",component:Ce},{path:"/expand",name:"Expand",component:Qe},{path:"/errors",name:"Errors",component:Xe},{path:"/chart",name:"Chart",component:Ie},{path:"/warn",name:"Warn",component:qe}],gt=new u["a"]({routes:ft}),vt=gt;n["default"].use(I["a"]);var _t=new I["a"].Store({state:{config:{modeName:""}},getters:{config:function(e){return e.config}},mutations:{setConfig:function(e,t){e.config=t}},actions:{getConfig:function(e){return Object(s["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=e.commit,e.state,k.get("./getRunModel").then((function(e){a("setConfig",{modeName:e.data})}));case 2:case"end":return t.stop()}}),t)})))()}},modules:{}}),bt=a("3eba");a("94b1"),a("ef97"),a("c037"),a("007d"),a("627c"),n["default"].prototype.$echarts=bt,n["default"].config.productionTip=!1,n["default"].use(w.a),w.a.LoadingBar.config({color:"#5cb85c",failedColor:"#f0ad4e",height:3}),new n["default"]({router:vt,store:_t,render:function(e){return e(d)},mounted:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("getConfig");case 2:case"end":return t.stop()}}),t)})))()}}).$mount("#app")},5797:function(e,t,a){"use strict";var s=a("44ad6"),n=a.n(s);n.a},5953:function(e,t,a){"use strict";var s=a("cb49"),n=a.n(s);n.a},"5b8f":function(e,t,a){},6496:function(e,t,a){"use strict";var s=a("4584"),n=a.n(s);n.a},"75b8":function(e,t,a){},"79e4":function(e,t,a){"use strict";var s=a("9241"),n=a.n(s);n.a},"7c55":function(e,t,a){"use strict";var s=a("2395"),n=a.n(s);n.a},"83d8":function(e,t,a){},"8cbc":function(e,t,a){},"8d91":function(e,t,a){},9241:function(e,t,a){},"92df":function(e,t,a){"use strict";var s=a("ff84"),n=a.n(s);n.a},"9a3e":function(e,t,a){"use strict";var s=a("0bf1"),n=a.n(s);n.a},"9a92":function(e,t,a){"use strict";var s=a("75b8"),n=a.n(s);n.a},"9c08":function(e,t,a){},"9d47":function(e,t,a){},a354:function(e,t,a){},abe9:function(e,t,a){"use strict";var s=a("1138"),n=a.n(s);n.a},c79a:function(e,t,a){"use strict";var s=a("d02e"),n=a.n(s);n.a},cb49:function(e,t,a){},cf95:function(e,t,a){"use strict";var s=a("211f"),n=a.n(s);n.a},d02e:function(e,t,a){},d385:function(e,t,a){"use strict";var s=a("edc3"),n=a.n(s);n.a},d5fc:function(e,t,a){},de16:function(e,t,a){"use strict";var s=a("8d91"),n=a.n(s);n.a},e04b:function(e,t,a){"use strict";var s=a("9c08"),n=a.n(s);n.a},e42c:function(e,t,a){(function(t){a("4160"),a("a15b"),a("d81d"),a("fb6a"),a("d3b7"),a("4d63"),a("ac1f"),a("25f0"),a("466d"),a("5319"),a("159b");var s="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(e){var t=/\blang(?:uage)?-([\w-]+)\b/i,a=0,s={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof n?new n(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/t.length)return;if(!(x instanceof n)){var N=1;if(_&&k!=a.tail.prev){f.lastIndex=C;var S=f.exec(t);if(!S)break;var T=S.index+(v&&S[1]?S[1].length:0),D=S.index+S[0].length,I=C;for(I+=k.value.length;I<=T;)k=k.next,I+=k.value.length;if(I-=k.value.length,C=I,k.value instanceof n)continue;for(var j=k;j!==a.tail&&(I"+i.content+""},!e.document)return e.addEventListener&&(s.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var a=JSON.parse(t.data),n=a.language,i=a.code,r=a.immediateClose;e.postMessage(s.highlight(i,s.languages[n],n)),r&&e.close()}),!1)),s;var l=s.util.currentScript();function c(){s.manual||s.highlightAll()}if(l&&(s.filename=l.src,l.hasAttribute("data-manual")&&(s.manual=!0)),!s.manual){var d=document.readyState;"loading"===d||"interactive"===d&&l&&l.defer?document.addEventListener("DOMContentLoaded",c):window.requestAnimationFrame?window.requestAnimationFrame(c):window.setTimeout(c,16)}return s}(s);e.exports&&(e.exports=n),"undefined"!=typeof t&&(t.Prism=n),n.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var a={};a["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:n.languages[t]},a.cdata=/^$/i;var s={"included-cdata":{pattern://i,inside:a}};s["language-"+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var i={};i[e]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:s},n.languages.insertBefore("markup","cdata",i)}}),n.languages.xml=n.languages.extend("markup",{}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"}}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var a=e.languages.markup;a&&(a.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:a.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},a.tag))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.markup.tag.addInlined("script","javascript"),n.languages.js=n.languages.javascript,n.languages.stackjava={function:/[a-z0-9_$<>-]+(?=\()/i,path:{pattern:/[a-z0-9_]+\.java(?=:\d+)/i,alias:"entity"},package:{pattern:/\b[a-z0-9_]+(?:\.[a-z0-9_$]+)+/i,inside:{"class-name":{pattern:/(\.)[^.]+$/,lookbehind:!0,alias:"entity"}}},keyword:/\b(?:Caused by|at|more)\b/,number:/\d+/,punctuation:/[:.()]/}}).call(this,a("c8ba"))},edc3:function(e,t,a){},fccc:function(e,t,a){},ff84:function(e,t,a){}}); //# sourceMappingURL=app.eefc547c.js.map