前端eslint调整
This commit is contained in:
@@ -1,37 +1,61 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="15" class="py-1">
|
||||
<el-row
|
||||
:gutter="15"
|
||||
class="py-1"
|
||||
>
|
||||
<el-col :span="12">
|
||||
<el-card v-if="state.os" class="card_item">
|
||||
<el-card
|
||||
v-if="state.os"
|
||||
class="card_item"
|
||||
>
|
||||
<template #header>
|
||||
<div>Runtime</div>
|
||||
</template>
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">os:</el-col>
|
||||
<el-col :span="12" v-text="state.os.goos" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.os.goos"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">cpu nums:</el-col>
|
||||
<el-col :span="12" v-text="state.os.numCpu" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.os.numCpu"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">compiler:</el-col>
|
||||
<el-col :span="12" v-text="state.os.compiler" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.os.compiler"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">go version:</el-col>
|
||||
<el-col :span="12" v-text="state.os.goVersion" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.os.goVersion"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">goroutine nums:</el-col>
|
||||
<el-col :span="12" v-text="state.os.numGoroutine" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.os.numGoroutine"
|
||||
/>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card v-if="state.disk" class="card_item">
|
||||
<el-card
|
||||
v-if="state.disk"
|
||||
class="card_item"
|
||||
>
|
||||
<template #header>
|
||||
<div>Disk</div>
|
||||
</template>
|
||||
@@ -40,19 +64,31 @@
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">total (MB)</el-col>
|
||||
<el-col :span="12" v-text="state.disk.totalMb" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.disk.totalMb"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">used (MB)</el-col>
|
||||
<el-col :span="12" v-text="state.disk.usedMb" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.disk.usedMb"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">total (GB)</el-col>
|
||||
<el-col :span="12" v-text="state.disk.totalGb" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.disk.totalGb"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">used (GB)</el-col>
|
||||
<el-col :span="12" v-text="state.disk.usedGb" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.disk.usedGb"
|
||||
/>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -67,7 +103,10 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="15" class="py-1">
|
||||
<el-row
|
||||
:gutter="15"
|
||||
class="py-1"
|
||||
>
|
||||
<el-col :span="12">
|
||||
<el-card
|
||||
v-if="state.cpu"
|
||||
@@ -80,9 +119,16 @@
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">physical number of cores:</el-col>
|
||||
<el-col :span="12" v-text="state.cpu.cores" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.cpu.cores"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row v-for="(item, index) in state.cpu.cpus" :key="index" :gutter="10">
|
||||
<el-row
|
||||
v-for="(item, index) in state.cpu.cpus"
|
||||
:key="index"
|
||||
:gutter="10"
|
||||
>
|
||||
<el-col :span="12">core {{ index }}:</el-col>
|
||||
<el-col
|
||||
:span="12"
|
||||
@@ -96,7 +142,10 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card v-if="state.ram" class="card_item">
|
||||
<el-card
|
||||
v-if="state.ram"
|
||||
class="card_item"
|
||||
>
|
||||
<template #header>
|
||||
<div>Ram</div>
|
||||
</template>
|
||||
@@ -105,15 +154,24 @@
|
||||
<el-col :span="12">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">total (MB)</el-col>
|
||||
<el-col :span="12" v-text="state.ram.totalMb" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.ram.totalMb"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">used (MB)</el-col>
|
||||
<el-col :span="12" v-text="state.ram.usedMb" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.ram.usedMb"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">total (GB)</el-col>
|
||||
<el-col :span="12" v-text="state.ram.totalMb / 1024" />
|
||||
<el-col
|
||||
:span="12"
|
||||
v-text="state.ram.totalMb / 1024"
|
||||
/>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="12">used (GB)</el-col>
|
||||
@@ -141,6 +199,11 @@
|
||||
<script setup>
|
||||
import { getSystemState } from '@/api/system'
|
||||
import { onUnmounted, ref } from 'vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'State',
|
||||
})
|
||||
|
||||
const timer = ref(null)
|
||||
const state = ref({})
|
||||
const colors = ref([
|
||||
@@ -166,15 +229,8 @@ onUnmounted(() => {
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'State',
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
.card_item {
|
||||
@apply h-80 text-xl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user