diff --git a/src/layout.tsx b/src/layout.tsx index 8be495c..b3576b1 100644 --- a/src/layout.tsx +++ b/src/layout.tsx @@ -31,6 +31,8 @@ export function Layout({ children }: PropsWithChildren) { key={item.name} to={item.path} className="group flex items-center rounded-md p-2 text-sm font-medium text-gray-800 hover:bg-gray-400" + search={{}} + params={{}} > {item.name} diff --git a/src/router.tsx b/src/router.tsx index 3525f75..175cde5 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -5,12 +5,12 @@ import { AppProviders } from "./app-providers"; import { Layout } from "./layout"; import { Ingresses } from "./service/ingresses/ingresses"; import { TestPlayground } from "./test-playground/test-playground"; -import { CronJobs } from "./workloads/cron-jobs/cron-jobs"; -import { Deployments } from "./workloads/deployments/deployments"; -import { Jobs } from "./workloads/jobs/jobs"; -import { Pods } from "./workloads/pods/pods"; -import { ReplicaSets } from "./workloads/replica-sets/replica-sets"; -import { StatefulSets } from "./workloads/stateful-sets/stateful-sets"; +import { CronJobs } from "./workloads/cron-jobs"; +import { Deployments } from "./workloads/deployments"; +import { Jobs } from "./workloads/jobs"; +import { Pods } from "./workloads/pods"; +import { ReplicaSets } from "./workloads/replica-sets"; +import { StatefulSets } from "./workloads/stateful-sets"; const rootRoute = createRouteConfig({ component: () => ( diff --git a/src/workloads/cron-jobs/cron-jobs.tsx b/src/workloads/cron-jobs.tsx similarity index 90% rename from src/workloads/cron-jobs/cron-jobs.tsx rename to src/workloads/cron-jobs.tsx index 0672de3..9b11bed 100644 --- a/src/workloads/cron-jobs/cron-jobs.tsx +++ b/src/workloads/cron-jobs.tsx @@ -3,8 +3,8 @@ import { useQuery } from "@tanstack/react-query"; import { invoke } from "@tauri-apps/api"; import { format, formatDistance, formatRelative, subDays } from "date-fns"; -import { Table, TableHeader, TableBody, TableCell } from "../../components/table"; -import { useCurrentNamespace } from "../../namespaces/namespaces"; +import { Table, TableHeader, TableBody, TableCell } from "../components/table"; +import { useCurrentNamespace } from "../namespaces/namespaces"; const noData = { metadata: { diff --git a/src/workloads/deployments/deployments.tsx b/src/workloads/deployments.tsx similarity index 89% rename from src/workloads/deployments/deployments.tsx rename to src/workloads/deployments.tsx index 936dad3..b356a8a 100644 --- a/src/workloads/deployments/deployments.tsx +++ b/src/workloads/deployments.tsx @@ -4,13 +4,13 @@ import { useMutation, useQuery } from "@tanstack/react-query"; import { invoke } from "@tauri-apps/api"; import { lazy, Suspense, useState } from "react"; -import { ActionButton, ActionGroup } from "../../components/action-group"; -import { ScaleModal } from "../../components/scale-modal"; -import { Table, TableHeader, TableBody, TableCell } from "../../components/table"; -import { useCurrentNamespace } from "../../namespaces/namespaces"; +import { ActionButton, ActionGroup } from "../components/action-group"; +import { ScaleModal } from "../components/scale-modal"; +import { Table, TableHeader, TableBody, TableCell } from "../components/table"; +import { useCurrentNamespace } from "../namespaces/namespaces"; const ResourceEditDrawer = lazy(() => - import("../../components/resource-edit-drawer").then((module) => ({ + import("../components/resource-edit-drawer").then((module) => ({ default: module.ResourceEditDrawer, })) ); diff --git a/src/workloads/jobs/jobs.tsx b/src/workloads/jobs.tsx similarity index 88% rename from src/workloads/jobs/jobs.tsx rename to src/workloads/jobs.tsx index 0a67a59..505dcc4 100644 --- a/src/workloads/jobs/jobs.tsx +++ b/src/workloads/jobs.tsx @@ -3,8 +3,8 @@ import { useQuery } from "@tanstack/react-query"; import { invoke } from "@tauri-apps/api"; import { formatDistance } from "date-fns"; -import { Table, TableHeader, TableBody, TableCell } from "../../components/table"; -import { useCurrentNamespace } from "../../namespaces/namespaces"; +import { Table, TableHeader, TableBody, TableCell } from "../components/table"; +import { useCurrentNamespace } from "../namespaces/namespaces"; export function Jobs() { const { namespace } = useCurrentNamespace(); diff --git a/src/workloads/pods/pod-logs.tsx b/src/workloads/pod-logs.tsx similarity index 96% rename from src/workloads/pods/pod-logs.tsx rename to src/workloads/pod-logs.tsx index 46d745f..c49a9aa 100644 --- a/src/workloads/pods/pod-logs.tsx +++ b/src/workloads/pod-logs.tsx @@ -3,7 +3,7 @@ import { useQuery } from "@tanstack/react-query"; import { invoke } from "@tauri-apps/api"; import { useEffect, useRef } from "react"; -import { Drawer } from "../../components/drawer"; +import { Drawer } from "../components/drawer"; interface PodLogsProps { isOpen: boolean; diff --git a/src/workloads/pods/pods.tsx b/src/workloads/pods.tsx similarity index 88% rename from src/workloads/pods/pods.tsx rename to src/workloads/pods.tsx index e79ae23..b6481ed 100644 --- a/src/workloads/pods/pods.tsx +++ b/src/workloads/pods.tsx @@ -4,14 +4,14 @@ import { useQuery } from "@tanstack/react-query"; import { invoke } from "@tauri-apps/api"; import { useState, lazy, Suspense } from "react"; -import { ActionButton, ActionGroup } from "../../components/action-group"; -import { Table, TableHeader, TableBody, TableCell } from "../../components/table"; -import { useCurrentNamespace } from "../../namespaces/namespaces"; +import { ActionButton, ActionGroup } from "../components/action-group"; +import { Table, TableHeader, TableBody, TableCell } from "../components/table"; +import { useCurrentNamespace } from "../namespaces/namespaces"; const PodLogs = lazy(() => import("./pod-logs").then((module) => ({ default: module.PodLogs }))); const ResourceEditDrawer = lazy(() => - import("../../components/resource-edit-drawer").then((module) => ({ + import("../components/resource-edit-drawer").then((module) => ({ default: module.ResourceEditDrawer, })) ); diff --git a/src/workloads/replica-sets/replica-sets.tsx b/src/workloads/replica-sets.tsx similarity index 86% rename from src/workloads/replica-sets/replica-sets.tsx rename to src/workloads/replica-sets.tsx index 1f0f2b6..5c4793e 100644 --- a/src/workloads/replica-sets/replica-sets.tsx +++ b/src/workloads/replica-sets.tsx @@ -2,8 +2,8 @@ import type { V1ReplicaSet } from "@kubernetes/client-node"; import { useQuery } from "@tanstack/react-query"; import { invoke } from "@tauri-apps/api"; -import { Table, TableHeader, TableBody, TableCell } from "../../components/table"; -import { useCurrentNamespace } from "../../namespaces/namespaces"; +import { Table, TableHeader, TableBody, TableCell } from "../components/table"; +import { useCurrentNamespace } from "../namespaces/namespaces"; export function ReplicaSets() { const { namespace } = useCurrentNamespace(); diff --git a/src/workloads/stateful-sets/stateful-sets.tsx b/src/workloads/stateful-sets.tsx similarity index 88% rename from src/workloads/stateful-sets/stateful-sets.tsx rename to src/workloads/stateful-sets.tsx index 04f4edb..a1cb0ce 100644 --- a/src/workloads/stateful-sets/stateful-sets.tsx +++ b/src/workloads/stateful-sets.tsx @@ -3,13 +3,13 @@ import { useQuery } from "@tanstack/react-query"; import { invoke } from "@tauri-apps/api"; import { lazy, Suspense, useState } from "react"; -import { ActionButton, ActionGroup } from "../../components/action-group"; -import { ScaleModal } from "../../components/scale-modal"; -import { Table, TableHeader, TableBody, TableCell } from "../../components/table"; -import { useCurrentNamespace } from "../../namespaces/namespaces"; +import { ActionButton, ActionGroup } from "../components/action-group"; +import { ScaleModal } from "../components/scale-modal"; +import { Table, TableHeader, TableBody, TableCell } from "../components/table"; +import { useCurrentNamespace } from "../namespaces/namespaces"; const ResourceEditDrawer = lazy(() => - import("../../components/resource-edit-drawer").then((module) => ({ + import("../components/resource-edit-drawer").then((module) => ({ default: module.ResourceEditDrawer, })) );