Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add sidebar #1084

Merged
merged 86 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
04471f8
refactor: add sidebar
Siumauricio Oct 25, 2024
b140efa
Merge branch 'canary' into feat/add-sidebar
Siumauricio Dec 25, 2024
a025ffe
chore: add deps
Siumauricio Dec 25, 2024
a4318e1
refactor: update sidebar
Siumauricio Dec 26, 2024
291a7fa
refactor: another layout
Siumauricio Dec 26, 2024
1955d4e
refactor: update variant
Siumauricio Dec 26, 2024
3221a89
refactor: change layout
Siumauricio Dec 26, 2024
8953e1f
refactor: change variant
Siumauricio Dec 26, 2024
5af165e
refactor: enhance sidebar navigation with active state management
vishalkadam47 Dec 27, 2024
3aa8dc6
Merge branch 'canary' into feat/add-sidebar
Siumauricio Dec 27, 2024
2957891
Merge branch 'Dokploy:feat/add-sidebar' into feat/add-sidebar
vishalkadam47 Dec 27, 2024
e58afb9
feat: add project button to dashboard
vishalkadam47 Dec 27, 2024
b17ae01
Merge pull request #1003 from wish-oss/feat/add-sidebar
Siumauricio Dec 29, 2024
06c4f68
Merge branch 'canary' into feat/add-sidebar
Siumauricio Jan 2, 2025
10ab504
refactor: update design destination
Siumauricio Jan 2, 2025
4fc6ce9
refactor: add loader
Siumauricio Jan 2, 2025
d678959
refactor: update destinations and refactor
Siumauricio Jan 2, 2025
6ee77fd
refactor: ui refactor certificates
Siumauricio Jan 2, 2025
0043933
refactor: delete unused files
Siumauricio Jan 3, 2025
4fa37b5
refactor: remove unused files and duplicate registry
Siumauricio Jan 3, 2025
0606424
refactor: update style registry
Siumauricio Jan 3, 2025
954ceaa
refactor: add new design registry
Siumauricio Jan 3, 2025
60628f8
refactor: enhance git providers
Siumauricio Jan 3, 2025
38c2473
refactor: remove duplicate files
Siumauricio Jan 3, 2025
2ee2b50
refactor: update
Siumauricio Jan 3, 2025
858965d
refactor: update users
Siumauricio Jan 3, 2025
d0fcdb3
refactor: delete unused files
Siumauricio Jan 3, 2025
7c5734a
refactor: update profile
Siumauricio Jan 3, 2025
daf0b6d
refactor: apply changes
Siumauricio Jan 3, 2025
b4c3aff
refactor: update UI
Siumauricio Jan 3, 2025
54253c6
refactor: enhance Docker monitoring UI layout
vishalkadam47 Jan 9, 2025
99b333f
refactor: add theme toggle and language selection to user navigation …
vishalkadam47 Jan 11, 2025
71d3825
Merge branch 'canary' into feat/add-sidebar
Siumauricio Jan 11, 2025
9274738
refactor: remove unused files
Siumauricio Jan 11, 2025
4aed235
feat: add filter to services
Siumauricio Jan 11, 2025
a8bb551
refactor: add active items
Siumauricio Jan 11, 2025
511721c
refactor: remove tab prop
Siumauricio Jan 11, 2025
bfb5034
refactor: remove unused files
Siumauricio Jan 11, 2025
176862a
refactor: remove duplicated files
Siumauricio Jan 11, 2025
f7c1020
refactor: remove unused files
Siumauricio Jan 11, 2025
3d5d6e6
refactor: remove duplicate files
Siumauricio Jan 11, 2025
19cd8b6
refactor: remove unused files
Siumauricio Jan 11, 2025
3e76fd7
refactor: delete unused files
Siumauricio Jan 11, 2025
9aaa4cf
refactor: remove unsued files
Siumauricio Jan 11, 2025
0a94bf7
refactor: delete unused files
Siumauricio Jan 11, 2025
e101a2c
refactor: lint
Siumauricio Jan 11, 2025
46cbd1b
refactor: remove unused secuirty
Siumauricio Jan 11, 2025
6469f5e
refactor: delete unused files
Siumauricio Jan 11, 2025
9c622a8
refactor: delete unused files
Siumauricio Jan 11, 2025
2ea79f7
remove imports
Siumauricio Jan 11, 2025
0ae176e
refactor: add update button
Siumauricio Jan 11, 2025
6c73f5c
refactor: delete unused files
Siumauricio Jan 11, 2025
20c67b6
refactor: remove unused code
Siumauricio Jan 11, 2025
81e46a3
refactor: remove unused files
Siumauricio Jan 11, 2025
37f6b0b
refactor: update login page
Siumauricio Jan 11, 2025
7b058b9
refactor: update login UI
Siumauricio Jan 11, 2025
e054af1
refactor: update ui reset password
Siumauricio Jan 11, 2025
3f2bb2e
Merge branch 'canary' into feat/add-sidebar
Siumauricio Jan 11, 2025
1e63eb5
refactor: add justify end
Siumauricio Jan 12, 2025
9c03b4a
feat: add suscriptions
Siumauricio Jan 12, 2025
215fcac
feat: add sheet
Siumauricio Jan 12, 2025
e73e7f5
feat: add logs for postgres
Siumauricio Jan 12, 2025
91cad3c
feat: add logs for all databases
Siumauricio Jan 12, 2025
e7d7387
feat: add server logs with drawer logs
Siumauricio Jan 12, 2025
1caabe5
refactor: remove unused files
Siumauricio Jan 12, 2025
9b32561
refactor: add refetch when closing
Siumauricio Jan 12, 2025
ea6df87
refactor: fix linter
Siumauricio Jan 12, 2025
75e8d49
chore: bump node-20
Siumauricio Jan 12, 2025
cd136bc
revert
Siumauricio Jan 12, 2025
6873a89
refactor: fix conflicts
Siumauricio Jan 12, 2025
8530f2b
refactor: update
Siumauricio Jan 12, 2025
fd48f00
refactor: add missing deps
Siumauricio Jan 12, 2025
da204b6
refactor: delete duplicate files
Siumauricio Jan 12, 2025
ff18e50
refactor: delete unsued files
Siumauricio Jan 12, 2025
26ddfc9
chore: lint
Siumauricio Jan 12, 2025
3bbd6d1
refactor: remove unsued file
Siumauricio Jan 12, 2025
b9cb283
refactor: add refetch
Siumauricio Jan 12, 2025
dee0544
refactor: remove duplicated files
Siumauricio Jan 12, 2025
0f8fbdb
refactor: delete unused files
Siumauricio Jan 12, 2025
f029718
refactor: update setup onboarding
Siumauricio Jan 12, 2025
4c5d4ff
refactor: add breadcrumb
Siumauricio Jan 12, 2025
76c6558
refactor: apply updates
Siumauricio Jan 12, 2025
26358cb
refactor: add faker
Siumauricio Jan 12, 2025
eb51c68
refactor: use 0 in validation
Siumauricio Jan 12, 2025
62849c7
refactor: show correct state
Siumauricio Jan 12, 2025
424d008
refactor: update
Siumauricio Jan 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

combine-manifests:
docker:
- image: cimg/node:18.18.0
- image: cimg/node:20.9.0
steps:
- checkout
- setup_remote_docker
Expand Down Expand Up @@ -99,14 +99,14 @@ workflows:
only:
- main
- canary
- fix/nixpacks-version
- feat/add-sidebar
- build-arm64:
filters:
branches:
only:
- main
- canary
- fix/nixpacks-version
- feat/add-sidebar
- combine-manifests:
requires:
- build-amd64
Expand All @@ -116,4 +116,4 @@ workflows:
only:
- main
- canary
- fix/nixpacks-version
- feat/add-sidebar
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.0
node-version: 20.9.0
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run server:build
Expand All @@ -26,7 +26,7 @@ jobs:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.0
node-version: 20.9.0
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run server:build
Expand All @@ -39,7 +39,7 @@ jobs:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.0
node-version: 20.9.0
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run server:build
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18.0
20.9.0
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ We have a few guidelines to follow when contributing to this project:

## Commit Convention


Before you create a Pull Request, please make sure your commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.

### Commit Message Format


```
<type>[optional scope]: <description>

Expand Down Expand Up @@ -54,6 +52,8 @@ feat: add new feature

Before you start, please make the clone based on the `canary` branch, since the `main` branch is the source of truth and should always reflect the latest stable release, also the PRs will be merged to the `canary` branch.

We use Node v20.9.0

```bash
git clone https://github.com/dokploy/dokploy.git
cd dokploy
Expand All @@ -73,9 +73,10 @@ Run the command that will spin up all the required services and files.
pnpm run dokploy:setup
```

Run this script
Run this script

```bash
pnpm run server:script
pnpm run server:script
```

Now run the development server.
Expand Down Expand Up @@ -248,4 +249,3 @@ export function generate(schema: Schema): Template {
## Docs & Website

To contribute to the Dokploy docs or website, please go to this [repository](https://github.com/Dokploy/website).

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-slim AS base
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
Expand All @@ -7,7 +7,7 @@ FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*

# Install dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.cloud
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-slim AS base
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
Expand All @@ -7,7 +7,7 @@ FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*

# Install dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/dokploy install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.schedule
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-slim AS base
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
Expand All @@ -7,7 +7,7 @@ FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*

# Install dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/schedules install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.server
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-slim AS base
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
Expand All @@ -7,7 +7,7 @@ FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python3 make g++ git python3-pip pkg-config libsecret-1-dev && rm -rf /var/lib/apt/lists/*

# Install dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/api install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion apps/dokploy/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18.0
20.9.0
4 changes: 2 additions & 2 deletions apps/dokploy/components/auth/login-2fa.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ export const Login2FA = ({ authId }: Props) => {
control={form.control}
name="pin"
render={({ field }) => (
<FormItem className="flex flex-col justify-center max-sm:items-center">
<FormItem className="flex flex-col max-sm:items-center">
<FormLabel>Pin</FormLabel>
<FormControl>
<div className="flex justify-center">
<div className="flex">
<InputOTP
maxLength={6}
{...field}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
} from "@/components/ui/select";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { PlusIcon } from "lucide-react";
import { PenBoxIcon, PlusIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
Expand All @@ -45,18 +45,29 @@ type AddPort = z.infer<typeof AddPortSchema>;

interface Props {
applicationId: string;
portId?: string;
children?: React.ReactNode;
}

export const AddPort = ({
export const HandlePorts = ({
applicationId,
portId,
children = <PlusIcon className="h-4 w-4" />,
}: Props) => {
const [isOpen, setIsOpen] = useState(false);
const utils = api.useUtils();

const { mutateAsync, isLoading, error, isError } =
api.port.create.useMutation();
const { data } = api.port.one.useQuery(
{
portId: portId ?? "",
},
{
enabled: !!portId,
},
);
const { mutateAsync, isLoading, error, isError } = portId
? api.port.update.useMutation()
: api.port.create.useMutation();

const form = useForm<AddPort>({
defaultValues: {
Expand All @@ -68,32 +79,46 @@ export const AddPort = ({

useEffect(() => {
form.reset({
publishedPort: 0,
targetPort: 0,
publishedPort: data?.publishedPort ?? 0,
targetPort: data?.targetPort ?? 0,
protocol: data?.protocol ?? "tcp",
});
}, [form, form.reset, form.formState.isSubmitSuccessful]);
}, [form, form.reset, form.formState.isSubmitSuccessful, data]);

const onSubmit = async (data: AddPort) => {
await mutateAsync({
applicationId,
...data,
portId: portId || "",
})
.then(async () => {
toast.success("Port Created");
toast.success(portId ? "Port Updated" : "Port Created");
await utils.application.one.invalidate({
applicationId,
});
setIsOpen(false);
})
.catch(() => {
toast.error("Error creating the port");
toast.error(
portId ? "Error updating the port" : "Error creating the port",
);
});
};

return (
<Dialog open={isOpen} onOpenChange={setIsOpen}>
<DialogTrigger asChild>
<Button>{children}</Button>
{portId ? (
<Button
variant="ghost"
size="icon"
className="group hover:bg-blue-500/10 "
>
<PenBoxIcon className="size-3.5 text-primary group-hover:text-blue-500" />
</Button>
) : (
<Button>{children}</Button>
)}
</DialogTrigger>
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-lg">
<DialogHeader>
Expand Down Expand Up @@ -204,7 +229,7 @@ export const AddPort = ({
form="hook-form-add-port"
type="submit"
>
Create
{portId ? "Update" : "Create"}
</Button>
</DialogFooter>
</Form>
Expand Down
Loading
Loading