Files
starRiverProperty/frontend-source/decompiled/cwos-portal/static/js/108.c6ba3b8decc6d5cf39a9.js
T
反编译工作区 4f79e10bd6 chore: cleanup stray nested directories in frontend-source
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
2026-04-29 13:07:40 +08:00

1 line
3.5 KiB
JavaScript

webpackJsonp([108],{OfgT:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("xfkA"),s=a("vMX1"),n=a("dGwE"),l=a("xT6B"),r={data:function(){return{id:null,ip:null,loading:!1,cpuOption:null,memoryOption:null,diskOption:null,shortcuts:[{label:"1",value:"1小时"},{label:"6",value:"6小时"},{label:"12",value:"12小时"},{label:"24",value:"1天"},{label:"72",value:"3天"},{label:"168",value:"7天"},{label:"336",value:"14天"}],timeArr:[],time:{},shortcut:1,disbaledDate:{min:-30,max:0,reference:1}}},created:function(){this.id=this.$route.query.id,this.ip=this.$route.query.ip,this.getTimes()},components:{searchPage:s.a,dates:n.a,eCharts:function(){return a.e(236).then(a.bind(null,"1ObY"))}},watch:{$route:function(t,e){t.path==e.path&&retrun,this.id=t.params.id,this.fetchData()},timeArr:function(t){t&&t.length>0&&(this.time={startTime:t[0].getTime(),endTime:t[1].getTime()})}},methods:{getTimes:function(){var t=Object(l.c)(this.shortcut);this.setTime(t,!0)},setTime:function(t,e){t&&t.length>1&&(e?this.timeArr=[]:this.shortcut=null,this.time={startTime:new Date(t[0]).getTime(),endTime:new Date(t[1]).getTime()},this.fetchData())},fetchData:function(){var t=this;this.loading=!0,i.a.getStatus(this.time,this.ip).then(function(e){e.success&&(t.loading=!1,t.cpuOption=e.data.cpuOption,t.memoryOption=e.data.memoryOption,t.diskOption=e.data.diskOption)}).catch(function(e){t.loading=!1})}}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-card",{staticClass:"monitor-card",attrs:{shadow:"hover"}},[a("div",{staticClass:"monitor-title",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("监控管理")])]),t._v(" "),a("el-form",{attrs:{inline:!0}},[a("el-form-item",[a("el-radio-group",{on:{input:t.getTimes},model:{value:t.shortcut,callback:function(e){t.shortcut=e},expression:"shortcut"}},t._l(t.shortcuts,function(e){return a("el-radio-button",{key:e.label,attrs:{label:e.label}},[t._v(t._s(e.value))])}),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"选择时间范围:"}},[a("dates",{attrs:{timeRange:t.disbaledDate},on:{input:t.setTime},model:{value:t.timeArr,callback:function(e){t.timeArr=e},expression:"timeArr"}})],1)],1)],1),t._v(" "),a("div",{staticStyle:{padding:"0 12px"}},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:"8"}},[a("el-card",{staticClass:"monitor-card",attrs:{shadow:"none"}},[a("div",{staticClass:"monitor-title",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("CPU使用率(%)")])]),t._v(" "),a("e-charts",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{width:"100%",option:t.cpuOption,height:"300px"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:"8"}},[a("el-card",{staticClass:"monitor-card",attrs:{shadow:"none"}},[a("div",{staticClass:"monitor-title",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("内存使用量")])]),t._v(" "),a("e-charts",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{width:"100%",option:t.memoryOption,height:"300px"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:"8"}},[a("el-card",{staticClass:"monitor-card",attrs:{shadow:"none"}},[a("div",{staticClass:"monitor-title",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("磁盘使用率(%)")])]),t._v(" "),a("e-charts",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{width:"100%",option:t.diskOption,height:"300px"}})],1)],1)],1)],1)],1)},staticRenderFns:[]},d=a("VU/8")(r,o,!1,null,null,null);e.default=d.exports}});