重新设计了界面

This commit is contained in:
huoji
2022-10-11 16:53:51 +08:00
parent c8292cf977
commit 534443a475
11 changed files with 10 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
"use strict";(globalThis["webpackChunksyseye"]=globalThis["webpackChunksyseye"]||[]).push([[385],{6385:(t,e,n)=>{n.r(e),n.d(e,{default:()=>Z});var l=n(3673);const r=(0,l.Uk)(" RmEye测试版v1.0.1.3 "),i={key:1,class:"q-gutter-md q-mb-sm q-pa-lg"};function o(t,e,n,o,a,u){const s=(0,l.up)("q-toolbar-title"),h=(0,l.up)("q-btn"),d=(0,l.up)("q-toolbar"),c=(0,l.up)("q-breadcrumbs-el"),g=(0,l.up)("q-breadcrumbs"),m=(0,l.up)("q-header"),p=(0,l.up)("router-view"),b=(0,l.up)("q-page-container"),w=(0,l.up)("HtmlPanel"),T=(0,l.up)("q-layout");return(0,l.wg)(),(0,l.j4)(T,{view:"lHh Lpr lFf",style:{"background-color":"rgb(239, 243, 246)"}},{default:(0,l.w5)((()=>[(0,l.Wm)(m,{elevated:"","height-hint":"98"},{default:(0,l.w5)((()=>[(0,l.Wm)(d,{class:"text-white",style:{"background-color":"rgb(210,61,42)"}},{default:(0,l.w5)((()=>[(0,l.Wm)(s,null,{default:(0,l.w5)((()=>[r])),_:1}),(0,l.Wm)(h,{flat:"",round:"",dense:"",icon:"lightbulb"})])),_:1}),(0,l.Wm)(d,{style:{"font-size":"16px","background-color":"rgb(47,43,48)"}},{default:(0,l.w5)((()=>[(0,l.Wm)(g,{"active-color":"white"},{default:(0,l.w5)((()=>[(0,l.Wm)(c,{label:"仪表盘",icon:"dashboard",to:"/page/dashboard"}),(0,l.Wm)(c,{label:"未处理威胁列表",icon:"report",to:"#",onClick:e[0]||(e[0]=e=>{t.routerToThreatList(0)})}),(0,l.Wm)(c,{label:"已处理威胁列表",icon:"done",to:"#",onClick:e[1]||(e[1]=e=>{t.routerToThreatList(1)})}),(0,l.Wm)(c,{label:"已忽略威胁列表",icon:"texture",to:"#",onClick:e[2]||(e[2]=e=>{t.routerToThreatList(2)})}),(0,l.Wm)(c,{label:"白名单列表",icon:"list",to:"#",onClick:e[3]||(e[3]=e=>{t.routerToWhiteList()})})])),_:1})])),_:1})])),_:1}),0==t.isInPlugin?((0,l.wg)(),(0,l.j4)(b,{key:0},{default:(0,l.w5)((()=>[(0,l.Wm)(p)])),_:1})):(0,l.kq)("",!0),t.isInPlugin?((0,l.wg)(),(0,l.iD)("div",i,[(0,l.Wm)(w,{url:t.PluginUrl,"onUpdate:url":e[4]||(e[4]=e=>t.PluginUrl=e)},null,8,["url"])])):(0,l.kq)("",!0)])),_:1})}const a=["innerHTML"];function u(t,e,n,r,i,o){return(0,l.wg)(),(0,l.iD)("div",{innerHTML:t.html},null,8,a)}var s=n(52),h=n.n(s);const d=(0,l.aZ)({props:{url:{required:!0}},data(){return{html:""}},watch:{url(t){this.load(t)}},mounted(){this.load(this.url)},methods:{load(t){if(t&&t.length>0){const e={accept:"text/html, text/plain"};h().get(t,e).then((t=>{this.html=t.data})).catch((()=>{this.html="加载失败"}))}}}});var c=n(4260);const g=(0,c.Z)(d,[["render",u]]),m=g,p=(0,l.aZ)({components:{HtmlPanel:m},name:"MainLayout",setup(){return{}},data:function(){return{selectLabel:"dashboard",drawer:!1,miniState:!0,plugin:[],isInPlugin:!1,PluginUrl:""}},methods:{routerToWhiteList(){this.isInPlugin=!1,this.$router.push({name:"whitelist"})},routerToThreatList(t){this.isInPlugin=!1,this.$router.push({name:"index",params:{queryIndex:t}})},routerToPlugin(t){this.isInPlugin=!0,this.PluginUrl="/plugin/"+t},getPluginsMenu(){h().get("/api/v1/get/plugin_menu",{"Content-Type":"application/json"}).then((t=>{this.plugin=t.data.data.menu,console.log(this.plugin)}))}},mounted(){this.getPluginsMenu()}});var b=n(3066),w=n(3812),T=n(9570),k=n(3747),P=n(8240),f=n(1481),q=n(5926),y=n(2652),W=n(7518),v=n.n(W);const L=(0,c.Z)(p,[["render",o]]),Z=L;v()(p,"components",{QLayout:b.Z,QHeader:w.Z,QToolbar:T.Z,QToolbarTitle:k.Z,QBtn:P.Z,QBreadcrumbs:f.Z,QBreadcrumbsEl:q.Z,QPageContainer:y.Z})}}]);

View File

@@ -1 +1 @@
"use strict";(globalThis["webpackChunksyseye"]=globalThis["webpackChunksyseye"]||[]).push([[556],{6556:(t,e,a)=>{a.r(e),a.d(e,{default:()=>Z});var s=a(3673),i=a(2323);const o={class:"q-gutter-md q-mb-sm q-pa-lg"},l={class:"row q-col-gutter-sm"},n={class:"text-h6"},r=(0,s.Uk)(" 由于python+sqlite数据库作为后端,理论上最高支持的主机数量为50. "),c={class:"text-subtitle2"},h={ref:"main_draw",style:{width:"100%",height:"600px"}};function m(t,e,a,m,u,d){const p=(0,s.up)("q-icon"),w=(0,s.up)("q-item-section"),g=(0,s.up)("q-item-label"),_=(0,s.up)("q-item"),b=(0,s.up)("q-card-section"),f=(0,s.up)("q-card"),v=(0,s.up)("q-banner"),y=(0,s.up)("q-popup-proxy");return(0,s.wg)(),(0,s.iD)("div",o,[(0,s._)("div",null,[(0,s.Wm)(f,{class:"bg-transparent no-shadow no-border"},{default:(0,s.w5)((()=>[(0,s.Wm)(b,{class:"q-pa-none"},{default:(0,s.w5)((()=>[(0,s._)("div",l,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.Threatitems,((t,e)=>((0,s.wg)(),(0,s.iD)("div",{key:e,class:"col-md-3 col-sm-12 col-xs-12"},[(0,s.Wm)(_,{style:(0,i.j5)(`background-color: ${t.color1}`),class:"q-pa-none"},{default:(0,s.w5)((()=>[(0,s.Wm)(w,{side:"",style:(0,i.j5)(`background-color: ${t.color2}`),class:"q-pa-lg q-mr-none text-white"},{default:(0,s.w5)((()=>[(0,s.Wm)(p,{name:t.icon,color:"white",size:"24px"},null,8,["name"])])),_:2},1032,["style"]),(0,s.Wm)(w,{class:"q-pa-md q-ml-none text-white"},{default:(0,s.w5)((()=>[(0,s.Wm)(g,{class:"text-white text-h6 text-weight-bolder"},{default:(0,s.w5)((()=>[(0,s.Uk)((0,i.zw)(t.value),1)])),_:2},1024),(0,s.Wm)(g,null,{default:(0,s.w5)((()=>[(0,s.Uk)((0,i.zw)(t.title),1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["style"])])))),128))])])),_:1})])),_:1})]),(0,s.Wm)(f,{class:"no-shadow",style:{background:"rbg(255,255,255)"}},{default:(0,s.w5)((()=>[(0,s.Wm)(b,null,{default:(0,s.w5)((()=>[(0,s._)("div",n,[(0,s.Uk)(" 主机数量: "+(0,i.zw)(t.threatStatistics.host_num)+"/50 ",1),(0,s.Wm)(p,{name:"info",class:"text-brown cursor-pointer"},{default:(0,s.w5)((()=>[(0,s.Wm)(y,{"transition-show":"flip-up","transition-hide":"flip-down"},{default:(0,s.w5)((()=>[(0,s.Wm)(v,{class:"bg-brown text-white"},{avatar:(0,s.w5)((()=>[(0,s.Wm)(p,{name:"lightbulb"})])),default:(0,s.w5)((()=>[r])),_:1})])),_:1})])),_:1})]),(0,s._)("div",c,"最近日志数量: "+(0,i.zw)(t.threatStatistics.all_log_num),1)])),_:1}),(0,s.Wm)(b,{class:"q-pt-none"},{default:(0,s.w5)((()=>[(0,s._)("div",h," 1 ",512)])),_:1})])),_:1})])}var u=a(52),d=a.n(u),p=a(2256);const w=(0,s.aZ)({name:"Dashboard",data(){return{Threatitems:[{title:"发现的威胁",icon:"remove_red_eye",value:"200",color1:"#5064b5",color2:"#3e51b5"},{title:"确认的威胁",icon:"flash_on",value:"500",color1:"#f37169",color2:"#f34636"},{title:"忽略的威胁",icon:"texture",value:"50",color1:"#ea6a7f",color2:"#ea4b64"},{title:"进行中的威胁",icon:"bar_chart",value:"1020",color1:"#a270b1",color2:"#9f52b1"}],threatStatistics:{all:1,confirm:0,ingore:1,working:0,host_list:{},host_num:10,all_log_num:647}}},methods:{get_threatStatistics(){d().get("/api/v1/get/threat_statistics",{"Content-Type":"application/json"}).then((t=>{const e=t.data;e.data&&(this.threatStatistics=e.data,this.threatStatistics.host_num=Object.keys(this.threatStatistics.host_list).length,this.Threatitems[0].value=this.threatStatistics.all,this.Threatitems[1].value=this.threatStatistics.confirm,this.Threatitems[2].value=this.threatStatistics.ingore,this.Threatitems[3].value=this.threatStatistics.working,console.log(this.threatStatistics),this.draw())}))},draw(){const t=[],e=[];for(const o in this.threatStatistics.host_list)t.push(o),e.push({name:o,type:"line",stack:"Total",areaStyle:{},emphasis:{focus:"series"},data:this.threatStatistics.host_list[o].log_num});const a=this.$refs.main_draw,s=p.S1(a),i={title:{text:"最近十分钟日志量"},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{data:t},toolbox:{feature:{saveAsImage:{}}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:["10min","9min","8min","7min","6min","5min","4min","3min","2min","1min"]}],yAxis:[{type:"value"}],series:e};s.setOption(i),setTimeout((()=>{s.resize()}),1e3)}},mounted(){this.get_threatStatistics(),setInterval((()=>{this.get_threatStatistics()}),1e4)}});var g=a(4260),_=a(151),b=a(5589),f=a(3414),v=a(2035),y=a(4554),x=a(2350),q=a(3944),S=a(5607),k=a(7518),W=a.n(k);const T=(0,g.Z)(w,[["render",m]]),Z=T;W()(w,"components",{QCard:_.Z,QCardSection:b.Z,QItem:f.Z,QItemSection:v.Z,QIcon:y.Z,QItemLabel:x.Z,QPopupProxy:q.Z,QBanner:S.Z})}}]);
"use strict";(globalThis["webpackChunksyseye"]=globalThis["webpackChunksyseye"]||[]).push([[526],{7526:(t,e,a)=>{a.r(e),a.d(e,{default:()=>Z});var s=a(3673),i=a(2323);const o={class:"q-gutter-md q-mb-sm q-pa-lg"},l={class:"row q-col-gutter-sm"},n={class:"text-h6"},r=(0,s.Uk)(" 由于python+sqlite数据库作为后端,理论上最高支持的主机数量为50. "),c={class:"text-subtitle2"},h={ref:"main_draw",style:{width:"100%",height:"600px"}};function m(t,e,a,m,u,d){const p=(0,s.up)("q-icon"),w=(0,s.up)("q-item-section"),g=(0,s.up)("q-item-label"),_=(0,s.up)("q-item"),b=(0,s.up)("q-card-section"),f=(0,s.up)("q-card"),v=(0,s.up)("q-banner"),y=(0,s.up)("q-popup-proxy");return(0,s.wg)(),(0,s.iD)("div",o,[(0,s._)("div",null,[(0,s.Wm)(f,{class:"bg-transparent no-shadow no-border"},{default:(0,s.w5)((()=>[(0,s.Wm)(b,{class:"q-pa-none"},{default:(0,s.w5)((()=>[(0,s._)("div",l,[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.Threatitems,((t,e)=>((0,s.wg)(),(0,s.iD)("div",{key:e,class:"col-md-3 col-sm-12 col-xs-12"},[(0,s.Wm)(_,{style:(0,i.j5)(`background-color: ${t.color1}`),class:"q-pa-none"},{default:(0,s.w5)((()=>[(0,s.Wm)(w,{side:"",style:(0,i.j5)(`background-color: ${t.color2}`),class:"q-pa-lg q-mr-none text-white"},{default:(0,s.w5)((()=>[(0,s.Wm)(p,{name:t.icon,color:"white",size:"24px"},null,8,["name"])])),_:2},1032,["style"]),(0,s.Wm)(w,{class:"q-pa-md q-ml-none text-white"},{default:(0,s.w5)((()=>[(0,s.Wm)(g,{class:"text-white text-h6 text-weight-bolder"},{default:(0,s.w5)((()=>[(0,s.Uk)((0,i.zw)(t.value),1)])),_:2},1024),(0,s.Wm)(g,null,{default:(0,s.w5)((()=>[(0,s.Uk)((0,i.zw)(t.title),1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["style"])])))),128))])])),_:1})])),_:1})]),(0,s.Wm)(f,{class:"no-shadow",style:{background:"rbg(255,255,255)"}},{default:(0,s.w5)((()=>[(0,s.Wm)(b,null,{default:(0,s.w5)((()=>[(0,s._)("div",n,[(0,s.Uk)(" 主机数量: "+(0,i.zw)(t.threatStatistics.host_num)+"/50 ",1),(0,s.Wm)(p,{name:"info",class:"text-brown cursor-pointer"},{default:(0,s.w5)((()=>[(0,s.Wm)(y,{"transition-show":"flip-up","transition-hide":"flip-down"},{default:(0,s.w5)((()=>[(0,s.Wm)(v,{class:"bg-brown text-white"},{avatar:(0,s.w5)((()=>[(0,s.Wm)(p,{name:"lightbulb"})])),default:(0,s.w5)((()=>[r])),_:1})])),_:1})])),_:1})]),(0,s._)("div",c,"最近日志数量: "+(0,i.zw)(t.threatStatistics.all_log_num),1)])),_:1}),(0,s.Wm)(b,{class:"q-pt-none"},{default:(0,s.w5)((()=>[(0,s._)("div",h," 1 ",512)])),_:1})])),_:1})])}var u=a(52),d=a.n(u),p=a(2256);const w=(0,s.aZ)({name:"Dashboard",data(){return{Threatitems:[{title:"发现的威胁",icon:"remove_red_eye",value:"200",color1:"#b9b6ab",color2:"#969388"},{title:"确认的威胁",icon:"flash_on",value:"500",color1:"#9f6a61",color2:"#a27a73"},{title:"忽略的威胁",icon:"add_moderator",value:"50",color1:"#1fd7a2",color2:"#19C896"},{title:"进行中的威胁",icon:"stream",value:"1020",color1:"#f34a50",color2:"#c77c6f"}],threatStatistics:{all:1,confirm:0,ingore:1,working:0,host_list:{},host_num:10,all_log_num:647}}},methods:{get_threatStatistics(){d().get("/api/v1/get/threat_statistics",{"Content-Type":"application/json"}).then((t=>{const e=t.data;e.data&&(this.threatStatistics=e.data,this.threatStatistics.host_num=Object.keys(this.threatStatistics.host_list).length,this.Threatitems[0].value=this.threatStatistics.all,this.Threatitems[1].value=this.threatStatistics.confirm,this.Threatitems[2].value=this.threatStatistics.ingore,this.Threatitems[3].value=this.threatStatistics.working,console.log(this.threatStatistics),this.draw())}))},draw(){const t=[],e=[];for(const o in this.threatStatistics.host_list)t.push(o),e.push({name:o,type:"line",stack:"Total",areaStyle:{},emphasis:{focus:"series"},data:this.threatStatistics.host_list[o].log_num});const a=this.$refs.main_draw,s=p.S1(a),i={title:{text:"最近十分钟日志量"},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{data:t},toolbox:{feature:{saveAsImage:{}}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:["10min","9min","8min","7min","6min","5min","4min","3min","2min","1min"]}],yAxis:[{type:"value"}],series:e};s.setOption(i),setTimeout((()=>{s.resize()}),1e3)}},mounted(){this.get_threatStatistics(),setInterval((()=>{this.get_threatStatistics()}),1e4)}});var g=a(4260),_=a(151),b=a(5589),f=a(3414),v=a(2035),y=a(4554),x=a(2350),q=a(3944),S=a(5607),k=a(7518),W=a.n(k);const T=(0,g.Z)(w,[["render",m]]),Z=T;W()(w,"components",{QCard:_.Z,QCardSection:b.Z,QItem:f.Z,QItemSection:v.Z,QIcon:y.Z,QItemLabel:x.Z,QPopupProxy:q.Z,QBanner:S.Z})}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.