fix: systeme metrics chart
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<NuxtLayout name="default">
|
||||
<div class="dashboard-container">
|
||||
<header class="dashboard-header">
|
||||
<div>
|
||||
@@ -62,15 +61,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { apiFetch } from "~/composables/useApiAuth"
|
||||
import type { SystemMetrics } from "~/types/system";
|
||||
|
||||
definePageMeta({layout: false})
|
||||
|
||||
type DiskSourceResult = {
|
||||
key: string
|
||||
label: string
|
||||
@@ -192,7 +188,7 @@ const runScript = async () => {
|
||||
|
||||
const loadSystemMetrics = async () => {
|
||||
try {
|
||||
systemMetrics.value = await $fetch<SystemMetrics>("/api/system")
|
||||
systemMetrics.value = await apiFetch<SystemMetrics>("/api/system")
|
||||
} catch {
|
||||
systemMetrics.value = null
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user