"use strict";(self["webpackChunkwaf_dashboard"]=self["webpackChunkwaf_dashboard"]||[]).push([[602],{81602:function(t,s,e){e.r(s),e.d(s,{default:function(){return d}});var a=function(){var t=this,s=t._self._c;return s("div",[s("a-row",{attrs:{gutter:24,type:"flex"}},[s("a-col",{staticClass:"mb-24",attrs:{span:24}},[s("a-card",{staticClass:"header-solid h-full",attrs:{bordered:!1,bodyStyle:{padding:0}},scopedSlots:t._u([{key:"title",fn:function(){return[s("a-row",{attrs:{type:"flex",align:"middle"}},[s("a-col",{attrs:{span:24,md:24}},[s("h6",{staticClass:"font-semibold m-0"},[t._v("系统信息")])])],1)]},proxy:!0}])},[s("a-collapse",{attrs:{bordered:!1},model:{value:t.activeKey,callback:function(s){t.activeKey=s},expression:"activeKey"}},[s("a-collapse-panel",{key:"1",style:t.customStyle,attrs:{header:"主机信息"}},[s("a-row",{attrs:{gutter:24,type:"flex",align:"stretch"}},[s("a-col",{staticClass:"mb-24",attrs:{span:24,lg:6}},[s("a-card",{attrs:{title:"CPU详情"}},[t._v(" 占用率："+t._s(t.sysInfo.cpu_used_percent.toFixed(2))+"% ")])],1),s("a-col",{staticClass:"mb-24",attrs:{span:24,lg:6}},[s("a-card",{attrs:{title:"内存详情"}},[t._v(" 占用率："+t._s(t.sysInfo.mem_used_percent.toFixed(2))+"%      容量："+t._s(t.sysInfo.mem_total.toFixed(2))+"G ")])],1),s("a-col",{staticClass:"mb-24",attrs:{span:24,lg:6}},[s("a-card",{attrs:{title:"磁盘详情"}},[t._v(" 占用率："+t._s(t.sysInfo.disk_used_percent.toFixed(2))+"%      容量："+t._s(t.sysInfo.disk_total.toFixed(2))+"G ")])],1),s("a-col",{staticClass:"mb-24",attrs:{span:24,lg:6}},[s("a-card",{attrs:{title:"网络详情"}},[t._v(" 接收："+t._s(t.sysInfo.net_bytes_recv.toFixed(2))+"G      发送："+t._s(t.sysInfo.net_bytes_send.toFixed(2))+"G ")])],1)],1)],1),s("a-collapse-panel",{key:"2",style:t.customStyle,attrs:{header:"固件信息",disabled:!1}},[s("p",{staticStyle:{"margin-left":"25px",color:"#363"}},[t._v("固件版本")]),s("a-divider",{staticStyle:{margin:"12px 0"}}),s("p",{staticStyle:{"margin-left":"25px","margin-bottom":"30px"}},[t._v(" 当前版本：   v4.5.0"),s("br"),s("br"),t._v(" 最新版本：   v"+t._s(t.sysInfo.waf_version)+" ")]),s("p",{staticStyle:{"margin-left":"25px",color:"#363"}},[s("a-button",{staticClass:"custom-button",attrs:{icon:"sync",type:"success",shape:"round",size:"small",disabled:t.disabled},on:{click:function(s){return t.update()}}},[t._v("更新固件")])],1)],1),s("a-collapse-panel",{key:"3",style:t.customStyle,attrs:{header:"关于产品"}},[s("p",{staticStyle:{"margin-left":"25px",color:"#363"}},[t._v("产品信息")]),s("a-divider",{staticStyle:{margin:"12px 0"}}),s("p",{staticStyle:{"margin-left":"25px","margin-bottom":"30px"}},[t._v(" 产品名称：   南墙（uuWAF）Web应用防火墙"),s("br"),s("br"),t._v(" 产品型号：   社区版 ")]),s("p",{staticStyle:{"margin-left":"25px",color:"#363"}},[t._v("帮助信息")]),s("a-divider",{staticStyle:{margin:"12px 0"}}),s("p",{staticStyle:{"margin-left":"25px","margin-bottom":"30px"}},[t._v(" 支持邮箱：   support@uusec.com"),s("br"),s("br"),t._v(" 支持微信：   uucorp ")])],1)],1)],1)],1)],1)],1)},r=[],o={props:{searchStr:{type:String,default:""}},data(){return{sysInfo:{cpu_used_percent:0,mem_used_percent:0,mem_total:0,disk_used_percent:0,disk_total:0,net_bytes_recv:0,net_bytes_send:0,waf_version:""},customStyle:"background: #f7f7f7;border-radius: 4px;margin-bottom: 24px;border: 0;overflow: hidden",activeKey:["1","2","3"],disabled:!1}},methods:{update(){this.disabled=!0,this.$message.info("固件更新中，请耐心等待！"),this.http.get("/sysinfo/update").then((t=>{t.data.err?this.$message.error("错误："+t.data.err):this.$message.success("过程将持续几分钟，此时服务不可访问！"),this.disabled=!1})).catch((t=>{if(t.response&&401===t.response.status)return this.$message.info("请重新登录！"),void this.$router.push({name:"用户登录"});this.disabled=!1,console.log(t)}))}},mounted(){this.http.get("/sysinfo/").then((t=>{t.data.err?this.$message.error("错误："+t.data.err):this.sysInfo=t.data})).catch((t=>{if(t.response&&401===t.response.status)return this.$message.info("请重新登录！"),void this.$router.push({name:"用户登录"});console.log(t)}))}},i=o,l=e(81656),n=(0,l.A)(i,a,r,!1,null,null,null),d=n.exports}}]);