new widget refactor

This commit is contained in:
caipira113 2023-06-02 01:20:54 +09:00 committed by NoriDev
parent 0319f95126
commit 39f53b64b6
4 changed files with 6 additions and 9 deletions

View file

@ -38,8 +38,7 @@ import bytesSizes from '@/filters/bytes-net-sizes';
const props = defineProps<{
connection: any,
meta: any,
value: number
meta: any
}>();
let cpuUsage: number = $ref(0);

View file

@ -19,8 +19,7 @@ import XPie from './pie-compact.vue';
const props = defineProps<{
connection: any,
meta: any,
value: number
meta: any
}>();
let cpuUsage: number = $ref(0);

View file

@ -7,9 +7,9 @@
<div v-if="meta" data-cy-mkw-serverMetric class="mkw-serverMetric">
<XCpuMemory v-if="widgetProps.view === 0" :connection="connection" :meta="meta"/>
<XNet v-else-if="widgetProps.view === 1" :connection="connection" :meta="meta"/>
<XCpuMemoryNetCompact v-if="widgetProps.view === 2" :connection="connection" :meta="meta"/>
<XCpuMemoryCompact v-if="widgetProps.view === 3" :connection="connection" :meta="meta"/>
<XNetCompact v-if="widgetProps.view === 4" :connection="connection" :meta="meta"/>
<XCpuMemoryNetCompact v-else-if="widgetProps.view === 2" :connection="connection" :meta="meta"/>
<XCpuMemoryCompact v-else-if="widgetProps.view === 3" :connection="connection" :meta="meta"/>
<XNetCompact v-else-if="widgetProps.view === 4" :connection="connection" :meta="meta"/>
<XCpu v-else-if="widgetProps.view === 5" :connection="connection" :meta="meta"/>
<XMemory v-else-if="widgetProps.view === 6" :connection="connection" :meta="meta"/>
<XDisk v-else-if="widgetProps.view === 7" :connection="connection" :meta="meta"/>

View file

@ -23,8 +23,7 @@ import bytesSizes from '@/filters/bytes-net-sizes';
const props = defineProps<{
connection: any,
meta: any,
value: number
meta: any
}>();
let inRecent: number = $ref(0);