mirror of
https://github.com/Noooste/garage-ui.git
synced 2026-08-16 16:28:21 +00:00
refactor: update .gitignore and clean up unused imports and comments
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ dist-ssr
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
../.idea
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
|
||||
@@ -44,7 +44,7 @@ export function BucketUsageChart({ data }: BucketUsageChartProps) {
|
||||
cx="50%"
|
||||
cy="50%"
|
||||
labelLine={false}
|
||||
label={({ name, displaySize }) => `${name}: ${displaySize}`}
|
||||
label={({ name }) => `${name}`}
|
||||
outerRadius={80}
|
||||
fill="#8884d8"
|
||||
dataKey="value"
|
||||
|
||||
@@ -4,7 +4,7 @@ import { cn } from '@/lib/utils';
|
||||
interface DropdownMenuContextValue {
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
triggerRef: React.RefObject<HTMLButtonElement>;
|
||||
triggerRef: React.RefObject<HTMLButtonElement | null>;
|
||||
}
|
||||
|
||||
const DropdownMenuContext = React.createContext<DropdownMenuContextValue | undefined>(undefined);
|
||||
@@ -58,7 +58,7 @@ interface DropdownMenuContentProps extends React.HTMLAttributes<HTMLDivElement>
|
||||
}
|
||||
|
||||
const DropdownMenuContent = React.forwardRef<HTMLDivElement, DropdownMenuContentProps>(
|
||||
({ className, children, align = 'start', ...props }, _ref) => {
|
||||
({ className, children, align = 'start', ...props }) => {
|
||||
const { open, setOpen, triggerRef } = useDropdownMenu();
|
||||
const contentRef = React.useRef<HTMLDivElement>(null);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Header } from '@/components/layout/header';
|
||||
import { garageApi, analyticsApi, bucketsApi } from '@/lib/api';
|
||||
import { garageApi, bucketsApi } from '@/lib/api';
|
||||
import { formatBytes } from '@/lib/utils';
|
||||
import type { GarageMetrics, Bucket, ClusterHealth } from '@/types';
|
||||
import { Database, FolderOpen, HardDrive, Activity, Server, Zap, AlertCircle } from 'lucide-react';
|
||||
@@ -12,11 +12,11 @@ export function Dashboard() {
|
||||
const [metrics, setMetrics] = useState<GarageMetrics | null>(null);
|
||||
const [buckets, setBuckets] = useState<Bucket[]>([]);
|
||||
const [clusterHealth, setClusterHealth] = useState<ClusterHealth | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
// const [loading, setLoading] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
setLoading(true);
|
||||
// setLoading(true);
|
||||
const [garageMetrics, bucketsData, health] = await Promise.all([
|
||||
garageApi.getFullMetrics(),
|
||||
bucketsApi.list(),
|
||||
@@ -25,7 +25,7 @@ export function Dashboard() {
|
||||
setMetrics(garageMetrics);
|
||||
setBuckets(bucketsData);
|
||||
setClusterHealth(health);
|
||||
setLoading(false);
|
||||
// setLoading(false);
|
||||
};
|
||||
|
||||
fetchData();
|
||||
|
||||
Reference in New Issue
Block a user