zhaowei
2024-06-25 e68724aee9b82d65796cb29f2d91c409c4a3c008
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
  <a-card title="磁盘监控">
    <a-skeleton v-if="loading" active/>
    <a-row v-else>
      <template v-if="diskInfo && diskInfo.length>0">
        <a-col :span="8" v-for="(item,index) in diskInfo" :key=" 'diskInfo'+index ">
          <dash-chart-demo :title="item.name" :datasource="item.restPPT"></dash-chart-demo>
        </a-col>
      </template>
    </a-row>
  </a-card>
</template>
 
<script>
  import { getAction } from '@/api/manage'
  import DashChartDemo from '@/components/chart/DashChartDemo'
  import ARow from 'ant-design-vue/es/grid/Row'
 
  export default {
    name: 'DiskMonitoring',
    components:{
      ARow,
      DashChartDemo,
    },
    data() {
      return {
        loading: true,
        description: '磁盘监控',
        //数据集
        diskInfo:[],
        url:{
          queryDiskInfo:'sys/actuator/redis/queryDiskInfo',
        }
      }
    },
    created() {
      this.loading = true
      getAction(this.url.queryDiskInfo).then((res)=>{
        if(res.success){
          for(var i=0;i<res.result.length;i++){
            res.result[i].restPPT = res.result[i].restPPT/10;
          }
          this.diskInfo = res.result;
        }
      }).finally(() => this.loading = false)
    }
  }
</script>
 
<style scoped>
 
</style>