Skip to content

Commit

Permalink
chore: move workload files out of folder to simplify folder structure (
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhu2000 authored Jan 21, 2023
1 parent e83593f commit aca334e
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 27 deletions.
2 changes: 2 additions & 0 deletions src/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
</Link>
Expand Down
12 changes: 6 additions & 6 deletions src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}))
);
Expand Down
4 changes: 2 additions & 2 deletions src/workloads/jobs/jobs.tsx → src/workloads/jobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/workloads/pods/pods.tsx → src/workloads/pods.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}))
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}))
);
Expand Down

0 comments on commit aca334e

Please sign in to comment.