forked from github-starred/komodo
cleanup
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import { useRead } from "@hooks";
|
||||
import { BuildCard } from "@resources/build/card";
|
||||
|
||||
export const Builds = () => {
|
||||
const builds = useRead({ type: "ListBuilds", params: {} }).data;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-12">
|
||||
<h1 className="text-3xl">Builds</h1>
|
||||
<div className="grid grid-cols-4 gap-8">
|
||||
{builds?.map(({ id }) => (
|
||||
<BuildCard key={id} id={id} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +1,9 @@
|
||||
import { useRead, useUser } from "@hooks";
|
||||
import { Card, CardDescription, CardHeader, CardTitle } from "@ui/card";
|
||||
import { version_to_string } from "@util/helpers";
|
||||
import { useUser } from "@hooks";
|
||||
import { Card, CardHeader, CardTitle } from "@ui/card";
|
||||
import { ServersChart } from "./components/servers-chart";
|
||||
import { DeploymentsChart } from "./components/deployments-chart";
|
||||
import { Link } from "react-router-dom";
|
||||
import { RecentlyViewed } from "./components/recently-viewed";
|
||||
import { ServerStatusIcon } from "@resources/server/util";
|
||||
|
||||
export const Dashboard = () => {
|
||||
const user = useUser().data;
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
import { useRead } from "@hooks";
|
||||
import { DeploymentCard } from "@resources/deployment/card";
|
||||
import { NewDeployment } from "@resources/deployment/new";
|
||||
import { Button } from "@ui/button";
|
||||
import { Input } from "@ui/input";
|
||||
import { PlusCircle } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
|
||||
export const Deployments = () => {
|
||||
const deployments = useRead({ type: "ListDeployments", params: {} }).data;
|
||||
const [search, setSearch] = useState("");
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-12">
|
||||
<div className="flex justify-between">
|
||||
<h1 className="text-3xl">Deployments</h1>
|
||||
<div className="flex gap-4">
|
||||
<Input
|
||||
className="w-[300px]"
|
||||
placeholder="Search"
|
||||
value={search}
|
||||
onChange={(e) => setSearch(e.target.value)}
|
||||
/>
|
||||
<Button
|
||||
className="w-[200px] flex items-center gap-2"
|
||||
variant="outline"
|
||||
intent="success"
|
||||
onClick={() => setOpen(true)}
|
||||
>
|
||||
<PlusCircle className="w-4 h-4 text-green-500" />
|
||||
New Deployment
|
||||
</Button>
|
||||
<NewDeployment open={open} set={setOpen} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-3 gap-8">
|
||||
{deployments?.map(
|
||||
({ id, name }) =>
|
||||
(search.includes(name) || name.includes(search)) && (
|
||||
<DeploymentCard key={id} id={id} />
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,45 +0,0 @@
|
||||
import { useRead } from "@hooks";
|
||||
import { ServerCard } from "@resources/server/card";
|
||||
import { Button } from "@ui/button";
|
||||
import { Input } from "@ui/input";
|
||||
import { PlusCircle } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
|
||||
const Resources = () => {};
|
||||
|
||||
export const Servers = () => {
|
||||
const servers = useRead({ type: "ListServers", params: {} }).data;
|
||||
const [search, set] = useState("");
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-12">
|
||||
<div className="flex justify-between">
|
||||
<h1 className="text-3xl">Servers</h1>
|
||||
<div className="flex gap-4">
|
||||
<Input
|
||||
className="w-[300px]"
|
||||
placeholder="Search"
|
||||
value={search}
|
||||
onChange={(e) => set(e.target.value)}
|
||||
/>
|
||||
<Button
|
||||
className="w-[200px] flex items-center gap-2"
|
||||
variant="outline"
|
||||
intent="success"
|
||||
>
|
||||
<PlusCircle className="w-4 h-4 text-green-500" />
|
||||
New Server
|
||||
</Button>
|
||||
</div>
|
||||
</div>{" "}
|
||||
<div className="grid grid-cols-3 gap-8">
|
||||
{servers?.map(
|
||||
({ id, name }) =>
|
||||
(search.includes(name) || name.includes(search)) && (
|
||||
<ServerCard key={id} id={id} />
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user