|
|
@ -3,7 +3,7 @@ import { PieChart } from '../charts/PieChart.jsx'
|
|
|
|
import { Icon } from '../Icon.jsx'
|
|
|
|
import { Icon } from '../Icon.jsx'
|
|
|
|
import { ToastMessage, useToasts } from '../Toasts.jsx'
|
|
|
|
import { ToastMessage, useToasts } from '../Toasts.jsx'
|
|
|
|
|
|
|
|
|
|
|
|
export const DiskUsage = ({ disk }) => {
|
|
|
|
export const DiskUsage = ({ disk, diskLabel }) => {
|
|
|
|
const [showToast] = useToasts()
|
|
|
|
const [showToast] = useToasts()
|
|
|
|
const [output, err, refreshOutput] = useRemoteState(
|
|
|
|
const [output, err, refreshOutput] = useRemoteState(
|
|
|
|
`/api/monitor/status?script=${encodeURIComponent(`disk-usage ${disk}`)}`,
|
|
|
|
`/api/monitor/status?script=${encodeURIComponent(`disk-usage ${disk}`)}`,
|
|
|
@ -14,7 +14,7 @@ export const DiskUsage = ({ disk }) => {
|
|
|
|
|
|
|
|
|
|
|
|
const title = (
|
|
|
|
const title = (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
Spazio Utilizzato • <code>{disk}</code>
|
|
|
|
Spazio Utilizzato • <code>{diskLabel || disk}</code>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|