1 line
4.8 KiB
JSON
1 line
4.8 KiB
JSON
{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\monitor\\server\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\monitor\\server\\index.vue","mtime":1732871026706},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\babel.config.js","mtime":1732871025888},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1732872825835}],"contextDependencies":[],"result":["\"use strict\";\n\nvar _interopRequireDefault = require(\"D:/data/hanguodoushan/acs2/nladmin-ui/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _vueEcharts = _interopRequireDefault(require(\"vue-echarts\"));\nrequire(\"echarts/lib/chart/line\");\nrequire(\"echarts/lib/component/polar\");\nvar _data = require(\"@/api/data\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = exports.default = {\n name: 'ServerMonitor',\n components: {\n 'v-chart': _vueEcharts.default\n },\n data: function data() {\n return {\n show: false,\n monitor: null,\n url: 'api/monitor',\n data: {},\n cpuInfo: {\n tooltip: {\n trigger: 'axis'\n },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n data: []\n },\n yAxis: {\n type: 'value',\n min: 0,\n max: 100,\n interval: 20\n },\n series: [{\n data: [],\n type: 'line',\n areaStyle: {\n normal: {\n color: 'rgb(32, 160, 255)' // 改变区域颜色\n }\n },\n itemStyle: {\n normal: {\n color: '#6fbae1',\n lineStyle: {\n color: '#6fbae1' // 改变折线颜色\n }\n }\n }\n }]\n },\n memoryInfo: {\n tooltip: {\n trigger: 'axis'\n },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n data: []\n },\n yAxis: {\n type: 'value',\n min: 0,\n max: 100,\n interval: 20\n },\n series: [{\n data: [],\n type: 'line',\n areaStyle: {\n normal: {\n color: 'rgb(32, 160, 255)' // 改变区域颜色\n }\n },\n itemStyle: {\n normal: {\n color: '#6fbae1',\n lineStyle: {\n color: '#6fbae1' // 改变折线颜色\n }\n }\n }\n }]\n }\n };\n },\n created: function created() {\n var _this = this;\n this.init();\n this.monitor = window.setInterval(function () {\n setTimeout(function () {\n _this.init();\n }, 2);\n }, 3500);\n },\n destroyed: function destroyed() {\n clearInterval(this.monitor);\n },\n methods: {\n init: function init() {\n var _this2 = this;\n (0, _data.initData)(this.url, {}).then(function (data) {\n _this2.data = data;\n _this2.show = true;\n if (_this2.cpuInfo.xAxis.data.length >= 8) {\n _this2.cpuInfo.xAxis.data.shift();\n _this2.memoryInfo.xAxis.data.shift();\n _this2.cpuInfo.series[0].data.shift();\n _this2.memoryInfo.series[0].data.shift();\n }\n _this2.cpuInfo.xAxis.data.push(data.time);\n _this2.memoryInfo.xAxis.data.push(data.time);\n _this2.cpuInfo.series[0].data.push(parseFloat(data.cpu.used));\n _this2.memoryInfo.series[0].data.push(parseFloat(data.memory.usageRate));\n });\n }\n }\n};",null]} |