mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Compare commits
250 Commits
v0.17.3
...
feat/bette
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b71f963cc | ||
|
|
1c5cc5a0db | ||
|
|
d233f2c764 | ||
|
|
1bbb4c9b64 | ||
|
|
6ec60b6bab | ||
|
|
55abac3f2f | ||
|
|
b6c29ccf05 | ||
|
|
ca217affe6 | ||
|
|
5c24281f72 | ||
|
|
bc901bcb25 | ||
|
|
7c0d223e17 | ||
|
|
74ee024cf9 | ||
|
|
140a871275 | ||
|
|
d1f72a2e20 | ||
|
|
0d525398a8 | ||
|
|
7c62408070 | ||
|
|
23f1ce17de | ||
|
|
60eee55f2d | ||
|
|
8f562eefc1 | ||
|
|
6179cef1ee | ||
|
|
b7112b89fd | ||
|
|
030c8a312d | ||
|
|
1db6ba94f4 | ||
|
|
afd3d2eea3 | ||
|
|
8bd72a8a34 | ||
|
|
fafc238e70 | ||
|
|
c04bf3c7e0 | ||
|
|
6b9fd596e5 | ||
|
|
7e36433144 | ||
|
|
0a6554c275 | ||
|
|
fcc55355f2 | ||
|
|
78e606876a | ||
|
|
7e99baa267 | ||
|
|
92c03bb7cc | ||
|
|
3a5ecb2f64 | ||
|
|
c0a00f4957 | ||
|
|
a8f94540f9 | ||
|
|
3e2cfe6eb8 | ||
|
|
b2d5090b36 | ||
|
|
0a0f53e9de | ||
|
|
17ce03e529 | ||
|
|
f44512a437 | ||
|
|
8379068fe3 | ||
|
|
a71de72a3c | ||
|
|
b024060eed | ||
|
|
56b26ce0d5 | ||
|
|
a9e3a65782 | ||
|
|
7a472df753 | ||
|
|
bd809c8dca | ||
|
|
48642979c5 | ||
|
|
46411a5f4e | ||
|
|
82cf0643d7 | ||
|
|
65780ee852 | ||
|
|
9d988c9a9b | ||
|
|
eb211b933e | ||
|
|
20eb6d7985 | ||
|
|
d424524d69 | ||
|
|
6f2148c060 | ||
|
|
97b77e526d | ||
|
|
077f47f2d8 | ||
|
|
5d6847b970 | ||
|
|
2630a73bd8 | ||
|
|
df5ef4a34e | ||
|
|
48a8c6021d | ||
|
|
d84a22fa72 | ||
|
|
1661022d56 | ||
|
|
2a295d6492 | ||
|
|
51851567db | ||
|
|
d1aaeb9a7b | ||
|
|
f9b4035c20 | ||
|
|
d492ff87f2 | ||
|
|
f638f49ab6 | ||
|
|
d1610855bb | ||
|
|
0c8c0844b1 | ||
|
|
98b19bb433 | ||
|
|
d8c5244d19 | ||
|
|
7bb8456cb7 | ||
|
|
74a0f5e992 | ||
|
|
8c69d2a085 | ||
|
|
c8a4a826ca | ||
|
|
e1b114a63b | ||
|
|
0b4d19abd6 | ||
|
|
1c0f6a8e60 | ||
|
|
c41aa0ccf7 | ||
|
|
96bb72eb99 | ||
|
|
ee2fed07b2 | ||
|
|
af083ffa5d | ||
|
|
f14ed5170d | ||
|
|
cd1c7e60bf | ||
|
|
79c6b7389c | ||
|
|
e48f1431a9 | ||
|
|
c2ecdb2d76 | ||
|
|
5c889e81a9 | ||
|
|
407e2e1137 | ||
|
|
2c6c89e4c1 | ||
|
|
41a8014585 | ||
|
|
fffe1d6249 | ||
|
|
cf0f5c8b97 | ||
|
|
777980618f | ||
|
|
dcd1df31c7 | ||
|
|
7369b54f32 | ||
|
|
009859faa9 | ||
|
|
f7a29accb1 | ||
|
|
50c518a63a | ||
|
|
79fca72d06 | ||
|
|
18c6d08b9a | ||
|
|
208094cd3e | ||
|
|
1342f73a02 | ||
|
|
1787c524f0 | ||
|
|
5899dc9394 | ||
|
|
6b48c0f354 | ||
|
|
33f3d1d87e | ||
|
|
4bfb172373 | ||
|
|
6cf96df6ec | ||
|
|
62a3707c10 | ||
|
|
00d2b3b572 | ||
|
|
d8f1548076 | ||
|
|
de4d1c0911 | ||
|
|
b96169fa55 | ||
|
|
e21e0e1865 | ||
|
|
dc9a194bbe | ||
|
|
27738d253e | ||
|
|
d37bde00bc | ||
|
|
55fae23ce3 | ||
|
|
d43cd52762 | ||
|
|
094491ecbf | ||
|
|
3d5bed0915 | ||
|
|
23de14f0b4 | ||
|
|
215811ae82 | ||
|
|
34b4956630 | ||
|
|
7ed0282ce1 | ||
|
|
24327139b8 | ||
|
|
0fb67ced5d | ||
|
|
1e56364f93 | ||
|
|
f980e459d9 | ||
|
|
3209550edc | ||
|
|
9835ead2b9 | ||
|
|
73f93f8a13 | ||
|
|
46ddaa68fa | ||
|
|
64e68cfde1 | ||
|
|
36c1a615c6 | ||
|
|
eeb97645b5 | ||
|
|
9a052c4657 | ||
|
|
165cdd27da | ||
|
|
13551f6065 | ||
|
|
f2ad1c5a57 | ||
|
|
4d5565895c | ||
|
|
8e51dedb78 | ||
|
|
780fa6b9cd | ||
|
|
95e642e63a | ||
|
|
5801c69034 | ||
|
|
2c98b4267f | ||
|
|
1874ffaa55 | ||
|
|
11c4101dc3 | ||
|
|
4c3b5ef271 | ||
|
|
4105353109 | ||
|
|
8a971072e4 | ||
|
|
dab12d6162 | ||
|
|
8d31574e5f | ||
|
|
0012ca7357 | ||
|
|
1aed53e6fe | ||
|
|
d6b966cfea | ||
|
|
772341fb1e | ||
|
|
e7a6247297 | ||
|
|
b1beb7b71b | ||
|
|
6254644fa6 | ||
|
|
bcb86f3d6d | ||
|
|
b96103247a | ||
|
|
87697147da | ||
|
|
074e3b6ec6 | ||
|
|
7061e06736 | ||
|
|
de35812d5a | ||
|
|
c5ac5f84b1 | ||
|
|
2e42fa7014 | ||
|
|
0fe8a1a221 | ||
|
|
829e77a6b8 | ||
|
|
adfe598671 | ||
|
|
ac49235916 | ||
|
|
d7210e9d7b | ||
|
|
52ea9ffa67 | ||
|
|
fd570ff861 | ||
|
|
130567dd78 | ||
|
|
0a826fbf1c | ||
|
|
081d08c20a | ||
|
|
41cf3d7b77 | ||
|
|
b05af62b7b | ||
|
|
c6569f70e4 | ||
|
|
d5c9338f51 | ||
|
|
dba39b6364 | ||
|
|
22de0fef49 | ||
|
|
03e1c17675 | ||
|
|
6edd2a81e5 | ||
|
|
fe5b8782e9 | ||
|
|
71f28fae70 | ||
|
|
c44618aa95 | ||
|
|
c7d86dd430 | ||
|
|
e50bbd1a6a | ||
|
|
d5ff91563a | ||
|
|
210fe0759c | ||
|
|
edff66900e | ||
|
|
4cf2177928 | ||
|
|
4a8306b015 | ||
|
|
f92d6693c3 | ||
|
|
81248ed03f | ||
|
|
c7d5900e11 | ||
|
|
d0608f43a9 | ||
|
|
adaf12a9a4 | ||
|
|
baa2ca20f4 | ||
|
|
537caf02e5 | ||
|
|
02ff507094 | ||
|
|
53df7d969e | ||
|
|
9e6e68558a | ||
|
|
a2e9ea2986 | ||
|
|
026e1bece6 | ||
|
|
51f6e08e16 | ||
|
|
c0f8218ad9 | ||
|
|
35dd6bff7a | ||
|
|
8dad8fd008 | ||
|
|
52dbc0d8f1 | ||
|
|
692f883064 | ||
|
|
6d90e268f7 | ||
|
|
1d86f1a0fc | ||
|
|
c7338983b8 | ||
|
|
ce06cd42b3 | ||
|
|
1a44a0ea5a | ||
|
|
444121f8d8 | ||
|
|
05a75edbec | ||
|
|
f5d81f434c | ||
|
|
10353d1f29 | ||
|
|
6226c75959 | ||
|
|
42c9cd5901 | ||
|
|
49edcdb99e | ||
|
|
ad71e8b36a | ||
|
|
b166cd5bfa | ||
|
|
0045608acc | ||
|
|
b140e81210 | ||
|
|
34ab01fcae | ||
|
|
df43f8318a | ||
|
|
a46cbf4f2c | ||
|
|
79b733536f | ||
|
|
65ee0a3e22 | ||
|
|
c9b570e469 | ||
|
|
dafed3096f | ||
|
|
f772fec407 | ||
|
|
06cbd1fce1 | ||
|
|
9c355bcfb7 | ||
|
|
06081627e8 | ||
|
|
dc1e12d6ed | ||
|
|
cb02deb837 | ||
|
|
94786c738b |
BIN
.github/sponsors/openalternative.png
vendored
Normal file
BIN
.github/sponsors/openalternative.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
9
.github/workflows/deploy.yml
vendored
9
.github/workflows/deploy.yml
vendored
@@ -2,7 +2,7 @@ name: Build Docker images
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["canary", "main"]
|
branches: ["canary", "main", "feat/monitoring"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-cloud-image:
|
build-and-push-cloud-image:
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
@@ -53,8 +53,7 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
siumauricio/schedule:${{ github.ref_name == 'main' && 'latest' || 'canary' }}
|
siumauricio/schedule:${{ github.ref_name == 'main' && 'latest' || 'canary' }}
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
|
||||||
|
|
||||||
build-and-push-server-image:
|
build-and-push-server-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -77,4 +76,4 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
siumauricio/server:${{ github.ref_name == 'main' && 'latest' || 'canary' }}
|
siumauricio/server:${{ github.ref_name == 'main' && 'latest' || 'canary' }}
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
|
|||||||
6
.github/workflows/dokploy.yml
vendored
6
.github/workflows/dokploy.yml
vendored
@@ -2,7 +2,7 @@ name: Dokploy Docker Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, canary, feat/github-runners]
|
branches: [main, canary, "feat/monitoring"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: dokploy/dokploy
|
IMAGE_NAME: dokploy/dokploy
|
||||||
@@ -152,8 +152,8 @@ jobs:
|
|||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.get_version.outputs.version }}
|
tag_name: ${{ steps.get_version.outputs.version }}
|
||||||
name: Release v${{ steps.get_version.outputs.version }}
|
name: ${{ steps.get_version.outputs.version }}
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|||||||
118
.github/workflows/monitoring.yml
vendored
Normal file
118
.github/workflows/monitoring.yml
vendored
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
name: Dokploy Monitoring Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main, canary]
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: dokploy/monitoring
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker-amd:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set tag
|
||||||
|
id: meta
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
||||||
|
TAG="latest"
|
||||||
|
elif [ "${{ github.ref }}" = "refs/heads/canary" ]; then
|
||||||
|
TAG="canary"
|
||||||
|
else
|
||||||
|
TAG="feature"
|
||||||
|
fi
|
||||||
|
echo "tags=${IMAGE_NAME}:${TAG}-amd64" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile.monitoring
|
||||||
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
docker-arm:
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set
|
||||||
|
id: meta
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
||||||
|
TAG="latest"
|
||||||
|
elif [ "${{ github.ref }}" = "refs/heads/canary" ]; then
|
||||||
|
TAG="canary"
|
||||||
|
else
|
||||||
|
TAG="feature"
|
||||||
|
fi
|
||||||
|
echo "tags=${IMAGE_NAME}:${TAG}-arm64" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile.monitoring
|
||||||
|
platforms: linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|
||||||
|
combine-manifests:
|
||||||
|
needs: [docker-amd, docker-arm]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create and push manifests
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
||||||
|
TAG="latest"
|
||||||
|
|
||||||
|
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
|
||||||
|
${IMAGE_NAME}:${TAG}-amd64 \
|
||||||
|
${IMAGE_NAME}:${TAG}-arm64
|
||||||
|
|
||||||
|
elif [ "${{ github.ref }}" = "refs/heads/canary" ]; then
|
||||||
|
TAG="canary"
|
||||||
|
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
|
||||||
|
${IMAGE_NAME}:${TAG}-amd64 \
|
||||||
|
${IMAGE_NAME}:${TAG}-arm64
|
||||||
|
|
||||||
|
else
|
||||||
|
TAG="feature"
|
||||||
|
docker buildx imagetools create -t ${IMAGE_NAME}:${TAG} \
|
||||||
|
${IMAGE_NAME}:${TAG}-amd64 \
|
||||||
|
${IMAGE_NAME}:${TAG}-arm64
|
||||||
|
fi
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -39,3 +39,6 @@ yarn-error.log*
|
|||||||
# Misc
|
# Misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.pem
|
*.pem
|
||||||
|
|
||||||
|
|
||||||
|
.db
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM node:20-slim AS base
|
FROM node:20.9-slim AS base
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM node:20-slim AS base
|
FROM node:20.9-slim AS base
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|||||||
41
Dockerfile.monitoring
Normal file
41
Dockerfile.monitoring
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Build stage
|
||||||
|
FROM golang:1.21-alpine3.19 AS builder
|
||||||
|
|
||||||
|
# Instalar dependencias necesarias
|
||||||
|
RUN apk add --no-cache gcc musl-dev sqlite-dev
|
||||||
|
|
||||||
|
# Establecer el directorio de trabajo
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copiar todo el código fuente primero
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Movernos al directorio de la aplicación golang
|
||||||
|
WORKDIR /app/apps/monitoring
|
||||||
|
|
||||||
|
# Descargar dependencias
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
# Compilar la aplicación
|
||||||
|
RUN CGO_ENABLED=1 GOOS=linux go build -o main main.go
|
||||||
|
|
||||||
|
# Etapa final
|
||||||
|
FROM alpine:3.19
|
||||||
|
|
||||||
|
# Instalar SQLite y otras dependencias necesarias
|
||||||
|
RUN apk add --no-cache sqlite-libs docker-cli
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copiar el binario compilado y el archivo monitor.go
|
||||||
|
COPY --from=builder /app/apps/monitoring/main ./main
|
||||||
|
COPY --from=builder /app/apps/monitoring/main.go ./monitor.go
|
||||||
|
|
||||||
|
# COPY --from=builder /app/apps/golang/.env ./.env
|
||||||
|
|
||||||
|
# Exponer el puerto
|
||||||
|
ENV PORT=3001
|
||||||
|
EXPOSE 3001
|
||||||
|
|
||||||
|
# Ejecutar la aplicación
|
||||||
|
CMD ["./main"]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM node:20-slim AS base
|
FROM node:20.9-slim AS base
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM node:20-slim AS base
|
FROM node:20.9-slim AS base
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ For detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com).
|
|||||||
<a href="https://cloudblast.io/?ref=dokploy "><img src="https://cloudblast.io/img/logo-icon.193cf13e.svg" width="250px" alt="Cloudblast.io"/></a>
|
<a href="https://cloudblast.io/?ref=dokploy "><img src="https://cloudblast.io/img/logo-icon.193cf13e.svg" width="250px" alt="Cloudblast.io"/></a>
|
||||||
<a href="https://startupfa.me/?ref=dokploy "><img src=".github/sponsors/startupfame.png" width="65px" alt="Startupfame"/></a>
|
<a href="https://startupfa.me/?ref=dokploy "><img src=".github/sponsors/startupfame.png" width="65px" alt="Startupfame"/></a>
|
||||||
<a href="https://itsdb-center.com?ref=dokploy "><img src=".github/sponsors/its.png" width="65px" alt="Itsdb-center"/></a>
|
<a href="https://itsdb-center.com?ref=dokploy "><img src=".github/sponsors/its.png" width="65px" alt="Itsdb-center"/></a>
|
||||||
|
<a href="https://openalternative.co/?ref=dokploy "><img src=".github/sponsors/openalternative.png" width="65px" alt="Openalternative"/></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Community Backers 🤝
|
### Community Backers 🤝
|
||||||
|
|||||||
@@ -14,6 +14,29 @@ import {
|
|||||||
import { beforeEach, expect, test, vi } from "vitest";
|
import { beforeEach, expect, test, vi } from "vitest";
|
||||||
|
|
||||||
const baseAdmin: Admin = {
|
const baseAdmin: Admin = {
|
||||||
|
enablePaidFeatures: false,
|
||||||
|
metricsConfig: {
|
||||||
|
containers: {
|
||||||
|
refreshRate: 20,
|
||||||
|
services: {
|
||||||
|
include: [],
|
||||||
|
exclude: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
type: "Dokploy",
|
||||||
|
cronJob: "",
|
||||||
|
port: 4500,
|
||||||
|
refreshRate: 20,
|
||||||
|
retentionDays: 2,
|
||||||
|
token: "",
|
||||||
|
thresholds: {
|
||||||
|
cpu: 0,
|
||||||
|
memory: 0,
|
||||||
|
},
|
||||||
|
urlCallback: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
cleanupCacheApplications: false,
|
cleanupCacheApplications: false,
|
||||||
cleanupCacheOnCompose: false,
|
cleanupCacheOnCompose: false,
|
||||||
cleanupCacheOnPreviews: false,
|
cleanupCacheOnPreviews: false,
|
||||||
|
|||||||
@@ -144,38 +144,6 @@ export const ShowResources = ({ id, type }: Props) => {
|
|||||||
className="grid w-full gap-8 "
|
className="grid w-full gap-8 "
|
||||||
>
|
>
|
||||||
<div className="grid w-full md:grid-cols-2 gap-4">
|
<div className="grid w-full md:grid-cols-2 gap-4">
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="memoryReservation"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<FormLabel>Memory Reservation</FormLabel>
|
|
||||||
<TooltipProvider>
|
|
||||||
<Tooltip delayDuration={0}>
|
|
||||||
<TooltipTrigger>
|
|
||||||
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent>
|
|
||||||
<p>
|
|
||||||
Memory soft limit in bytes. Example: 256MB =
|
|
||||||
268435456 bytes
|
|
||||||
</p>
|
|
||||||
</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</TooltipProvider>
|
|
||||||
</div>
|
|
||||||
<FormControl>
|
|
||||||
<Input
|
|
||||||
placeholder="268435456 (256MB in bytes)"
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="memoryLimit"
|
name="memoryLimit"
|
||||||
@@ -209,6 +177,37 @@ export const ShowResources = ({ id, type }: Props) => {
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="memoryReservation"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<FormLabel>Memory Reservation</FormLabel>
|
||||||
|
<TooltipProvider>
|
||||||
|
<Tooltip delayDuration={0}>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<InfoIcon className="h-4 w-4 text-muted-foreground" />
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>
|
||||||
|
<p>
|
||||||
|
Memory soft limit in bytes. Example: 256MB =
|
||||||
|
268435456 bytes
|
||||||
|
</p>
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</TooltipProvider>
|
||||||
|
</div>
|
||||||
|
<FormControl>
|
||||||
|
<Input
|
||||||
|
placeholder="268435456 (256MB in bytes)"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ export const ShowVolumes = ({ id, type }: Props) => {
|
|||||||
<div>
|
<div>
|
||||||
<CardTitle className="text-xl">Volumes</CardTitle>
|
<CardTitle className="text-xl">Volumes</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
If you want to persist data in this postgres database use the
|
If you want to persist data in this service use the following config
|
||||||
following config to setup the volumes
|
to setup the volumes
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ export const ShowVolumes = ({ id, type }: Props) => {
|
|||||||
{mount.type === "file" && (
|
{mount.type === "file" && (
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<span className="font-medium">Content</span>
|
<span className="font-medium">Content</span>
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-muted-foreground line-clamp-[10] whitespace-break-spaces">
|
||||||
{mount.content}
|
{mount.content}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -113,12 +113,21 @@ export const ShowVolumes = ({ id, type }: Props) => {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="flex flex-col gap-1">
|
{mount.type === "file" ? (
|
||||||
<span className="font-medium">Mount Path</span>
|
<div className="flex flex-col gap-1">
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="font-medium">File Path</span>
|
||||||
{mount.mountPath}
|
<span className="text-sm text-muted-foreground">
|
||||||
</span>
|
{mount.filePath}
|
||||||
</div>
|
</span>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
<span className="font-medium">Mount Path</span>
|
||||||
|
<span className="text-sm text-muted-foreground">
|
||||||
|
{mount.mountPath}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row gap-1">
|
<div className="flex flex-row gap-1">
|
||||||
<UpdateVolume
|
<UpdateVolume
|
||||||
|
|||||||
@@ -17,8 +17,15 @@ interface Props {
|
|||||||
open: boolean;
|
open: boolean;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
serverId?: string;
|
serverId?: string;
|
||||||
|
errorMessage?: string;
|
||||||
}
|
}
|
||||||
export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
|
export const ShowDeployment = ({
|
||||||
|
logPath,
|
||||||
|
open,
|
||||||
|
onClose,
|
||||||
|
serverId,
|
||||||
|
errorMessage,
|
||||||
|
}: Props) => {
|
||||||
const [data, setData] = useState("");
|
const [data, setData] = useState("");
|
||||||
const [showExtraLogs, setShowExtraLogs] = useState(false);
|
const [showExtraLogs, setShowExtraLogs] = useState(false);
|
||||||
const [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);
|
const [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);
|
||||||
@@ -99,6 +106,8 @@ export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
|
|||||||
}
|
}
|
||||||
}, [filteredLogs, autoScroll]);
|
}, [filteredLogs, autoScroll]);
|
||||||
|
|
||||||
|
const optionalErrors = parseLogs(errorMessage || "");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
open={open}
|
open={open}
|
||||||
@@ -157,9 +166,17 @@ export const ShowDeployment = ({ logPath, open, onClose, serverId }: Props) => {
|
|||||||
<TerminalLine key={index} log={log} noTimestamp />
|
<TerminalLine key={index} log={log} noTimestamp />
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<div className="flex justify-center items-center h-full text-muted-foreground">
|
<>
|
||||||
<Loader2 className="h-6 w-6 animate-spin" />
|
{optionalErrors.length > 0 ? (
|
||||||
</div>
|
optionalErrors.map((log: LogLine, index: number) => (
|
||||||
|
<TerminalLine key={`extra-${index}`} log={log} noTimestamp />
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<div className="flex justify-center items-center h-full text-muted-foreground">
|
||||||
|
<Loader2 className="h-6 w-6 animate-spin" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
import { api } from "@/utils/api";
|
import { type RouterOutputs, api } from "@/utils/api";
|
||||||
import { RocketIcon } from "lucide-react";
|
import { RocketIcon } from "lucide-react";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { CancelQueues } from "./cancel-queues";
|
import { CancelQueues } from "./cancel-queues";
|
||||||
@@ -18,8 +18,11 @@ import { ShowDeployment } from "./show-deployment";
|
|||||||
interface Props {
|
interface Props {
|
||||||
applicationId: string;
|
applicationId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ShowDeployments = ({ applicationId }: Props) => {
|
export const ShowDeployments = ({ applicationId }: Props) => {
|
||||||
const [activeLog, setActiveLog] = useState<string | null>(null);
|
const [activeLog, setActiveLog] = useState<
|
||||||
|
RouterOutputs["deployment"]["all"][number] | null
|
||||||
|
>(null);
|
||||||
const { data } = api.application.one.useQuery({ applicationId });
|
const { data } = api.application.one.useQuery({ applicationId });
|
||||||
const { data: deployments } = api.deployment.all.useQuery(
|
const { data: deployments } = api.deployment.all.useQuery(
|
||||||
{ applicationId },
|
{ applicationId },
|
||||||
@@ -100,7 +103,7 @@ export const ShowDeployments = ({ applicationId }: Props) => {
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setActiveLog(deployment.logPath);
|
setActiveLog(deployment);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
View
|
View
|
||||||
@@ -112,9 +115,10 @@ export const ShowDeployments = ({ applicationId }: Props) => {
|
|||||||
)}
|
)}
|
||||||
<ShowDeployment
|
<ShowDeployment
|
||||||
serverId={data?.serverId || ""}
|
serverId={data?.serverId || ""}
|
||||||
open={activeLog !== null}
|
open={Boolean(activeLog && activeLog.logPath !== null)}
|
||||||
onClose={() => setActiveLog(null)}
|
onClose={() => setActiveLog(null)}
|
||||||
logPath={activeLog}
|
logPath={activeLog?.logPath || ""}
|
||||||
|
errorMessage={activeLog?.errorMessage || ""}
|
||||||
/>
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
import { Input } from "@/components/ui/input";
|
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import { ExternalLink, GlobeIcon, PenBoxIcon, Trash2 } from "lucide-react";
|
import { ExternalLink, GlobeIcon, PenBoxIcon, Trash2 } from "lucide-react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
@@ -74,60 +73,66 @@ export const ShowDomains = ({ applicationId }: Props) => {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={item.domainId}
|
key={item.domainId}
|
||||||
className="flex w-full items-center gap-4 max-sm:flex-wrap border p-4 rounded-lg"
|
className="flex w-full items-center justify-between gap-4 border p-4 md:px-6 rounded-lg flex-wrap"
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
|
className="md:basis-1/2 flex gap-2 items-center hover:underline transition-all w-full"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href={`${item.https ? "https" : "http"}://${item.host}${item.path}`}
|
href={`${item.https ? "https" : "http"}://${item.host}${item.path}`}
|
||||||
>
|
>
|
||||||
<ExternalLink className="size-5" />
|
<span className="truncate max-w-full text-sm">
|
||||||
|
{item.host}
|
||||||
|
</span>
|
||||||
|
<ExternalLink className="size-4 min-w-4" />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Input disabled value={item.host} />
|
<div className="flex gap-8">
|
||||||
<Button variant="outline" disabled>
|
<div className="flex gap-8 opacity-50 items-center h-10 text-center text-sm font-medium">
|
||||||
{item.path}
|
<span>{item.path}</span>
|
||||||
</Button>
|
<span>{item.port}</span>
|
||||||
<Button variant="outline" disabled>
|
<span>{item.https ? "HTTPS" : "HTTP"}</span>
|
||||||
{item.port}
|
</div>
|
||||||
</Button>
|
|
||||||
<Button variant="outline" disabled>
|
<div className="flex gap-2">
|
||||||
{item.https ? "HTTPS" : "HTTP"}
|
<AddDomain
|
||||||
</Button>
|
applicationId={applicationId}
|
||||||
<div className="flex flex-row gap-1">
|
domainId={item.domainId}
|
||||||
<AddDomain
|
|
||||||
applicationId={applicationId}
|
|
||||||
domainId={item.domainId}
|
|
||||||
>
|
|
||||||
<Button variant="ghost">
|
|
||||||
<PenBoxIcon className="size-4 text-muted-foreground" />
|
|
||||||
</Button>
|
|
||||||
</AddDomain>
|
|
||||||
<DialogAction
|
|
||||||
title="Delete Domain"
|
|
||||||
description="Are you sure you want to delete this domain?"
|
|
||||||
type="destructive"
|
|
||||||
onClick={async () => {
|
|
||||||
await deleteDomain({
|
|
||||||
domainId: item.domainId,
|
|
||||||
})
|
|
||||||
.then((data) => {
|
|
||||||
refetch();
|
|
||||||
toast.success("Domain deleted successfully");
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
toast.error("Error deleting domain");
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="icon"
|
|
||||||
className="group hover:bg-red-500/10"
|
|
||||||
isLoading={isRemoving}
|
|
||||||
>
|
>
|
||||||
<Trash2 className="size-4 text-primary group-hover:text-red-500" />
|
<Button
|
||||||
</Button>
|
variant="ghost"
|
||||||
</DialogAction>
|
size="icon"
|
||||||
|
className="group hover:bg-blue-500/10 "
|
||||||
|
>
|
||||||
|
<PenBoxIcon className="size-3.5 text-primary group-hover:text-blue-500" />
|
||||||
|
</Button>
|
||||||
|
</AddDomain>
|
||||||
|
<DialogAction
|
||||||
|
title="Delete Domain"
|
||||||
|
description="Are you sure you want to delete this domain?"
|
||||||
|
type="destructive"
|
||||||
|
onClick={async () => {
|
||||||
|
await deleteDomain({
|
||||||
|
domainId: item.domainId,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
refetch();
|
||||||
|
toast.success("Domain deleted successfully");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
toast.error("Error deleting domain");
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
className="group hover:bg-red-500/10"
|
||||||
|
isLoading={isRemoving}
|
||||||
|
>
|
||||||
|
<Trash2 className="size-4 text-primary group-hover:text-red-500" />
|
||||||
|
</Button>
|
||||||
|
</DialogAction>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
|
|||||||
<CommandGroup>
|
<CommandGroup>
|
||||||
{repositories?.map((repo) => (
|
{repositories?.map((repo) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
value={repo.url}
|
value={repo.name}
|
||||||
key={repo.url}
|
key={repo.url}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
form.setValue("repository", {
|
form.setValue("repository", {
|
||||||
@@ -245,7 +245,12 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
|
|||||||
form.setValue("branch", "");
|
form.setValue("branch", "");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{repo.name}
|
<span className="flex items-center gap-2">
|
||||||
|
<span>{repo.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{repo.owner.username}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto h-4 w-4",
|
"ml-auto h-4 w-4",
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
|
|||||||
<CommandGroup>
|
<CommandGroup>
|
||||||
{repositories?.map((repo) => (
|
{repositories?.map((repo) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
value={repo.url}
|
value={repo.name}
|
||||||
key={repo.url}
|
key={repo.url}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
form.setValue("repository", {
|
form.setValue("repository", {
|
||||||
@@ -236,7 +236,12 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
|
|||||||
form.setValue("branch", "");
|
form.setValue("branch", "");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{repo.name}
|
<span className="flex items-center gap-2">
|
||||||
|
<span>{repo.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{repo.owner.login}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto h-4 w-4",
|
"ml-auto h-4 w-4",
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
|
|||||||
{repositories?.map((repo) => {
|
{repositories?.map((repo) => {
|
||||||
return (
|
return (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
value={repo.url}
|
value={repo.name}
|
||||||
key={repo.url}
|
key={repo.url}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
form.setValue("repository", {
|
form.setValue("repository", {
|
||||||
@@ -260,7 +260,12 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
|
|||||||
form.setValue("branch", "");
|
form.setValue("branch", "");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{repo.name}
|
<span className="flex items-center gap-2">
|
||||||
|
<span>{repo.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{repo.owner.username}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto h-4 w-4",
|
"ml-auto h-4 w-4",
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ export const ShowPreviewBuilds = ({
|
|||||||
serverId,
|
serverId,
|
||||||
trigger,
|
trigger,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [activeLog, setActiveLog] = useState<string | null>(null);
|
const [activeLog, setActiveLog] = useState<
|
||||||
|
RouterOutputs["deployment"]["all"][number] | null
|
||||||
|
>(null);
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
return (
|
return (
|
||||||
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
||||||
@@ -77,7 +79,7 @@ export const ShowPreviewBuilds = ({
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setActiveLog(deployment.logPath);
|
setActiveLog(deployment);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
View
|
View
|
||||||
@@ -89,9 +91,10 @@ export const ShowPreviewBuilds = ({
|
|||||||
</DialogContent>
|
</DialogContent>
|
||||||
<ShowDeployment
|
<ShowDeployment
|
||||||
serverId={serverId || ""}
|
serverId={serverId || ""}
|
||||||
open={activeLog !== null}
|
open={Boolean(activeLog && activeLog.logPath !== null)}
|
||||||
onClose={() => setActiveLog(null)}
|
onClose={() => setActiveLog(null)}
|
||||||
logPath={activeLog}
|
logPath={activeLog?.logPath || ""}
|
||||||
|
errorMessage={activeLog?.errorMessage || ""}
|
||||||
/>
|
/>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,9 +20,10 @@ import {
|
|||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
|
import type { ServiceType } from "@dokploy/server/db/schema";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
|
import copy from "copy-to-clipboard";
|
||||||
import { Copy, Trash2 } from "lucide-react";
|
import { Copy, Trash2 } from "lucide-react";
|
||||||
import { TrashIcon } from "lucide-react";
|
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
@@ -39,16 +40,42 @@ const deleteComposeSchema = z.object({
|
|||||||
type DeleteCompose = z.infer<typeof deleteComposeSchema>;
|
type DeleteCompose = z.infer<typeof deleteComposeSchema>;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
composeId: string;
|
id: string;
|
||||||
|
type: ServiceType | "application";
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DeleteCompose = ({ composeId }: Props) => {
|
export const DeleteService = ({ id, type }: Props) => {
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const { mutateAsync, isLoading } = api.compose.delete.useMutation();
|
|
||||||
const { data } = api.compose.one.useQuery(
|
const queryMap = {
|
||||||
{ composeId },
|
postgres: () =>
|
||||||
{ enabled: !!composeId },
|
api.postgres.one.useQuery({ postgresId: id }, { enabled: !!id }),
|
||||||
);
|
redis: () => api.redis.one.useQuery({ redisId: id }, { enabled: !!id }),
|
||||||
|
mysql: () => api.mysql.one.useQuery({ mysqlId: id }, { enabled: !!id }),
|
||||||
|
mariadb: () =>
|
||||||
|
api.mariadb.one.useQuery({ mariadbId: id }, { enabled: !!id }),
|
||||||
|
application: () =>
|
||||||
|
api.application.one.useQuery({ applicationId: id }, { enabled: !!id }),
|
||||||
|
mongo: () => api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id }),
|
||||||
|
compose: () =>
|
||||||
|
api.compose.one.useQuery({ composeId: id }, { enabled: !!id }),
|
||||||
|
};
|
||||||
|
const { data, refetch } = queryMap[type]
|
||||||
|
? queryMap[type]()
|
||||||
|
: api.mongo.one.useQuery({ mongoId: id }, { enabled: !!id });
|
||||||
|
|
||||||
|
const mutationMap = {
|
||||||
|
postgres: () => api.postgres.remove.useMutation(),
|
||||||
|
redis: () => api.redis.remove.useMutation(),
|
||||||
|
mysql: () => api.mysql.remove.useMutation(),
|
||||||
|
mariadb: () => api.mariadb.remove.useMutation(),
|
||||||
|
application: () => api.application.delete.useMutation(),
|
||||||
|
mongo: () => api.mongo.remove.useMutation(),
|
||||||
|
compose: () => api.compose.delete.useMutation(),
|
||||||
|
};
|
||||||
|
const { mutateAsync, isLoading } = mutationMap[type]
|
||||||
|
? mutationMap[type]()
|
||||||
|
: api.mongo.remove.useMutation();
|
||||||
const { push } = useRouter();
|
const { push } = useRouter();
|
||||||
const form = useForm<DeleteCompose>({
|
const form = useForm<DeleteCompose>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
@@ -62,14 +89,23 @@ export const DeleteCompose = ({ composeId }: Props) => {
|
|||||||
const expectedName = `${data?.name}/${data?.appName}`;
|
const expectedName = `${data?.name}/${data?.appName}`;
|
||||||
if (formData.projectName === expectedName) {
|
if (formData.projectName === expectedName) {
|
||||||
const { deleteVolumes } = formData;
|
const { deleteVolumes } = formData;
|
||||||
await mutateAsync({ composeId, deleteVolumes })
|
await mutateAsync({
|
||||||
|
mongoId: id || "",
|
||||||
|
postgresId: id || "",
|
||||||
|
redisId: id || "",
|
||||||
|
mysqlId: id || "",
|
||||||
|
mariadbId: id || "",
|
||||||
|
applicationId: id || "",
|
||||||
|
composeId: id || "",
|
||||||
|
deleteVolumes,
|
||||||
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
push(`/dashboard/project/${result?.projectId}`);
|
push(`/dashboard/project/${result?.projectId}`);
|
||||||
toast.success("Compose deleted successfully");
|
toast.success("deleted successfully");
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
toast.error("Error deleting the compose");
|
toast.error("Error deleting the service");
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
form.setError("projectName", {
|
form.setError("projectName", {
|
||||||
@@ -95,8 +131,8 @@ export const DeleteCompose = ({ composeId }: Props) => {
|
|||||||
<DialogTitle>Are you absolutely sure?</DialogTitle>
|
<DialogTitle>Are you absolutely sure?</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
This action cannot be undone. This will permanently delete the
|
This action cannot be undone. This will permanently delete the
|
||||||
compose. If you are sure please enter the compose name to delete
|
service. If you are sure please enter the service name to delete
|
||||||
this compose.
|
this service.
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="grid gap-4">
|
<div className="grid gap-4">
|
||||||
@@ -119,9 +155,7 @@ export const DeleteCompose = ({ composeId }: Props) => {
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (data?.name && data?.appName) {
|
if (data?.name && data?.appName) {
|
||||||
navigator.clipboard.writeText(
|
copy(`${data.name}/${data.appName}`);
|
||||||
`${data.name}/${data.appName}`,
|
|
||||||
);
|
|
||||||
toast.success("Copied to clipboard. Be careful!");
|
toast.success("Copied to clipboard. Be careful!");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@@ -142,27 +176,29 @@ export const DeleteCompose = ({ composeId }: Props) => {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<FormField
|
{type === "compose" && (
|
||||||
control={form.control}
|
<FormField
|
||||||
name="deleteVolumes"
|
control={form.control}
|
||||||
render={({ field }) => (
|
name="deleteVolumes"
|
||||||
<FormItem>
|
render={({ field }) => (
|
||||||
<div className="flex items-center">
|
<FormItem>
|
||||||
<FormControl>
|
<div className="flex items-center">
|
||||||
<Checkbox
|
<FormControl>
|
||||||
checked={field.value}
|
<Checkbox
|
||||||
onCheckedChange={field.onChange}
|
checked={field.value}
|
||||||
/>
|
onCheckedChange={field.onChange}
|
||||||
</FormControl>
|
/>
|
||||||
|
</FormControl>
|
||||||
|
|
||||||
<FormLabel className="ml-2">
|
<FormLabel className="ml-2">
|
||||||
Delete volumes associated with this compose
|
Delete volumes associated with this compose
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
</div>
|
</div>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,12 +17,14 @@ interface Props {
|
|||||||
serverId?: string;
|
serverId?: string;
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
|
errorMessage?: string;
|
||||||
}
|
}
|
||||||
export const ShowDeploymentCompose = ({
|
export const ShowDeploymentCompose = ({
|
||||||
logPath,
|
logPath,
|
||||||
open,
|
open,
|
||||||
onClose,
|
onClose,
|
||||||
serverId,
|
serverId,
|
||||||
|
errorMessage,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const [data, setData] = useState("");
|
const [data, setData] = useState("");
|
||||||
const [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);
|
const [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);
|
||||||
@@ -105,6 +107,8 @@ export const ShowDeploymentCompose = ({
|
|||||||
}
|
}
|
||||||
}, [filteredLogs, autoScroll]);
|
}, [filteredLogs, autoScroll]);
|
||||||
|
|
||||||
|
const optionalErrors = parseLogs(errorMessage || "");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
open={open}
|
open={open}
|
||||||
@@ -161,9 +165,17 @@ export const ShowDeploymentCompose = ({
|
|||||||
<TerminalLine key={index} log={log} noTimestamp />
|
<TerminalLine key={index} log={log} noTimestamp />
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
<div className="flex justify-center items-center h-full text-muted-foreground">
|
<>
|
||||||
<Loader2 className="h-6 w-6 animate-spin" />
|
{optionalErrors.length > 0 ? (
|
||||||
</div>
|
optionalErrors.map((log: LogLine, index: number) => (
|
||||||
|
<TerminalLine key={`extra-${index}`} log={log} noTimestamp />
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<div className="flex justify-center items-center h-full text-muted-foreground">
|
||||||
|
<Loader2 className="h-6 w-6 animate-spin" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
import { api } from "@/utils/api";
|
import { type RouterOutputs, api } from "@/utils/api";
|
||||||
import { RocketIcon } from "lucide-react";
|
import { RocketIcon } from "lucide-react";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { CancelQueuesCompose } from "./cancel-queues-compose";
|
import { CancelQueuesCompose } from "./cancel-queues-compose";
|
||||||
@@ -19,7 +19,9 @@ interface Props {
|
|||||||
composeId: string;
|
composeId: string;
|
||||||
}
|
}
|
||||||
export const ShowDeploymentsCompose = ({ composeId }: Props) => {
|
export const ShowDeploymentsCompose = ({ composeId }: Props) => {
|
||||||
const [activeLog, setActiveLog] = useState<string | null>(null);
|
const [activeLog, setActiveLog] = useState<
|
||||||
|
RouterOutputs["deployment"]["all"][number] | null
|
||||||
|
>(null);
|
||||||
const { data } = api.compose.one.useQuery({ composeId });
|
const { data } = api.compose.one.useQuery({ composeId });
|
||||||
const { data: deployments } = api.deployment.allByCompose.useQuery(
|
const { data: deployments } = api.deployment.allByCompose.useQuery(
|
||||||
{ composeId },
|
{ composeId },
|
||||||
@@ -100,7 +102,7 @@ export const ShowDeploymentsCompose = ({ composeId }: Props) => {
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setActiveLog(deployment.logPath);
|
setActiveLog(deployment);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
View
|
View
|
||||||
@@ -112,9 +114,10 @@ export const ShowDeploymentsCompose = ({ composeId }: Props) => {
|
|||||||
)}
|
)}
|
||||||
<ShowDeploymentCompose
|
<ShowDeploymentCompose
|
||||||
serverId={data?.serverId || ""}
|
serverId={data?.serverId || ""}
|
||||||
open={activeLog !== null}
|
open={Boolean(activeLog && activeLog.logPath !== null)}
|
||||||
onClose={() => setActiveLog(null)}
|
onClose={() => setActiveLog(null)}
|
||||||
logPath={activeLog}
|
logPath={activeLog?.logPath || ""}
|
||||||
|
errorMessage={activeLog?.errorMessage || ""}
|
||||||
/>
|
/>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
import { Input } from "@/components/ui/input";
|
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import { ExternalLink, GlobeIcon, PenBoxIcon, Trash2 } from "lucide-react";
|
import { ExternalLink, GlobeIcon, PenBoxIcon, Trash2 } from "lucide-react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
@@ -74,59 +73,70 @@ export const ShowDomainsCompose = ({ composeId }: Props) => {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={item.domainId}
|
key={item.domainId}
|
||||||
className="flex w-full items-center gap-4 max-sm:flex-wrap border p-4 rounded-lg"
|
className="flex w-full items-center justify-between gap-4 border p-4 md:px-6 rounded-lg flex-wrap"
|
||||||
>
|
>
|
||||||
<Link target="_blank" href={`http://${item.host}`}>
|
<div className="md:basis-1/2 flex gap-6 w-full items-center">
|
||||||
<ExternalLink className="size-5" />
|
<span className="opacity-50 text-center font-medium text-sm whitespace-nowrap">
|
||||||
</Link>
|
{item.serviceName}
|
||||||
<Button variant="outline" disabled>
|
</span>
|
||||||
{item.serviceName}
|
|
||||||
</Button>
|
<Link
|
||||||
<Input disabled value={item.host} />
|
className="flex gap-2 items-center hover:underline transition-all w-full max-w-[calc(100%-4rem)]"
|
||||||
<Button variant="outline" disabled>
|
target="_blank"
|
||||||
{item.path}
|
href={`${item.https ? "https" : "http"}://${item.host}${item.path}`}
|
||||||
</Button>
|
|
||||||
<Button variant="outline" disabled>
|
|
||||||
{item.port}
|
|
||||||
</Button>
|
|
||||||
<Button variant="outline" disabled>
|
|
||||||
{item.https ? "HTTPS" : "HTTP"}
|
|
||||||
</Button>
|
|
||||||
<div className="flex flex-row gap-1">
|
|
||||||
<AddDomainCompose
|
|
||||||
composeId={composeId}
|
|
||||||
domainId={item.domainId}
|
|
||||||
>
|
>
|
||||||
<Button variant="ghost">
|
<span className="truncate text-sm">{item.host}</span>
|
||||||
<PenBoxIcon className="size-4 text-muted-foreground" />
|
<ExternalLink className="size-4 min-w-4" />
|
||||||
</Button>
|
</Link>
|
||||||
</AddDomainCompose>
|
</div>
|
||||||
<DialogAction
|
|
||||||
title="Delete Domain"
|
<div className="flex gap-8">
|
||||||
description="Are you sure you want to delete this domain?"
|
<div className="flex gap-8 opacity-50 items-center h-10 text-center text-sm font-medium">
|
||||||
type="destructive"
|
<span>{item.path}</span>
|
||||||
onClick={async () => {
|
<span>{item.port}</span>
|
||||||
await deleteDomain({
|
<span>{item.https ? "HTTPS" : "HTTP"}</span>
|
||||||
domainId: item.domainId,
|
</div>
|
||||||
})
|
|
||||||
.then((data) => {
|
<div className="flex gap-2">
|
||||||
refetch();
|
<AddDomainCompose
|
||||||
toast.success("Domain deleted successfully");
|
composeId={composeId}
|
||||||
})
|
domainId={item.domainId}
|
||||||
.catch(() => {
|
|
||||||
toast.error("Error deleting domain");
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="icon"
|
|
||||||
className="group hover:bg-red-500/10"
|
|
||||||
isLoading={isRemoving}
|
|
||||||
>
|
>
|
||||||
<Trash2 className="size-4 text-primary group-hover:text-red-500" />
|
<Button
|
||||||
</Button>
|
variant="ghost"
|
||||||
</DialogAction>
|
size="icon"
|
||||||
|
className="group hover:bg-blue-500/10 "
|
||||||
|
>
|
||||||
|
<PenBoxIcon className="size-3.5 text-primary group-hover:text-blue-500" />
|
||||||
|
</Button>
|
||||||
|
</AddDomainCompose>
|
||||||
|
<DialogAction
|
||||||
|
title="Delete Domain"
|
||||||
|
description="Are you sure you want to delete this domain?"
|
||||||
|
type="destructive"
|
||||||
|
onClick={async () => {
|
||||||
|
await deleteDomain({
|
||||||
|
domainId: item.domainId,
|
||||||
|
})
|
||||||
|
.then((data) => {
|
||||||
|
refetch();
|
||||||
|
toast.success("Domain deleted successfully");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
toast.error("Error deleting domain");
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
className="group hover:bg-red-500/10"
|
||||||
|
isLoading={isRemoving}
|
||||||
|
>
|
||||||
|
<Trash2 className="size-4 text-primary group-hover:text-red-500" />
|
||||||
|
</Button>
|
||||||
|
</DialogAction>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { useForm } from "react-hook-form";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { validateAndFormatYAML } from "../../application/advanced/traefik/update-traefik-config";
|
import { validateAndFormatYAML } from "../../application/advanced/traefik/update-traefik-config";
|
||||||
import { RandomizeCompose } from "./randomize-compose";
|
import { ShowUtilities } from "./show-utilities";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
composeId: string;
|
composeId: string;
|
||||||
@@ -125,7 +125,7 @@ services:
|
|||||||
</Form>
|
</Form>
|
||||||
<div className="flex justify-between flex-col lg:flex-row gap-2">
|
<div className="flex justify-between flex-col lg:flex-row gap-2">
|
||||||
<div className="w-full flex flex-col lg:flex-row gap-4 items-end">
|
<div className="w-full flex flex-col lg:flex-row gap-4 items-end">
|
||||||
<RandomizeCompose composeId={composeId} />
|
<ShowUtilities composeId={composeId} />
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
|
|||||||
<CommandGroup>
|
<CommandGroup>
|
||||||
{repositories?.map((repo) => (
|
{repositories?.map((repo) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
value={repo.url}
|
value={repo.name}
|
||||||
key={repo.url}
|
key={repo.url}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
form.setValue("repository", {
|
form.setValue("repository", {
|
||||||
@@ -247,7 +247,12 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
|
|||||||
form.setValue("branch", "");
|
form.setValue("branch", "");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{repo.name}
|
<span className="flex items-center gap-2">
|
||||||
|
<span>{repo.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{repo.owner.username}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto h-4 w-4",
|
"ml-auto h-4 w-4",
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
|
|||||||
<CommandGroup>
|
<CommandGroup>
|
||||||
{repositories?.map((repo) => (
|
{repositories?.map((repo) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
value={repo.url}
|
value={repo.name}
|
||||||
key={repo.url}
|
key={repo.url}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
form.setValue("repository", {
|
form.setValue("repository", {
|
||||||
@@ -238,7 +238,12 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
|
|||||||
form.setValue("branch", "");
|
form.setValue("branch", "");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{repo.name}
|
<span className="flex items-center gap-2">
|
||||||
|
<span>{repo.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{repo.owner.login}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto h-4 w-4",
|
"ml-auto h-4 w-4",
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
|
|||||||
{repositories?.map((repo) => {
|
{repositories?.map((repo) => {
|
||||||
return (
|
return (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
value={repo.url}
|
value={repo.name}
|
||||||
key={repo.url}
|
key={repo.url}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
form.setValue("repository", {
|
form.setValue("repository", {
|
||||||
@@ -262,7 +262,12 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
|
|||||||
form.setValue("branch", "");
|
form.setValue("branch", "");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{repo.name}
|
<span className="flex items-center gap-2">
|
||||||
|
<span>{repo.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{repo.owner.username}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto h-4 w-4",
|
"ml-auto h-4 w-4",
|
||||||
|
|||||||
@@ -0,0 +1,191 @@
|
|||||||
|
import { AlertBlock } from "@/components/shared/alert-block";
|
||||||
|
import { CodeEditor } from "@/components/shared/code-editor";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import {
|
||||||
|
DialogDescription,
|
||||||
|
DialogHeader,
|
||||||
|
DialogTitle,
|
||||||
|
} from "@/components/ui/dialog";
|
||||||
|
import {
|
||||||
|
Form,
|
||||||
|
FormControl,
|
||||||
|
FormDescription,
|
||||||
|
FormField,
|
||||||
|
FormItem,
|
||||||
|
FormLabel,
|
||||||
|
} from "@/components/ui/form";
|
||||||
|
import { Label } from "@/components/ui/label";
|
||||||
|
import { Switch } from "@/components/ui/switch";
|
||||||
|
import { api } from "@/utils/api";
|
||||||
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
|
import { AlertTriangle } from "lucide-react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { useForm } from "react-hook-form";
|
||||||
|
import { toast } from "sonner";
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
composeId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const schema = z.object({
|
||||||
|
isolatedDeployment: z.boolean().optional(),
|
||||||
|
});
|
||||||
|
|
||||||
|
type Schema = z.infer<typeof schema>;
|
||||||
|
|
||||||
|
export const IsolatedDeployment = ({ composeId }: Props) => {
|
||||||
|
const utils = api.useUtils();
|
||||||
|
const [compose, setCompose] = useState<string>("");
|
||||||
|
const { mutateAsync, error, isError } =
|
||||||
|
api.compose.isolatedDeployment.useMutation();
|
||||||
|
|
||||||
|
const { mutateAsync: updateCompose } = api.compose.update.useMutation();
|
||||||
|
|
||||||
|
const { data, refetch } = api.compose.one.useQuery(
|
||||||
|
{ composeId },
|
||||||
|
{ enabled: !!composeId },
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
|
const form = useForm<Schema>({
|
||||||
|
defaultValues: {
|
||||||
|
isolatedDeployment: false,
|
||||||
|
},
|
||||||
|
resolver: zodResolver(schema),
|
||||||
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
randomizeCompose();
|
||||||
|
if (data) {
|
||||||
|
form.reset({
|
||||||
|
isolatedDeployment: data?.isolatedDeployment || false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [form, form.reset, form.formState.isSubmitSuccessful, data]);
|
||||||
|
|
||||||
|
const onSubmit = async (formData: Schema) => {
|
||||||
|
await updateCompose({
|
||||||
|
composeId,
|
||||||
|
isolatedDeployment: formData?.isolatedDeployment || false,
|
||||||
|
})
|
||||||
|
.then(async (data) => {
|
||||||
|
randomizeCompose();
|
||||||
|
refetch();
|
||||||
|
toast.success("Compose updated");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
toast.error("Error updating the compose");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const randomizeCompose = async () => {
|
||||||
|
await mutateAsync({
|
||||||
|
composeId,
|
||||||
|
suffix: data?.appName || "",
|
||||||
|
})
|
||||||
|
.then(async (data) => {
|
||||||
|
await utils.project.all.invalidate();
|
||||||
|
setCompose(data);
|
||||||
|
toast.success("Compose Isolated");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
toast.error("Error isolating the compose");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<DialogHeader>
|
||||||
|
<DialogTitle>Isolate Deployment</DialogTitle>
|
||||||
|
<DialogDescription>
|
||||||
|
Use this option to isolate the deployment of this compose file.
|
||||||
|
</DialogDescription>
|
||||||
|
</DialogHeader>
|
||||||
|
<div className="text-sm text-muted-foreground flex flex-col gap-2">
|
||||||
|
<span>
|
||||||
|
This feature creates an isolated environment for your deployment by
|
||||||
|
adding unique prefixes to all resources. It establishes a dedicated
|
||||||
|
network based on your compose file's name, ensuring your services run
|
||||||
|
in isolation. This prevents conflicts when running multiple instances
|
||||||
|
of the same template or services with identical names.
|
||||||
|
</span>
|
||||||
|
<div className="space-y-4">
|
||||||
|
<div>
|
||||||
|
<h4 className="font-medium mb-2">
|
||||||
|
Resources that will be isolated:
|
||||||
|
</h4>
|
||||||
|
<ul className="list-disc list-inside">
|
||||||
|
<li>Docker volumes</li>
|
||||||
|
<li>Docker networks</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
||||||
|
<Form {...form}>
|
||||||
|
<form
|
||||||
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
|
id="hook-form-add-project"
|
||||||
|
className="grid w-full gap-4"
|
||||||
|
>
|
||||||
|
{isError && (
|
||||||
|
<div className="flex flex-row gap-4 rounded-lg items-center bg-red-50 p-2 dark:bg-red-950">
|
||||||
|
<AlertTriangle className="text-red-600 dark:text-red-400" />
|
||||||
|
<span className="text-sm text-red-600 dark:text-red-400">
|
||||||
|
{error?.message}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="flex flex-col lg:flex-col gap-4 w-full ">
|
||||||
|
<div>
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="isolatedDeployment"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="mt-4 flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm">
|
||||||
|
<div className="space-y-0.5">
|
||||||
|
<FormLabel>Enable Randomize ({data?.appName})</FormLabel>
|
||||||
|
<FormDescription>
|
||||||
|
Enable randomize to the compose file.
|
||||||
|
</FormDescription>
|
||||||
|
</div>
|
||||||
|
<FormControl>
|
||||||
|
<Switch
|
||||||
|
checked={field.value}
|
||||||
|
onCheckedChange={field.onChange}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-col lg:flex-row gap-4 w-full items-end justify-end">
|
||||||
|
<Button
|
||||||
|
form="hook-form-add-project"
|
||||||
|
type="submit"
|
||||||
|
className="lg:w-fit"
|
||||||
|
>
|
||||||
|
Save
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col gap-4">
|
||||||
|
<Label>Preview</Label>
|
||||||
|
<pre>
|
||||||
|
<CodeEditor
|
||||||
|
value={compose || ""}
|
||||||
|
language="yaml"
|
||||||
|
readOnly
|
||||||
|
height="50rem"
|
||||||
|
/>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</Form>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
import { AlertBlock } from "@/components/shared/alert-block";
|
import { AlertBlock } from "@/components/shared/alert-block";
|
||||||
import { CodeEditor } from "@/components/shared/code-editor";
|
import { CodeEditor } from "@/components/shared/code-editor";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { CardTitle } from "@/components/ui/card";
|
|
||||||
import {
|
import {
|
||||||
Dialog,
|
|
||||||
DialogContent,
|
|
||||||
DialogDescription,
|
DialogDescription,
|
||||||
DialogHeader,
|
DialogHeader,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
DialogTrigger,
|
|
||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
@@ -20,11 +16,6 @@ import {
|
|||||||
FormMessage,
|
FormMessage,
|
||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import {
|
|
||||||
InputOTP,
|
|
||||||
InputOTPGroup,
|
|
||||||
InputOTPSlot,
|
|
||||||
} from "@/components/ui/input-otp";
|
|
||||||
import { Switch } from "@/components/ui/switch";
|
import { Switch } from "@/components/ui/switch";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
@@ -70,6 +61,7 @@ export const RandomizeCompose = ({ composeId }: Props) => {
|
|||||||
const suffix = form.watch("suffix");
|
const suffix = form.watch("suffix");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
randomizeCompose();
|
||||||
if (data) {
|
if (data) {
|
||||||
form.reset({
|
form.reset({
|
||||||
suffix: data?.suffix || "",
|
suffix: data?.suffix || "",
|
||||||
@@ -110,126 +102,117 @@ export const RandomizeCompose = ({ composeId }: Props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
<div className="w-full">
|
||||||
<DialogTrigger asChild onClick={() => randomizeCompose()}>
|
<DialogHeader>
|
||||||
<Button className="max-lg:w-full" variant="outline">
|
<DialogTitle>Randomize Compose (Experimental)</DialogTitle>
|
||||||
<Dices className="h-4 w-4" />
|
<DialogDescription>
|
||||||
Randomize Compose
|
Use this in case you want to deploy the same compose file and you have
|
||||||
</Button>
|
conflicts with some property like volumes, networks, etc.
|
||||||
</DialogTrigger>
|
</DialogDescription>
|
||||||
<DialogContent className="sm:max-w-6xl max-h-[50rem] overflow-y-auto">
|
</DialogHeader>
|
||||||
<DialogHeader>
|
<div className="text-sm text-muted-foreground flex flex-col gap-2">
|
||||||
<DialogTitle>Randomize Compose (Experimental)</DialogTitle>
|
<span>
|
||||||
<DialogDescription>
|
This will randomize the compose file and will add a suffix to the
|
||||||
Use this in case you want to deploy the same compose file and you
|
property to avoid conflicts
|
||||||
have conflicts with some property like volumes, networks, etc.
|
</span>
|
||||||
</DialogDescription>
|
<ul className="list-disc list-inside">
|
||||||
</DialogHeader>
|
<li>volumes</li>
|
||||||
<div className="text-sm text-muted-foreground flex flex-col gap-2">
|
<li>networks</li>
|
||||||
<span>
|
<li>services</li>
|
||||||
This will randomize the compose file and will add a suffix to the
|
<li>configs</li>
|
||||||
property to avoid conflicts
|
<li>secrets</li>
|
||||||
</span>
|
</ul>
|
||||||
<ul className="list-disc list-inside">
|
<AlertBlock type="info">
|
||||||
<li>volumes</li>
|
When you activate this option, we will include a env `COMPOSE_PREFIX`
|
||||||
<li>networks</li>
|
variable to the compose file so you can use it in your compose file.
|
||||||
<li>services</li>
|
</AlertBlock>
|
||||||
<li>configs</li>
|
</div>
|
||||||
<li>secrets</li>
|
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
||||||
</ul>
|
<Form {...form}>
|
||||||
<AlertBlock type="info">
|
<form
|
||||||
When you activate this option, we will include a env
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
`COMPOSE_PREFIX` variable to the compose file so you can use it in
|
id="hook-form-add-project"
|
||||||
your compose file.
|
className="grid w-full gap-4"
|
||||||
</AlertBlock>
|
>
|
||||||
</div>
|
{isError && (
|
||||||
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
<div className="flex flex-row gap-4 rounded-lg items-center bg-red-50 p-2 dark:bg-red-950">
|
||||||
<Form {...form}>
|
<AlertTriangle className="text-red-600 dark:text-red-400" />
|
||||||
<form
|
<span className="text-sm text-red-600 dark:text-red-400">
|
||||||
onSubmit={form.handleSubmit(onSubmit)}
|
{error?.message}
|
||||||
id="hook-form-add-project"
|
</span>
|
||||||
className="grid w-full gap-4"
|
|
||||||
>
|
|
||||||
{isError && (
|
|
||||||
<div className="flex flex-row gap-4 rounded-lg items-center bg-red-50 p-2 dark:bg-red-950">
|
|
||||||
<AlertTriangle className="text-red-600 dark:text-red-400" />
|
|
||||||
<span className="text-sm text-red-600 dark:text-red-400">
|
|
||||||
{error?.message}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="flex flex-col lg:flex-col gap-4 w-full ">
|
|
||||||
<div>
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="suffix"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem className="flex flex-col justify-center max-sm:items-center w-full">
|
|
||||||
<FormLabel>Suffix</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input
|
|
||||||
placeholder="Enter a suffix (Optional, example: prod)"
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="randomize"
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem className="mt-4 flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm">
|
|
||||||
<div className="space-y-0.5">
|
|
||||||
<FormLabel>Apply Randomize</FormLabel>
|
|
||||||
<FormDescription>
|
|
||||||
Apply randomize to the compose file.
|
|
||||||
</FormDescription>
|
|
||||||
</div>
|
|
||||||
<FormControl>
|
|
||||||
<Switch
|
|
||||||
checked={field.value}
|
|
||||||
onCheckedChange={field.onChange}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex flex-col lg:flex-row gap-4 w-full items-end justify-end">
|
|
||||||
<Button
|
|
||||||
form="hook-form-add-project"
|
|
||||||
type="submit"
|
|
||||||
className="lg:w-fit"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="button"
|
|
||||||
variant="secondary"
|
|
||||||
onClick={async () => {
|
|
||||||
await randomizeCompose();
|
|
||||||
}}
|
|
||||||
className="lg:w-fit"
|
|
||||||
>
|
|
||||||
Random
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<pre>
|
)}
|
||||||
<CodeEditor
|
|
||||||
value={compose || ""}
|
<div className="flex flex-col lg:flex-col gap-4 w-full ">
|
||||||
language="yaml"
|
<div>
|
||||||
readOnly
|
<FormField
|
||||||
height="50rem"
|
control={form.control}
|
||||||
|
name="suffix"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="flex flex-col justify-center max-sm:items-center w-full mt-4">
|
||||||
|
<FormLabel>Suffix</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input
|
||||||
|
placeholder="Enter a suffix (Optional, example: prod)"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
</pre>
|
<FormField
|
||||||
</form>
|
control={form.control}
|
||||||
</Form>
|
name="randomize"
|
||||||
</DialogContent>
|
render={({ field }) => (
|
||||||
</Dialog>
|
<FormItem className="mt-4 flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm">
|
||||||
|
<div className="space-y-0.5">
|
||||||
|
<FormLabel>Apply Randomize</FormLabel>
|
||||||
|
<FormDescription>
|
||||||
|
Apply randomize to the compose file.
|
||||||
|
</FormDescription>
|
||||||
|
</div>
|
||||||
|
<FormControl>
|
||||||
|
<Switch
|
||||||
|
checked={field.value}
|
||||||
|
onCheckedChange={field.onChange}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-col lg:flex-row gap-4 w-full items-end justify-end">
|
||||||
|
<Button
|
||||||
|
form="hook-form-add-project"
|
||||||
|
type="submit"
|
||||||
|
className="lg:w-fit"
|
||||||
|
>
|
||||||
|
Save
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="secondary"
|
||||||
|
onClick={async () => {
|
||||||
|
await randomizeCompose();
|
||||||
|
}}
|
||||||
|
className="lg:w-fit"
|
||||||
|
>
|
||||||
|
Random
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<pre>
|
||||||
|
<CodeEditor
|
||||||
|
value={compose || ""}
|
||||||
|
language="yaml"
|
||||||
|
readOnly
|
||||||
|
height="50rem"
|
||||||
|
/>
|
||||||
|
</pre>
|
||||||
|
</form>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import {
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
DialogDescription,
|
||||||
|
DialogHeader,
|
||||||
|
DialogTitle,
|
||||||
|
DialogTrigger,
|
||||||
|
} from "@/components/ui/dialog";
|
||||||
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { IsolatedDeployment } from "./isolated-deployment";
|
||||||
|
import { RandomizeCompose } from "./randomize-compose";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
composeId: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ShowUtilities = ({ composeId }: Props) => {
|
||||||
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
return (
|
||||||
|
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
||||||
|
<DialogTrigger asChild>
|
||||||
|
<Button variant="ghost">Show Utilities</Button>
|
||||||
|
</DialogTrigger>
|
||||||
|
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-5xl">
|
||||||
|
<DialogHeader>
|
||||||
|
<DialogTitle>Utilities </DialogTitle>
|
||||||
|
<DialogDescription>Modify the application data</DialogDescription>
|
||||||
|
</DialogHeader>
|
||||||
|
<Tabs defaultValue="isolated">
|
||||||
|
<TabsList className="grid w-full grid-cols-2">
|
||||||
|
<TabsTrigger value="isolated">Isolated Deployment</TabsTrigger>
|
||||||
|
<TabsTrigger value="randomize">Randomize Compose</TabsTrigger>
|
||||||
|
</TabsList>
|
||||||
|
<TabsContent value="randomize" className="pt-5">
|
||||||
|
<RandomizeCompose composeId={composeId} />
|
||||||
|
</TabsContent>
|
||||||
|
<TabsContent value="isolated" className="pt-5">
|
||||||
|
<IsolatedDeployment composeId={composeId} />
|
||||||
|
</TabsContent>
|
||||||
|
</Tabs>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -43,7 +43,7 @@ const LOG_STYLES: Record<LogType, LogStyle> = {
|
|||||||
|
|
||||||
export function parseLogs(logString: string): LogLine[] {
|
export function parseLogs(logString: string): LogLine[] {
|
||||||
// Regex to match the log line format
|
// Regex to match the log line format
|
||||||
// Exemple of return :
|
// Example of return :
|
||||||
// 1 2024-12-10T10:00:00.000Z The server is running on port 8080
|
// 1 2024-12-10T10:00:00.000Z The server is running on port 8080
|
||||||
// Should return :
|
// Should return :
|
||||||
// { timestamp: new Date("2024-12-10T10:00:00.000Z"),
|
// { timestamp: new Date("2024-12-10T10:00:00.000Z"),
|
||||||
@@ -63,18 +63,10 @@ export function parseLogs(logString: string): LogLine[] {
|
|||||||
|
|
||||||
if (!message?.trim()) return null;
|
if (!message?.trim()) return null;
|
||||||
|
|
||||||
// Delete other timestamps and keep only the one from --timestamps
|
|
||||||
const cleanedMessage = message
|
|
||||||
?.replace(
|
|
||||||
/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z|\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} UTC/g,
|
|
||||||
"",
|
|
||||||
)
|
|
||||||
.trim();
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
rawTimestamp: timestamp ?? null,
|
rawTimestamp: timestamp ?? null,
|
||||||
timestamp: timestamp ? new Date(timestamp.replace(" UTC", "Z")) : null,
|
timestamp: timestamp ? new Date(timestamp.replace(" UTC", "Z")) : null,
|
||||||
message: cleanedMessage,
|
message: message.trim(),
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.filter((log) => log !== null);
|
.filter((log) => log !== null);
|
||||||
|
|||||||
@@ -1,314 +0,0 @@
|
|||||||
import {
|
|
||||||
Card,
|
|
||||||
CardContent,
|
|
||||||
CardDescription,
|
|
||||||
CardHeader,
|
|
||||||
CardTitle,
|
|
||||||
} from "@/components/ui/card";
|
|
||||||
import { Progress } from "@/components/ui/progress";
|
|
||||||
import { api } from "@/utils/api";
|
|
||||||
import React, { useEffect, useState } from "react";
|
|
||||||
import { DockerBlockChart } from "./docker-block-chart";
|
|
||||||
import { DockerCpuChart } from "./docker-cpu-chart";
|
|
||||||
import { DockerDiskChart } from "./docker-disk-chart";
|
|
||||||
import { DockerMemoryChart } from "./docker-memory-chart";
|
|
||||||
import { DockerNetworkChart } from "./docker-network-chart";
|
|
||||||
|
|
||||||
const defaultData = {
|
|
||||||
cpu: {
|
|
||||||
value: 0,
|
|
||||||
time: "",
|
|
||||||
},
|
|
||||||
memory: {
|
|
||||||
value: {
|
|
||||||
used: 0,
|
|
||||||
free: 0,
|
|
||||||
usedPercentage: 0,
|
|
||||||
total: 0,
|
|
||||||
},
|
|
||||||
time: "",
|
|
||||||
},
|
|
||||||
block: {
|
|
||||||
value: {
|
|
||||||
readMb: 0,
|
|
||||||
writeMb: 0,
|
|
||||||
},
|
|
||||||
time: "",
|
|
||||||
},
|
|
||||||
network: {
|
|
||||||
value: {
|
|
||||||
inputMb: 0,
|
|
||||||
outputMb: 0,
|
|
||||||
},
|
|
||||||
time: "",
|
|
||||||
},
|
|
||||||
disk: {
|
|
||||||
value: { diskTotal: 0, diskUsage: 0, diskUsedPercentage: 0, diskFree: 0 },
|
|
||||||
time: "",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
appName: string;
|
|
||||||
appType?: "application" | "stack" | "docker-compose";
|
|
||||||
}
|
|
||||||
export interface DockerStats {
|
|
||||||
cpu: {
|
|
||||||
value: number;
|
|
||||||
time: string;
|
|
||||||
};
|
|
||||||
memory: {
|
|
||||||
value: {
|
|
||||||
used: number;
|
|
||||||
free: number;
|
|
||||||
usedPercentage: number;
|
|
||||||
total: number;
|
|
||||||
};
|
|
||||||
time: string;
|
|
||||||
};
|
|
||||||
block: {
|
|
||||||
value: {
|
|
||||||
readMb: number;
|
|
||||||
writeMb: number;
|
|
||||||
};
|
|
||||||
time: string;
|
|
||||||
};
|
|
||||||
network: {
|
|
||||||
value: {
|
|
||||||
inputMb: number;
|
|
||||||
outputMb: number;
|
|
||||||
};
|
|
||||||
time: string;
|
|
||||||
};
|
|
||||||
disk: {
|
|
||||||
value: {
|
|
||||||
diskTotal: number;
|
|
||||||
diskUsage: number;
|
|
||||||
diskUsedPercentage: number;
|
|
||||||
diskFree: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
time: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DockerStatsJSON = {
|
|
||||||
cpu: DockerStats["cpu"][];
|
|
||||||
memory: DockerStats["memory"][];
|
|
||||||
block: DockerStats["block"][];
|
|
||||||
network: DockerStats["network"][];
|
|
||||||
disk: DockerStats["disk"][];
|
|
||||||
};
|
|
||||||
|
|
||||||
export const DockerMonitoring = ({
|
|
||||||
appName,
|
|
||||||
appType = "application",
|
|
||||||
}: Props) => {
|
|
||||||
const { data } = api.application.readAppMonitoring.useQuery(
|
|
||||||
{ appName },
|
|
||||||
{
|
|
||||||
refetchOnWindowFocus: false,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
const [acummulativeData, setAcummulativeData] = useState<DockerStatsJSON>({
|
|
||||||
cpu: [],
|
|
||||||
memory: [],
|
|
||||||
block: [],
|
|
||||||
network: [],
|
|
||||||
disk: [],
|
|
||||||
});
|
|
||||||
const [currentData, setCurrentData] = useState<DockerStats>(defaultData);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setCurrentData(defaultData);
|
|
||||||
|
|
||||||
setAcummulativeData({
|
|
||||||
cpu: [],
|
|
||||||
memory: [],
|
|
||||||
block: [],
|
|
||||||
network: [],
|
|
||||||
disk: [],
|
|
||||||
});
|
|
||||||
}, [appName]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!data) return;
|
|
||||||
|
|
||||||
setCurrentData({
|
|
||||||
cpu: data.cpu[data.cpu.length - 1] ?? currentData.cpu,
|
|
||||||
memory: data.memory[data.memory.length - 1] ?? currentData.memory,
|
|
||||||
block: data.block[data.block.length - 1] ?? currentData.block,
|
|
||||||
network: data.network[data.network.length - 1] ?? currentData.network,
|
|
||||||
disk: data.disk[data.disk.length - 1] ?? currentData.disk,
|
|
||||||
});
|
|
||||||
setAcummulativeData({
|
|
||||||
block: data?.block || [],
|
|
||||||
cpu: data?.cpu || [],
|
|
||||||
disk: data?.disk || [],
|
|
||||||
memory: data?.memory || [],
|
|
||||||
network: data?.network || [],
|
|
||||||
});
|
|
||||||
}, [data]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
||||||
const wsUrl = `${protocol}//${window.location.host}/listen-docker-stats-monitoring?appName=${appName}&appType=${appType}`;
|
|
||||||
const ws = new WebSocket(wsUrl);
|
|
||||||
|
|
||||||
ws.onmessage = (e) => {
|
|
||||||
const value = JSON.parse(e.data);
|
|
||||||
if (!value) return;
|
|
||||||
|
|
||||||
const data = {
|
|
||||||
cpu: value.data.cpu ?? currentData.cpu,
|
|
||||||
memory: value.data.memory ?? currentData.memory,
|
|
||||||
block: value.data.block ?? currentData.block,
|
|
||||||
disk: value.data.disk ?? currentData.disk,
|
|
||||||
network: value.data.network ?? currentData.network,
|
|
||||||
};
|
|
||||||
|
|
||||||
setCurrentData(data);
|
|
||||||
|
|
||||||
setAcummulativeData((prevData) => ({
|
|
||||||
cpu: [...prevData.cpu, data.cpu],
|
|
||||||
memory: [...prevData.memory, data.memory],
|
|
||||||
block: [...prevData.block, data.block],
|
|
||||||
network: [...prevData.network, data.network],
|
|
||||||
disk: [...prevData.disk, data.disk],
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
ws.onclose = (e) => {
|
|
||||||
console.log(e.reason);
|
|
||||||
};
|
|
||||||
|
|
||||||
return () => ws.close();
|
|
||||||
}, [appName]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Card className="h-full bg-sidebar p-2.5 rounded-xl mx-auto w-full">
|
|
||||||
<div className="rounded-xl bg-background shadow-md p-6 flex flex-col gap-4">
|
|
||||||
<header className="flex items-center justify-between">
|
|
||||||
<div className="space-y-1">
|
|
||||||
<h1 className="text-2xl font-semibold tracking-tight">
|
|
||||||
Monitoring
|
|
||||||
</h1>
|
|
||||||
<p className="text-sm text-muted-foreground">
|
|
||||||
Watch the usage of your server in the current app
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div className="grid gap-6 lg:grid-cols-2">
|
|
||||||
<Card className="bg-background">
|
|
||||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
||||||
<CardTitle className="text-sm font-medium">CPU Usage</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<div className="flex flex-col gap-2 w-full">
|
|
||||||
<span className="text-sm text-muted-foreground">
|
|
||||||
Used: {currentData.cpu.value.toFixed(2)}%
|
|
||||||
</span>
|
|
||||||
<Progress
|
|
||||||
value={currentData.cpu.value}
|
|
||||||
className="w-[100%]"
|
|
||||||
/>
|
|
||||||
<DockerCpuChart acummulativeData={acummulativeData.cpu} />
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card className="bg-background">
|
|
||||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
||||||
<CardTitle className="text-sm font-medium">
|
|
||||||
Memory Usage
|
|
||||||
</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<div className="flex flex-col gap-2 w-full">
|
|
||||||
<span className="text-sm text-muted-foreground">
|
|
||||||
{`Used: ${(currentData.memory.value.used / 1024 ** 3).toFixed(2)} GB / Limit: ${(currentData.memory.value.total / 1024 ** 3).toFixed(2)} GB`}
|
|
||||||
</span>
|
|
||||||
<Progress
|
|
||||||
value={currentData.memory.value.usedPercentage}
|
|
||||||
className="w-[100%]"
|
|
||||||
/>
|
|
||||||
<DockerMemoryChart
|
|
||||||
acummulativeData={acummulativeData.memory}
|
|
||||||
memoryLimitGB={currentData.memory.value.total / 1024 ** 3}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
{appName === "dokploy" && (
|
|
||||||
<Card className="bg-background">
|
|
||||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
||||||
<CardTitle className="text-sm font-medium">
|
|
||||||
Disk Space
|
|
||||||
</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<div className="flex flex-col gap-2 w-full">
|
|
||||||
<span className="text-sm text-muted-foreground">
|
|
||||||
{`Used: ${currentData.disk.value.diskUsage} GB / Limit: ${currentData.disk.value.diskTotal} GB`}
|
|
||||||
</span>
|
|
||||||
<Progress
|
|
||||||
value={currentData.disk.value.diskUsedPercentage}
|
|
||||||
className="w-[100%]"
|
|
||||||
/>
|
|
||||||
<DockerDiskChart
|
|
||||||
acummulativeData={acummulativeData.disk}
|
|
||||||
diskTotal={currentData.disk.value.diskTotal}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Card className="bg-background">
|
|
||||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
||||||
<CardTitle className="text-sm font-medium">Block I/O</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<div className="flex flex-col gap-2 w-full">
|
|
||||||
<span className="text-sm text-muted-foreground">
|
|
||||||
{`Read: ${currentData.block.value.readMb.toFixed(
|
|
||||||
2,
|
|
||||||
)} MB / Write: ${currentData.block.value.writeMb.toFixed(
|
|
||||||
3,
|
|
||||||
)} MB`}
|
|
||||||
</span>
|
|
||||||
<DockerBlockChart acummulativeData={acummulativeData.block} />
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card className="bg-background">
|
|
||||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
||||||
<CardTitle className="text-sm font-medium">
|
|
||||||
Network I/O
|
|
||||||
</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<div className="flex flex-col gap-2 w-full">
|
|
||||||
<span className="text-sm text-muted-foreground">
|
|
||||||
{`In MB: ${currentData.network.value.inputMb.toFixed(
|
|
||||||
2,
|
|
||||||
)} MB / Out MB: ${currentData.network.value.outputMb.toFixed(
|
|
||||||
2,
|
|
||||||
)} MB`}
|
|
||||||
</span>
|
|
||||||
<DockerNetworkChart
|
|
||||||
acummulativeData={acummulativeData.network}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
YAxis,
|
YAxis,
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import type { DockerStatsJSON } from "./show";
|
import type { DockerStatsJSON } from "./show-free-container-monitoring";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
acummulativeData: DockerStatsJSON["block"];
|
acummulativeData: DockerStatsJSON["block"];
|
||||||
@@ -90,9 +90,11 @@ const CustomTooltip = ({ active, payload }: CustomTooltipProps) => {
|
|||||||
if (active && payload && payload.length && payload[0]) {
|
if (active && payload && payload.length && payload[0]) {
|
||||||
return (
|
return (
|
||||||
<div className="custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border">
|
<div className="custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border">
|
||||||
<p>{`Date: ${format(new Date(payload[0].payload.time), "PPpp")}`}</p>
|
{payload[0].payload.time && (
|
||||||
<p>{`Read ${payload[0].payload.readMb.toFixed(2)} MB`}</p>
|
<p>{`Date: ${format(new Date(payload[0].payload.time), "PPpp")}`}</p>
|
||||||
<p>{`Write: ${payload[0].payload.writeMb.toFixed(3)} MB`}</p>
|
)}
|
||||||
|
<p>{`Read ${payload[0].payload.readMb} `}</p>
|
||||||
|
<p>{`Write: ${payload[0].payload.writeMb} `}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
YAxis,
|
YAxis,
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import type { DockerStatsJSON } from "./show";
|
import type { DockerStatsJSON } from "./show-free-container-monitoring";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
acummulativeData: DockerStatsJSON["cpu"];
|
acummulativeData: DockerStatsJSON["cpu"];
|
||||||
@@ -19,7 +19,7 @@ export const DockerCpuChart = ({ acummulativeData }: Props) => {
|
|||||||
return {
|
return {
|
||||||
name: `Point ${index + 1}`,
|
name: `Point ${index + 1}`,
|
||||||
time: item.time,
|
time: item.time,
|
||||||
usage: item.value.toFixed(2),
|
usage: item.value.toString().split("%")[0],
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
@@ -75,7 +75,9 @@ const CustomTooltip = ({ active, payload }: CustomTooltipProps) => {
|
|||||||
if (active && payload && payload.length && payload[0]) {
|
if (active && payload && payload.length && payload[0]) {
|
||||||
return (
|
return (
|
||||||
<div className="custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border">
|
<div className="custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border">
|
||||||
<p>{`Date: ${format(new Date(payload[0].payload.time), "PPpp")}`}</p>
|
{payload[0].payload.time && (
|
||||||
|
<p>{`Date: ${format(new Date(payload[0].payload.time), "PPpp")}`}</p>
|
||||||
|
)}
|
||||||
<p>{`CPU Usage: ${payload[0].payload.usage}%`}</p>
|
<p>{`CPU Usage: ${payload[0].payload.usage}%`}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
YAxis,
|
YAxis,
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import type { DockerStatsJSON } from "./show";
|
import type { DockerStatsJSON } from "./show-free-container-monitoring";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
acummulativeData: DockerStatsJSON["disk"];
|
acummulativeData: DockerStatsJSON["disk"];
|
||||||
@@ -8,8 +8,8 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
YAxis,
|
YAxis,
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import type { DockerStatsJSON } from "./show";
|
import type { DockerStatsJSON } from "./show-free-container-monitoring";
|
||||||
|
import { convertMemoryToBytes } from "./show-free-container-monitoring";
|
||||||
interface Props {
|
interface Props {
|
||||||
acummulativeData: DockerStatsJSON["memory"];
|
acummulativeData: DockerStatsJSON["memory"];
|
||||||
memoryLimitGB: number;
|
memoryLimitGB: number;
|
||||||
@@ -23,7 +23,8 @@ export const DockerMemoryChart = ({
|
|||||||
return {
|
return {
|
||||||
time: item.time,
|
time: item.time,
|
||||||
name: `Point ${index + 1}`,
|
name: `Point ${index + 1}`,
|
||||||
usage: (item.value.used / 1024 ** 3).toFixed(2),
|
// @ts-ignore
|
||||||
|
usage: (convertMemoryToBytes(item.value.used) / 1024 ** 3).toFixed(2),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
@@ -75,10 +76,13 @@ interface CustomTooltipProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const CustomTooltip = ({ active, payload }: CustomTooltipProps) => {
|
const CustomTooltip = ({ active, payload }: CustomTooltipProps) => {
|
||||||
if (active && payload && payload.length && payload[0]) {
|
if (active && payload && payload.length && payload[0] && payload[0].payload) {
|
||||||
return (
|
return (
|
||||||
<div className="custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border">
|
<div className="custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border">
|
||||||
<p>{`Date: ${format(new Date(payload[0].payload.time), "PPpp")}`}</p>
|
{payload[0].payload.time && (
|
||||||
|
<p>{`Date: ${format(new Date(payload[0].payload.time), "PPpp")}`}</p>
|
||||||
|
)}
|
||||||
|
|
||||||
<p>{`Memory usage: ${payload[0].payload.usage} GB`}</p>
|
<p>{`Memory usage: ${payload[0].payload.usage} GB`}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -8,8 +8,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
YAxis,
|
YAxis,
|
||||||
} from "recharts";
|
} from "recharts";
|
||||||
import type { DockerStatsJSON } from "./show";
|
import type { DockerStatsJSON } from "./show-free-container-monitoring";
|
||||||
1;
|
|
||||||
interface Props {
|
interface Props {
|
||||||
acummulativeData: DockerStatsJSON["network"];
|
acummulativeData: DockerStatsJSON["network"];
|
||||||
}
|
}
|
||||||
@@ -19,8 +18,8 @@ export const DockerNetworkChart = ({ acummulativeData }: Props) => {
|
|||||||
return {
|
return {
|
||||||
time: item.time,
|
time: item.time,
|
||||||
name: `Point ${index + 1}`,
|
name: `Point ${index + 1}`,
|
||||||
inMB: item.value.inputMb.toFixed(2),
|
inMB: item.value.inputMb,
|
||||||
outMB: item.value.outputMb.toFixed(2),
|
outMB: item.value.outputMb,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
@@ -86,9 +85,11 @@ const CustomTooltip = ({ active, payload }: CustomTooltipProps) => {
|
|||||||
if (active && payload && payload.length && payload[0]) {
|
if (active && payload && payload.length && payload[0]) {
|
||||||
return (
|
return (
|
||||||
<div className="custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border">
|
<div className="custom-tooltip bg-background p-2 shadow-lg rounded-md text-primary border">
|
||||||
<p>{`Date: ${format(new Date(payload[0].payload.time), "PPpp")}`}</p>
|
{payload[0].payload.time && (
|
||||||
<p>{`In MB Usage: ${payload[0].payload.inMB} MB`}</p>
|
<p>{`Date: ${format(new Date(payload[0].payload.time), "PPpp")}`}</p>
|
||||||
<p>{`Out MB Usage: ${payload[0].payload.outMB} MB`}</p>
|
)}
|
||||||
|
<p>{`In Usage: ${payload[0].payload.inMB} `}</p>
|
||||||
|
<p>{`Out Usage: ${payload[0].payload.outMB} `}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import { Label } from "@/components/ui/label";
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectGroup,
|
||||||
|
SelectItem,
|
||||||
|
SelectLabel,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from "@/components/ui/select";
|
||||||
|
import { api } from "@/utils/api";
|
||||||
|
import { Loader2 } from "lucide-react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { toast } from "sonner";
|
||||||
|
import { ContainerFreeMonitoring } from "./show-free-container-monitoring";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
appName: string;
|
||||||
|
serverId?: string;
|
||||||
|
appType: "stack" | "docker-compose";
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ComposeFreeMonitoring = ({
|
||||||
|
appName,
|
||||||
|
appType = "stack",
|
||||||
|
serverId,
|
||||||
|
}: Props) => {
|
||||||
|
const { data, isLoading } = api.docker.getContainersByAppNameMatch.useQuery(
|
||||||
|
{
|
||||||
|
appName: appName,
|
||||||
|
appType,
|
||||||
|
serverId,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
enabled: !!appName,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const [containerAppName, setContainerAppName] = useState<
|
||||||
|
string | undefined
|
||||||
|
>();
|
||||||
|
|
||||||
|
const [containerId, setContainerId] = useState<string | undefined>();
|
||||||
|
|
||||||
|
const { mutateAsync: restart, isLoading: isRestarting } =
|
||||||
|
api.docker.restartContainer.useMutation();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (data && data?.length > 0) {
|
||||||
|
setContainerAppName(data[0]?.name);
|
||||||
|
setContainerId(data[0]?.containerId);
|
||||||
|
}
|
||||||
|
}, [data]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle className="text-xl">Monitoring</CardTitle>
|
||||||
|
<CardDescription>Watch the usage of your compose</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="flex flex-col gap-4">
|
||||||
|
<Label>Select a container to watch the monitoring</Label>
|
||||||
|
<div className="flex flex-row gap-4">
|
||||||
|
<Select
|
||||||
|
onValueChange={(value) => {
|
||||||
|
setContainerAppName(value);
|
||||||
|
setContainerId(
|
||||||
|
data?.find((container) => container.name === value)
|
||||||
|
?.containerId,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
value={containerAppName}
|
||||||
|
>
|
||||||
|
<SelectTrigger>
|
||||||
|
{isLoading ? (
|
||||||
|
<div className="flex flex-row gap-2 items-center justify-center text-sm text-muted-foreground">
|
||||||
|
<span>Loading...</span>
|
||||||
|
<Loader2 className="animate-spin size-4" />
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<SelectValue placeholder="Select a container" />
|
||||||
|
)}
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectGroup>
|
||||||
|
{data?.map((container) => (
|
||||||
|
<SelectItem
|
||||||
|
key={container.containerId}
|
||||||
|
value={container.name}
|
||||||
|
>
|
||||||
|
{container.name} ({container.containerId}) {container.state}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
<SelectLabel>Containers ({data?.length})</SelectLabel>
|
||||||
|
</SelectGroup>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
<Button
|
||||||
|
isLoading={isRestarting}
|
||||||
|
onClick={async () => {
|
||||||
|
if (!containerId) return;
|
||||||
|
toast.success(`Restarting container ${containerAppName}`);
|
||||||
|
await restart({ containerId }).then(() => {
|
||||||
|
toast.success("Container restarted");
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Restart
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<ContainerFreeMonitoring
|
||||||
|
appName={containerAppName || ""}
|
||||||
|
appType={appType}
|
||||||
|
/>
|
||||||
|
</CardContent>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,316 @@
|
|||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import { Progress } from "@/components/ui/progress";
|
||||||
|
import { api } from "@/utils/api";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { DockerBlockChart } from "./docker-block-chart";
|
||||||
|
import { DockerCpuChart } from "./docker-cpu-chart";
|
||||||
|
import { DockerDiskChart } from "./docker-disk-chart";
|
||||||
|
import { DockerMemoryChart } from "./docker-memory-chart";
|
||||||
|
import { DockerNetworkChart } from "./docker-network-chart";
|
||||||
|
|
||||||
|
const defaultData = {
|
||||||
|
cpu: {
|
||||||
|
value: 0,
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
memory: {
|
||||||
|
value: {
|
||||||
|
used: 0,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
block: {
|
||||||
|
value: {
|
||||||
|
readMb: 0,
|
||||||
|
writeMb: 0,
|
||||||
|
},
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
network: {
|
||||||
|
value: {
|
||||||
|
inputMb: 0,
|
||||||
|
outputMb: 0,
|
||||||
|
},
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
disk: {
|
||||||
|
value: { diskTotal: 0, diskUsage: 0, diskUsedPercentage: 0, diskFree: 0 },
|
||||||
|
time: "",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
appName: string;
|
||||||
|
appType?: "application" | "stack" | "docker-compose";
|
||||||
|
}
|
||||||
|
export interface DockerStats {
|
||||||
|
cpu: {
|
||||||
|
value: number;
|
||||||
|
time: string;
|
||||||
|
};
|
||||||
|
memory: {
|
||||||
|
value: {
|
||||||
|
used: number;
|
||||||
|
total: number;
|
||||||
|
};
|
||||||
|
time: string;
|
||||||
|
};
|
||||||
|
block: {
|
||||||
|
value: {
|
||||||
|
readMb: number;
|
||||||
|
writeMb: number;
|
||||||
|
};
|
||||||
|
time: string;
|
||||||
|
};
|
||||||
|
network: {
|
||||||
|
value: {
|
||||||
|
inputMb: number;
|
||||||
|
outputMb: number;
|
||||||
|
};
|
||||||
|
time: string;
|
||||||
|
};
|
||||||
|
disk: {
|
||||||
|
value: {
|
||||||
|
diskTotal: number;
|
||||||
|
diskUsage: number;
|
||||||
|
diskUsedPercentage: number;
|
||||||
|
diskFree: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
time: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DockerStatsJSON = {
|
||||||
|
cpu: DockerStats["cpu"][];
|
||||||
|
memory: DockerStats["memory"][];
|
||||||
|
block: DockerStats["block"][];
|
||||||
|
network: DockerStats["network"][];
|
||||||
|
disk: DockerStats["disk"][];
|
||||||
|
};
|
||||||
|
|
||||||
|
export const convertMemoryToBytes = (
|
||||||
|
memoryString: string | undefined,
|
||||||
|
): number => {
|
||||||
|
if (!memoryString || typeof memoryString !== "string") {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const value = Number.parseFloat(memoryString) || 0;
|
||||||
|
const unit = memoryString.replace(/[0-9.]/g, "").trim();
|
||||||
|
|
||||||
|
switch (unit) {
|
||||||
|
case "KiB":
|
||||||
|
return value * 1024;
|
||||||
|
case "MiB":
|
||||||
|
return value * 1024 * 1024;
|
||||||
|
case "GiB":
|
||||||
|
return value * 1024 * 1024 * 1024;
|
||||||
|
case "TiB":
|
||||||
|
return value * 1024 * 1024 * 1024 * 1024;
|
||||||
|
default:
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ContainerFreeMonitoring = ({
|
||||||
|
appName,
|
||||||
|
appType = "application",
|
||||||
|
}: Props) => {
|
||||||
|
const { data } = api.application.readAppMonitoring.useQuery(
|
||||||
|
{ appName },
|
||||||
|
{
|
||||||
|
refetchOnWindowFocus: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
const [acummulativeData, setAcummulativeData] = useState<DockerStatsJSON>({
|
||||||
|
cpu: [],
|
||||||
|
memory: [],
|
||||||
|
block: [],
|
||||||
|
network: [],
|
||||||
|
disk: [],
|
||||||
|
});
|
||||||
|
const [currentData, setCurrentData] = useState<DockerStats>(defaultData);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setCurrentData(defaultData);
|
||||||
|
|
||||||
|
setAcummulativeData({
|
||||||
|
cpu: [],
|
||||||
|
memory: [],
|
||||||
|
block: [],
|
||||||
|
network: [],
|
||||||
|
disk: [],
|
||||||
|
});
|
||||||
|
}, [appName]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
|
setCurrentData({
|
||||||
|
cpu: data.cpu[data.cpu.length - 1] ?? currentData.cpu,
|
||||||
|
memory: data.memory[data.memory.length - 1] ?? currentData.memory,
|
||||||
|
block: data.block[data.block.length - 1] ?? currentData.block,
|
||||||
|
network: data.network[data.network.length - 1] ?? currentData.network,
|
||||||
|
disk: data.disk[data.disk.length - 1] ?? currentData.disk,
|
||||||
|
});
|
||||||
|
setAcummulativeData({
|
||||||
|
block: data?.block || [],
|
||||||
|
cpu: data?.cpu || [],
|
||||||
|
disk: data?.disk || [],
|
||||||
|
memory: data?.memory || [],
|
||||||
|
network: data?.network || [],
|
||||||
|
});
|
||||||
|
}, [data]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||||
|
const wsUrl = `${protocol}//${window.location.host}/listen-docker-stats-monitoring?appName=${appName}&appType=${appType}`;
|
||||||
|
const ws = new WebSocket(wsUrl);
|
||||||
|
|
||||||
|
ws.onmessage = (e) => {
|
||||||
|
const value = JSON.parse(e.data);
|
||||||
|
if (!value) return;
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
cpu: value.data.cpu ?? currentData.cpu,
|
||||||
|
memory: value.data.memory ?? currentData.memory,
|
||||||
|
block: value.data.block ?? currentData.block,
|
||||||
|
disk: value.data.disk ?? currentData.disk,
|
||||||
|
network: value.data.network ?? currentData.network,
|
||||||
|
};
|
||||||
|
|
||||||
|
setCurrentData(data);
|
||||||
|
|
||||||
|
setAcummulativeData((prevData) => ({
|
||||||
|
cpu: [...prevData.cpu, data.cpu],
|
||||||
|
memory: [...prevData.memory, data.memory],
|
||||||
|
block: [...prevData.block, data.block],
|
||||||
|
network: [...prevData.network, data.network],
|
||||||
|
disk: [...prevData.disk, data.disk],
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
|
||||||
|
ws.onclose = (e) => {
|
||||||
|
console.log(e.reason);
|
||||||
|
};
|
||||||
|
|
||||||
|
return () => ws.close();
|
||||||
|
}, [appName]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="rounded-xl bg-background shadow-md flex flex-col gap-4">
|
||||||
|
<header className="flex items-center justify-between">
|
||||||
|
<div className="space-y-1">
|
||||||
|
<h1 className="text-2xl font-semibold tracking-tight">Monitoring</h1>
|
||||||
|
<p className="text-sm text-muted-foreground">
|
||||||
|
Watch the usage of your server in the current app
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div className="grid gap-6 lg:grid-cols-2">
|
||||||
|
<Card className="bg-background">
|
||||||
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||||
|
<CardTitle className="text-sm font-medium">CPU Usage</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="flex flex-col gap-2 w-full">
|
||||||
|
<span className="text-sm text-muted-foreground">
|
||||||
|
Used: {currentData.cpu.value}%
|
||||||
|
</span>
|
||||||
|
<Progress value={currentData.cpu.value} className="w-[100%]" />
|
||||||
|
<DockerCpuChart acummulativeData={acummulativeData.cpu} />
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card className="bg-background">
|
||||||
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||||
|
<CardTitle className="text-sm font-medium">Memory Usage</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="flex flex-col gap-2 w-full">
|
||||||
|
<span className="text-sm text-muted-foreground">
|
||||||
|
{`Used: ${currentData.memory.value.used} / Limit: ${currentData.memory.value.total} `}
|
||||||
|
</span>
|
||||||
|
<Progress
|
||||||
|
value={
|
||||||
|
// @ts-ignore
|
||||||
|
(convertMemoryToBytes(currentData.memory.value.used) /
|
||||||
|
// @ts-ignore
|
||||||
|
convertMemoryToBytes(currentData.memory.value.total)) *
|
||||||
|
100
|
||||||
|
}
|
||||||
|
className="w-[100%]"
|
||||||
|
/>
|
||||||
|
<DockerMemoryChart
|
||||||
|
acummulativeData={acummulativeData.memory}
|
||||||
|
memoryLimitGB={
|
||||||
|
// @ts-ignore
|
||||||
|
convertMemoryToBytes(currentData.memory.value.total) /
|
||||||
|
1024 ** 3
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
{appName === "dokploy" && (
|
||||||
|
<Card className="bg-background">
|
||||||
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||||
|
<CardTitle className="text-sm font-medium">Disk Space</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="flex flex-col gap-2 w-full">
|
||||||
|
<span className="text-sm text-muted-foreground">
|
||||||
|
{`Used: ${currentData.disk.value.diskUsage} GB / Limit: ${currentData.disk.value.diskTotal} GB`}
|
||||||
|
</span>
|
||||||
|
<Progress
|
||||||
|
value={currentData.disk.value.diskUsedPercentage}
|
||||||
|
className="w-[100%]"
|
||||||
|
/>
|
||||||
|
<DockerDiskChart
|
||||||
|
acummulativeData={acummulativeData.disk}
|
||||||
|
diskTotal={currentData.disk.value.diskTotal}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<Card className="bg-background">
|
||||||
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||||
|
<CardTitle className="text-sm font-medium">Block I/O</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="flex flex-col gap-2 w-full">
|
||||||
|
<span className="text-sm text-muted-foreground">
|
||||||
|
{`Read: ${currentData.block.value.readMb} / Write: ${currentData.block.value.writeMb} `}
|
||||||
|
</span>
|
||||||
|
<DockerBlockChart acummulativeData={acummulativeData.block} />
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
<Card className="bg-background">
|
||||||
|
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||||
|
<CardTitle className="text-sm font-medium">Network I/O</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent>
|
||||||
|
<div className="flex flex-col gap-2 w-full">
|
||||||
|
<span className="text-sm text-muted-foreground">
|
||||||
|
{`In MB: ${currentData.network.value.inputMb} / Out MB: ${currentData.network.value.outputMb} `}
|
||||||
|
</span>
|
||||||
|
<DockerNetworkChart acummulativeData={acummulativeData.network} />
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
type ChartConfig,
|
||||||
|
ChartContainer,
|
||||||
|
ChartLegend,
|
||||||
|
ChartLegendContent,
|
||||||
|
ChartTooltip,
|
||||||
|
} from "@/components/ui/chart";
|
||||||
|
import { formatTimestamp } from "@/lib/utils";
|
||||||
|
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
|
||||||
|
|
||||||
|
interface ContainerMetric {
|
||||||
|
timestamp: string;
|
||||||
|
BlockIO: {
|
||||||
|
read: number;
|
||||||
|
write: number;
|
||||||
|
readUnit: string;
|
||||||
|
writeUnit: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
data: ContainerMetric[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FormattedMetric {
|
||||||
|
timestamp: string;
|
||||||
|
read: number;
|
||||||
|
write: number;
|
||||||
|
readUnit: string;
|
||||||
|
writeUnit: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartConfig = {
|
||||||
|
read: {
|
||||||
|
label: "Read",
|
||||||
|
color: "hsl(217, 91%, 60%)", // Azul brillante
|
||||||
|
},
|
||||||
|
write: {
|
||||||
|
label: "Write",
|
||||||
|
color: "hsl(142, 71%, 45%)", // Verde brillante
|
||||||
|
},
|
||||||
|
} satisfies ChartConfig;
|
||||||
|
|
||||||
|
export const ContainerBlockChart = ({ data }: Props) => {
|
||||||
|
const formattedData = data.map((metric) => ({
|
||||||
|
timestamp: metric.timestamp,
|
||||||
|
read: metric.BlockIO.read,
|
||||||
|
write: metric.BlockIO.write,
|
||||||
|
readUnit: metric.BlockIO.readUnit,
|
||||||
|
writeUnit: metric.BlockIO.writeUnit,
|
||||||
|
}));
|
||||||
|
|
||||||
|
const latestData = formattedData[formattedData.length - 1] || {
|
||||||
|
timestamp: "",
|
||||||
|
read: 0,
|
||||||
|
write: 0,
|
||||||
|
readUnit: "B",
|
||||||
|
writeUnit: "B",
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="bg-transparent">
|
||||||
|
<CardHeader className="border-b py-5">
|
||||||
|
<CardTitle>Block I/O</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Read: {latestData.read}
|
||||||
|
{latestData.readUnit} / Write: {latestData.write}
|
||||||
|
{latestData.writeUnit}
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="px-2 pt-4 sm:px-6 sm:pt-6">
|
||||||
|
<ChartContainer
|
||||||
|
config={chartConfig}
|
||||||
|
className="aspect-auto h-[250px] w-full"
|
||||||
|
>
|
||||||
|
<AreaChart data={formattedData}>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="fillRead" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(217, 91%, 60%)"
|
||||||
|
stopOpacity={0.3}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(217, 91%, 60%)"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="fillWrite" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(142, 71%, 45%)"
|
||||||
|
stopOpacity={0.3}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(142, 71%, 45%)"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<CartesianGrid vertical={false} />
|
||||||
|
<XAxis
|
||||||
|
dataKey="timestamp"
|
||||||
|
tickLine={false}
|
||||||
|
axisLine={false}
|
||||||
|
tickMargin={8}
|
||||||
|
minTickGap={32}
|
||||||
|
tickFormatter={(value) => formatTimestamp(value)}
|
||||||
|
/>
|
||||||
|
<YAxis />
|
||||||
|
<ChartTooltip
|
||||||
|
cursor={false}
|
||||||
|
content={({ active, payload, label }) => {
|
||||||
|
if (active && payload && payload.length) {
|
||||||
|
const data = payload?.[0]?.payload;
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border bg-background p-2 shadow-sm">
|
||||||
|
<div className="grid grid-cols-2 gap-2">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Time
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{formatTimestamp(label)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Read
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{data.read}
|
||||||
|
{data.readUnit}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Write
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{data.write}
|
||||||
|
{data.writeUnit}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="Write"
|
||||||
|
dataKey="write"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillWrite)"
|
||||||
|
stroke="hsl(142, 71%, 45%)"
|
||||||
|
strokeWidth={2}
|
||||||
|
fillOpacity={0.3}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="Read"
|
||||||
|
dataKey="read"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillRead)"
|
||||||
|
stroke="hsl(217, 91%, 60%)"
|
||||||
|
strokeWidth={2}
|
||||||
|
fillOpacity={0.3}
|
||||||
|
/>
|
||||||
|
<ChartLegend
|
||||||
|
content={<ChartLegendContent />}
|
||||||
|
verticalAlign="bottom"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
</AreaChart>
|
||||||
|
</ChartContainer>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
type ChartConfig,
|
||||||
|
ChartContainer,
|
||||||
|
ChartLegend,
|
||||||
|
ChartLegendContent,
|
||||||
|
ChartTooltip,
|
||||||
|
} from "@/components/ui/chart";
|
||||||
|
import { formatTimestamp } from "@/lib/utils";
|
||||||
|
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
|
||||||
|
|
||||||
|
interface ContainerMetric {
|
||||||
|
timestamp: string;
|
||||||
|
CPU: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
data: ContainerMetric[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartConfig = {
|
||||||
|
cpu: {
|
||||||
|
label: "CPU",
|
||||||
|
color: "hsl(var(--chart-1))",
|
||||||
|
},
|
||||||
|
} satisfies ChartConfig;
|
||||||
|
|
||||||
|
export const ContainerCPUChart = ({ data }: Props) => {
|
||||||
|
const formattedData = data.map((metric) => ({
|
||||||
|
timestamp: metric.timestamp,
|
||||||
|
cpu: metric.CPU,
|
||||||
|
}));
|
||||||
|
|
||||||
|
const latestData = formattedData[formattedData.length - 1] || {
|
||||||
|
timestamp: "",
|
||||||
|
cpu: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="bg-transparent">
|
||||||
|
<CardHeader className="border-b py-5">
|
||||||
|
<CardTitle>CPU</CardTitle>
|
||||||
|
<CardDescription>CPU Usage: {latestData.cpu}%</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="px-2 pt-4 sm:px-6 sm:pt-6">
|
||||||
|
<ChartContainer
|
||||||
|
config={chartConfig}
|
||||||
|
className="aspect-auto h-[250px] w-full"
|
||||||
|
>
|
||||||
|
<AreaChart data={formattedData}>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="fillCPU" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(var(--chart-1))"
|
||||||
|
stopOpacity={0.8}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(var(--chart-1))"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<CartesianGrid vertical={false} />
|
||||||
|
<XAxis
|
||||||
|
dataKey="timestamp"
|
||||||
|
tickLine={false}
|
||||||
|
axisLine={false}
|
||||||
|
tickMargin={8}
|
||||||
|
minTickGap={32}
|
||||||
|
tickFormatter={(value) => formatTimestamp(value)}
|
||||||
|
/>
|
||||||
|
<YAxis tickFormatter={(value) => `${value}%`} domain={[0, 100]} />
|
||||||
|
<ChartTooltip
|
||||||
|
cursor={false}
|
||||||
|
content={({ active, payload, label }) => {
|
||||||
|
if (active && payload && payload.length) {
|
||||||
|
const data = payload?.[0]?.payload;
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border bg-background p-2 shadow-sm">
|
||||||
|
<div className="grid grid-cols-2 gap-2">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Time
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{formatTimestamp(label)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
CPU
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">{data.cpu}%</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="CPU"
|
||||||
|
dataKey="cpu"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillCPU)"
|
||||||
|
stroke="hsl(var(--chart-1))"
|
||||||
|
strokeWidth={2}
|
||||||
|
/>
|
||||||
|
<ChartLegend
|
||||||
|
content={<ChartLegendContent />}
|
||||||
|
verticalAlign="bottom"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
</AreaChart>
|
||||||
|
</ChartContainer>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
type ChartConfig,
|
||||||
|
ChartContainer,
|
||||||
|
ChartLegend,
|
||||||
|
ChartLegendContent,
|
||||||
|
ChartTooltip,
|
||||||
|
} from "@/components/ui/chart";
|
||||||
|
import { formatTimestamp } from "@/lib/utils";
|
||||||
|
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
|
||||||
|
|
||||||
|
interface ContainerMetric {
|
||||||
|
timestamp: string;
|
||||||
|
Memory: {
|
||||||
|
percentage: number;
|
||||||
|
used: number;
|
||||||
|
total: number;
|
||||||
|
usedUnit: string;
|
||||||
|
totalUnit: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
data: ContainerMetric[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartConfig = {
|
||||||
|
memory: {
|
||||||
|
label: "Memory",
|
||||||
|
color: "hsl(var(--chart-2))",
|
||||||
|
},
|
||||||
|
} satisfies ChartConfig;
|
||||||
|
|
||||||
|
const formatMemoryValue = (value: number) => {
|
||||||
|
return value.toLocaleString("en-US", {
|
||||||
|
minimumFractionDigits: 1,
|
||||||
|
maximumFractionDigits: 2,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ContainerMemoryChart = ({ data }: Props) => {
|
||||||
|
const formattedData = data.map((metric) => ({
|
||||||
|
timestamp: metric.timestamp,
|
||||||
|
memory: metric.Memory.percentage,
|
||||||
|
usage: `${formatMemoryValue(metric.Memory.used)}${metric.Memory.usedUnit} / ${formatMemoryValue(metric.Memory.total)}${metric.Memory.totalUnit}`,
|
||||||
|
}));
|
||||||
|
|
||||||
|
const latestData = formattedData[formattedData.length - 1] || {
|
||||||
|
timestamp: "",
|
||||||
|
memory: 0,
|
||||||
|
usage: "0 / 0 B",
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="bg-transparent">
|
||||||
|
<CardHeader className="border-b py-5">
|
||||||
|
<CardTitle>Memory</CardTitle>
|
||||||
|
<CardDescription>Memory Usage: {latestData.usage}</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="px-2 pt-4 sm:px-6 sm:pt-6">
|
||||||
|
<ChartContainer
|
||||||
|
config={chartConfig}
|
||||||
|
className="aspect-auto h-[250px] w-full"
|
||||||
|
>
|
||||||
|
<AreaChart data={formattedData}>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="fillMemory" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(var(--chart-2))"
|
||||||
|
stopOpacity={0.8}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(var(--chart-2))"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<CartesianGrid vertical={false} />
|
||||||
|
<XAxis
|
||||||
|
dataKey="timestamp"
|
||||||
|
tickLine={false}
|
||||||
|
axisLine={false}
|
||||||
|
tickMargin={8}
|
||||||
|
minTickGap={32}
|
||||||
|
tickFormatter={(value) => formatTimestamp(value)}
|
||||||
|
/>
|
||||||
|
<YAxis tickFormatter={(value) => `${value}%`} domain={[0, 100]} />
|
||||||
|
<ChartTooltip
|
||||||
|
cursor={false}
|
||||||
|
content={({ active, payload, label }) => {
|
||||||
|
if (active && payload && payload.length) {
|
||||||
|
const data = payload?.[0]?.payload;
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border bg-background p-2 shadow-sm">
|
||||||
|
<div className="grid grid-cols-2 gap-2">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Time
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{formatTimestamp(label)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Memory
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">{data.memory}%</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col col-span-2">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Usage
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">{data.usage}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="Memory"
|
||||||
|
dataKey="memory"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillMemory)"
|
||||||
|
stroke="hsl(var(--chart-2))"
|
||||||
|
strokeWidth={2}
|
||||||
|
/>
|
||||||
|
<ChartLegend
|
||||||
|
content={<ChartLegendContent />}
|
||||||
|
verticalAlign="bottom"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
</AreaChart>
|
||||||
|
</ChartContainer>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,186 @@
|
|||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
type ChartConfig,
|
||||||
|
ChartContainer,
|
||||||
|
ChartLegend,
|
||||||
|
ChartLegendContent,
|
||||||
|
ChartTooltip,
|
||||||
|
} from "@/components/ui/chart";
|
||||||
|
import { formatTimestamp } from "@/lib/utils";
|
||||||
|
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
|
||||||
|
|
||||||
|
interface ContainerMetric {
|
||||||
|
timestamp: string;
|
||||||
|
Network: {
|
||||||
|
input: number;
|
||||||
|
output: number;
|
||||||
|
inputUnit: string;
|
||||||
|
outputUnit: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
data: ContainerMetric[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FormattedMetric {
|
||||||
|
timestamp: string;
|
||||||
|
input: number;
|
||||||
|
output: number;
|
||||||
|
inputUnit: string;
|
||||||
|
outputUnit: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartConfig = {
|
||||||
|
input: {
|
||||||
|
label: "Input",
|
||||||
|
color: "hsl(var(--chart-3))",
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
label: "Output",
|
||||||
|
color: "hsl(var(--chart-4))",
|
||||||
|
},
|
||||||
|
} satisfies ChartConfig;
|
||||||
|
|
||||||
|
export const ContainerNetworkChart = ({ data }: Props) => {
|
||||||
|
const formattedData: FormattedMetric[] = data.map((metric) => ({
|
||||||
|
timestamp: metric.timestamp,
|
||||||
|
input: metric.Network.input,
|
||||||
|
output: metric.Network.output,
|
||||||
|
inputUnit: metric.Network.inputUnit,
|
||||||
|
outputUnit: metric.Network.outputUnit,
|
||||||
|
}));
|
||||||
|
|
||||||
|
const latestData = formattedData[formattedData.length - 1] || {
|
||||||
|
input: 0,
|
||||||
|
output: 0,
|
||||||
|
inputUnit: "B",
|
||||||
|
outputUnit: "B",
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="bg-transparent">
|
||||||
|
<CardHeader className="border-b py-5">
|
||||||
|
<CardTitle>Network I/O</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Input: {latestData.input}
|
||||||
|
{latestData.inputUnit} / Output: {latestData.output}
|
||||||
|
{latestData.outputUnit}
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="px-2 pt-4 sm:px-6 sm:pt-6">
|
||||||
|
<ChartContainer
|
||||||
|
config={chartConfig}
|
||||||
|
className="aspect-auto h-[250px] w-full"
|
||||||
|
>
|
||||||
|
<AreaChart data={formattedData}>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="fillInput" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(var(--chart-3))"
|
||||||
|
stopOpacity={0.8}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(var(--chart-3))"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="fillOutput" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(var(--chart-4))"
|
||||||
|
stopOpacity={0.8}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(var(--chart-4))"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<CartesianGrid vertical={false} />
|
||||||
|
<XAxis
|
||||||
|
dataKey="timestamp"
|
||||||
|
tickLine={false}
|
||||||
|
axisLine={false}
|
||||||
|
tickMargin={8}
|
||||||
|
minTickGap={32}
|
||||||
|
tickFormatter={(value) => formatTimestamp(value)}
|
||||||
|
/>
|
||||||
|
<YAxis />
|
||||||
|
<ChartTooltip
|
||||||
|
cursor={false}
|
||||||
|
content={({ active, payload, label }) => {
|
||||||
|
if (active && payload && payload.length) {
|
||||||
|
const data = payload?.[0]?.payload;
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border bg-background p-2 shadow-sm">
|
||||||
|
<div className="grid grid-cols-2 gap-2">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Time
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{formatTimestamp(label)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Input
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{data.input}
|
||||||
|
{data.inputUnit}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Output
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{data.output}
|
||||||
|
{data.outputUnit}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="Input"
|
||||||
|
dataKey="input"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillInput)"
|
||||||
|
stroke="hsl(var(--chart-3))"
|
||||||
|
strokeWidth={2}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="Output"
|
||||||
|
dataKey="output"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillOutput)"
|
||||||
|
stroke="hsl(var(--chart-4))"
|
||||||
|
strokeWidth={2}
|
||||||
|
/>
|
||||||
|
<ChartLegend
|
||||||
|
content={<ChartLegendContent />}
|
||||||
|
verticalAlign="bottom"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
</AreaChart>
|
||||||
|
</ChartContainer>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -20,18 +20,22 @@ import { api } from "@/utils/api";
|
|||||||
import { Loader2 } from "lucide-react";
|
import { Loader2 } from "lucide-react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { DockerMonitoring } from "../../monitoring/docker/show";
|
import { ContainerPaidMonitoring } from "./show-paid-container-monitoring";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
appName: string;
|
appName: string;
|
||||||
serverId?: string;
|
serverId?: string;
|
||||||
appType: "stack" | "docker-compose";
|
appType: "stack" | "docker-compose";
|
||||||
|
baseUrl: string;
|
||||||
|
token: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ShowMonitoringCompose = ({
|
export const ComposePaidMonitoring = ({
|
||||||
appName,
|
appName,
|
||||||
appType = "stack",
|
appType = "stack",
|
||||||
serverId,
|
serverId,
|
||||||
|
baseUrl,
|
||||||
|
token,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const { data, isLoading } = api.docker.getContainersByAppNameMatch.useQuery(
|
const { data, isLoading } = api.docker.getContainersByAppNameMatch.useQuery(
|
||||||
{
|
{
|
||||||
@@ -44,9 +48,9 @@ export const ShowMonitoringCompose = ({
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const [containerAppName, setContainerAppName] = useState<
|
const [containerAppName, setContainerAppName] = useState<string | undefined>(
|
||||||
string | undefined
|
"",
|
||||||
>();
|
);
|
||||||
|
|
||||||
const [containerId, setContainerId] = useState<string | undefined>();
|
const [containerId, setContainerId] = useState<string | undefined>();
|
||||||
|
|
||||||
@@ -62,7 +66,7 @@ export const ShowMonitoringCompose = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Card className="bg-background">
|
<Card className="bg-background border-0">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-xl">Monitoring</CardTitle>
|
<CardTitle className="text-xl">Monitoring</CardTitle>
|
||||||
<CardDescription>Watch the usage of your compose</CardDescription>
|
<CardDescription>Watch the usage of your compose</CardDescription>
|
||||||
@@ -118,10 +122,13 @@ export const ShowMonitoringCompose = ({
|
|||||||
Restart
|
Restart
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<DockerMonitoring
|
<div className="flex flex-col gap-4">
|
||||||
appName={containerAppName || ""}
|
<ContainerPaidMonitoring
|
||||||
appType={appType}
|
appName={containerAppName || ""}
|
||||||
/>
|
baseUrl={baseUrl}
|
||||||
|
token={token}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
import { Card } from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from "@/components/ui/select";
|
||||||
|
import { api } from "@/utils/api";
|
||||||
|
import { Cpu, HardDrive, Loader2, MemoryStick, Network } from "lucide-react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { ContainerBlockChart } from "./container-block-chart";
|
||||||
|
import { ContainerCPUChart } from "./container-cpu-chart";
|
||||||
|
import { ContainerMemoryChart } from "./container-memory-chart";
|
||||||
|
import { ContainerNetworkChart } from "./container-network-chart";
|
||||||
|
|
||||||
|
const REFRESH_INTERVALS = {
|
||||||
|
"5000": "5 Seconds",
|
||||||
|
"10000": "10 Seconds",
|
||||||
|
"20000": "20 Seconds",
|
||||||
|
"30000": "30 Seconds",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
const DATA_POINTS_OPTIONS = {
|
||||||
|
"50": "50 points",
|
||||||
|
"200": "200 points",
|
||||||
|
"500": "500 points",
|
||||||
|
"800": "800 points",
|
||||||
|
"1200": "1200 points",
|
||||||
|
"1600": "1600 points",
|
||||||
|
"2000": "2000 points",
|
||||||
|
all: "All points",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
interface ContainerMetric {
|
||||||
|
timestamp: string;
|
||||||
|
CPU: number;
|
||||||
|
Memory: {
|
||||||
|
percentage: number;
|
||||||
|
used: number;
|
||||||
|
total: number;
|
||||||
|
unit: string;
|
||||||
|
usedUnit: string;
|
||||||
|
totalUnit: string;
|
||||||
|
};
|
||||||
|
Network: {
|
||||||
|
input: number;
|
||||||
|
output: number;
|
||||||
|
inputUnit: string;
|
||||||
|
outputUnit: string;
|
||||||
|
};
|
||||||
|
BlockIO: {
|
||||||
|
read: number;
|
||||||
|
write: number;
|
||||||
|
readUnit: string;
|
||||||
|
writeUnit: string;
|
||||||
|
};
|
||||||
|
Container: string;
|
||||||
|
ID: string;
|
||||||
|
Name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
appName: string;
|
||||||
|
baseUrl: string;
|
||||||
|
token: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ContainerPaidMonitoring = ({ appName, baseUrl, token }: Props) => {
|
||||||
|
const [historicalData, setHistoricalData] = useState<ContainerMetric[]>([]);
|
||||||
|
const [metrics, setMetrics] = useState<ContainerMetric>(
|
||||||
|
{} as ContainerMetric,
|
||||||
|
);
|
||||||
|
const [dataPoints, setDataPoints] =
|
||||||
|
useState<keyof typeof DATA_POINTS_OPTIONS>("50");
|
||||||
|
const [refreshInterval, setRefreshInterval] = useState<string>("5000");
|
||||||
|
|
||||||
|
const {
|
||||||
|
data,
|
||||||
|
isLoading,
|
||||||
|
error: queryError,
|
||||||
|
} = api.admin.getContainerMetrics.useQuery(
|
||||||
|
{
|
||||||
|
url: baseUrl,
|
||||||
|
token,
|
||||||
|
dataPoints,
|
||||||
|
appName,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
refetchInterval:
|
||||||
|
dataPoints === "all" ? undefined : Number.parseInt(refreshInterval),
|
||||||
|
enabled: !!appName,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
setHistoricalData(data);
|
||||||
|
// @ts-ignore
|
||||||
|
setMetrics(data[data.length - 1]);
|
||||||
|
}, [data]);
|
||||||
|
|
||||||
|
if (isLoading) {
|
||||||
|
return (
|
||||||
|
<div className="flex h-[400px] w-full items-center justify-center">
|
||||||
|
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (queryError) {
|
||||||
|
return (
|
||||||
|
<div className="mt-5 flex min-h-[55vh] w-full items-center justify-center p-4">
|
||||||
|
<div className="max-w-xl text-center">
|
||||||
|
<p className="mb-2 text-base font-medium leading-none text-muted-foreground">
|
||||||
|
Error fetching metrics for{" "}
|
||||||
|
<strong className="text-primary">{appName}</strong>
|
||||||
|
</p>
|
||||||
|
<p className="whitespace-pre-line text-sm text-destructive">
|
||||||
|
{queryError instanceof Error
|
||||||
|
? queryError.message
|
||||||
|
: "Failed to fetch metrics, Please check your monitoring Instance is Configured correctly."}
|
||||||
|
</p>
|
||||||
|
<p className=" text-sm text-muted-foreground">URL: {baseUrl}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="flex items-center justify-between flex-wrap gap-2">
|
||||||
|
<h2 className="text-2xl font-bold tracking-tight">
|
||||||
|
Container Monitoring
|
||||||
|
</h2>
|
||||||
|
<div className="flex items-center gap-4 flex-wrap">
|
||||||
|
<div>
|
||||||
|
<span className="text-sm text-muted-foreground">Data points:</span>
|
||||||
|
<Select
|
||||||
|
value={dataPoints}
|
||||||
|
onValueChange={(value: keyof typeof DATA_POINTS_OPTIONS) =>
|
||||||
|
setDataPoints(value)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<SelectTrigger className="w-[180px]">
|
||||||
|
<SelectValue placeholder="Select points" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
{Object.entries(DATA_POINTS_OPTIONS).map(([value, label]) => (
|
||||||
|
<SelectItem key={value} value={value}>
|
||||||
|
{label}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span className="text-sm text-muted-foreground">
|
||||||
|
Refresh interval:
|
||||||
|
</span>
|
||||||
|
<Select
|
||||||
|
value={refreshInterval}
|
||||||
|
onValueChange={(value: keyof typeof REFRESH_INTERVALS) =>
|
||||||
|
setRefreshInterval(value)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<SelectTrigger className="w-[180px]">
|
||||||
|
<SelectValue placeholder="Select interval" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
{Object.entries(REFRESH_INTERVALS).map(([value, label]) => (
|
||||||
|
<SelectItem key={value} value={value}>
|
||||||
|
{label}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Stats Cards */}
|
||||||
|
<div className="grid gap-4 grid-cols-1 sm:grid-cols-2 xl:grid-cols-4">
|
||||||
|
<Card className="p-6 bg-transparent">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Cpu className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<h3 className="text-sm font-medium">CPU Usage</h3>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-2xl font-bold">{metrics.CPU}%</p>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card className="p-6 bg-transparent">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<MemoryStick className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<h3 className="text-sm font-medium">Memory Usage</h3>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-2xl font-bold">
|
||||||
|
{metrics?.Memory?.percentage}%
|
||||||
|
</p>
|
||||||
|
<p className="mt-1 text-sm text-muted-foreground">
|
||||||
|
{metrics?.Memory?.used} {metrics?.Memory?.unit} /{" "}
|
||||||
|
{metrics?.Memory?.total} {metrics?.Memory?.unit}
|
||||||
|
</p>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card className="p-6 bg-transparent">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Network className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<h3 className="text-sm font-medium">Network I/O</h3>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-2xl font-bold">
|
||||||
|
{metrics?.Network?.input} {metrics?.Network?.inputUnit} /{" "}
|
||||||
|
{metrics?.Network?.output} {metrics?.Network?.outputUnit}
|
||||||
|
</p>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card className="p-6 bg-transparent">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<HardDrive className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<h3 className="text-sm font-medium">Block I/O</h3>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-2xl font-bold">
|
||||||
|
{metrics?.BlockIO?.read} {metrics?.BlockIO?.readUnit} /{" "}
|
||||||
|
{metrics?.BlockIO?.write} {metrics?.BlockIO?.writeUnit}
|
||||||
|
</p>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Container Information */}
|
||||||
|
<Card className="p-6 bg-transparent">
|
||||||
|
<h3 className="text-lg font-medium mb-4">Container Information</h3>
|
||||||
|
<div className="grid gap-4 md:grid-cols-2">
|
||||||
|
<div>
|
||||||
|
<h4 className="text-sm font-medium text-muted-foreground">
|
||||||
|
Container ID
|
||||||
|
</h4>
|
||||||
|
<p className="mt-1">{metrics.ID}</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4 className="text-sm font-medium text-muted-foreground">Name</h4>
|
||||||
|
<p className="mt-1 truncate">{metrics.Name}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
{/* Charts Grid */}
|
||||||
|
<div className="grid gap-4 grid-cols-1 md:grid-cols-1 xl:grid-cols-2">
|
||||||
|
<ContainerCPUChart data={historicalData} />
|
||||||
|
<ContainerMemoryChart data={historicalData} />
|
||||||
|
<ContainerBlockChart data={historicalData} />
|
||||||
|
<ContainerNetworkChart data={historicalData} />
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
type ChartConfig,
|
||||||
|
ChartContainer,
|
||||||
|
ChartLegend,
|
||||||
|
ChartLegendContent,
|
||||||
|
ChartTooltip,
|
||||||
|
} from "@/components/ui/chart";
|
||||||
|
import { formatTimestamp } from "@/lib/utils";
|
||||||
|
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
|
||||||
|
|
||||||
|
interface CPUChartProps {
|
||||||
|
data: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartConfig = {
|
||||||
|
cpu: {
|
||||||
|
label: "CPU",
|
||||||
|
color: "hsl(var(--chart-1))",
|
||||||
|
},
|
||||||
|
} satisfies ChartConfig;
|
||||||
|
|
||||||
|
export function CPUChart({ data }: CPUChartProps) {
|
||||||
|
const latestData = data[data.length - 1] || {};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="bg-transparent">
|
||||||
|
<CardHeader className="border-b py-5">
|
||||||
|
<CardTitle>CPU</CardTitle>
|
||||||
|
<CardDescription>CPU Usage: {latestData.cpu}%</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="px-2 pt-4 sm:px-6 sm:pt-6">
|
||||||
|
<ChartContainer
|
||||||
|
config={chartConfig}
|
||||||
|
className="aspect-auto h-[250px] w-full"
|
||||||
|
>
|
||||||
|
<AreaChart data={data}>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="fillCPU" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(var(--chart-1))"
|
||||||
|
stopOpacity={0.8}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(var(--chart-1))"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<CartesianGrid vertical={false} />
|
||||||
|
<XAxis
|
||||||
|
dataKey="timestamp"
|
||||||
|
tickLine={false}
|
||||||
|
axisLine={false}
|
||||||
|
tickMargin={8}
|
||||||
|
minTickGap={32}
|
||||||
|
tickFormatter={(value) => formatTimestamp(value)}
|
||||||
|
/>
|
||||||
|
<YAxis tickFormatter={(value) => `${value}%`} domain={[0, 100]} />
|
||||||
|
<ChartTooltip
|
||||||
|
cursor={false}
|
||||||
|
content={({ active, payload, label }) => {
|
||||||
|
if (active && payload && payload.length) {
|
||||||
|
const data = payload?.[0]?.payload;
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border bg-background p-2 shadow-sm">
|
||||||
|
<div className="grid grid-cols-2 gap-2">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Time
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{formatTimestamp(label)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
CPU
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">{data.cpu}%</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="CPU"
|
||||||
|
dataKey="cpu"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillCPU)"
|
||||||
|
stroke="hsl(var(--chart-1))"
|
||||||
|
strokeWidth={2}
|
||||||
|
/>
|
||||||
|
<ChartLegend
|
||||||
|
content={<ChartLegendContent />}
|
||||||
|
verticalAlign="bottom"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
</AreaChart>
|
||||||
|
</ChartContainer>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
import { HardDrive } from "lucide-react";
|
||||||
|
import {
|
||||||
|
Label,
|
||||||
|
PolarGrid,
|
||||||
|
PolarRadiusAxis,
|
||||||
|
RadialBar,
|
||||||
|
RadialBarChart,
|
||||||
|
} from "recharts";
|
||||||
|
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import { type ChartConfig, ChartContainer } from "@/components/ui/chart";
|
||||||
|
|
||||||
|
interface RadialChartProps {
|
||||||
|
data: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function DiskChart({ data }: RadialChartProps) {
|
||||||
|
const diskUsed = Number.parseFloat(data.diskUsed || 0);
|
||||||
|
const totalDiskGB = Number.parseFloat(data.totalDisk || 0);
|
||||||
|
const usedDiskGB = (totalDiskGB * diskUsed) / 100;
|
||||||
|
|
||||||
|
const chartData = [
|
||||||
|
{
|
||||||
|
disk: 25,
|
||||||
|
fill: "hsl(var(--chart-2))",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const chartConfig = {
|
||||||
|
disk: {
|
||||||
|
label: "Disk",
|
||||||
|
color: "hsl(var(--chart-2))",
|
||||||
|
},
|
||||||
|
} satisfies ChartConfig;
|
||||||
|
|
||||||
|
const endAngle = (diskUsed * 360) / 100;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="flex flex-col bg-transparent">
|
||||||
|
<CardHeader className="items-center border-b pb-5">
|
||||||
|
<CardTitle>Disk</CardTitle>
|
||||||
|
<CardDescription>Storage Space</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="flex-1 pb-0">
|
||||||
|
<ChartContainer
|
||||||
|
config={chartConfig}
|
||||||
|
className="mx-auto aspect-square max-h-[250px]"
|
||||||
|
>
|
||||||
|
<RadialBarChart
|
||||||
|
data={chartData}
|
||||||
|
startAngle={0}
|
||||||
|
endAngle={endAngle}
|
||||||
|
innerRadius={80}
|
||||||
|
outerRadius={110}
|
||||||
|
>
|
||||||
|
<PolarGrid
|
||||||
|
gridType="circle"
|
||||||
|
radialLines={false}
|
||||||
|
stroke="none"
|
||||||
|
className="first:fill-muted last:fill-background"
|
||||||
|
polarRadius={[86, 74]}
|
||||||
|
/>
|
||||||
|
<RadialBar
|
||||||
|
dataKey="disk"
|
||||||
|
background
|
||||||
|
cornerRadius={10}
|
||||||
|
fill="hsl(var(--chart-2))"
|
||||||
|
/>
|
||||||
|
<PolarRadiusAxis tick={false} tickLine={false} axisLine={false}>
|
||||||
|
<Label
|
||||||
|
content={({ viewBox }) => {
|
||||||
|
if (viewBox && "cx" in viewBox && "cy" in viewBox) {
|
||||||
|
return (
|
||||||
|
<text
|
||||||
|
x={viewBox.cx}
|
||||||
|
y={viewBox.cy}
|
||||||
|
textAnchor="middle"
|
||||||
|
dominantBaseline="middle"
|
||||||
|
>
|
||||||
|
<tspan
|
||||||
|
x={viewBox.cx}
|
||||||
|
y={viewBox.cy}
|
||||||
|
className="fill-foreground text-4xl font-bold"
|
||||||
|
>
|
||||||
|
{diskUsed.toFixed(1)}%
|
||||||
|
</tspan>
|
||||||
|
<tspan
|
||||||
|
x={viewBox.cx}
|
||||||
|
y={(viewBox.cy || 0) + 24}
|
||||||
|
className="fill-muted-foreground text-sm"
|
||||||
|
>
|
||||||
|
Used
|
||||||
|
</tspan>
|
||||||
|
</text>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</PolarRadiusAxis>
|
||||||
|
</RadialBarChart>
|
||||||
|
</ChartContainer>
|
||||||
|
</CardContent>
|
||||||
|
<CardFooter className="flex-col gap-2 text-sm">
|
||||||
|
<div className="flex items-center gap-2 font-medium leading-none">
|
||||||
|
<HardDrive className="h-4 w-4" /> {usedDiskGB.toFixed(1)} GB used
|
||||||
|
</div>
|
||||||
|
<div className="leading-none text-muted-foreground">
|
||||||
|
Of {totalDiskGB.toFixed(1)} GB total
|
||||||
|
</div>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
type ChartConfig,
|
||||||
|
ChartContainer,
|
||||||
|
ChartTooltip,
|
||||||
|
} from "@/components/ui/chart";
|
||||||
|
import { formatTimestamp } from "@/lib/utils";
|
||||||
|
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
|
||||||
|
|
||||||
|
interface MemoryChartProps {
|
||||||
|
data: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartConfig = {
|
||||||
|
Memory: {
|
||||||
|
label: "Memory",
|
||||||
|
color: "hsl(var(--chart-2))",
|
||||||
|
},
|
||||||
|
} satisfies ChartConfig;
|
||||||
|
|
||||||
|
export function MemoryChart({ data }: MemoryChartProps) {
|
||||||
|
const latestData = data[data.length - 1] || {};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="bg-transparent">
|
||||||
|
<CardHeader className="border-b py-5">
|
||||||
|
<CardTitle>Memory</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Memory Usage: {latestData.memUsedGB} GB of {latestData.memTotal} GB (
|
||||||
|
{latestData.memUsed}%)
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="px-2 pt-4 sm:px-6 sm:pt-6">
|
||||||
|
<ChartContainer
|
||||||
|
config={chartConfig}
|
||||||
|
className="aspect-auto h-[250px] w-full"
|
||||||
|
>
|
||||||
|
<AreaChart data={data}>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="fillMemory" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(var(--chart-2))"
|
||||||
|
stopOpacity={0.8}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(var(--chart-2))"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<CartesianGrid vertical={false} />
|
||||||
|
<XAxis
|
||||||
|
dataKey="timestamp"
|
||||||
|
tickLine={false}
|
||||||
|
axisLine={false}
|
||||||
|
tickMargin={8}
|
||||||
|
minTickGap={32}
|
||||||
|
tickFormatter={(value) => formatTimestamp(value)}
|
||||||
|
/>
|
||||||
|
<YAxis
|
||||||
|
yAxisId="left"
|
||||||
|
orientation="left"
|
||||||
|
tickFormatter={(value) => `${value}%`}
|
||||||
|
domain={[0, 100]}
|
||||||
|
/>
|
||||||
|
<YAxis
|
||||||
|
yAxisId="right"
|
||||||
|
orientation="right"
|
||||||
|
tickFormatter={(value) => `${value.toFixed(1)} GB`}
|
||||||
|
domain={[
|
||||||
|
0,
|
||||||
|
Math.ceil(Number.parseFloat(latestData.memTotal || "0")),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<ChartTooltip
|
||||||
|
cursor={false}
|
||||||
|
content={({ active, payload, label }) => {
|
||||||
|
if (active && payload && payload.length) {
|
||||||
|
const data = payload?.[0]?.payload;
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border bg-background p-2 shadow-sm">
|
||||||
|
<div className="grid grid-cols-2 gap-2">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Time
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{formatTimestamp(label)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Memory
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{data.memUsed}% ({data.memUsedGB} GB)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
yAxisId="left"
|
||||||
|
dataKey="memUsed"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillMemory)"
|
||||||
|
stroke="hsl(var(--chart-2))"
|
||||||
|
strokeWidth={2}
|
||||||
|
name="Memory"
|
||||||
|
/>
|
||||||
|
</AreaChart>
|
||||||
|
</ChartContainer>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
type ChartConfig,
|
||||||
|
ChartContainer,
|
||||||
|
ChartLegend,
|
||||||
|
ChartLegendContent,
|
||||||
|
ChartTooltip,
|
||||||
|
} from "@/components/ui/chart";
|
||||||
|
import { formatTimestamp } from "@/lib/utils";
|
||||||
|
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from "recharts";
|
||||||
|
|
||||||
|
interface NetworkChartProps {
|
||||||
|
data: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartConfig = {
|
||||||
|
networkIn: {
|
||||||
|
label: "Network In",
|
||||||
|
color: "hsl(var(--chart-3))",
|
||||||
|
},
|
||||||
|
networkOut: {
|
||||||
|
label: "Network Out",
|
||||||
|
color: "hsl(var(--chart-4))",
|
||||||
|
},
|
||||||
|
} satisfies ChartConfig;
|
||||||
|
|
||||||
|
export function NetworkChart({ data }: NetworkChartProps) {
|
||||||
|
const latestData = data[data.length - 1] || {};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card className="bg-transparent">
|
||||||
|
<CardHeader className="border-b py-5">
|
||||||
|
<CardTitle>Network</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Network Traffic: ↑ {latestData.networkOut} KB/s ↓{" "}
|
||||||
|
{latestData.networkIn} KB/s
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="px-2 pt-4 sm:px-6 sm:pt-6">
|
||||||
|
<ChartContainer
|
||||||
|
config={chartConfig}
|
||||||
|
className="aspect-auto h-[250px] w-full"
|
||||||
|
>
|
||||||
|
<AreaChart data={data}>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="fillNetworkIn" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(var(--chart-3))"
|
||||||
|
stopOpacity={0.8}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(var(--chart-3))"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="fillNetworkOut" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop
|
||||||
|
offset="5%"
|
||||||
|
stopColor="hsl(var(--chart-4))"
|
||||||
|
stopOpacity={0.8}
|
||||||
|
/>
|
||||||
|
<stop
|
||||||
|
offset="95%"
|
||||||
|
stopColor="hsl(var(--chart-4))"
|
||||||
|
stopOpacity={0.1}
|
||||||
|
/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<CartesianGrid vertical={false} />
|
||||||
|
<XAxis
|
||||||
|
dataKey="timestamp"
|
||||||
|
tickLine={false}
|
||||||
|
axisLine={false}
|
||||||
|
tickMargin={8}
|
||||||
|
minTickGap={32}
|
||||||
|
tickFormatter={(value) => formatTimestamp(value)}
|
||||||
|
/>
|
||||||
|
<YAxis tickFormatter={(value) => `${value} KB/s`} />
|
||||||
|
<ChartTooltip
|
||||||
|
cursor={false}
|
||||||
|
content={({ active, payload, label }) => {
|
||||||
|
if (active && payload && payload.length) {
|
||||||
|
const data = payload?.[0]?.payload;
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border bg-background p-2 shadow-sm">
|
||||||
|
<div className="grid grid-cols-2 gap-2">
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Time
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
{formatTimestamp(label)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col">
|
||||||
|
<span className="text-[0.70rem] uppercase text-muted-foreground">
|
||||||
|
Network
|
||||||
|
</span>
|
||||||
|
<span className="font-bold">
|
||||||
|
↑ {data.networkOut} KB/s
|
||||||
|
<br />↓ {data.networkIn} KB/s
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="Network In"
|
||||||
|
dataKey="networkIn"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillNetworkIn)"
|
||||||
|
stroke="hsl(var(--chart-3))"
|
||||||
|
strokeWidth={2}
|
||||||
|
/>
|
||||||
|
<Area
|
||||||
|
name="Network Out"
|
||||||
|
dataKey="networkOut"
|
||||||
|
type="monotone"
|
||||||
|
fill="url(#fillNetworkOut)"
|
||||||
|
stroke="hsl(var(--chart-4))"
|
||||||
|
strokeWidth={2}
|
||||||
|
/>
|
||||||
|
<ChartLegend
|
||||||
|
content={<ChartLegendContent />}
|
||||||
|
verticalAlign="bottom"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
</AreaChart>
|
||||||
|
</ChartContainer>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,276 @@
|
|||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from "@/components/ui/select";
|
||||||
|
import { api } from "@/utils/api";
|
||||||
|
import { Clock, Cpu, HardDrive, Loader2, MemoryStick } from "lucide-react";
|
||||||
|
import type React from "react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { CPUChart } from "./cpu-chart";
|
||||||
|
import { DiskChart } from "./disk-chart";
|
||||||
|
import { MemoryChart } from "./memory-chart";
|
||||||
|
import { NetworkChart } from "./network-chart";
|
||||||
|
|
||||||
|
const REFRESH_INTERVALS = {
|
||||||
|
"5000": "5 Seconds",
|
||||||
|
"10000": "10 Seconds",
|
||||||
|
"20000": "20 Seconds",
|
||||||
|
"30000": "30 Seconds",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
const DATA_POINTS_OPTIONS = {
|
||||||
|
"50": "50 points",
|
||||||
|
"200": "200 points",
|
||||||
|
"500": "500 points",
|
||||||
|
"800": "800 points",
|
||||||
|
"1200": "1200 points",
|
||||||
|
"1600": "1600 points",
|
||||||
|
"2000": "2000 points",
|
||||||
|
all: "All points",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
interface SystemMetrics {
|
||||||
|
cpu: string;
|
||||||
|
cpuModel: string;
|
||||||
|
cpuCores: number;
|
||||||
|
cpuPhysicalCores: number;
|
||||||
|
cpuSpeed: number;
|
||||||
|
os: string;
|
||||||
|
distro: string;
|
||||||
|
kernel: string;
|
||||||
|
arch: string;
|
||||||
|
memUsed: string;
|
||||||
|
memUsedGB: string;
|
||||||
|
memTotal: string;
|
||||||
|
uptime: number;
|
||||||
|
diskUsed: string;
|
||||||
|
totalDisk: string;
|
||||||
|
networkIn: string;
|
||||||
|
networkOut: string;
|
||||||
|
timestamp: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
BASE_URL?: string;
|
||||||
|
token?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ShowPaidMonitoring = ({
|
||||||
|
BASE_URL = process.env.NEXT_PUBLIC_METRICS_URL ||
|
||||||
|
"http://localhost:3001/metrics",
|
||||||
|
token = process.env.NEXT_PUBLIC_METRICS_TOKEN || "my-token",
|
||||||
|
}: Props) => {
|
||||||
|
const [historicalData, setHistoricalData] = useState<SystemMetrics[]>([]);
|
||||||
|
const [metrics, setMetrics] = useState<SystemMetrics>({} as SystemMetrics);
|
||||||
|
const [dataPoints, setDataPoints] =
|
||||||
|
useState<keyof typeof DATA_POINTS_OPTIONS>("50");
|
||||||
|
const [refreshInterval, setRefreshInterval] = useState<string>("5000");
|
||||||
|
|
||||||
|
const {
|
||||||
|
data,
|
||||||
|
isLoading,
|
||||||
|
error: queryError,
|
||||||
|
} = api.admin.getServerMetrics.useQuery(
|
||||||
|
{
|
||||||
|
url: BASE_URL,
|
||||||
|
token,
|
||||||
|
dataPoints,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
refetchInterval:
|
||||||
|
dataPoints === "all" ? undefined : Number.parseInt(refreshInterval),
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
|
const formattedData = data.map((metric: SystemMetrics) => ({
|
||||||
|
timestamp: metric.timestamp,
|
||||||
|
cpu: Number.parseFloat(metric.cpu),
|
||||||
|
cpuModel: metric.cpuModel,
|
||||||
|
cpuCores: metric.cpuCores,
|
||||||
|
cpuPhysicalCores: metric.cpuPhysicalCores,
|
||||||
|
cpuSpeed: metric.cpuSpeed,
|
||||||
|
os: metric.os,
|
||||||
|
distro: metric.distro,
|
||||||
|
kernel: metric.kernel,
|
||||||
|
arch: metric.arch,
|
||||||
|
memUsed: Number.parseFloat(metric.memUsed),
|
||||||
|
memUsedGB: Number.parseFloat(metric.memUsedGB),
|
||||||
|
memTotal: Number.parseFloat(metric.memTotal),
|
||||||
|
networkIn: Number.parseFloat(metric.networkIn),
|
||||||
|
networkOut: Number.parseFloat(metric.networkOut),
|
||||||
|
diskUsed: Number.parseFloat(metric.diskUsed),
|
||||||
|
totalDisk: Number.parseFloat(metric.totalDisk),
|
||||||
|
uptime: metric.uptime,
|
||||||
|
}));
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
setHistoricalData(formattedData);
|
||||||
|
// @ts-ignore
|
||||||
|
setMetrics(formattedData[formattedData.length - 1] || {});
|
||||||
|
}, [data]);
|
||||||
|
|
||||||
|
const formatUptime = (seconds: number): string => {
|
||||||
|
const days = Math.floor(seconds / (24 * 60 * 60));
|
||||||
|
const hours = Math.floor((seconds % (24 * 60 * 60)) / (60 * 60));
|
||||||
|
const minutes = Math.floor((seconds % (60 * 60)) / 60);
|
||||||
|
|
||||||
|
return `${days}d ${hours}h ${minutes}m`;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isLoading) {
|
||||||
|
return (
|
||||||
|
<div className="flex h-[400px] w-full items-center justify-center">
|
||||||
|
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (queryError) {
|
||||||
|
return (
|
||||||
|
<div className="flex min-h-[55vh] w-full items-center justify-center p-4">
|
||||||
|
<div className="max-w-xl text-center">
|
||||||
|
<p className="mb-2 text-base font-medium leading-none text-muted-foreground">
|
||||||
|
Error fetching metrics{" "}
|
||||||
|
</p>
|
||||||
|
<p className="whitespace-pre-line text-sm text-destructive">
|
||||||
|
{queryError instanceof Error
|
||||||
|
? queryError.message
|
||||||
|
: "Failed to fetch metrics, Please check your monitoring Instance is Configured correctly."}
|
||||||
|
</p>
|
||||||
|
<p className=" text-sm text-muted-foreground">URL: {BASE_URL}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="space-y-4 pt-5 pb-10 w-full md:px-4">
|
||||||
|
<div className="flex items-center justify-between flex-wrap gap-2">
|
||||||
|
<h2 className="text-2xl font-bold tracking-tight">System Monitoring</h2>
|
||||||
|
<div className="flex items-center gap-4 flex-wrap">
|
||||||
|
<div>
|
||||||
|
<span className="text-sm text-muted-foreground">Data points:</span>
|
||||||
|
<Select
|
||||||
|
value={dataPoints}
|
||||||
|
onValueChange={(value: keyof typeof DATA_POINTS_OPTIONS) =>
|
||||||
|
setDataPoints(value)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<SelectTrigger className="w-[180px]">
|
||||||
|
<SelectValue placeholder="Select points" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
{Object.entries(DATA_POINTS_OPTIONS).map(([value, label]) => (
|
||||||
|
<SelectItem key={value} value={value}>
|
||||||
|
{label}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span className="text-sm text-muted-foreground">
|
||||||
|
Refresh interval:
|
||||||
|
</span>
|
||||||
|
<Select
|
||||||
|
value={refreshInterval}
|
||||||
|
onValueChange={(value: keyof typeof REFRESH_INTERVALS) =>
|
||||||
|
setRefreshInterval(value)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<SelectTrigger className="w-[180px]">
|
||||||
|
<SelectValue placeholder="Select interval" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
{Object.entries(REFRESH_INTERVALS).map(([value, label]) => (
|
||||||
|
<SelectItem key={value} value={value}>
|
||||||
|
{label}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Stats Cards */}
|
||||||
|
<div className="grid gap-4 grid-cols-1 sm:grid-cols-2 xl:grid-cols-4">
|
||||||
|
<div className="rounded-lg border text-card-foreground shadow-sm p-6">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Clock className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<h3 className="text-sm font-medium">Uptime</h3>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-2xl font-bold">
|
||||||
|
{formatUptime(metrics.uptime || 0)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="rounded-lg border text-card-foreground shadow-sm p-6">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Cpu className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<h3 className="text-sm font-medium">CPU Usage</h3>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-2xl font-bold">{metrics.cpu}%</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="rounded-lg border text-card-foreground bg-transparent shadow-sm p-6">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<MemoryStick className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<h3 className="text-sm font-medium">Memory Usage</h3>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-2xl font-bold">
|
||||||
|
{metrics.memUsedGB} GB / {metrics.memTotal} GB
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="rounded-lg border text-card-foreground shadow-sm p-6">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<HardDrive className="h-4 w-4 text-muted-foreground" />
|
||||||
|
<h3 className="text-sm font-medium">Disk Usage</h3>
|
||||||
|
</div>
|
||||||
|
<p className="mt-2 text-2xl font-bold">{metrics.diskUsed}%</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* System Information */}
|
||||||
|
<div className="rounded-lg border text-card-foreground shadow-sm p-6">
|
||||||
|
<h3 className="text-lg font-medium mb-4">System Information</h3>
|
||||||
|
<div className="grid gap-4 md:grid-cols-2">
|
||||||
|
<div>
|
||||||
|
<h4 className="text-sm font-medium text-muted-foreground">CPU</h4>
|
||||||
|
<p className="mt-1">{metrics.cpuModel}</p>
|
||||||
|
<p className="text-sm text-muted-foreground mt-1">
|
||||||
|
{metrics.cpuPhysicalCores} Physical Cores ({metrics.cpuCores}{" "}
|
||||||
|
Threads) @ {metrics.cpuSpeed}GHz
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4 className="text-sm font-medium text-muted-foreground">
|
||||||
|
Operating System
|
||||||
|
</h4>
|
||||||
|
<p className="mt-1">{metrics.distro}</p>
|
||||||
|
<p className="text-sm text-muted-foreground mt-1">
|
||||||
|
Kernel: {metrics.kernel} ({metrics.arch})
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Charts Grid */}
|
||||||
|
<div className="grid gap-4 grid-cols-1 md:grid-cols-1 xl:grid-cols-2">
|
||||||
|
<CPUChart data={historicalData} />
|
||||||
|
<MemoryChart data={historicalData} />
|
||||||
|
<DiskChart data={metrics} />
|
||||||
|
<NetworkChart data={historicalData} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import { DockerMonitoring } from "../docker/show";
|
|
||||||
|
|
||||||
export const ShowMonitoring = () => {
|
|
||||||
return (
|
|
||||||
<div className="w-full">
|
|
||||||
<DockerMonitoring appName="dokploy" />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -70,7 +70,7 @@ interface Props {
|
|||||||
|
|
||||||
export const AddApplication = ({ projectId, projectName }: Props) => {
|
export const AddApplication = ({ projectId, projectName }: Props) => {
|
||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const slug = slugify(projectName);
|
const slug = slugify(projectName);
|
||||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||||
@@ -166,7 +166,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
||||||
Select a Server (Optional)
|
Select a Server {!isCloud ? "(Optional)" : ""}
|
||||||
<HelpCircle className="size-4 text-muted-foreground" />
|
<HelpCircle className="size-4 text-muted-foreground" />
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -197,7 +197,12 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
key={server.serverId}
|
key={server.serverId}
|
||||||
value={server.serverId}
|
value={server.serverId}
|
||||||
>
|
>
|
||||||
{server.name}
|
<span className="flex items-center gap-2 justify-between w-full">
|
||||||
|
<span>{server.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs self-center">
|
||||||
|
{server.ipAddress}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const slug = slugify(projectName);
|
const slug = slugify(projectName);
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||||
const { mutateAsync, isLoading, error, isError } =
|
const { mutateAsync, isLoading, error, isError } =
|
||||||
api.compose.create.useMutation();
|
api.compose.create.useMutation();
|
||||||
@@ -173,7 +174,7 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
||||||
Select a Server (Optional)
|
Select a Server {!isCloud ? "(Optional)" : ""}
|
||||||
<HelpCircle className="size-4 text-muted-foreground" />
|
<HelpCircle className="size-4 text-muted-foreground" />
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -204,7 +205,12 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
key={server.serverId}
|
key={server.serverId}
|
||||||
value={server.serverId}
|
value={server.serverId}
|
||||||
>
|
>
|
||||||
{server.name}
|
<span className="flex items-center gap-2 justify-between w-full">
|
||||||
|
<span>{server.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs self-center">
|
||||||
|
{server.ipAddress}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ const mySchema = z.discriminatedUnion("type", [
|
|||||||
z
|
z
|
||||||
.object({
|
.object({
|
||||||
type: z.literal("postgres"),
|
type: z.literal("postgres"),
|
||||||
databaseName: z.string().min(1, "Database name required"),
|
databaseName: z.string().default("postgres"),
|
||||||
databaseUser: z.string().default("postgres"),
|
databaseUser: z.string().default("postgres"),
|
||||||
})
|
})
|
||||||
.merge(baseDatabaseSchema),
|
.merge(baseDatabaseSchema),
|
||||||
@@ -110,7 +110,7 @@ const mySchema = z.discriminatedUnion("type", [
|
|||||||
type: z.literal("mysql"),
|
type: z.literal("mysql"),
|
||||||
databaseRootPassword: z.string().default(""),
|
databaseRootPassword: z.string().default(""),
|
||||||
databaseUser: z.string().default("mysql"),
|
databaseUser: z.string().default("mysql"),
|
||||||
databaseName: z.string().min(1, "Database name required"),
|
databaseName: z.string().default("mysql"),
|
||||||
})
|
})
|
||||||
.merge(baseDatabaseSchema),
|
.merge(baseDatabaseSchema),
|
||||||
z
|
z
|
||||||
@@ -119,7 +119,7 @@ const mySchema = z.discriminatedUnion("type", [
|
|||||||
dockerImage: z.string().default("mariadb:4"),
|
dockerImage: z.string().default("mariadb:4"),
|
||||||
databaseRootPassword: z.string().default(""),
|
databaseRootPassword: z.string().default(""),
|
||||||
databaseUser: z.string().default("mariadb"),
|
databaseUser: z.string().default("mariadb"),
|
||||||
databaseName: z.string().min(1, "Database name required"),
|
databaseName: z.string().default("mariadb"),
|
||||||
})
|
})
|
||||||
.merge(baseDatabaseSchema),
|
.merge(baseDatabaseSchema),
|
||||||
]);
|
]);
|
||||||
@@ -206,7 +206,7 @@ export const AddDatabase = ({ projectId, projectName }: Props) => {
|
|||||||
promise = postgresMutation.mutateAsync({
|
promise = postgresMutation.mutateAsync({
|
||||||
...commonParams,
|
...commonParams,
|
||||||
databasePassword: data.databasePassword,
|
databasePassword: data.databasePassword,
|
||||||
databaseName: data.databaseName,
|
databaseName: data.databaseName || "postgres",
|
||||||
|
|
||||||
databaseUser:
|
databaseUser:
|
||||||
data.databaseUser || databasesUserDefaultPlaceholder[data.type],
|
data.databaseUser || databasesUserDefaultPlaceholder[data.type],
|
||||||
@@ -233,7 +233,7 @@ export const AddDatabase = ({ projectId, projectName }: Props) => {
|
|||||||
...commonParams,
|
...commonParams,
|
||||||
databasePassword: data.databasePassword,
|
databasePassword: data.databasePassword,
|
||||||
databaseRootPassword: data.databaseRootPassword,
|
databaseRootPassword: data.databaseRootPassword,
|
||||||
databaseName: data.databaseName,
|
databaseName: data.databaseName || "mariadb",
|
||||||
databaseUser:
|
databaseUser:
|
||||||
data.databaseUser || databasesUserDefaultPlaceholder[data.type],
|
data.databaseUser || databasesUserDefaultPlaceholder[data.type],
|
||||||
serverId: data.serverId,
|
serverId: data.serverId,
|
||||||
@@ -242,7 +242,7 @@ export const AddDatabase = ({ projectId, projectName }: Props) => {
|
|||||||
promise = mysqlMutation.mutateAsync({
|
promise = mysqlMutation.mutateAsync({
|
||||||
...commonParams,
|
...commonParams,
|
||||||
databasePassword: data.databasePassword,
|
databasePassword: data.databasePassword,
|
||||||
databaseName: data.databaseName,
|
databaseName: data.databaseName || "mysql",
|
||||||
databaseUser:
|
databaseUser:
|
||||||
data.databaseUser || databasesUserDefaultPlaceholder[data.type],
|
data.databaseUser || databasesUserDefaultPlaceholder[data.type],
|
||||||
databaseRootPassword: data.databaseRootPassword,
|
databaseRootPassword: data.databaseRootPassword,
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
const [viewMode, setViewMode] = useState<"detailed" | "icon">("detailed");
|
const [viewMode, setViewMode] = useState<"detailed" | "icon">("detailed");
|
||||||
const [selectedTags, setSelectedTags] = useState<string[]>([]);
|
const [selectedTags, setSelectedTags] = useState<string[]>([]);
|
||||||
const { data } = api.compose.templates.useQuery();
|
const { data } = api.compose.templates.useQuery();
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||||
const { data: tags, isLoading: isLoadingTags } =
|
const { data: tags, isLoading: isLoadingTags } =
|
||||||
api.compose.getTags.useQuery();
|
api.compose.getTags.useQuery();
|
||||||
@@ -226,7 +227,11 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
|
|
||||||
<ScrollArea className="h-[calc(98vh-8rem)]">
|
<ScrollArea className="h-[calc(98vh-8rem)]">
|
||||||
<div className="p-6">
|
<div className="p-6">
|
||||||
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
{isError && (
|
||||||
|
<AlertBlock type="error" className="mb-4">
|
||||||
|
{error?.message}
|
||||||
|
</AlertBlock>
|
||||||
|
)}
|
||||||
|
|
||||||
{templates.length === 0 ? (
|
{templates.length === 0 ? (
|
||||||
<div className="flex justify-center items-center w-full gap-2 min-h-[50vh]">
|
<div className="flex justify-center items-center w-full gap-2 min-h-[50vh]">
|
||||||
@@ -304,7 +309,7 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
{/* Create Button */}
|
{/* Create Button */}
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex-none px-6 pb-6 pt-3 mt-auto",
|
"flex-none px-6 py-3 mt-auto",
|
||||||
viewMode === "detailed"
|
viewMode === "detailed"
|
||||||
? "flex items-center justify-between bg-muted/30 border-t"
|
? "flex items-center justify-between bg-muted/30 border-t"
|
||||||
: "flex justify-center",
|
: "flex justify-center",
|
||||||
@@ -368,7 +373,8 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Label className="break-all w-fit flex flex-row gap-1 items-center pb-2 pt-3.5">
|
<Label className="break-all w-fit flex flex-row gap-1 items-center pb-2 pt-3.5">
|
||||||
Select a Server (Optional)
|
Select a Server{" "}
|
||||||
|
{!isCloud ? "(Optional)" : ""}
|
||||||
<HelpCircle className="size-4 text-muted-foreground" />
|
<HelpCircle className="size-4 text-muted-foreground" />
|
||||||
</Label>
|
</Label>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -401,7 +407,12 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
key={server.serverId}
|
key={server.serverId}
|
||||||
value={server.serverId}
|
value={server.serverId}
|
||||||
>
|
>
|
||||||
{server.name}
|
<span className="flex items-center gap-2 justify-between w-full">
|
||||||
|
<span>{server.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs self-center">
|
||||||
|
{server.ipAddress}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
<SelectLabel>
|
<SelectLabel>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
|
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
import { authClient } from "@/lib/auth";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { PlusIcon, SquarePen } from "lucide-react";
|
import { PlusIcon, SquarePen } from "lucide-react";
|
||||||
@@ -97,6 +98,18 @@ export const HandleProject = ({ projectId }: Props) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// useEffect(() => {
|
||||||
|
// const getUsers = async () => {
|
||||||
|
// const users = await authClient.admin.listUsers({
|
||||||
|
// query: {
|
||||||
|
// limit: 100,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// console.log(users);
|
||||||
|
// };
|
||||||
|
|
||||||
|
// getUsers();
|
||||||
|
// });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
||||||
@@ -118,7 +131,7 @@ export const HandleProject = ({ projectId }: Props) => {
|
|||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="sm:m:max-w-lg ">
|
<DialogContent className="sm:m:max-w-lg ">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Add a project</DialogTitle>
|
<DialogTitle>{projectId ? "Update" : "Add a"} project</DialogTitle>
|
||||||
<DialogDescription>The home of something big!</DialogDescription>
|
<DialogDescription>The home of something big!</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
||||||
|
|||||||
@@ -99,8 +99,7 @@ export const ProjectEnvironment = ({ projectId, children }: Props) => {
|
|||||||
<DialogTitle>Project Environment</DialogTitle>
|
<DialogTitle>Project Environment</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
Update the env Environment variables that are accessible to all
|
Update the env Environment variables that are accessible to all
|
||||||
services of this project. Use this syntax to reference project-level
|
services of this project.
|
||||||
variables in your service environments:
|
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
|
import { BreadcrumbSidebar } from "@/components/shared/breadcrumb-sidebar";
|
||||||
import { DateTooltip } from "@/components/shared/date-tooltip";
|
import { DateTooltip } from "@/components/shared/date-tooltip";
|
||||||
|
import { StatusTooltip } from "@/components/shared/status-tooltip";
|
||||||
import {
|
import {
|
||||||
AlertDialog,
|
AlertDialog,
|
||||||
AlertDialogAction,
|
AlertDialogAction,
|
||||||
@@ -23,8 +24,10 @@ import {
|
|||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
|
DropdownMenuGroup,
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
DropdownMenuLabel,
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuSeparator,
|
||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
@@ -54,7 +57,7 @@ export const ShowProjects = () => {
|
|||||||
authId: auth?.id || "",
|
authId: auth?.id || "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: !!auth?.id && auth?.rol === "user",
|
enabled: !!auth?.id && auth?.role === "member",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const { mutateAsync } = api.project.remove.useMutation();
|
const { mutateAsync } = api.project.remove.useMutation();
|
||||||
@@ -87,9 +90,12 @@ export const ShowProjects = () => {
|
|||||||
Create and manage your projects
|
Create and manage your projects
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<div className="">
|
|
||||||
<HandleProject />
|
{(auth?.role === "owner" || user?.canCreateProjects) && (
|
||||||
</div>
|
<div className="">
|
||||||
|
<HandleProject />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardContent className="space-y-2 py-8 border-t gap-4 flex flex-col min-h-[60vh]">
|
<CardContent className="space-y-2 py-8 border-t gap-4 flex flex-col min-h-[60vh]">
|
||||||
@@ -146,14 +152,97 @@ export const ShowProjects = () => {
|
|||||||
href={`/dashboard/project/${project.projectId}`}
|
href={`/dashboard/project/${project.projectId}`}
|
||||||
>
|
>
|
||||||
<Card className="group relative w-full h-full bg-transparent transition-colors hover:bg-border">
|
<Card className="group relative w-full h-full bg-transparent transition-colors hover:bg-border">
|
||||||
<Button
|
{project.applications.length > 0 ||
|
||||||
className="absolute -right-3 -top-3 size-9 translate-y-1 rounded-full p-0 opacity-0 transition-all duration-200 group-hover:translate-y-0 group-hover:opacity-100"
|
project.compose.length > 0 ? (
|
||||||
size="sm"
|
<DropdownMenu>
|
||||||
variant="default"
|
<DropdownMenuTrigger asChild>
|
||||||
>
|
<Button
|
||||||
<ExternalLinkIcon className="size-3.5" />
|
className="absolute -right-3 -top-3 size-9 translate-y-1 rounded-full p-0 opacity-0 transition-all duration-200 group-hover:translate-y-0 group-hover:opacity-100"
|
||||||
</Button>
|
size="sm"
|
||||||
|
variant="default"
|
||||||
|
>
|
||||||
|
<ExternalLinkIcon className="size-3.5" />
|
||||||
|
</Button>
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent
|
||||||
|
className="w-[200px] space-y-2 overflow-y-auto max-h-[400px]"
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
{project.applications.length > 0 && (
|
||||||
|
<DropdownMenuGroup>
|
||||||
|
<DropdownMenuLabel>
|
||||||
|
Applications
|
||||||
|
</DropdownMenuLabel>
|
||||||
|
{project.applications.map((app) => (
|
||||||
|
<div key={app.applicationId}>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuGroup>
|
||||||
|
<DropdownMenuLabel className="font-normal capitalize text-xs flex items-center justify-between">
|
||||||
|
{app.name}
|
||||||
|
<StatusTooltip
|
||||||
|
status={app.applicationStatus}
|
||||||
|
/>
|
||||||
|
</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
{app.domains.map((domain) => (
|
||||||
|
<DropdownMenuItem
|
||||||
|
key={domain.domainId}
|
||||||
|
asChild
|
||||||
|
>
|
||||||
|
<Link
|
||||||
|
className="space-x-4 text-xs cursor-pointer justify-between"
|
||||||
|
target="_blank"
|
||||||
|
href={`${domain.https ? "https" : "http"}://${domain.host}${domain.path}`}
|
||||||
|
>
|
||||||
|
<span>{domain.host}</span>
|
||||||
|
<ExternalLinkIcon className="size-4 shrink-0" />
|
||||||
|
</Link>
|
||||||
|
</DropdownMenuItem>
|
||||||
|
))}
|
||||||
|
</DropdownMenuGroup>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</DropdownMenuGroup>
|
||||||
|
)}
|
||||||
|
{project.compose.length > 0 && (
|
||||||
|
<DropdownMenuGroup>
|
||||||
|
<DropdownMenuLabel>
|
||||||
|
Compose
|
||||||
|
</DropdownMenuLabel>
|
||||||
|
{project.compose.map((comp) => (
|
||||||
|
<div key={comp.composeId}>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<DropdownMenuGroup>
|
||||||
|
<DropdownMenuLabel className="font-normal capitalize text-xs flex items-center justify-between">
|
||||||
|
{comp.name}
|
||||||
|
<StatusTooltip
|
||||||
|
status={comp.composeStatus}
|
||||||
|
/>
|
||||||
|
</DropdownMenuLabel>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
{comp.domains.map((domain) => (
|
||||||
|
<DropdownMenuItem
|
||||||
|
key={domain.domainId}
|
||||||
|
asChild
|
||||||
|
>
|
||||||
|
<Link
|
||||||
|
className="space-x-4 text-xs cursor-pointer justify-between"
|
||||||
|
target="_blank"
|
||||||
|
href={`${domain.https ? "https" : "http"}://${domain.host}${domain.path}`}
|
||||||
|
>
|
||||||
|
<span>{domain.host}</span>
|
||||||
|
<ExternalLinkIcon className="size-4 shrink-0" />
|
||||||
|
</Link>
|
||||||
|
</DropdownMenuItem>
|
||||||
|
))}
|
||||||
|
</DropdownMenuGroup>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</DropdownMenuGroup>
|
||||||
|
)}
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
) : null}
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="flex items-center justify-between gap-2">
|
<CardTitle className="flex items-center justify-between gap-2">
|
||||||
<span className="flex flex-col gap-1.5">
|
<span className="flex flex-col gap-1.5">
|
||||||
@@ -179,7 +268,10 @@ export const ShowProjects = () => {
|
|||||||
<MoreHorizontalIcon className="size-5" />
|
<MoreHorizontalIcon className="size-5" />
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent className="w-[200px] space-y-2">
|
<DropdownMenuContent
|
||||||
|
className="w-[200px] space-y-2 overflow-y-auto max-h-[280px]"
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
<DropdownMenuLabel className="font-normal">
|
<DropdownMenuLabel className="font-normal">
|
||||||
Actions
|
Actions
|
||||||
</DropdownMenuLabel>
|
</DropdownMenuLabel>
|
||||||
@@ -201,7 +293,7 @@ export const ShowProjects = () => {
|
|||||||
<div
|
<div
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
{(auth?.rol === "admin" ||
|
{(auth?.role === "owner" ||
|
||||||
user?.canDeleteProjects) && (
|
user?.canDeleteProjects) && (
|
||||||
<AlertDialog>
|
<AlertDialog>
|
||||||
<AlertDialogTrigger className="w-full">
|
<AlertDialogTrigger className="w-full">
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ export const ShowGeneralRedis = ({ redisId }: Props) => {
|
|||||||
setIsDrawerOpen(false);
|
setIsDrawerOpen(false);
|
||||||
setFilteredLogs([]);
|
setFilteredLogs([]);
|
||||||
setIsDeploying(false);
|
setIsDeploying(false);
|
||||||
|
refetch();
|
||||||
}}
|
}}
|
||||||
filteredLogs={filteredLogs}
|
filteredLogs={filteredLogs}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import {
|
|||||||
CommandList,
|
CommandList,
|
||||||
CommandSeparator,
|
CommandSeparator,
|
||||||
} from "@/components/ui/command";
|
} from "@/components/ui/command";
|
||||||
|
import { authClient } from "@/lib/auth";
|
||||||
import {
|
import {
|
||||||
type Services,
|
type Services,
|
||||||
extractServices,
|
extractServices,
|
||||||
@@ -35,8 +36,10 @@ export const SearchCommand = () => {
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [open, setOpen] = React.useState(false);
|
const [open, setOpen] = React.useState(false);
|
||||||
const [search, setSearch] = React.useState("");
|
const [search, setSearch] = React.useState("");
|
||||||
|
const { data: session } = authClient.getSession();
|
||||||
const { data } = api.project.all.useQuery();
|
const { data } = api.project.all.useQuery(undefined, {
|
||||||
|
enabled: !!session,
|
||||||
|
});
|
||||||
const { data: isCloud, isLoading } = api.settings.isCloud.useQuery();
|
const { data: isCloud, isLoading } = api.settings.isCloud.useQuery();
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const ShowWelcomeDokploy = () => {
|
|||||||
|
|
||||||
const { data: isCloud, isLoading } = api.settings.isCloud.useQuery();
|
const { data: isCloud, isLoading } = api.settings.isCloud.useQuery();
|
||||||
|
|
||||||
if (!isCloud || data?.rol !== "admin") {
|
if (!isCloud || data?.role !== "admin") {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,14 +24,14 @@ export const ShowWelcomeDokploy = () => {
|
|||||||
!isLoading &&
|
!isLoading &&
|
||||||
isCloud &&
|
isCloud &&
|
||||||
!localStorage.getItem("hasSeenCloudWelcomeModal") &&
|
!localStorage.getItem("hasSeenCloudWelcomeModal") &&
|
||||||
data?.rol === "admin"
|
data?.role === "owner"
|
||||||
) {
|
) {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
}
|
}
|
||||||
}, [isCloud, isLoading]);
|
}, [isCloud, isLoading]);
|
||||||
|
|
||||||
const handleClose = (isOpen: boolean) => {
|
const handleClose = (isOpen: boolean) => {
|
||||||
if (data?.rol === "admin") {
|
if (data?.role === "owner") {
|
||||||
setOpen(isOpen);
|
setOpen(isOpen);
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
localStorage.setItem("hasSeenCloudWelcomeModal", "true"); // Establece el flag al cerrar el modal
|
localStorage.setItem("hasSeenCloudWelcomeModal", "true"); // Establece el flag al cerrar el modal
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ export const AddCertificate = () => {
|
|||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
|
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const { mutateAsync, isError, error, isLoading } =
|
const { mutateAsync, isError, error, isLoading } =
|
||||||
api.certificates.create.useMutation();
|
api.certificates.create.useMutation();
|
||||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||||
@@ -181,7 +182,7 @@ export const AddCertificate = () => {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
||||||
Select a Server (Optional)
|
Select a Server {!isCloud && "(Optional)"}
|
||||||
<HelpCircle className="size-4 text-muted-foreground" />
|
<HelpCircle className="size-4 text-muted-foreground" />
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -202,7 +203,12 @@ export const AddCertificate = () => {
|
|||||||
key={server.serverId}
|
key={server.serverId}
|
||||||
value={server.serverId}
|
value={server.serverId}
|
||||||
>
|
>
|
||||||
{server.name}
|
<span className="flex items-center gap-2 justify-between w-full">
|
||||||
|
<span>{server.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs self-center">
|
||||||
|
{server.ipAddress}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ const notificationBaseSchema = z.object({
|
|||||||
databaseBackup: z.boolean().default(false),
|
databaseBackup: z.boolean().default(false),
|
||||||
dokployRestart: z.boolean().default(false),
|
dokployRestart: z.boolean().default(false),
|
||||||
dockerCleanup: z.boolean().default(false),
|
dockerCleanup: z.boolean().default(false),
|
||||||
|
serverThreshold: z.boolean().default(false),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const notificationSchema = z.discriminatedUnion("type", [
|
export const notificationSchema = z.discriminatedUnion("type", [
|
||||||
@@ -204,6 +205,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
channel: notification.slack?.channel || "",
|
channel: notification.slack?.channel || "",
|
||||||
name: notification.name,
|
name: notification.name,
|
||||||
type: notification.notificationType,
|
type: notification.notificationType,
|
||||||
|
serverThreshold: notification.serverThreshold,
|
||||||
});
|
});
|
||||||
} else if (notification.notificationType === "telegram") {
|
} else if (notification.notificationType === "telegram") {
|
||||||
form.reset({
|
form.reset({
|
||||||
@@ -216,6 +218,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
type: notification.notificationType,
|
type: notification.notificationType,
|
||||||
name: notification.name,
|
name: notification.name,
|
||||||
dockerCleanup: notification.dockerCleanup,
|
dockerCleanup: notification.dockerCleanup,
|
||||||
|
serverThreshold: notification.serverThreshold,
|
||||||
});
|
});
|
||||||
} else if (notification.notificationType === "discord") {
|
} else if (notification.notificationType === "discord") {
|
||||||
form.reset({
|
form.reset({
|
||||||
@@ -228,6 +231,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
decoration: notification.discord?.decoration || undefined,
|
decoration: notification.discord?.decoration || undefined,
|
||||||
name: notification.name,
|
name: notification.name,
|
||||||
dockerCleanup: notification.dockerCleanup,
|
dockerCleanup: notification.dockerCleanup,
|
||||||
|
serverThreshold: notification.serverThreshold,
|
||||||
});
|
});
|
||||||
} else if (notification.notificationType === "email") {
|
} else if (notification.notificationType === "email") {
|
||||||
form.reset({
|
form.reset({
|
||||||
@@ -244,6 +248,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
fromAddress: notification.email?.fromAddress,
|
fromAddress: notification.email?.fromAddress,
|
||||||
name: notification.name,
|
name: notification.name,
|
||||||
dockerCleanup: notification.dockerCleanup,
|
dockerCleanup: notification.dockerCleanup,
|
||||||
|
serverThreshold: notification.serverThreshold,
|
||||||
});
|
});
|
||||||
} else if (notification.notificationType === "gotify") {
|
} else if (notification.notificationType === "gotify") {
|
||||||
form.reset({
|
form.reset({
|
||||||
@@ -280,6 +285,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
dokployRestart,
|
dokployRestart,
|
||||||
databaseBackup,
|
databaseBackup,
|
||||||
dockerCleanup,
|
dockerCleanup,
|
||||||
|
serverThreshold,
|
||||||
} = data;
|
} = data;
|
||||||
let promise: Promise<unknown> | null = null;
|
let promise: Promise<unknown> | null = null;
|
||||||
if (data.type === "slack") {
|
if (data.type === "slack") {
|
||||||
@@ -294,6 +300,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
dockerCleanup: dockerCleanup,
|
dockerCleanup: dockerCleanup,
|
||||||
slackId: notification?.slackId || "",
|
slackId: notification?.slackId || "",
|
||||||
notificationId: notificationId || "",
|
notificationId: notificationId || "",
|
||||||
|
serverThreshold: serverThreshold,
|
||||||
});
|
});
|
||||||
} else if (data.type === "telegram") {
|
} else if (data.type === "telegram") {
|
||||||
promise = telegramMutation.mutateAsync({
|
promise = telegramMutation.mutateAsync({
|
||||||
@@ -307,6 +314,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
dockerCleanup: dockerCleanup,
|
dockerCleanup: dockerCleanup,
|
||||||
notificationId: notificationId || "",
|
notificationId: notificationId || "",
|
||||||
telegramId: notification?.telegramId || "",
|
telegramId: notification?.telegramId || "",
|
||||||
|
serverThreshold: serverThreshold,
|
||||||
});
|
});
|
||||||
} else if (data.type === "discord") {
|
} else if (data.type === "discord") {
|
||||||
promise = discordMutation.mutateAsync({
|
promise = discordMutation.mutateAsync({
|
||||||
@@ -320,6 +328,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
dockerCleanup: dockerCleanup,
|
dockerCleanup: dockerCleanup,
|
||||||
notificationId: notificationId || "",
|
notificationId: notificationId || "",
|
||||||
discordId: notification?.discordId || "",
|
discordId: notification?.discordId || "",
|
||||||
|
serverThreshold: serverThreshold,
|
||||||
});
|
});
|
||||||
} else if (data.type === "email") {
|
} else if (data.type === "email") {
|
||||||
promise = emailMutation.mutateAsync({
|
promise = emailMutation.mutateAsync({
|
||||||
@@ -337,6 +346,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
dockerCleanup: dockerCleanup,
|
dockerCleanup: dockerCleanup,
|
||||||
notificationId: notificationId || "",
|
notificationId: notificationId || "",
|
||||||
emailId: notification?.emailId || "",
|
emailId: notification?.emailId || "",
|
||||||
|
serverThreshold: serverThreshold,
|
||||||
});
|
});
|
||||||
} else if (data.type === "gotify") {
|
} else if (data.type === "gotify") {
|
||||||
promise = gotifyMutation.mutateAsync({
|
promise = gotifyMutation.mutateAsync({
|
||||||
@@ -955,6 +965,30 @@ export const HandleNotifications = ({ notificationId }: Props) => {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{isCloud && (
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="serverThreshold"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className=" flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm gap-2">
|
||||||
|
<div className="space-y-0.5">
|
||||||
|
<FormLabel>Server Threshold</FormLabel>
|
||||||
|
<FormDescription>
|
||||||
|
Trigger the action when the server threshold is
|
||||||
|
reached.
|
||||||
|
</FormDescription>
|
||||||
|
</div>
|
||||||
|
<FormControl>
|
||||||
|
<Switch
|
||||||
|
checked={field.value}
|
||||||
|
onCheckedChange={field.onChange}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const GenerateToken = () => {
|
|||||||
<Label>Token</Label>
|
<Label>Token</Label>
|
||||||
<ToggleVisibilityInput
|
<ToggleVisibilityInput
|
||||||
placeholder="Token"
|
placeholder="Token"
|
||||||
value={data?.token || ""}
|
value={data?.user?.token || ""}
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ export const ProfileForm = () => {
|
|||||||
|
|
||||||
const form = useForm<Profile>({
|
const form = useForm<Profile>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
email: data?.email || "",
|
email: data?.user?.email || "",
|
||||||
password: "",
|
password: "",
|
||||||
image: data?.image || "",
|
image: data?.user?.image || "",
|
||||||
currentPassword: "",
|
currentPassword: "",
|
||||||
},
|
},
|
||||||
resolver: zodResolver(profileSchema),
|
resolver: zodResolver(profileSchema),
|
||||||
@@ -84,14 +84,14 @@ export const ProfileForm = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data) {
|
if (data) {
|
||||||
form.reset({
|
form.reset({
|
||||||
email: data?.email || "",
|
email: data?.user?.email || "",
|
||||||
password: "",
|
password: "",
|
||||||
image: data?.image || "",
|
image: data?.user?.image || "",
|
||||||
currentPassword: "",
|
currentPassword: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.email) {
|
if (data.user.email) {
|
||||||
generateSHA256Hash(data.email).then((hash) => {
|
generateSHA256Hash(data.user.email).then((hash) => {
|
||||||
setGravatarHash(hash);
|
setGravatarHash(hash);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,636 @@
|
|||||||
|
import { AlertBlock } from "@/components/shared/alert-block";
|
||||||
|
import { Badge } from "@/components/ui/badge";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import {
|
||||||
|
Command,
|
||||||
|
CommandEmpty,
|
||||||
|
CommandGroup,
|
||||||
|
CommandInput,
|
||||||
|
CommandItem,
|
||||||
|
} from "@/components/ui/command";
|
||||||
|
import {
|
||||||
|
Form,
|
||||||
|
FormControl,
|
||||||
|
FormDescription,
|
||||||
|
FormField,
|
||||||
|
FormItem,
|
||||||
|
FormLabel,
|
||||||
|
FormMessage,
|
||||||
|
} from "@/components/ui/form";
|
||||||
|
import { Input, NumberInput } from "@/components/ui/input";
|
||||||
|
import {
|
||||||
|
Popover,
|
||||||
|
PopoverContent,
|
||||||
|
PopoverTrigger,
|
||||||
|
} from "@/components/ui/popover";
|
||||||
|
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||||
|
import { extractServices } from "@/pages/dashboard/project/[projectId]";
|
||||||
|
import { api } from "@/utils/api";
|
||||||
|
import { useUrl } from "@/utils/hooks/use-url";
|
||||||
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
|
import { Eye, EyeOff, LayoutDashboardIcon, RefreshCw } from "lucide-react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { useForm } from "react-hook-form";
|
||||||
|
import { toast } from "sonner";
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
serverId?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Schema = z.object({
|
||||||
|
metricsConfig: z.object({
|
||||||
|
server: z.object({
|
||||||
|
refreshRate: z.number().min(2, {
|
||||||
|
message: "Server Refresh Rate is required",
|
||||||
|
}),
|
||||||
|
port: z.number().min(1, {
|
||||||
|
message: "Port is required",
|
||||||
|
}),
|
||||||
|
token: z.string(),
|
||||||
|
urlCallback: z.string(),
|
||||||
|
retentionDays: z.number().min(1, {
|
||||||
|
message: "Retention days must be at least 1",
|
||||||
|
}),
|
||||||
|
thresholds: z.object({
|
||||||
|
cpu: z.number().min(0),
|
||||||
|
memory: z.number().min(0),
|
||||||
|
}),
|
||||||
|
cronJob: z.string().min(1, {
|
||||||
|
message: "Cron Job is required",
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
containers: z.object({
|
||||||
|
refreshRate: z.number().min(2, {
|
||||||
|
message: "Container Refresh Rate is required",
|
||||||
|
}),
|
||||||
|
services: z.object({
|
||||||
|
include: z.array(z.string()).optional(),
|
||||||
|
exclude: z.array(z.string()).optional(),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
type Schema = z.infer<typeof Schema>;
|
||||||
|
|
||||||
|
export const SetupMonitoring = ({ serverId }: Props) => {
|
||||||
|
const { data, isLoading } = serverId
|
||||||
|
? api.server.one.useQuery(
|
||||||
|
{
|
||||||
|
serverId: serverId || "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
enabled: !!serverId,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: api.admin.one.useQuery();
|
||||||
|
|
||||||
|
const url = useUrl();
|
||||||
|
|
||||||
|
const { data: projects } = api.project.all.useQuery();
|
||||||
|
|
||||||
|
const extractServicesFromProjects = (projects: any[] | undefined) => {
|
||||||
|
if (!projects) return [];
|
||||||
|
|
||||||
|
const allServices = projects.flatMap((project) => {
|
||||||
|
const services = extractServices(project);
|
||||||
|
return serverId
|
||||||
|
? services
|
||||||
|
.filter((service) => service.serverId === serverId)
|
||||||
|
.map((service) => service.appName)
|
||||||
|
: services.map((service) => service.appName);
|
||||||
|
});
|
||||||
|
|
||||||
|
return [...new Set(allServices)];
|
||||||
|
};
|
||||||
|
|
||||||
|
const services = extractServicesFromProjects(projects);
|
||||||
|
|
||||||
|
const form = useForm<Schema>({
|
||||||
|
resolver: zodResolver(Schema),
|
||||||
|
defaultValues: {
|
||||||
|
metricsConfig: {
|
||||||
|
server: {
|
||||||
|
refreshRate: 20,
|
||||||
|
port: 4500,
|
||||||
|
token: "",
|
||||||
|
urlCallback: `${url}/api/trpc/notification.receiveNotification`,
|
||||||
|
retentionDays: 7,
|
||||||
|
thresholds: {
|
||||||
|
cpu: 0,
|
||||||
|
memory: 0,
|
||||||
|
},
|
||||||
|
cronJob: "",
|
||||||
|
},
|
||||||
|
containers: {
|
||||||
|
refreshRate: 20,
|
||||||
|
services: {
|
||||||
|
include: [],
|
||||||
|
exclude: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (data) {
|
||||||
|
form.reset({
|
||||||
|
metricsConfig: {
|
||||||
|
server: {
|
||||||
|
refreshRate: data?.metricsConfig?.server?.refreshRate,
|
||||||
|
port: data?.metricsConfig?.server?.port,
|
||||||
|
token: data?.metricsConfig?.server?.token || generateToken(),
|
||||||
|
urlCallback:
|
||||||
|
data?.metricsConfig?.server?.urlCallback ||
|
||||||
|
`${url}/api/trpc/notification.receiveNotification`,
|
||||||
|
retentionDays: data?.metricsConfig?.server?.retentionDays || 5,
|
||||||
|
thresholds: {
|
||||||
|
cpu: data?.metricsConfig?.server?.thresholds?.cpu,
|
||||||
|
memory: data?.metricsConfig?.server?.thresholds?.memory,
|
||||||
|
},
|
||||||
|
cronJob: data?.metricsConfig?.server?.cronJob || "0 0 * * *",
|
||||||
|
},
|
||||||
|
containers: {
|
||||||
|
refreshRate: data?.metricsConfig?.containers?.refreshRate,
|
||||||
|
services: {
|
||||||
|
include: data?.metricsConfig?.containers?.services?.include,
|
||||||
|
exclude: data?.metricsConfig?.containers?.services?.exclude,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [data, url]);
|
||||||
|
|
||||||
|
const [search, setSearch] = useState("");
|
||||||
|
const [searchExclude, setSearchExclude] = useState("");
|
||||||
|
const [showToken, setShowToken] = useState(false);
|
||||||
|
|
||||||
|
const availableServices = services?.filter(
|
||||||
|
(service) =>
|
||||||
|
!form
|
||||||
|
.watch("metricsConfig.containers.services.include")
|
||||||
|
?.some((s) => s === service) &&
|
||||||
|
!form
|
||||||
|
.watch("metricsConfig.containers.services.exclude")
|
||||||
|
?.includes(service) &&
|
||||||
|
service.toLowerCase().includes(search.toLowerCase()),
|
||||||
|
);
|
||||||
|
|
||||||
|
const availableServicesToExclude = [
|
||||||
|
...(services?.filter(
|
||||||
|
(service) =>
|
||||||
|
!form
|
||||||
|
.watch("metricsConfig.containers.services.exclude")
|
||||||
|
?.includes(service) &&
|
||||||
|
!form
|
||||||
|
.watch("metricsConfig.containers.services.include")
|
||||||
|
?.some((s) => s === service) &&
|
||||||
|
service.toLowerCase().includes(searchExclude.toLowerCase()),
|
||||||
|
) ?? []),
|
||||||
|
...(!form.watch("metricsConfig.containers.services.exclude")?.includes("*")
|
||||||
|
? ["*"]
|
||||||
|
: []),
|
||||||
|
];
|
||||||
|
|
||||||
|
const { mutateAsync } = serverId
|
||||||
|
? api.server.setupMonitoring.useMutation()
|
||||||
|
: api.admin.setupMonitoring.useMutation();
|
||||||
|
|
||||||
|
const generateToken = () => {
|
||||||
|
const array = new Uint8Array(64);
|
||||||
|
crypto.getRandomValues(array);
|
||||||
|
return Array.from(array, (byte) => byte.toString(16).padStart(2, "0")).join(
|
||||||
|
"",
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSubmit = async (values: Schema) => {
|
||||||
|
await mutateAsync({
|
||||||
|
serverId: serverId || "",
|
||||||
|
metricsConfig: values.metricsConfig,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
toast.success("Server updated successfully");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
toast.error("Error updating the server");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<CardHeader className="">
|
||||||
|
<CardTitle className="text-xl flex flex-row gap-2">
|
||||||
|
<LayoutDashboardIcon className="size-6 text-muted-foreground self-center" />
|
||||||
|
Monitoring
|
||||||
|
</CardTitle>
|
||||||
|
<CardDescription>
|
||||||
|
Monitor your servers and containers in realtime with notifications
|
||||||
|
when they reach their thresholds.
|
||||||
|
</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="space-y-6 py-6 border-t">
|
||||||
|
<Form {...form}>
|
||||||
|
<form
|
||||||
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
|
className="flex w-full flex-col gap-4"
|
||||||
|
>
|
||||||
|
<AlertBlock>
|
||||||
|
Using a lower refresh rate will make your CPU and memory usage
|
||||||
|
higher, we recommend 30-60 seconds
|
||||||
|
</AlertBlock>
|
||||||
|
<div className="flex flex-col gap-4">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.server.refreshRate"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="flex flex-col justify-center max-sm:items-center">
|
||||||
|
<FormLabel>Server Refresh Rate</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<NumberInput placeholder="10" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
Please set the refresh rate for the server in seconds
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.containers.refreshRate"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="flex flex-col justify-center max-sm:items-center">
|
||||||
|
<FormLabel>Container Refresh Rate</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<NumberInput placeholder="10" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
Please set the refresh rate for the containers in seconds
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.server.cronJob"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Cron Job</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input {...field} placeholder="0 0 * * *" />
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
Cron job for cleaning up metrics
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.server.retentionDays"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Server Retention Days</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<NumberInput {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
Number of days to retain server metrics data
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.server.port"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className="flex flex-col justify-center max-sm:items-center">
|
||||||
|
<FormLabel>Port</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<NumberInput placeholder="4500" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
Please set the port for the metrics server
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.containers.services.include"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Include Services</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<div className="flex flex-col gap-4">
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<Popover>
|
||||||
|
<PopoverTrigger asChild>
|
||||||
|
<Button variant="outline">Add Service</Button>
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent
|
||||||
|
className="w-[300px] p-0"
|
||||||
|
align="start"
|
||||||
|
>
|
||||||
|
<Command>
|
||||||
|
<CommandInput
|
||||||
|
placeholder="Search service..."
|
||||||
|
value={search}
|
||||||
|
onValueChange={setSearch}
|
||||||
|
/>
|
||||||
|
{availableServices?.length === 0 ? (
|
||||||
|
<div className="p-4 text-sm text-muted-foreground">
|
||||||
|
No services available.
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<CommandEmpty>
|
||||||
|
No service found.
|
||||||
|
</CommandEmpty>
|
||||||
|
<CommandGroup>
|
||||||
|
{availableServices?.map((service) => (
|
||||||
|
<CommandItem
|
||||||
|
key={service}
|
||||||
|
value={service}
|
||||||
|
onSelect={() => {
|
||||||
|
field.onChange([
|
||||||
|
...(field.value ?? []),
|
||||||
|
service,
|
||||||
|
]);
|
||||||
|
setSearch("");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{service}
|
||||||
|
</CommandItem>
|
||||||
|
))}
|
||||||
|
</CommandGroup>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Command>
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
{field.value?.map((service) => (
|
||||||
|
<Badge
|
||||||
|
key={service}
|
||||||
|
variant="secondary"
|
||||||
|
className="flex items-center gap-2"
|
||||||
|
>
|
||||||
|
{service}
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
className="h-4 w-4 p-0"
|
||||||
|
onClick={() => {
|
||||||
|
field.onChange(
|
||||||
|
field.value?.filter((s) => s !== service),
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</Button>
|
||||||
|
</Badge>
|
||||||
|
))}
|
||||||
|
<FormDescription>
|
||||||
|
Services to monitor.
|
||||||
|
</FormDescription>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.containers.services.exclude"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Exclude Services</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<div className="flex flex-col gap-4">
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<Popover>
|
||||||
|
<PopoverTrigger asChild>
|
||||||
|
<Button variant="outline">Add Service</Button>
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent
|
||||||
|
className="w-[300px] p-0"
|
||||||
|
align="start"
|
||||||
|
>
|
||||||
|
<Command>
|
||||||
|
<CommandInput
|
||||||
|
placeholder="Search service..."
|
||||||
|
value={searchExclude}
|
||||||
|
onValueChange={setSearchExclude}
|
||||||
|
/>
|
||||||
|
{availableServicesToExclude?.length === 0 ? (
|
||||||
|
<div className="p-4 text-sm text-muted-foreground">
|
||||||
|
No services available.
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<CommandEmpty>
|
||||||
|
No service found.
|
||||||
|
</CommandEmpty>
|
||||||
|
<CommandGroup>
|
||||||
|
{availableServicesToExclude.map(
|
||||||
|
(service) => (
|
||||||
|
<CommandItem
|
||||||
|
key={service}
|
||||||
|
value={service}
|
||||||
|
onSelect={() => {
|
||||||
|
field.onChange([
|
||||||
|
...(field.value ?? []),
|
||||||
|
service,
|
||||||
|
]);
|
||||||
|
setSearchExclude("");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{service}
|
||||||
|
</CommandItem>
|
||||||
|
),
|
||||||
|
)}
|
||||||
|
</CommandGroup>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Command>
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
{field.value?.map((service, index) => (
|
||||||
|
<Badge
|
||||||
|
key={service}
|
||||||
|
variant="secondary"
|
||||||
|
className="flex items-center gap-2"
|
||||||
|
>
|
||||||
|
{service}
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
className="h-4 w-4 p-0"
|
||||||
|
onClick={() => {
|
||||||
|
field.onChange(
|
||||||
|
field.value?.filter((_, i) => i !== index),
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</Button>
|
||||||
|
</Badge>
|
||||||
|
))}
|
||||||
|
<FormDescription>
|
||||||
|
Services to exclude from monitoring
|
||||||
|
</FormDescription>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</FormControl>
|
||||||
|
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.server.thresholds.cpu"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>CPU Threshold (%)</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<NumberInput {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
Alert when CPU usage exceeds this percentage
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.server.thresholds.memory"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Memory Threshold (%)</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<NumberInput {...field} />
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
Alert when memory usage exceeds this percentage
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.server.token"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Metrics Token</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<div className="relative flex-1">
|
||||||
|
<Input
|
||||||
|
type={showToken ? "text" : "password"}
|
||||||
|
placeholder="Enter your metrics token"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="secondary"
|
||||||
|
size="icon"
|
||||||
|
className="absolute right-0 top-1/2 -translate-y-1/2"
|
||||||
|
onClick={() => setShowToken(!showToken)}
|
||||||
|
title={showToken ? "Hide token" : "Show token"}
|
||||||
|
>
|
||||||
|
{showToken ? (
|
||||||
|
<EyeOff className="h-4 w-4" />
|
||||||
|
) : (
|
||||||
|
<Eye className="h-4 w-4" />
|
||||||
|
)}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="outline"
|
||||||
|
size="icon"
|
||||||
|
onClick={() => {
|
||||||
|
const newToken = generateToken();
|
||||||
|
form.setValue(
|
||||||
|
"metricsConfig.server.token",
|
||||||
|
newToken,
|
||||||
|
);
|
||||||
|
toast.success("Token generated successfully");
|
||||||
|
}}
|
||||||
|
title="Generate new token"
|
||||||
|
>
|
||||||
|
<RefreshCw className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
Token for authenticating metrics requests
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="metricsConfig.server.urlCallback"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel>Metrics Callback URL</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input
|
||||||
|
placeholder="https://your-callback-url.com"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormDescription>
|
||||||
|
URL where metrics will be sent
|
||||||
|
</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center justify-end gap-2">
|
||||||
|
<Button type="submit" isLoading={form.formState.isSubmitting}>
|
||||||
|
Save changes
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</Form>
|
||||||
|
</CardContent>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -19,6 +19,7 @@ import {
|
|||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
|
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
|
||||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import copy from "copy-to-clipboard";
|
import copy from "copy-to-clipboard";
|
||||||
import { CopyIcon, ExternalLinkIcon, ServerIcon } from "lucide-react";
|
import { CopyIcon, ExternalLinkIcon, ServerIcon } from "lucide-react";
|
||||||
@@ -30,6 +31,7 @@ import { type LogLine, parseLogs } from "../../docker/logs/utils";
|
|||||||
import { EditScript } from "./edit-script";
|
import { EditScript } from "./edit-script";
|
||||||
import { GPUSupport } from "./gpu-support";
|
import { GPUSupport } from "./gpu-support";
|
||||||
import { SecurityAudit } from "./security-audit";
|
import { SecurityAudit } from "./security-audit";
|
||||||
|
import { SetupMonitoring } from "./setup-monitoring";
|
||||||
import { ValidateServer } from "./validate-server";
|
import { ValidateServer } from "./validate-server";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -48,7 +50,7 @@ export const SetupServer = ({ serverId }: Props) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const [activeLog, setActiveLog] = useState<string | null>(null);
|
const [activeLog, setActiveLog] = useState<string | null>(null);
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
||||||
const [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);
|
const [filteredLogs, setFilteredLogs] = useState<LogLine[]>([]);
|
||||||
const [isDeploying, setIsDeploying] = useState(false);
|
const [isDeploying, setIsDeploying] = useState(false);
|
||||||
@@ -112,11 +114,19 @@ export const SetupServer = ({ serverId }: Props) => {
|
|||||||
</AlertBlock>
|
</AlertBlock>
|
||||||
|
|
||||||
<Tabs defaultValue="ssh-keys">
|
<Tabs defaultValue="ssh-keys">
|
||||||
<TabsList className="grid grid-cols-5 w-[700px]">
|
<TabsList
|
||||||
|
className={cn(
|
||||||
|
"grid w-[700px]",
|
||||||
|
isCloud ? "grid-cols-6" : "grid-cols-5",
|
||||||
|
)}
|
||||||
|
>
|
||||||
<TabsTrigger value="ssh-keys">SSH Keys</TabsTrigger>
|
<TabsTrigger value="ssh-keys">SSH Keys</TabsTrigger>
|
||||||
<TabsTrigger value="deployments">Deployments</TabsTrigger>
|
<TabsTrigger value="deployments">Deployments</TabsTrigger>
|
||||||
<TabsTrigger value="validate">Validate</TabsTrigger>
|
<TabsTrigger value="validate">Validate</TabsTrigger>
|
||||||
<TabsTrigger value="audit">Security</TabsTrigger>
|
<TabsTrigger value="audit">Security</TabsTrigger>
|
||||||
|
{isCloud && (
|
||||||
|
<TabsTrigger value="monitoring">Monitoring</TabsTrigger>
|
||||||
|
)}
|
||||||
<TabsTrigger value="gpu-setup">GPU Setup</TabsTrigger>
|
<TabsTrigger value="gpu-setup">GPU Setup</TabsTrigger>
|
||||||
</TabsList>
|
</TabsList>
|
||||||
<TabsContent
|
<TabsContent
|
||||||
@@ -309,6 +319,16 @@ export const SetupServer = ({ serverId }: Props) => {
|
|||||||
<SecurityAudit serverId={serverId} />
|
<SecurityAudit serverId={serverId} />
|
||||||
</div>
|
</div>
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
|
<TabsContent
|
||||||
|
value="monitoring"
|
||||||
|
className="outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
||||||
|
>
|
||||||
|
<div className="flex flex-col gap-2 text-sm pt-3">
|
||||||
|
<div className="rounded-xl bg-background shadow-md border">
|
||||||
|
<SetupMonitoring serverId={serverId} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</TabsContent>
|
||||||
<TabsContent
|
<TabsContent
|
||||||
value="gpu-setup"
|
value="gpu-setup"
|
||||||
className="outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
className="outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
|
||||||
|
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { ShowPaidMonitoring } from "../../monitoring/paid/servers/show-paid-monitoring";
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
url: string;
|
||||||
|
token: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ShowMonitoringModal = ({ url, token }: Props) => {
|
||||||
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
||||||
|
<DialogTrigger asChild>
|
||||||
|
<DropdownMenuItem
|
||||||
|
className="w-full cursor-pointer "
|
||||||
|
onSelect={(e) => e.preventDefault()}
|
||||||
|
>
|
||||||
|
Show Monitoring
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</DialogTrigger>
|
||||||
|
<DialogContent className="sm:max-w-7xl overflow-y-auto max-h-screen ">
|
||||||
|
<div className="flex gap-4 py-4 w-full">
|
||||||
|
<ShowPaidMonitoring BASE_URL={url} token={token} />
|
||||||
|
</div>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -38,6 +38,7 @@ import { ShowServerActions } from "./actions/show-server-actions";
|
|||||||
import { HandleServers } from "./handle-servers";
|
import { HandleServers } from "./handle-servers";
|
||||||
import { SetupServer } from "./setup-server";
|
import { SetupServer } from "./setup-server";
|
||||||
import { ShowDockerContainersModal } from "./show-docker-containers-modal";
|
import { ShowDockerContainersModal } from "./show-docker-containers-modal";
|
||||||
|
import { ShowMonitoringModal } from "./show-monitoring-modal";
|
||||||
import { ShowSwarmOverviewModal } from "./show-swarm-overview-modal";
|
import { ShowSwarmOverviewModal } from "./show-swarm-overview-modal";
|
||||||
import { ShowTraefikFileSystemModal } from "./show-traefik-file-system-modal";
|
import { ShowTraefikFileSystemModal } from "./show-traefik-file-system-modal";
|
||||||
import { WelcomeSuscription } from "./welcome-stripe/welcome-suscription";
|
import { WelcomeSuscription } from "./welcome-stripe/welcome-suscription";
|
||||||
@@ -314,6 +315,16 @@ export const ShowServers = () => {
|
|||||||
<ShowDockerContainersModal
|
<ShowDockerContainersModal
|
||||||
serverId={server.serverId}
|
serverId={server.serverId}
|
||||||
/>
|
/>
|
||||||
|
{isCloud && (
|
||||||
|
<ShowMonitoringModal
|
||||||
|
url={`http://${server.ipAddress}:${server?.metricsConfig?.server?.port}/metrics`}
|
||||||
|
token={
|
||||||
|
server?.metricsConfig?.server
|
||||||
|
?.token
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<ShowSwarmOverviewModal
|
<ShowSwarmOverviewModal
|
||||||
serverId={server.serverId}
|
serverId={server.serverId}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { Textarea } from "@/components/ui/textarea";
|
|||||||
import { sshKeyCreate, type sshKeyType } from "@/server/db/validations";
|
import { sshKeyCreate, type sshKeyType } from "@/server/db/validations";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { PenBoxIcon, PlusIcon } from "lucide-react";
|
import { DownloadIcon, PenBoxIcon, PlusIcon } from "lucide-react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
@@ -111,6 +111,26 @@ export const HandleSSHKeys = ({ sshKeyId }: Props) => {
|
|||||||
toast.error("Error generating the SSH Key");
|
toast.error("Error generating the SSH Key");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const downloadKey = (
|
||||||
|
content: string,
|
||||||
|
defaultFilename: string,
|
||||||
|
keyType: "private" | "public",
|
||||||
|
) => {
|
||||||
|
const keyName = form.watch("name");
|
||||||
|
const filename = keyName
|
||||||
|
? `${keyName}${sshKeyId ? `_${sshKeyId}` : ""}_${keyType}_${defaultFilename}`
|
||||||
|
: `${keyType}_${defaultFilename}`;
|
||||||
|
const blob = new Blob([content], { type: "text/plain" });
|
||||||
|
const url = window.URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = filename;
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.click();
|
||||||
|
document.body.removeChild(a);
|
||||||
|
window.URL.revokeObjectURL(url);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
||||||
<DialogTrigger className="" asChild>
|
<DialogTrigger className="" asChild>
|
||||||
@@ -245,7 +265,41 @@ export const HandleSSHKeys = ({ sshKeyId }: Props) => {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<DialogFooter>
|
<DialogFooter className="flex items-center justify-between">
|
||||||
|
<div className="flex items-center gap-4">
|
||||||
|
{form.watch("privateKey") && (
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="outline"
|
||||||
|
size="default"
|
||||||
|
onClick={() =>
|
||||||
|
downloadKey(form.watch("privateKey"), "id_rsa", "private")
|
||||||
|
}
|
||||||
|
className="flex items-center gap-2"
|
||||||
|
>
|
||||||
|
<DownloadIcon className="h-4 w-4" />
|
||||||
|
Private Key
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
{form.watch("publicKey") && (
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="outline"
|
||||||
|
size="default"
|
||||||
|
onClick={() =>
|
||||||
|
downloadKey(
|
||||||
|
form.watch("publicKey"),
|
||||||
|
"id_rsa.pub",
|
||||||
|
"public",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="flex items-center gap-2"
|
||||||
|
>
|
||||||
|
<DownloadIcon className="h-4 w-4" />
|
||||||
|
Public Key
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<Button isLoading={isLoading} type="submit">
|
<Button isLoading={isLoading} type="submit">
|
||||||
{sshKeyId ? "Update" : "Create"}
|
{sshKeyId ? "Update" : "Create"}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useEffect, useRef } from "react";
|
|||||||
import { FitAddon } from "xterm-addon-fit";
|
import { FitAddon } from "xterm-addon-fit";
|
||||||
import "@xterm/xterm/css/xterm.css";
|
import "@xterm/xterm/css/xterm.css";
|
||||||
import { AttachAddon } from "@xterm/addon-attach";
|
import { AttachAddon } from "@xterm/addon-attach";
|
||||||
|
import { ClipboardAddon } from "@xterm/addon-clipboard";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
import { getLocalServerData } from "./local-server-config";
|
import { getLocalServerData } from "./local-server-config";
|
||||||
|
|
||||||
@@ -37,6 +38,7 @@ export const Terminal: React.FC<Props> = ({ id, serverId }) => {
|
|||||||
foreground: "currentColor",
|
foreground: "currentColor",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const addonFit = new FitAddon();
|
const addonFit = new FitAddon();
|
||||||
|
|
||||||
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||||
@@ -54,6 +56,8 @@ export const Terminal: React.FC<Props> = ({ id, serverId }) => {
|
|||||||
|
|
||||||
const ws = new WebSocket(wsUrl);
|
const ws = new WebSocket(wsUrl);
|
||||||
const addonAttach = new AttachAddon(ws);
|
const addonAttach = new AttachAddon(ws);
|
||||||
|
const clipboardAddon = new ClipboardAddon();
|
||||||
|
term.loadAddon(clipboardAddon);
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
term.open(termRef.current);
|
term.open(termRef.current);
|
||||||
@@ -68,7 +72,7 @@ export const Terminal: React.FC<Props> = ({ id, serverId }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
<div className="w-full h-full bg-transparent border rounded-lg p-2 ">
|
<div className="w-full h-full bg-transparent border rounded-lg p-2">
|
||||||
<div id={id} ref={termRef} className="rounded-xl" />
|
<div id={id} ref={termRef} className="rounded-xl" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const OnboardingLayout = ({ children }: Props) => {
|
|||||||
<div className="absolute inset-0 bg-muted" />
|
<div className="absolute inset-0 bg-muted" />
|
||||||
<Link
|
<Link
|
||||||
href="https://dokploy.com"
|
href="https://dokploy.com"
|
||||||
className="relative z-20 flex items-center text-lg font-medium gap-4"
|
className="relative z-20 flex items-center text-lg font-medium gap-4 text-primary"
|
||||||
>
|
>
|
||||||
<Logo className="size-10" />
|
<Logo className="size-10" />
|
||||||
Dokploy
|
Dokploy
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import {
|
import {
|
||||||
Activity,
|
Activity,
|
||||||
AudioWaveform,
|
|
||||||
BarChartHorizontalBigIcon,
|
BarChartHorizontalBigIcon,
|
||||||
Bell,
|
Bell,
|
||||||
BlocksIcon,
|
BlocksIcon,
|
||||||
@@ -9,7 +8,6 @@ import {
|
|||||||
Boxes,
|
Boxes,
|
||||||
ChevronRight,
|
ChevronRight,
|
||||||
CircleHelp,
|
CircleHelp,
|
||||||
Command,
|
|
||||||
CreditCard,
|
CreditCard,
|
||||||
Database,
|
Database,
|
||||||
Folder,
|
Folder,
|
||||||
@@ -27,8 +25,8 @@ import {
|
|||||||
Users,
|
Users,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { usePathname } from "next/navigation";
|
import { usePathname } from "next/navigation";
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import type * as React from "react";
|
import type * as React from "react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
@@ -65,243 +63,290 @@ import {
|
|||||||
useSidebar,
|
useSidebar,
|
||||||
} from "@/components/ui/sidebar";
|
} from "@/components/ui/sidebar";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
import type { AppRouter } from "@/server/api/root";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
|
import type { inferRouterOutputs } from "@trpc/server";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { Logo } from "../shared/logo";
|
import { Logo } from "../shared/logo";
|
||||||
import { UpdateServerButton } from "./update-server";
|
import { UpdateServerButton } from "./update-server";
|
||||||
import { UserNav } from "./user-nav";
|
import { UserNav } from "./user-nav";
|
||||||
// This is sample data.
|
|
||||||
interface NavItem {
|
// The types of the queries we are going to use
|
||||||
|
type AuthQueryOutput = inferRouterOutputs<AppRouter>["auth"]["get"];
|
||||||
|
type UserQueryOutput = inferRouterOutputs<AppRouter>["user"]["byAuthId"];
|
||||||
|
|
||||||
|
type SingleNavItem = {
|
||||||
|
isSingle?: true;
|
||||||
title: string;
|
title: string;
|
||||||
url: string;
|
url: string;
|
||||||
icon: LucideIcon;
|
icon?: LucideIcon;
|
||||||
isSingle: boolean;
|
isEnabled?: (opts: {
|
||||||
isActive: boolean;
|
auth?: AuthQueryOutput;
|
||||||
items?: {
|
user?: UserQueryOutput;
|
||||||
title: string;
|
isCloud: boolean;
|
||||||
url: string;
|
}) => boolean;
|
||||||
icon?: LucideIcon;
|
};
|
||||||
}[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ExternalLink {
|
// NavItem type
|
||||||
|
// Consists of a single item or a group of items
|
||||||
|
// If `isSingle` is true or undefined, the item is a single item
|
||||||
|
// If `isSingle` is false, the item is a group of items
|
||||||
|
type NavItem =
|
||||||
|
| SingleNavItem
|
||||||
|
| {
|
||||||
|
isSingle: false;
|
||||||
|
title: string;
|
||||||
|
icon: LucideIcon;
|
||||||
|
items: SingleNavItem[];
|
||||||
|
isEnabled?: (opts: {
|
||||||
|
auth?: AuthQueryOutput;
|
||||||
|
user?: UserQueryOutput;
|
||||||
|
isCloud: boolean;
|
||||||
|
}) => boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ExternalLink type
|
||||||
|
// Represents an external link item (used for the help section)
|
||||||
|
type ExternalLink = {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
icon: React.ComponentType<{ className?: string }>;
|
icon: React.ComponentType<{ className?: string }>;
|
||||||
}
|
isEnabled?: (opts: {
|
||||||
|
auth?: AuthQueryOutput;
|
||||||
|
user?: UserQueryOutput;
|
||||||
|
isCloud: boolean;
|
||||||
|
}) => boolean;
|
||||||
|
};
|
||||||
|
|
||||||
const data = {
|
// Menu type
|
||||||
user: {
|
// Consists of home, settings, and help items
|
||||||
name: "shadcn",
|
type Menu = {
|
||||||
email: "m@example.com",
|
home: NavItem[];
|
||||||
avatar: "/avatars/shadcn.jpg",
|
settings: NavItem[];
|
||||||
},
|
help: ExternalLink[];
|
||||||
teams: [
|
};
|
||||||
{
|
|
||||||
name: "Dokploy",
|
// Menu items
|
||||||
logo: Logo,
|
// Consists of unfiltered home, settings, and help items
|
||||||
plan: "Enterprise",
|
// The items are filtered based on the user's role and permissions
|
||||||
},
|
// The `isEnabled` function is called to determine if the item should be displayed
|
||||||
{
|
const MENU: Menu = {
|
||||||
name: "Acme Corp.",
|
|
||||||
logo: AudioWaveform,
|
|
||||||
plan: "Startup",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Evil Corp.",
|
|
||||||
logo: Command,
|
|
||||||
plan: "Free",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
home: [
|
home: [
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Projects",
|
title: "Projects",
|
||||||
url: "/dashboard/projects",
|
url: "/dashboard/projects",
|
||||||
icon: Folder,
|
icon: Folder,
|
||||||
isSingle: true,
|
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Monitoring",
|
title: "Monitoring",
|
||||||
url: "/dashboard/monitoring",
|
url: "/dashboard/monitoring",
|
||||||
icon: BarChartHorizontalBigIcon,
|
icon: BarChartHorizontalBigIcon,
|
||||||
isSingle: true,
|
// Only enabled in non-cloud environments
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) => !isCloud,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Traefik File System",
|
title: "Traefik File System",
|
||||||
url: "/dashboard/traefik",
|
url: "/dashboard/traefik",
|
||||||
icon: GalleryVerticalEnd,
|
icon: GalleryVerticalEnd,
|
||||||
isSingle: true,
|
// Only enabled for admins and users with access to Traefik files in non-cloud environments
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) =>
|
||||||
|
!!(
|
||||||
|
(auth?.role === "owner" || user?.canAccessToTraefikFiles) &&
|
||||||
|
!isCloud
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Docker",
|
title: "Docker",
|
||||||
url: "/dashboard/docker",
|
url: "/dashboard/docker",
|
||||||
icon: BlocksIcon,
|
icon: BlocksIcon,
|
||||||
isSingle: true,
|
// Only enabled for admins and users with access to Docker in non-cloud environments
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) =>
|
||||||
|
!!((auth?.role === "owner" || user?.canAccessToDocker) && !isCloud),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Swarm",
|
title: "Swarm",
|
||||||
url: "/dashboard/swarm",
|
url: "/dashboard/swarm",
|
||||||
icon: PieChart,
|
icon: PieChart,
|
||||||
isSingle: true,
|
// Only enabled for admins and users with access to Docker in non-cloud environments
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) =>
|
||||||
|
!!((auth?.role === "owner" || user?.canAccessToDocker) && !isCloud),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Requests",
|
title: "Requests",
|
||||||
url: "/dashboard/requests",
|
url: "/dashboard/requests",
|
||||||
icon: Forward,
|
icon: Forward,
|
||||||
isSingle: true,
|
// Only enabled for admins and users with access to Docker in non-cloud environments
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) =>
|
||||||
|
!!((auth?.role === "owner" || user?.canAccessToDocker) && !isCloud),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Legacy unused menu, adjusted to the new structure
|
||||||
// {
|
// {
|
||||||
|
// isSingle: true,
|
||||||
// title: "Projects",
|
// title: "Projects",
|
||||||
// url: "/dashboard/projects",
|
// url: "/dashboard/projects",
|
||||||
// icon: Folder,
|
// icon: Folder,
|
||||||
// isSingle: true,
|
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
|
// isSingle: true,
|
||||||
// title: "Monitoring",
|
// title: "Monitoring",
|
||||||
// icon: BarChartHorizontalBigIcon,
|
// icon: BarChartHorizontalBigIcon,
|
||||||
// url: "/dashboard/settings/monitoring",
|
// url: "/dashboard/settings/monitoring",
|
||||||
// isSingle: true,
|
|
||||||
// },
|
// },
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// title: "Settings",
|
// isSingle: false,
|
||||||
// url: "#",
|
// title: "Settings",
|
||||||
// icon: Settings2,
|
// icon: Settings2,
|
||||||
// isActive: true,
|
// items: [
|
||||||
// items: [
|
// {
|
||||||
// {
|
// title: "Profile",
|
||||||
// title: "Profile",
|
// url: "/dashboard/settings/profile",
|
||||||
// url: "/dashboard/settings/profile",
|
// },
|
||||||
// },
|
// {
|
||||||
// {
|
// title: "Users",
|
||||||
// title: "Users",
|
// url: "/dashboard/settings/users",
|
||||||
// url: "/dashboard/settings/users",
|
// },
|
||||||
// },
|
// {
|
||||||
// {
|
// title: "SSH Key",
|
||||||
// title: "SSH Key",
|
// url: "/dashboard/settings/ssh-keys",
|
||||||
// url: "/dashboard/settings/ssh-keys",
|
// },
|
||||||
// },
|
// {
|
||||||
// {
|
// title: "Git",
|
||||||
// title: "Git",
|
// url: "/dashboard/settings/git-providers",
|
||||||
// url: "/dashboard/settings/git-providers",
|
// },
|
||||||
// },
|
// ],
|
||||||
// ],
|
|
||||||
// },
|
// },
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// title: "Integrations",
|
// isSingle: false,
|
||||||
// icon: BlocksIcon,
|
// title: "Integrations",
|
||||||
// items: [
|
// icon: BlocksIcon,
|
||||||
// {
|
// items: [
|
||||||
// title: "S3 Destinations",
|
// {
|
||||||
// url: "/dashboard/settings/destinations",
|
// title: "S3 Destinations",
|
||||||
// },
|
// url: "/dashboard/settings/destinations",
|
||||||
// {
|
// },
|
||||||
// title: "Registry",
|
// {
|
||||||
// url: "/dashboard/settings/registry",
|
// title: "Registry",
|
||||||
// },
|
// url: "/dashboard/settings/registry",
|
||||||
// {
|
// },
|
||||||
// title: "Notifications",
|
// {
|
||||||
// url: "/dashboard/settings/notifications",
|
// title: "Notifications",
|
||||||
// },
|
// url: "/dashboard/settings/notifications",
|
||||||
// ],
|
// },
|
||||||
] as NavItem[],
|
// ],
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
|
||||||
settings: [
|
settings: [
|
||||||
{
|
{
|
||||||
title: "Server",
|
isSingle: true,
|
||||||
|
title: "Web Server",
|
||||||
url: "/dashboard/settings/server",
|
url: "/dashboard/settings/server",
|
||||||
icon: Activity,
|
icon: Activity,
|
||||||
isSingle: true,
|
// Only enabled for admins in non-cloud environments
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) =>
|
||||||
|
!!(auth?.role === "owner" && !isCloud),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Profile",
|
title: "Profile",
|
||||||
url: "/dashboard/settings/profile",
|
url: "/dashboard/settings/profile",
|
||||||
icon: User,
|
icon: User,
|
||||||
isSingle: true,
|
|
||||||
isActive: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Servers",
|
isSingle: true,
|
||||||
|
title: "Remote Servers",
|
||||||
url: "/dashboard/settings/servers",
|
url: "/dashboard/settings/servers",
|
||||||
icon: Server,
|
icon: Server,
|
||||||
isSingle: true,
|
// Only enabled for admins
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) => !!(auth?.role === "owner"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Users",
|
title: "Users",
|
||||||
icon: Users,
|
icon: Users,
|
||||||
url: "/dashboard/settings/users",
|
url: "/dashboard/settings/users",
|
||||||
isSingle: true,
|
// Only enabled for admins
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) => !!(auth?.role === "owner"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "SSH Keys",
|
title: "SSH Keys",
|
||||||
icon: KeyRound,
|
icon: KeyRound,
|
||||||
url: "/dashboard/settings/ssh-keys",
|
url: "/dashboard/settings/ssh-keys",
|
||||||
isSingle: true,
|
// Only enabled for admins and users with access to SSH keys
|
||||||
isActive: false,
|
isEnabled: ({ auth, user }) =>
|
||||||
|
!!(auth?.role === "owner" || user?.canAccessToSSHKeys),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Git",
|
title: "Git",
|
||||||
url: "/dashboard/settings/git-providers",
|
url: "/dashboard/settings/git-providers",
|
||||||
icon: GitBranch,
|
icon: GitBranch,
|
||||||
isSingle: true,
|
// Only enabled for admins and users with access to Git providers
|
||||||
isActive: false,
|
isEnabled: ({ auth, user }) =>
|
||||||
|
!!(auth?.role === "owner" || user?.canAccessToGitProviders),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Registry",
|
title: "Registry",
|
||||||
url: "/dashboard/settings/registry",
|
url: "/dashboard/settings/registry",
|
||||||
icon: Package,
|
icon: Package,
|
||||||
isSingle: true,
|
// Only enabled for admins
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) => !!(auth?.role === "owner"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "S3 Destinations",
|
title: "S3 Destinations",
|
||||||
url: "/dashboard/settings/destinations",
|
url: "/dashboard/settings/destinations",
|
||||||
icon: Database,
|
icon: Database,
|
||||||
isSingle: true,
|
// Only enabled for admins
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) => !!(auth?.role === "owner"),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Certificates",
|
title: "Certificates",
|
||||||
url: "/dashboard/settings/certificates",
|
url: "/dashboard/settings/certificates",
|
||||||
icon: ShieldCheck,
|
icon: ShieldCheck,
|
||||||
isSingle: true,
|
// Only enabled for admins
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) => !!(auth?.role === "owner"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Cluster",
|
title: "Cluster",
|
||||||
url: "/dashboard/settings/cluster",
|
url: "/dashboard/settings/cluster",
|
||||||
icon: Boxes,
|
icon: Boxes,
|
||||||
isSingle: true,
|
// Only enabled for admins in non-cloud environments
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) =>
|
||||||
|
!!(auth?.role === "owner" && !isCloud),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Notifications",
|
title: "Notifications",
|
||||||
url: "/dashboard/settings/notifications",
|
url: "/dashboard/settings/notifications",
|
||||||
icon: Bell,
|
icon: Bell,
|
||||||
isSingle: true,
|
// Only enabled for admins
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) => !!(auth?.role === "owner"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
isSingle: true,
|
||||||
title: "Billing",
|
title: "Billing",
|
||||||
url: "/dashboard/settings/billing",
|
url: "/dashboard/settings/billing",
|
||||||
icon: CreditCard,
|
icon: CreditCard,
|
||||||
isSingle: true,
|
// Only enabled for admins in cloud environments
|
||||||
isActive: false,
|
isEnabled: ({ auth, user, isCloud }) =>
|
||||||
|
!!(auth?.role === "owner" && isCloud),
|
||||||
},
|
},
|
||||||
] as NavItem[],
|
],
|
||||||
|
|
||||||
help: [
|
help: [
|
||||||
{
|
{
|
||||||
name: "Documentation",
|
name: "Documentation",
|
||||||
@@ -325,8 +370,108 @@ const data = {
|
|||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
] as ExternalLink[],
|
],
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a menu based on the current user's role and permissions
|
||||||
|
* @returns a menu object with the home, settings, and help items
|
||||||
|
*/
|
||||||
|
function createMenuForAuthUser(opts: {
|
||||||
|
auth?: AuthQueryOutput;
|
||||||
|
user?: UserQueryOutput;
|
||||||
|
isCloud: boolean;
|
||||||
|
}): Menu {
|
||||||
|
return {
|
||||||
|
// Filter the home items based on the user's role and permissions
|
||||||
|
// Calls the `isEnabled` function if it exists to determine if the item should be displayed
|
||||||
|
home: MENU.home.filter((item) =>
|
||||||
|
!item.isEnabled
|
||||||
|
? true
|
||||||
|
: item.isEnabled({
|
||||||
|
auth: opts.auth,
|
||||||
|
user: opts.user,
|
||||||
|
isCloud: opts.isCloud,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
// Filter the settings items based on the user's role and permissions
|
||||||
|
// Calls the `isEnabled` function if it exists to determine if the item should be displayed
|
||||||
|
settings: MENU.settings.filter((item) =>
|
||||||
|
!item.isEnabled
|
||||||
|
? true
|
||||||
|
: item.isEnabled({
|
||||||
|
auth: opts.auth,
|
||||||
|
user: opts.user,
|
||||||
|
isCloud: opts.isCloud,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
// Filter the help items based on the user's role and permissions
|
||||||
|
// Calls the `isEnabled` function if it exists to determine if the item should be displayed
|
||||||
|
help: MENU.help.filter((item) =>
|
||||||
|
!item.isEnabled
|
||||||
|
? true
|
||||||
|
: item.isEnabled({
|
||||||
|
auth: opts.auth,
|
||||||
|
user: opts.user,
|
||||||
|
isCloud: opts.isCloud,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if an item url is active based on the current pathname
|
||||||
|
* @returns true if the item url is active, false otherwise
|
||||||
|
*/
|
||||||
|
function isActiveRoute(opts: {
|
||||||
|
/** The url of the item. Usually obtained from `item.url` */
|
||||||
|
itemUrl: string;
|
||||||
|
/** The current pathname. Usually obtained from `usePathname()` */
|
||||||
|
pathname: string;
|
||||||
|
}): boolean {
|
||||||
|
const normalizedItemUrl = opts.itemUrl?.replace("/projects", "/project");
|
||||||
|
const normalizedPathname = opts.pathname?.replace("/projects", "/project");
|
||||||
|
|
||||||
|
if (!normalizedPathname) return false;
|
||||||
|
|
||||||
|
if (normalizedPathname === normalizedItemUrl) return true;
|
||||||
|
|
||||||
|
if (normalizedPathname.startsWith(normalizedItemUrl)) {
|
||||||
|
const nextChar = normalizedPathname.charAt(normalizedItemUrl.length);
|
||||||
|
return nextChar === "/";
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds the active nav item based on the current pathname
|
||||||
|
* @returns the active nav item with `SingleNavItem` type or undefined if none is active
|
||||||
|
*/
|
||||||
|
function findActiveNavItem(
|
||||||
|
navItems: NavItem[],
|
||||||
|
pathname: string,
|
||||||
|
): SingleNavItem | undefined {
|
||||||
|
const found = navItems.find((item) =>
|
||||||
|
item.isSingle !== false
|
||||||
|
? // The current item is single, so check if the item url is active
|
||||||
|
isActiveRoute({ itemUrl: item.url, pathname })
|
||||||
|
: // The current item is not single, so check if any of the sub items are active
|
||||||
|
item.items.some((item) =>
|
||||||
|
isActiveRoute({ itemUrl: item.url, pathname }),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (found?.isSingle !== false) {
|
||||||
|
// The found item is single, so return it
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The found item is not single, so find the active sub item
|
||||||
|
return found?.items.find((item) =>
|
||||||
|
isActiveRoute({ itemUrl: item.url, pathname }),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
@@ -392,70 +537,27 @@ export default function Page({ children }: Props) {
|
|||||||
authId: auth?.id || "",
|
authId: auth?.id || "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: !!auth?.id && auth?.rol === "user",
|
enabled: !!auth?.id && auth?.role === "member",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const includesProjects = pathname?.includes("/dashboard/project");
|
const includesProjects = pathname?.includes("/dashboard/project");
|
||||||
const { data: isCloud, isLoading } = api.settings.isCloud.useQuery();
|
const { data: isCloud, isLoading } = api.settings.isCloud.useQuery();
|
||||||
const isActiveRoute = (itemUrl: string) => {
|
|
||||||
const normalizedItemUrl = itemUrl?.replace("/projects", "/project");
|
|
||||||
const normalizedPathname = pathname?.replace("/projects", "/project");
|
|
||||||
|
|
||||||
if (!normalizedPathname) return false;
|
const {
|
||||||
|
home: filteredHome,
|
||||||
|
settings: filteredSettings,
|
||||||
|
help,
|
||||||
|
} = createMenuForAuthUser({ auth, user, isCloud: !!isCloud });
|
||||||
|
|
||||||
if (normalizedPathname === normalizedItemUrl) return true;
|
const activeItem = findActiveNavItem(
|
||||||
|
[...filteredHome, ...filteredSettings],
|
||||||
|
pathname,
|
||||||
|
);
|
||||||
|
|
||||||
if (normalizedPathname.startsWith(normalizedItemUrl)) {
|
// const showProjectsButton =
|
||||||
const nextChar = normalizedPathname.charAt(normalizedItemUrl.length);
|
// currentPath === "/dashboard/projects" &&
|
||||||
return nextChar === "/";
|
// (auth?.rol === "owner" || user?.canCreateProjects);
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
let filteredHome = isCloud
|
|
||||||
? data.home.filter(
|
|
||||||
(item) =>
|
|
||||||
![
|
|
||||||
"/dashboard/monitoring",
|
|
||||||
"/dashboard/traefik",
|
|
||||||
"/dashboard/docker",
|
|
||||||
"/dashboard/swarm",
|
|
||||||
"/dashboard/requests",
|
|
||||||
].includes(item.url),
|
|
||||||
)
|
|
||||||
: data.home;
|
|
||||||
|
|
||||||
let filteredSettings = isCloud
|
|
||||||
? data.settings.filter(
|
|
||||||
(item) =>
|
|
||||||
![
|
|
||||||
"/dashboard/settings/server",
|
|
||||||
"/dashboard/settings/cluster",
|
|
||||||
].includes(item.url),
|
|
||||||
)
|
|
||||||
: data.settings.filter(
|
|
||||||
(item) => !["/dashboard/settings/billing"].includes(item.url),
|
|
||||||
);
|
|
||||||
|
|
||||||
filteredHome = filteredHome.map((item) => ({
|
|
||||||
...item,
|
|
||||||
isActive: isActiveRoute(item.url),
|
|
||||||
}));
|
|
||||||
|
|
||||||
filteredSettings = filteredSettings.map((item) => ({
|
|
||||||
...item,
|
|
||||||
isActive: isActiveRoute(item.url),
|
|
||||||
}));
|
|
||||||
|
|
||||||
const activeItem =
|
|
||||||
filteredHome.find((item) => item.isActive) ||
|
|
||||||
filteredSettings.find((item) => item.isActive);
|
|
||||||
|
|
||||||
const showProjectsButton =
|
|
||||||
currentPath === "/dashboard/projects" &&
|
|
||||||
(auth?.rol === "admin" || user?.canCreateProjects);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SidebarProvider
|
<SidebarProvider
|
||||||
@@ -486,173 +588,185 @@ export default function Page({ children }: Props) {
|
|||||||
<SidebarGroup>
|
<SidebarGroup>
|
||||||
<SidebarGroupLabel>Home</SidebarGroupLabel>
|
<SidebarGroupLabel>Home</SidebarGroupLabel>
|
||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
{filteredHome.map((item) => (
|
{filteredHome.map((item) => {
|
||||||
<Collapsible
|
const isSingle = item.isSingle !== false;
|
||||||
key={item.title}
|
const isActive = isSingle
|
||||||
asChild
|
? isActiveRoute({ itemUrl: item.url, pathname })
|
||||||
defaultOpen={item.isActive}
|
: item.items.some((item) =>
|
||||||
className="group/collapsible"
|
isActiveRoute({ itemUrl: item.url, pathname }),
|
||||||
>
|
);
|
||||||
<SidebarMenuItem>
|
|
||||||
{item.isSingle ? (
|
|
||||||
<SidebarMenuButton
|
|
||||||
asChild
|
|
||||||
tooltip={item.title}
|
|
||||||
className={cn(isActiveRoute(item.url) && "bg-border")}
|
|
||||||
>
|
|
||||||
<Link
|
|
||||||
href={item.url}
|
|
||||||
className="flex w-full items-center gap-2"
|
|
||||||
>
|
|
||||||
<item.icon
|
|
||||||
className={cn(
|
|
||||||
isActiveRoute(item.url) && "text-primary",
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<span>{item.title}</span>
|
|
||||||
</Link>
|
|
||||||
</SidebarMenuButton>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<CollapsibleTrigger asChild>
|
|
||||||
<SidebarMenuButton
|
|
||||||
tooltip={item.title}
|
|
||||||
isActive={item.isActive}
|
|
||||||
>
|
|
||||||
{item.icon && <item.icon />}
|
|
||||||
|
|
||||||
<span>{item.title}</span>
|
return (
|
||||||
{item.items?.length && (
|
<Collapsible
|
||||||
<ChevronRight className="ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" />
|
key={item.title}
|
||||||
|
asChild
|
||||||
|
defaultOpen={isActive}
|
||||||
|
className="group/collapsible"
|
||||||
|
>
|
||||||
|
<SidebarMenuItem>
|
||||||
|
{isSingle ? (
|
||||||
|
<SidebarMenuButton
|
||||||
|
asChild
|
||||||
|
tooltip={item.title}
|
||||||
|
className={cn(isActive && "bg-border")}
|
||||||
|
>
|
||||||
|
<Link
|
||||||
|
href={item.url}
|
||||||
|
className="flex w-full items-center gap-2"
|
||||||
|
>
|
||||||
|
{item.icon && (
|
||||||
|
<item.icon
|
||||||
|
className={cn(isActive && "text-primary")}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</SidebarMenuButton>
|
<span>{item.title}</span>
|
||||||
</CollapsibleTrigger>
|
</Link>
|
||||||
<CollapsibleContent>
|
</SidebarMenuButton>
|
||||||
<SidebarMenuSub>
|
) : (
|
||||||
{item.items?.map((subItem) => (
|
<>
|
||||||
<SidebarMenuSubItem key={subItem.title}>
|
<CollapsibleTrigger asChild>
|
||||||
<SidebarMenuSubButton
|
<SidebarMenuButton
|
||||||
asChild
|
tooltip={item.title}
|
||||||
className={cn(
|
isActive={isActive}
|
||||||
isActiveRoute(subItem.url) && "bg-border",
|
>
|
||||||
)}
|
{item.icon && <item.icon />}
|
||||||
>
|
|
||||||
<Link
|
<span>{item.title}</span>
|
||||||
href={subItem.url}
|
{item.items?.length && (
|
||||||
className="flex w-full items-center"
|
<ChevronRight className="ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" />
|
||||||
|
)}
|
||||||
|
</SidebarMenuButton>
|
||||||
|
</CollapsibleTrigger>
|
||||||
|
<CollapsibleContent>
|
||||||
|
<SidebarMenuSub>
|
||||||
|
{item.items?.map((subItem) => (
|
||||||
|
<SidebarMenuSubItem key={subItem.title}>
|
||||||
|
<SidebarMenuSubButton
|
||||||
|
asChild
|
||||||
|
className={cn(isActive && "bg-border")}
|
||||||
>
|
>
|
||||||
{subItem.icon && (
|
<Link
|
||||||
<span className="mr-2">
|
href={subItem.url}
|
||||||
<subItem.icon
|
className="flex w-full items-center"
|
||||||
className={cn(
|
>
|
||||||
"h-4 w-4 text-muted-foreground",
|
{subItem.icon && (
|
||||||
isActiveRoute(subItem.url) &&
|
<span className="mr-2">
|
||||||
"text-primary",
|
<subItem.icon
|
||||||
)}
|
className={cn(
|
||||||
/>
|
"h-4 w-4 text-muted-foreground",
|
||||||
</span>
|
isActive && "text-primary",
|
||||||
)}
|
)}
|
||||||
<span>{subItem.title}</span>
|
/>
|
||||||
</Link>
|
</span>
|
||||||
</SidebarMenuSubButton>
|
)}
|
||||||
</SidebarMenuSubItem>
|
<span>{subItem.title}</span>
|
||||||
))}
|
</Link>
|
||||||
</SidebarMenuSub>
|
</SidebarMenuSubButton>
|
||||||
</CollapsibleContent>
|
</SidebarMenuSubItem>
|
||||||
</>
|
))}
|
||||||
)}
|
</SidebarMenuSub>
|
||||||
</SidebarMenuItem>
|
</CollapsibleContent>
|
||||||
</Collapsible>
|
</>
|
||||||
))}
|
)}
|
||||||
|
</SidebarMenuItem>
|
||||||
|
</Collapsible>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
</SidebarGroup>
|
</SidebarGroup>
|
||||||
<SidebarGroup>
|
<SidebarGroup>
|
||||||
<SidebarGroupLabel>Settings</SidebarGroupLabel>
|
<SidebarGroupLabel>Settings</SidebarGroupLabel>
|
||||||
<SidebarMenu className="gap-2">
|
<SidebarMenu className="gap-2">
|
||||||
{filteredSettings.map((item) => (
|
{filteredSettings.map((item) => {
|
||||||
<Collapsible
|
const isSingle = item.isSingle !== false;
|
||||||
key={item.title}
|
const isActive = isSingle
|
||||||
asChild
|
? isActiveRoute({ itemUrl: item.url, pathname })
|
||||||
defaultOpen={item.isActive}
|
: item.items.some((item) =>
|
||||||
className="group/collapsible"
|
isActiveRoute({ itemUrl: item.url, pathname }),
|
||||||
>
|
);
|
||||||
<SidebarMenuItem>
|
|
||||||
{item.isSingle ? (
|
|
||||||
<SidebarMenuButton
|
|
||||||
asChild
|
|
||||||
tooltip={item.title}
|
|
||||||
className={cn(isActiveRoute(item.url) && "bg-border")}
|
|
||||||
>
|
|
||||||
<Link
|
|
||||||
href={item.url}
|
|
||||||
className="flex w-full items-center gap-2"
|
|
||||||
>
|
|
||||||
<item.icon
|
|
||||||
className={cn(
|
|
||||||
isActiveRoute(item.url) && "text-primary",
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<span>{item.title}</span>
|
|
||||||
</Link>
|
|
||||||
</SidebarMenuButton>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<CollapsibleTrigger asChild>
|
|
||||||
<SidebarMenuButton
|
|
||||||
tooltip={item.title}
|
|
||||||
isActive={item.isActive}
|
|
||||||
>
|
|
||||||
{item.icon && <item.icon />}
|
|
||||||
|
|
||||||
<span>{item.title}</span>
|
return (
|
||||||
{item.items?.length && (
|
<Collapsible
|
||||||
<ChevronRight className="ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" />
|
key={item.title}
|
||||||
|
asChild
|
||||||
|
defaultOpen={isActive}
|
||||||
|
className="group/collapsible"
|
||||||
|
>
|
||||||
|
<SidebarMenuItem>
|
||||||
|
{isSingle ? (
|
||||||
|
<SidebarMenuButton
|
||||||
|
asChild
|
||||||
|
tooltip={item.title}
|
||||||
|
className={cn(isActive && "bg-border")}
|
||||||
|
>
|
||||||
|
<Link
|
||||||
|
href={item.url}
|
||||||
|
className="flex w-full items-center gap-2"
|
||||||
|
>
|
||||||
|
{item.icon && (
|
||||||
|
<item.icon
|
||||||
|
className={cn(isActive && "text-primary")}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</SidebarMenuButton>
|
<span>{item.title}</span>
|
||||||
</CollapsibleTrigger>
|
</Link>
|
||||||
<CollapsibleContent>
|
</SidebarMenuButton>
|
||||||
<SidebarMenuSub>
|
) : (
|
||||||
{item.items?.map((subItem) => (
|
<>
|
||||||
<SidebarMenuSubItem key={subItem.title}>
|
<CollapsibleTrigger asChild>
|
||||||
<SidebarMenuSubButton
|
<SidebarMenuButton
|
||||||
asChild
|
tooltip={item.title}
|
||||||
className={cn(
|
isActive={isActive}
|
||||||
isActiveRoute(subItem.url) && "bg-border",
|
>
|
||||||
)}
|
{item.icon && <item.icon />}
|
||||||
>
|
|
||||||
<Link
|
<span>{item.title}</span>
|
||||||
href={subItem.url}
|
{item.items?.length && (
|
||||||
className="flex w-full items-center"
|
<ChevronRight className="ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" />
|
||||||
|
)}
|
||||||
|
</SidebarMenuButton>
|
||||||
|
</CollapsibleTrigger>
|
||||||
|
<CollapsibleContent>
|
||||||
|
<SidebarMenuSub>
|
||||||
|
{item.items?.map((subItem) => (
|
||||||
|
<SidebarMenuSubItem key={subItem.title}>
|
||||||
|
<SidebarMenuSubButton
|
||||||
|
asChild
|
||||||
|
className={cn(isActive && "bg-border")}
|
||||||
>
|
>
|
||||||
{subItem.icon && (
|
<Link
|
||||||
<span className="mr-2">
|
href={subItem.url}
|
||||||
<subItem.icon
|
className="flex w-full items-center"
|
||||||
className={cn(
|
>
|
||||||
"h-4 w-4 text-muted-foreground",
|
{subItem.icon && (
|
||||||
isActiveRoute(subItem.url) &&
|
<span className="mr-2">
|
||||||
"text-primary",
|
<subItem.icon
|
||||||
)}
|
className={cn(
|
||||||
/>
|
"h-4 w-4 text-muted-foreground",
|
||||||
</span>
|
isActive && "text-primary",
|
||||||
)}
|
)}
|
||||||
<span>{subItem.title}</span>
|
/>
|
||||||
</Link>
|
</span>
|
||||||
</SidebarMenuSubButton>
|
)}
|
||||||
</SidebarMenuSubItem>
|
<span>{subItem.title}</span>
|
||||||
))}
|
</Link>
|
||||||
</SidebarMenuSub>
|
</SidebarMenuSubButton>
|
||||||
</CollapsibleContent>
|
</SidebarMenuSubItem>
|
||||||
</>
|
))}
|
||||||
)}
|
</SidebarMenuSub>
|
||||||
</SidebarMenuItem>
|
</CollapsibleContent>
|
||||||
</Collapsible>
|
</>
|
||||||
))}
|
)}
|
||||||
|
</SidebarMenuItem>
|
||||||
|
</Collapsible>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
</SidebarGroup>
|
</SidebarGroup>
|
||||||
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
|
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
|
||||||
<SidebarGroupLabel>Extra</SidebarGroupLabel>
|
<SidebarGroupLabel>Extra</SidebarGroupLabel>
|
||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
{data.help.map((item: ExternalLink) => (
|
{help.map((item: ExternalLink) => (
|
||||||
<SidebarMenuItem key={item.name}>
|
<SidebarMenuItem key={item.name}>
|
||||||
<SidebarMenuButton asChild>
|
<SidebarMenuButton asChild>
|
||||||
<a
|
<a
|
||||||
@@ -669,7 +783,7 @@ export default function Page({ children }: Props) {
|
|||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</SidebarMenuItem>
|
</SidebarMenuItem>
|
||||||
))}
|
))}
|
||||||
{!isCloud && (
|
{!isCloud && auth?.role === "owner" && (
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton asChild>
|
<SidebarMenuButton asChild>
|
||||||
<UpdateServerButton />
|
<UpdateServerButton />
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
SelectValue,
|
SelectValue,
|
||||||
} from "@/components/ui/select";
|
} from "@/components/ui/select";
|
||||||
|
import { authClient } from "@/lib/auth";
|
||||||
import { Languages } from "@/lib/languages";
|
import { Languages } from "@/lib/languages";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import useLocale from "@/utils/hooks/use-locale";
|
import useLocale from "@/utils/hooks/use-locale";
|
||||||
@@ -36,11 +37,11 @@ export const UserNav = () => {
|
|||||||
authId: data?.id || "",
|
authId: data?.id || "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: !!data?.id && data?.rol === "user",
|
enabled: !!data?.id && data?.role === "member",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
const { locale, setLocale } = useLocale();
|
const { locale, setLocale } = useLocale();
|
||||||
const { mutateAsync } = api.auth.logout.useMutation();
|
// const { mutateAsync } = api.auth.logout.useMutation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
@@ -50,12 +51,15 @@ export const UserNav = () => {
|
|||||||
className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
|
className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
|
||||||
>
|
>
|
||||||
<Avatar className="h-8 w-8 rounded-lg">
|
<Avatar className="h-8 w-8 rounded-lg">
|
||||||
<AvatarImage src={data?.image || ""} alt={data?.image || ""} />
|
<AvatarImage
|
||||||
|
src={data?.user?.image || ""}
|
||||||
|
alt={data?.user?.image || ""}
|
||||||
|
/>
|
||||||
<AvatarFallback className="rounded-lg">CN</AvatarFallback>
|
<AvatarFallback className="rounded-lg">CN</AvatarFallback>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
<div className="grid flex-1 text-left text-sm leading-tight">
|
<div className="grid flex-1 text-left text-sm leading-tight">
|
||||||
<span className="truncate font-semibold">Account</span>
|
<span className="truncate font-semibold">Account</span>
|
||||||
<span className="truncate text-xs">{data?.email}</span>
|
<span className="truncate text-xs">{data?.user?.email}</span>
|
||||||
</div>
|
</div>
|
||||||
<ChevronsUpDown className="ml-auto size-4" />
|
<ChevronsUpDown className="ml-auto size-4" />
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
@@ -70,7 +74,7 @@ export const UserNav = () => {
|
|||||||
<DropdownMenuLabel className="flex flex-col">
|
<DropdownMenuLabel className="flex flex-col">
|
||||||
My Account
|
My Account
|
||||||
<span className="text-xs font-normal text-muted-foreground">
|
<span className="text-xs font-normal text-muted-foreground">
|
||||||
{data?.email}
|
{data?.user?.email}
|
||||||
</span>
|
</span>
|
||||||
</DropdownMenuLabel>
|
</DropdownMenuLabel>
|
||||||
<ModeToggle />
|
<ModeToggle />
|
||||||
@@ -95,7 +99,7 @@ export const UserNav = () => {
|
|||||||
>
|
>
|
||||||
Monitoring
|
Monitoring
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
{(data?.rol === "admin" || user?.canAccessToTraefikFiles) && (
|
{(data?.role === "owner" || user?.canAccessToTraefikFiles) && (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -105,7 +109,7 @@ export const UserNav = () => {
|
|||||||
Traefik
|
Traefik
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
)}
|
)}
|
||||||
{(data?.rol === "admin" || user?.canAccessToDocker) && (
|
{(data?.role === "owner" || user?.canAccessToDocker) && (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -118,7 +122,7 @@ export const UserNav = () => {
|
|||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{data?.rol === "admin" && (
|
{data?.role === "owner" && (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -139,7 +143,7 @@ export const UserNav = () => {
|
|||||||
>
|
>
|
||||||
Profile
|
Profile
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
{data?.rol === "admin" && (
|
{data?.role === "owner" && (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -149,10 +153,21 @@ export const UserNav = () => {
|
|||||||
Servers
|
Servers
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{data?.role === "owner" && (
|
||||||
|
<DropdownMenuItem
|
||||||
|
className="cursor-pointer"
|
||||||
|
onClick={() => {
|
||||||
|
router.push("/dashboard/settings");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Settings
|
||||||
|
</DropdownMenuItem>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</DropdownMenuGroup>
|
</DropdownMenuGroup>
|
||||||
{isCloud && data?.rol === "admin" && (
|
{isCloud && data?.role === "owner" && (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -167,9 +182,12 @@ export const UserNav = () => {
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await mutateAsync().then(() => {
|
await authClient.signOut().then(() => {
|
||||||
router.push("/");
|
router.push("/");
|
||||||
});
|
});
|
||||||
|
// await mutateAsync().then(() => {
|
||||||
|
// router.push("/");
|
||||||
|
// });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Log out
|
Log out
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ ChartContainer.displayName = "Chart";
|
|||||||
|
|
||||||
const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
|
const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
|
||||||
const colorConfig = Object.entries(config).filter(
|
const colorConfig = Object.entries(config).filter(
|
||||||
([_, config]) => config.theme || config.color,
|
([, config]) => config.theme || config.color,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!colorConfig.length) {
|
if (!colorConfig.length) {
|
||||||
|
|||||||
1
apps/dokploy/drizzle/0058_brown_sharon_carter.sql
Normal file
1
apps/dokploy/drizzle/0058_brown_sharon_carter.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "deployment" ADD COLUMN "errorMessage" text;
|
||||||
1
apps/dokploy/drizzle/0059_striped_bill_hollister.sql
Normal file
1
apps/dokploy/drizzle/0059_striped_bill_hollister.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "admin" ALTER COLUMN "cleanupCacheApplications" SET DEFAULT false;
|
||||||
3
apps/dokploy/drizzle/0060_disable-aggressive-cache.sql
Normal file
3
apps/dokploy/drizzle/0060_disable-aggressive-cache.sql
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
-- Custom SQL migration file, put you code below!
|
||||||
|
|
||||||
|
UPDATE "admin" SET "cleanupCacheApplications" = false;
|
||||||
4
apps/dokploy/drizzle/0061_many_molten_man.sql
Normal file
4
apps/dokploy/drizzle/0061_many_molten_man.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE "admin" ADD COLUMN "enablePaidFeatures" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "admin" ADD COLUMN "metricsConfig" jsonb DEFAULT '{"server":{"refreshRate":20,"port":4500,"token":"","retentionDays":2,"cronJob":"","urlCallback":"","thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":20,"services":{"include":[],"exclude":[]}}}'::jsonb NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "notification" ADD COLUMN "serverThreshold" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "server" ADD COLUMN "metricsConfig" jsonb DEFAULT '{"server":{"refreshRate":20,"port":4500,"token":"","urlCallback":"","cronJob":"","retentionDays":2,"thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":20,"services":{"include":[],"exclude":[]}}}'::jsonb NOT NULL;
|
||||||
2
apps/dokploy/drizzle/0062_slippery_white_tiger.sql
Normal file
2
apps/dokploy/drizzle/0062_slippery_white_tiger.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE "admin" ALTER COLUMN "metricsConfig" SET DEFAULT '{"server":{"type":"Dokploy","refreshRate":20,"port":4500,"token":"","retentionDays":2,"cronJob":"","urlCallback":"","thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":20,"services":{"include":[],"exclude":[]}}}'::jsonb;--> statement-breakpoint
|
||||||
|
ALTER TABLE "server" ALTER COLUMN "metricsConfig" SET DEFAULT '{"server":{"type":"Remote","refreshRate":20,"port":4500,"token":"","urlCallback":"","cronJob":"","retentionDays":2,"thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":20,"services":{"include":[],"exclude":[]}}}'::jsonb;
|
||||||
2
apps/dokploy/drizzle/0063_panoramic_dreadnoughts.sql
Normal file
2
apps/dokploy/drizzle/0063_panoramic_dreadnoughts.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE "admin" ALTER COLUMN "metricsConfig" SET DEFAULT '{"server":{"type":"Dokploy","refreshRate":60,"port":4500,"token":"","retentionDays":2,"cronJob":"","urlCallback":"","thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":60,"services":{"include":[],"exclude":[]}}}'::jsonb;--> statement-breakpoint
|
||||||
|
ALTER TABLE "server" ALTER COLUMN "metricsConfig" SET DEFAULT '{"server":{"type":"Remote","refreshRate":60,"port":4500,"token":"","urlCallback":"","cronJob":"","retentionDays":2,"thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":60,"services":{"include":[],"exclude":[]}}}'::jsonb;
|
||||||
1
apps/dokploy/drizzle/0064_previous_agent_brand.sql
Normal file
1
apps/dokploy/drizzle/0064_previous_agent_brand.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "compose" ADD COLUMN "deployable" boolean DEFAULT false NOT NULL;
|
||||||
1
apps/dokploy/drizzle/0065_daily_zaladane.sql
Normal file
1
apps/dokploy/drizzle/0065_daily_zaladane.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "compose" RENAME COLUMN "deployable" TO "isolatedDeployment";
|
||||||
127
apps/dokploy/drizzle/0066_yielding_echo.sql
Normal file
127
apps/dokploy/drizzle/0066_yielding_echo.sql
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
CREATE TABLE "user_temp" (
|
||||||
|
"id" text PRIMARY KEY NOT NULL,
|
||||||
|
"name" text DEFAULT '' NOT NULL,
|
||||||
|
"token" text NOT NULL,
|
||||||
|
"isRegistered" boolean DEFAULT false NOT NULL,
|
||||||
|
"expirationDate" text NOT NULL,
|
||||||
|
"createdAt" text NOT NULL,
|
||||||
|
"canCreateProjects" boolean DEFAULT false NOT NULL,
|
||||||
|
"canAccessToSSHKeys" boolean DEFAULT false NOT NULL,
|
||||||
|
"canCreateServices" boolean DEFAULT false NOT NULL,
|
||||||
|
"canDeleteProjects" boolean DEFAULT false NOT NULL,
|
||||||
|
"canDeleteServices" boolean DEFAULT false NOT NULL,
|
||||||
|
"canAccessToDocker" boolean DEFAULT false NOT NULL,
|
||||||
|
"canAccessToAPI" boolean DEFAULT false NOT NULL,
|
||||||
|
"canAccessToGitProviders" boolean DEFAULT false NOT NULL,
|
||||||
|
"canAccessToTraefikFiles" boolean DEFAULT false NOT NULL,
|
||||||
|
"accesedProjects" text[] DEFAULT ARRAY[]::text[] NOT NULL,
|
||||||
|
"accesedServices" text[] DEFAULT ARRAY[]::text[] NOT NULL,
|
||||||
|
"email" text NOT NULL,
|
||||||
|
"email_verified" boolean NOT NULL,
|
||||||
|
"image" text,
|
||||||
|
"banned" boolean,
|
||||||
|
"ban_reason" text,
|
||||||
|
"ban_expires" timestamp,
|
||||||
|
"updated_at" timestamp NOT NULL,
|
||||||
|
"serverIp" text,
|
||||||
|
"certificateType" "certificateType" DEFAULT 'none' NOT NULL,
|
||||||
|
"host" text,
|
||||||
|
"letsEncryptEmail" text,
|
||||||
|
"sshPrivateKey" text,
|
||||||
|
"enableDockerCleanup" boolean DEFAULT false NOT NULL,
|
||||||
|
"enableLogRotation" boolean DEFAULT false NOT NULL,
|
||||||
|
"enablePaidFeatures" boolean DEFAULT false NOT NULL,
|
||||||
|
"metricsConfig" jsonb DEFAULT '{"server":{"type":"Dokploy","refreshRate":60,"port":4500,"token":"","retentionDays":2,"cronJob":"","urlCallback":"","thresholds":{"cpu":0,"memory":0}},"containers":{"refreshRate":60,"services":{"include":[],"exclude":[]}}}'::jsonb NOT NULL,
|
||||||
|
"cleanupCacheApplications" boolean DEFAULT false NOT NULL,
|
||||||
|
"cleanupCacheOnPreviews" boolean DEFAULT false NOT NULL,
|
||||||
|
"cleanupCacheOnCompose" boolean DEFAULT false NOT NULL,
|
||||||
|
"stripeCustomerId" text,
|
||||||
|
"stripeSubscriptionId" text,
|
||||||
|
"serversQuantity" integer DEFAULT 0 NOT NULL,
|
||||||
|
CONSTRAINT "user_temp_email_unique" UNIQUE("email")
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE "session_temp" (
|
||||||
|
"id" text PRIMARY KEY NOT NULL,
|
||||||
|
"expires_at" timestamp NOT NULL,
|
||||||
|
"token" text NOT NULL,
|
||||||
|
"created_at" timestamp NOT NULL,
|
||||||
|
"updated_at" timestamp NOT NULL,
|
||||||
|
"ip_address" text,
|
||||||
|
"user_agent" text,
|
||||||
|
"user_id" text NOT NULL,
|
||||||
|
"impersonated_by" text,
|
||||||
|
"active_organization_id" text,
|
||||||
|
CONSTRAINT "session_temp_token_unique" UNIQUE("token")
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE "account" (
|
||||||
|
"id" text PRIMARY KEY NOT NULL,
|
||||||
|
"account_id" text NOT NULL,
|
||||||
|
"provider_id" text NOT NULL,
|
||||||
|
"user_id" text NOT NULL,
|
||||||
|
"access_token" text,
|
||||||
|
"refresh_token" text,
|
||||||
|
"id_token" text,
|
||||||
|
"access_token_expires_at" timestamp,
|
||||||
|
"refresh_token_expires_at" timestamp,
|
||||||
|
"scope" text,
|
||||||
|
"password" text,
|
||||||
|
"is2FAEnabled" boolean DEFAULT false NOT NULL,
|
||||||
|
"created_at" timestamp NOT NULL,
|
||||||
|
"updated_at" timestamp NOT NULL,
|
||||||
|
"resetPasswordToken" text,
|
||||||
|
"resetPasswordExpiresAt" text,
|
||||||
|
"confirmationToken" text,
|
||||||
|
"confirmationExpiresAt" text
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE "invitation" (
|
||||||
|
"id" text PRIMARY KEY NOT NULL,
|
||||||
|
"organization_id" text NOT NULL,
|
||||||
|
"email" text NOT NULL,
|
||||||
|
"role" text,
|
||||||
|
"status" text NOT NULL,
|
||||||
|
"expires_at" timestamp NOT NULL,
|
||||||
|
"inviter_id" text NOT NULL
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE "member" (
|
||||||
|
"id" text PRIMARY KEY NOT NULL,
|
||||||
|
"organization_id" text NOT NULL,
|
||||||
|
"user_id" text NOT NULL,
|
||||||
|
"role" text NOT NULL,
|
||||||
|
"created_at" timestamp NOT NULL
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE "organization" (
|
||||||
|
"id" text PRIMARY KEY NOT NULL,
|
||||||
|
"name" text NOT NULL,
|
||||||
|
"slug" text,
|
||||||
|
"logo" text,
|
||||||
|
"created_at" timestamp NOT NULL,
|
||||||
|
"metadata" text,
|
||||||
|
"owner_id" text NOT NULL,
|
||||||
|
CONSTRAINT "organization_slug_unique" UNIQUE("slug")
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
CREATE TABLE "verification" (
|
||||||
|
"id" text PRIMARY KEY NOT NULL,
|
||||||
|
"identifier" text NOT NULL,
|
||||||
|
"value" text NOT NULL,
|
||||||
|
"expires_at" timestamp NOT NULL,
|
||||||
|
"created_at" timestamp,
|
||||||
|
"updated_at" timestamp
|
||||||
|
);
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "certificate" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "notification" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "ssh-key" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "git_provider" ALTER COLUMN "adminId" SET NOT NULL;--> statement-breakpoint
|
||||||
|
ALTER TABLE "session_temp" ADD CONSTRAINT "session_temp_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "account" ADD CONSTRAINT "account_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "invitation" ADD CONSTRAINT "invitation_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "invitation" ADD CONSTRAINT "invitation_inviter_id_user_temp_id_fk" FOREIGN KEY ("inviter_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "member" ADD CONSTRAINT "member_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "member" ADD CONSTRAINT "member_user_id_user_temp_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "organization" ADD CONSTRAINT "organization_owner_id_user_temp_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."user_temp"("id") ON DELETE no action ON UPDATE no action;
|
||||||
211
apps/dokploy/drizzle/0067_migrate-data.sql
Normal file
211
apps/dokploy/drizzle/0067_migrate-data.sql
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
-- Custom SQL migration file, put your code below! --
|
||||||
|
|
||||||
|
WITH inserted_users AS (
|
||||||
|
-- Insertar usuarios desde admins
|
||||||
|
INSERT INTO user_temp (
|
||||||
|
id,
|
||||||
|
email,
|
||||||
|
token,
|
||||||
|
"email_verified",
|
||||||
|
"updated_at",
|
||||||
|
"serverIp",
|
||||||
|
image,
|
||||||
|
"certificateType",
|
||||||
|
host,
|
||||||
|
"letsEncryptEmail",
|
||||||
|
"sshPrivateKey",
|
||||||
|
"enableDockerCleanup",
|
||||||
|
"enableLogRotation",
|
||||||
|
"enablePaidFeatures",
|
||||||
|
"metricsConfig",
|
||||||
|
"cleanupCacheApplications",
|
||||||
|
"cleanupCacheOnPreviews",
|
||||||
|
"cleanupCacheOnCompose",
|
||||||
|
"stripeCustomerId",
|
||||||
|
"stripeSubscriptionId",
|
||||||
|
"serversQuantity",
|
||||||
|
"expirationDate",
|
||||||
|
"createdAt"
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
a."adminId",
|
||||||
|
auth.email,
|
||||||
|
COALESCE(auth.token, ''),
|
||||||
|
true,
|
||||||
|
CURRENT_TIMESTAMP,
|
||||||
|
a."serverIp",
|
||||||
|
auth.image,
|
||||||
|
a."certificateType",
|
||||||
|
a.host,
|
||||||
|
a."letsEncryptEmail",
|
||||||
|
a."sshPrivateKey",
|
||||||
|
a."enableDockerCleanup",
|
||||||
|
a."enableLogRotation",
|
||||||
|
a."enablePaidFeatures",
|
||||||
|
a."metricsConfig",
|
||||||
|
a."cleanupCacheApplications",
|
||||||
|
a."cleanupCacheOnPreviews",
|
||||||
|
a."cleanupCacheOnCompose",
|
||||||
|
a."stripeCustomerId",
|
||||||
|
a."stripeSubscriptionId",
|
||||||
|
a."serversQuantity",
|
||||||
|
NOW() + INTERVAL '1 year',
|
||||||
|
NOW()
|
||||||
|
FROM admin a
|
||||||
|
JOIN auth ON auth.id = a."authId"
|
||||||
|
RETURNING *
|
||||||
|
),
|
||||||
|
inserted_accounts AS (
|
||||||
|
-- Insertar cuentas para los admins
|
||||||
|
INSERT INTO account (
|
||||||
|
id,
|
||||||
|
"account_id",
|
||||||
|
"provider_id",
|
||||||
|
"user_id",
|
||||||
|
password,
|
||||||
|
"is2FAEnabled",
|
||||||
|
"created_at",
|
||||||
|
"updated_at"
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
gen_random_uuid(),
|
||||||
|
gen_random_uuid(),
|
||||||
|
'credential',
|
||||||
|
a."adminId",
|
||||||
|
auth.password,
|
||||||
|
COALESCE(auth."is2FAEnabled", false),
|
||||||
|
NOW(),
|
||||||
|
NOW()
|
||||||
|
FROM admin a
|
||||||
|
JOIN auth ON auth.id = a."authId"
|
||||||
|
RETURNING *
|
||||||
|
),
|
||||||
|
inserted_orgs AS (
|
||||||
|
-- Crear organizaciones para cada admin
|
||||||
|
INSERT INTO organization (
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
slug,
|
||||||
|
"owner_id",
|
||||||
|
"created_at"
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
gen_random_uuid(),
|
||||||
|
'My Organization',
|
||||||
|
-- Generamos un slug único usando una función de hash
|
||||||
|
encode(sha256((a."adminId" || CURRENT_TIMESTAMP)::bytea), 'hex'),
|
||||||
|
a."adminId",
|
||||||
|
NOW()
|
||||||
|
FROM admin a
|
||||||
|
RETURNING *
|
||||||
|
),
|
||||||
|
inserted_members AS (
|
||||||
|
-- Insertar usuarios miembros
|
||||||
|
INSERT INTO user_temp (
|
||||||
|
id,
|
||||||
|
email,
|
||||||
|
token,
|
||||||
|
"email_verified",
|
||||||
|
"updated_at",
|
||||||
|
image,
|
||||||
|
"createdAt",
|
||||||
|
"canAccessToAPI",
|
||||||
|
"canAccessToDocker",
|
||||||
|
"canAccessToGitProviders",
|
||||||
|
"canAccessToSSHKeys",
|
||||||
|
"canAccessToTraefikFiles",
|
||||||
|
"canCreateProjects",
|
||||||
|
"canCreateServices",
|
||||||
|
"canDeleteProjects",
|
||||||
|
"canDeleteServices",
|
||||||
|
"accesedProjects",
|
||||||
|
"accesedServices",
|
||||||
|
"expirationDate"
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
u."userId",
|
||||||
|
auth.email,
|
||||||
|
COALESCE(u.token, ''),
|
||||||
|
true,
|
||||||
|
CURRENT_TIMESTAMP,
|
||||||
|
auth.image,
|
||||||
|
NOW(),
|
||||||
|
COALESCE(u."canAccessToAPI", false),
|
||||||
|
COALESCE(u."canAccessToDocker", false),
|
||||||
|
COALESCE(u."canAccessToGitProviders", false),
|
||||||
|
COALESCE(u."canAccessToSSHKeys", false),
|
||||||
|
COALESCE(u."canAccessToTraefikFiles", false),
|
||||||
|
COALESCE(u."canCreateProjects", false),
|
||||||
|
COALESCE(u."canCreateServices", false),
|
||||||
|
COALESCE(u."canDeleteProjects", false),
|
||||||
|
COALESCE(u."canDeleteServices", false),
|
||||||
|
COALESCE(u."accesedProjects", '{}'),
|
||||||
|
COALESCE(u."accesedServices", '{}'),
|
||||||
|
NOW() + INTERVAL '1 year'
|
||||||
|
FROM "user" u
|
||||||
|
JOIN admin a ON u."adminId" = a."adminId"
|
||||||
|
JOIN auth ON auth.id = u."authId"
|
||||||
|
RETURNING *
|
||||||
|
),
|
||||||
|
inserted_member_accounts AS (
|
||||||
|
-- Insertar cuentas para los usuarios miembros
|
||||||
|
INSERT INTO account (
|
||||||
|
id,
|
||||||
|
"account_id",
|
||||||
|
"provider_id",
|
||||||
|
"user_id",
|
||||||
|
password,
|
||||||
|
"is2FAEnabled",
|
||||||
|
"created_at",
|
||||||
|
"updated_at"
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
gen_random_uuid(),
|
||||||
|
gen_random_uuid(),
|
||||||
|
'credential',
|
||||||
|
u."userId",
|
||||||
|
auth.password,
|
||||||
|
COALESCE(auth."is2FAEnabled", false),
|
||||||
|
NOW(),
|
||||||
|
NOW()
|
||||||
|
FROM "user" u
|
||||||
|
JOIN admin a ON u."adminId" = a."adminId"
|
||||||
|
JOIN auth ON auth.id = u."authId"
|
||||||
|
RETURNING *
|
||||||
|
),
|
||||||
|
inserted_admin_members AS (
|
||||||
|
-- Insertar miembros en las organizaciones (admins como owners)
|
||||||
|
INSERT INTO member (
|
||||||
|
id,
|
||||||
|
"organization_id",
|
||||||
|
"user_id",
|
||||||
|
role,
|
||||||
|
"created_at"
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
gen_random_uuid(),
|
||||||
|
o.id,
|
||||||
|
a."adminId",
|
||||||
|
'owner',
|
||||||
|
NOW()
|
||||||
|
FROM admin a
|
||||||
|
JOIN inserted_orgs o ON o."owner_id" = a."adminId"
|
||||||
|
RETURNING *
|
||||||
|
)
|
||||||
|
-- Insertar miembros regulares en las organizaciones
|
||||||
|
INSERT INTO member (
|
||||||
|
id,
|
||||||
|
"organization_id",
|
||||||
|
"user_id",
|
||||||
|
role,
|
||||||
|
"created_at"
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
gen_random_uuid(),
|
||||||
|
o.id,
|
||||||
|
u."userId",
|
||||||
|
'member',
|
||||||
|
NOW()
|
||||||
|
FROM "user" u
|
||||||
|
JOIN admin a ON u."adminId" = a."adminId"
|
||||||
|
JOIN inserted_orgs o ON o."owner_id" = a."adminId";
|
||||||
32
apps/dokploy/drizzle/0068_sour_professor_monster.sql
Normal file
32
apps/dokploy/drizzle/0068_sour_professor_monster.sql
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
ALTER TABLE "project" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
|
||||||
|
ALTER TABLE "destination" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
|
||||||
|
ALTER TABLE "certificate" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
|
||||||
|
ALTER TABLE "registry" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
|
||||||
|
ALTER TABLE "notification" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
|
||||||
|
ALTER TABLE "ssh-key" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
|
||||||
|
ALTER TABLE "git_provider" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
|
||||||
|
ALTER TABLE "server" RENAME COLUMN "adminId" TO "userId";--> statement-breakpoint
|
||||||
|
ALTER TABLE "project" DROP CONSTRAINT "project_adminId_admin_adminId_fk";
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "destination" DROP CONSTRAINT "destination_adminId_admin_adminId_fk";
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "certificate" DROP CONSTRAINT "certificate_adminId_admin_adminId_fk";
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "registry" DROP CONSTRAINT "registry_adminId_admin_adminId_fk";
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "notification" DROP CONSTRAINT "notification_adminId_admin_adminId_fk";
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "ssh-key" DROP CONSTRAINT "ssh-key_adminId_admin_adminId_fk";
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "git_provider" DROP CONSTRAINT "git_provider_adminId_admin_adminId_fk";
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "server" DROP CONSTRAINT "server_adminId_admin_adminId_fk";
|
||||||
|
--> statement-breakpoint
|
||||||
|
ALTER TABLE "project" ADD CONSTRAINT "project_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "destination" ADD CONSTRAINT "destination_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "certificate" ADD CONSTRAINT "certificate_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "registry" ADD CONSTRAINT "registry_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "notification" ADD CONSTRAINT "notification_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "ssh-key" ADD CONSTRAINT "ssh-key_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||||
|
ALTER TABLE "server" ADD CONSTRAINT "server_userId_user_temp_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."user_temp"("id") ON DELETE cascade ON UPDATE no action;
|
||||||
2
apps/dokploy/drizzle/0069_broad_ken_ellis.sql
Normal file
2
apps/dokploy/drizzle/0069_broad_ken_ellis.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE "user_temp" ALTER COLUMN "token" SET DEFAULT '';--> statement-breakpoint
|
||||||
|
ALTER TABLE "user_temp" ADD COLUMN "created_at" timestamp DEFAULT now();
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "6",
|
"version": "7",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -252,7 +252,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -393,7 +396,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -522,7 +528,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -638,7 +647,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -692,7 +704,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -746,7 +761,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -828,7 +846,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -975,7 +996,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1110,7 +1134,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1257,7 +1284,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1399,7 +1429,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1471,7 +1504,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1532,7 +1568,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1700,7 +1739,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1754,7 +1796,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1796,7 +1841,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1863,7 +1911,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1926,7 +1977,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -1980,7 +2034,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2109,7 +2166,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2214,5 +2274,9 @@
|
|||||||
"columns": {}
|
"columns": {}
|
||||||
},
|
},
|
||||||
"id": "c6215051-7cd1-412d-b8df-b50d58acacff",
|
"id": "c6215051-7cd1-412d-b8df-b50d58acacff",
|
||||||
"prevId": "00000000-0000-0000-0000-000000000000"
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "6",
|
"version": "7",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -252,7 +252,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -393,7 +396,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -522,7 +528,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -638,7 +647,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -698,7 +710,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -752,7 +767,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -834,7 +852,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -981,7 +1002,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1116,7 +1140,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1263,7 +1290,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1405,7 +1435,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1477,7 +1510,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1538,7 +1574,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1706,7 +1745,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1760,7 +1802,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1802,7 +1847,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1869,7 +1917,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1932,7 +1983,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -1986,7 +2040,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2115,7 +2172,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2220,5 +2280,9 @@
|
|||||||
"columns": {}
|
"columns": {}
|
||||||
},
|
},
|
||||||
"id": "3a4dfad7-ae33-4ae3-b60e-4f40f44f5652",
|
"id": "3a4dfad7-ae33-4ae3-b60e-4f40f44f5652",
|
||||||
"prevId": "c6215051-7cd1-412d-b8df-b50d58acacff"
|
"prevId": "c6215051-7cd1-412d-b8df-b50d58acacff",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "6",
|
"version": "7",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -252,7 +252,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -393,7 +396,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -522,7 +528,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -638,7 +647,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -705,7 +717,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -759,7 +774,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -841,7 +859,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -988,7 +1009,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1123,7 +1147,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1270,7 +1297,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1412,7 +1442,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1484,7 +1517,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1545,7 +1581,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1713,7 +1752,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1767,7 +1809,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1809,7 +1854,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1876,7 +1924,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1939,7 +1990,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -1993,7 +2047,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2122,7 +2179,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2227,5 +2287,9 @@
|
|||||||
"columns": {}
|
"columns": {}
|
||||||
},
|
},
|
||||||
"id": "665483bd-5123-4c2b-beef-bfa9b91b9356",
|
"id": "665483bd-5123-4c2b-beef-bfa9b91b9356",
|
||||||
"prevId": "3a4dfad7-ae33-4ae3-b60e-4f40f44f5652"
|
"prevId": "3a4dfad7-ae33-4ae3-b60e-4f40f44f5652",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "6",
|
"version": "7",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -252,7 +252,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -393,7 +396,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -529,7 +535,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -645,7 +654,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -712,7 +724,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -766,7 +781,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -848,7 +866,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -995,7 +1016,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1130,7 +1154,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1277,7 +1304,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1419,7 +1449,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1491,7 +1524,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1552,7 +1588,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1720,7 +1759,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1774,7 +1816,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1816,7 +1861,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1883,7 +1931,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1946,7 +1997,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -2000,7 +2054,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2129,7 +2186,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2234,5 +2294,9 @@
|
|||||||
"columns": {}
|
"columns": {}
|
||||||
},
|
},
|
||||||
"id": "5a1d3f2b-9c31-4125-9645-015170550b51",
|
"id": "5a1d3f2b-9c31-4125-9645-015170550b51",
|
||||||
"prevId": "665483bd-5123-4c2b-beef-bfa9b91b9356"
|
"prevId": "665483bd-5123-4c2b-beef-bfa9b91b9356",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "6",
|
"version": "7",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -228,7 +228,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -369,7 +372,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -505,7 +511,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -621,7 +630,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -688,7 +700,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -742,7 +757,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -824,7 +842,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -971,7 +992,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1106,7 +1130,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1253,7 +1280,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1395,7 +1425,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1467,7 +1500,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1528,7 +1564,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1696,7 +1735,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1750,7 +1792,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1792,7 +1837,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1859,7 +1907,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1922,7 +1973,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -1976,7 +2030,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2105,7 +2162,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2210,5 +2270,9 @@
|
|||||||
"columns": {}
|
"columns": {}
|
||||||
},
|
},
|
||||||
"id": "7bb4bbcf-791c-4888-919e-f74bc0528b5f",
|
"id": "7bb4bbcf-791c-4888-919e-f74bc0528b5f",
|
||||||
"prevId": "5a1d3f2b-9c31-4125-9645-015170550b51"
|
"prevId": "5a1d3f2b-9c31-4125-9645-015170550b51",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "6",
|
"version": "7",
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -228,7 +228,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -369,7 +372,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -505,7 +511,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -621,7 +630,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -688,7 +700,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -742,7 +757,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -824,7 +842,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -971,7 +992,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1106,7 +1130,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1253,7 +1280,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1395,7 +1425,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1467,7 +1500,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1528,7 +1564,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1696,7 +1735,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1750,7 +1792,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1792,7 +1837,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1859,7 +1907,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1922,7 +1973,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -1976,7 +2030,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2105,7 +2162,10 @@
|
|||||||
],
|
],
|
||||||
"nullsNotDistinct": false
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.registry": {
|
"public.registry": {
|
||||||
"name": "registry",
|
"name": "registry",
|
||||||
@@ -2178,7 +2238,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2291,5 +2354,9 @@
|
|||||||
"columns": {}
|
"columns": {}
|
||||||
},
|
},
|
||||||
"id": "92c75e26-64ef-484f-a7d2-72a9422c119f",
|
"id": "92c75e26-64ef-484f-a7d2-72a9422c119f",
|
||||||
"prevId": "7bb4bbcf-791c-4888-919e-f74bc0528b5f"
|
"prevId": "7bb4bbcf-791c-4888-919e-f74bc0528b5f",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"id": "8ca71247-d512-427d-b115-47a7287ac431",
|
"version": "7",
|
||||||
"prevId": "92c75e26-64ef-484f-a7d2-72a9422c119f",
|
|
||||||
"version": "6",
|
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -219,40 +217,43 @@
|
|||||||
"application_registryId_registry_registryId_fk": {
|
"application_registryId_registry_registryId_fk": {
|
||||||
"name": "application_registryId_registry_registryId_fk",
|
"name": "application_registryId_registry_registryId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "registry",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "registry",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"application_projectId_project_projectId_fk": {
|
"application_projectId_project_projectId_fk": {
|
||||||
"name": "application_projectId_project_projectId_fk",
|
"name": "application_projectId_project_projectId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"application_appName_unique": {
|
"application_appName_unique": {
|
||||||
"name": "application_appName_unique",
|
"name": "application_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -374,27 +375,30 @@
|
|||||||
"postgres_projectId_project_projectId_fk": {
|
"postgres_projectId_project_projectId_fk": {
|
||||||
"name": "postgres_projectId_project_projectId_fk",
|
"name": "postgres_projectId_project_projectId_fk",
|
||||||
"tableFrom": "postgres",
|
"tableFrom": "postgres",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"postgres_appName_unique": {
|
"postgres_appName_unique": {
|
||||||
"name": "postgres_appName_unique",
|
"name": "postgres_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -505,32 +509,35 @@
|
|||||||
"user_adminId_admin_adminId_fk": {
|
"user_adminId_admin_adminId_fk": {
|
||||||
"name": "user_adminId_admin_adminId_fk",
|
"name": "user_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"user_authId_auth_id_fk": {
|
"user_authId_auth_id_fk": {
|
||||||
"name": "user_authId_auth_id_fk",
|
"name": "user_authId_auth_id_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -635,19 +642,22 @@
|
|||||||
"admin_authId_auth_id_fk": {
|
"admin_authId_auth_id_fk": {
|
||||||
"name": "admin_authId_auth_id_fk",
|
"name": "admin_authId_auth_id_fk",
|
||||||
"tableFrom": "admin",
|
"tableFrom": "admin",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -710,12 +720,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"auth_email_unique": {
|
"auth_email_unique": {
|
||||||
"name": "auth_email_unique",
|
"name": "auth_email_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"email"
|
"email"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -757,19 +770,22 @@
|
|||||||
"project_adminId_admin_adminId_fk": {
|
"project_adminId_admin_adminId_fk": {
|
||||||
"name": "project_adminId_admin_adminId_fk",
|
"name": "project_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "project",
|
"tableFrom": "project",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -840,19 +856,22 @@
|
|||||||
"domain_applicationId_application_applicationId_fk": {
|
"domain_applicationId_application_applicationId_fk": {
|
||||||
"name": "domain_applicationId_application_applicationId_fk",
|
"name": "domain_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "domain",
|
"tableFrom": "domain",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -980,27 +999,30 @@
|
|||||||
"mariadb_projectId_project_projectId_fk": {
|
"mariadb_projectId_project_projectId_fk": {
|
||||||
"name": "mariadb_projectId_project_projectId_fk",
|
"name": "mariadb_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mariadb",
|
"tableFrom": "mariadb",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mariadb_appName_unique": {
|
"mariadb_appName_unique": {
|
||||||
"name": "mariadb_appName_unique",
|
"name": "mariadb_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1116,27 +1138,30 @@
|
|||||||
"mongo_projectId_project_projectId_fk": {
|
"mongo_projectId_project_projectId_fk": {
|
||||||
"name": "mongo_projectId_project_projectId_fk",
|
"name": "mongo_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mongo",
|
"tableFrom": "mongo",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mongo_appName_unique": {
|
"mongo_appName_unique": {
|
||||||
"name": "mongo_appName_unique",
|
"name": "mongo_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1264,27 +1289,30 @@
|
|||||||
"mysql_projectId_project_projectId_fk": {
|
"mysql_projectId_project_projectId_fk": {
|
||||||
"name": "mysql_projectId_project_projectId_fk",
|
"name": "mysql_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mysql",
|
"tableFrom": "mysql",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mysql_appName_unique": {
|
"mysql_appName_unique": {
|
||||||
"name": "mysql_appName_unique",
|
"name": "mysql_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1363,71 +1391,74 @@
|
|||||||
"backup_destinationId_destination_destinationId_fk": {
|
"backup_destinationId_destination_destinationId_fk": {
|
||||||
"name": "backup_destinationId_destination_destinationId_fk",
|
"name": "backup_destinationId_destination_destinationId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "destination",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "destination",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_postgresId_postgres_postgresId_fk": {
|
"backup_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "backup_postgresId_postgres_postgresId_fk",
|
"name": "backup_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mariadbId_mariadb_mariadbId_fk": {
|
"backup_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mysqlId_mysql_mysqlId_fk": {
|
"backup_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mongoId_mongo_mongoId_fk": {
|
"backup_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "backup_mongoId_mongo_mongoId_fk",
|
"name": "backup_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1487,19 +1518,22 @@
|
|||||||
"destination_adminId_admin_adminId_fk": {
|
"destination_adminId_admin_adminId_fk": {
|
||||||
"name": "destination_adminId_admin_adminId_fk",
|
"name": "destination_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "destination",
|
"tableFrom": "destination",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1549,19 +1583,22 @@
|
|||||||
"deployment_applicationId_application_applicationId_fk": {
|
"deployment_applicationId_application_applicationId_fk": {
|
||||||
"name": "deployment_applicationId_application_applicationId_fk",
|
"name": "deployment_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "deployment",
|
"tableFrom": "deployment",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1654,84 +1691,87 @@
|
|||||||
"mount_applicationId_application_applicationId_fk": {
|
"mount_applicationId_application_applicationId_fk": {
|
||||||
"name": "mount_applicationId_application_applicationId_fk",
|
"name": "mount_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_postgresId_postgres_postgresId_fk": {
|
"mount_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "mount_postgresId_postgres_postgresId_fk",
|
"name": "mount_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mariadbId_mariadb_mariadbId_fk": {
|
"mount_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mongoId_mongo_mongoId_fk": {
|
"mount_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "mount_mongoId_mongo_mongoId_fk",
|
"name": "mount_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mysqlId_mysql_mysqlId_fk": {
|
"mount_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_redisId_redis_redisId_fk": {
|
"mount_redisId_redis_redisId_fk": {
|
||||||
"name": "mount_redisId_redis_redisId_fk",
|
"name": "mount_redisId_redis_redisId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "redis",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "redis",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1780,12 +1820,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"certificate_certificatePath_unique": {
|
"certificate_certificatePath_unique": {
|
||||||
"name": "certificate_certificatePath_unique",
|
"name": "certificate_certificatePath_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"certificatePath"
|
"certificatePath"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1815,19 +1858,22 @@
|
|||||||
"session_user_id_auth_id_fk": {
|
"session_user_id_auth_id_fk": {
|
||||||
"name": "session_user_id_auth_id_fk",
|
"name": "session_user_id_auth_id_fk",
|
||||||
"tableFrom": "session",
|
"tableFrom": "session",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"user_id"
|
"user_id"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1882,19 +1928,22 @@
|
|||||||
"redirect_applicationId_application_applicationId_fk": {
|
"redirect_applicationId_application_applicationId_fk": {
|
||||||
"name": "redirect_applicationId_application_applicationId_fk",
|
"name": "redirect_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "redirect",
|
"tableFrom": "redirect",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1936,28 +1985,31 @@
|
|||||||
"security_applicationId_application_applicationId_fk": {
|
"security_applicationId_application_applicationId_fk": {
|
||||||
"name": "security_applicationId_application_applicationId_fk",
|
"name": "security_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "security",
|
"tableFrom": "security",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"security_username_applicationId_unique": {
|
"security_username_applicationId_unique": {
|
||||||
"name": "security_username_applicationId_unique",
|
"name": "security_username_applicationId_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"username",
|
"username",
|
||||||
"applicationId"
|
"applicationId"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -2000,19 +2052,22 @@
|
|||||||
"port_applicationId_application_applicationId_fk": {
|
"port_applicationId_application_applicationId_fk": {
|
||||||
"name": "port_applicationId_application_applicationId_fk",
|
"name": "port_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "port",
|
"tableFrom": "port",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2122,27 +2177,30 @@
|
|||||||
"redis_projectId_project_projectId_fk": {
|
"redis_projectId_project_projectId_fk": {
|
||||||
"name": "redis_projectId_project_projectId_fk",
|
"name": "redis_projectId_project_projectId_fk",
|
||||||
"tableFrom": "redis",
|
"tableFrom": "redis",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"redis_appName_unique": {
|
"redis_appName_unique": {
|
||||||
"name": "redis_appName_unique",
|
"name": "redis_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.registry": {
|
"public.registry": {
|
||||||
"name": "registry",
|
"name": "registry",
|
||||||
@@ -2204,19 +2262,22 @@
|
|||||||
"registry_adminId_admin_adminId_fk": {
|
"registry_adminId_admin_adminId_fk": {
|
||||||
"name": "registry_adminId_admin_adminId_fk",
|
"name": "registry_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "registry",
|
"tableFrom": "registry",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2324,8 +2385,14 @@
|
|||||||
},
|
},
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"tables": {}
|
"tables": {},
|
||||||
}
|
"columns": {}
|
||||||
|
},
|
||||||
|
"id": "8ca71247-d512-427d-b115-47a7287ac431",
|
||||||
|
"prevId": "92c75e26-64ef-484f-a7d2-72a9422c119f",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"id": "80176730-273b-45e4-a7ca-760e29ad6d02",
|
"version": "7",
|
||||||
"prevId": "8ca71247-d512-427d-b115-47a7287ac431",
|
|
||||||
"version": "6",
|
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -226,40 +224,43 @@
|
|||||||
"application_registryId_registry_registryId_fk": {
|
"application_registryId_registry_registryId_fk": {
|
||||||
"name": "application_registryId_registry_registryId_fk",
|
"name": "application_registryId_registry_registryId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "registry",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "registry",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"application_projectId_project_projectId_fk": {
|
"application_projectId_project_projectId_fk": {
|
||||||
"name": "application_projectId_project_projectId_fk",
|
"name": "application_projectId_project_projectId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"application_appName_unique": {
|
"application_appName_unique": {
|
||||||
"name": "application_appName_unique",
|
"name": "application_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -381,27 +382,30 @@
|
|||||||
"postgres_projectId_project_projectId_fk": {
|
"postgres_projectId_project_projectId_fk": {
|
||||||
"name": "postgres_projectId_project_projectId_fk",
|
"name": "postgres_projectId_project_projectId_fk",
|
||||||
"tableFrom": "postgres",
|
"tableFrom": "postgres",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"postgres_appName_unique": {
|
"postgres_appName_unique": {
|
||||||
"name": "postgres_appName_unique",
|
"name": "postgres_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -512,32 +516,35 @@
|
|||||||
"user_adminId_admin_adminId_fk": {
|
"user_adminId_admin_adminId_fk": {
|
||||||
"name": "user_adminId_admin_adminId_fk",
|
"name": "user_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"user_authId_auth_id_fk": {
|
"user_authId_auth_id_fk": {
|
||||||
"name": "user_authId_auth_id_fk",
|
"name": "user_authId_auth_id_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -642,19 +649,22 @@
|
|||||||
"admin_authId_auth_id_fk": {
|
"admin_authId_auth_id_fk": {
|
||||||
"name": "admin_authId_auth_id_fk",
|
"name": "admin_authId_auth_id_fk",
|
||||||
"tableFrom": "admin",
|
"tableFrom": "admin",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -717,12 +727,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"auth_email_unique": {
|
"auth_email_unique": {
|
||||||
"name": "auth_email_unique",
|
"name": "auth_email_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"email"
|
"email"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -764,19 +777,22 @@
|
|||||||
"project_adminId_admin_adminId_fk": {
|
"project_adminId_admin_adminId_fk": {
|
||||||
"name": "project_adminId_admin_adminId_fk",
|
"name": "project_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "project",
|
"tableFrom": "project",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -847,19 +863,22 @@
|
|||||||
"domain_applicationId_application_applicationId_fk": {
|
"domain_applicationId_application_applicationId_fk": {
|
||||||
"name": "domain_applicationId_application_applicationId_fk",
|
"name": "domain_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "domain",
|
"tableFrom": "domain",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -987,27 +1006,30 @@
|
|||||||
"mariadb_projectId_project_projectId_fk": {
|
"mariadb_projectId_project_projectId_fk": {
|
||||||
"name": "mariadb_projectId_project_projectId_fk",
|
"name": "mariadb_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mariadb",
|
"tableFrom": "mariadb",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mariadb_appName_unique": {
|
"mariadb_appName_unique": {
|
||||||
"name": "mariadb_appName_unique",
|
"name": "mariadb_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1123,27 +1145,30 @@
|
|||||||
"mongo_projectId_project_projectId_fk": {
|
"mongo_projectId_project_projectId_fk": {
|
||||||
"name": "mongo_projectId_project_projectId_fk",
|
"name": "mongo_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mongo",
|
"tableFrom": "mongo",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mongo_appName_unique": {
|
"mongo_appName_unique": {
|
||||||
"name": "mongo_appName_unique",
|
"name": "mongo_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1271,27 +1296,30 @@
|
|||||||
"mysql_projectId_project_projectId_fk": {
|
"mysql_projectId_project_projectId_fk": {
|
||||||
"name": "mysql_projectId_project_projectId_fk",
|
"name": "mysql_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mysql",
|
"tableFrom": "mysql",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mysql_appName_unique": {
|
"mysql_appName_unique": {
|
||||||
"name": "mysql_appName_unique",
|
"name": "mysql_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1370,71 +1398,74 @@
|
|||||||
"backup_destinationId_destination_destinationId_fk": {
|
"backup_destinationId_destination_destinationId_fk": {
|
||||||
"name": "backup_destinationId_destination_destinationId_fk",
|
"name": "backup_destinationId_destination_destinationId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "destination",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "destination",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_postgresId_postgres_postgresId_fk": {
|
"backup_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "backup_postgresId_postgres_postgresId_fk",
|
"name": "backup_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mariadbId_mariadb_mariadbId_fk": {
|
"backup_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mysqlId_mysql_mysqlId_fk": {
|
"backup_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mongoId_mongo_mongoId_fk": {
|
"backup_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "backup_mongoId_mongo_mongoId_fk",
|
"name": "backup_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1494,19 +1525,22 @@
|
|||||||
"destination_adminId_admin_adminId_fk": {
|
"destination_adminId_admin_adminId_fk": {
|
||||||
"name": "destination_adminId_admin_adminId_fk",
|
"name": "destination_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "destination",
|
"tableFrom": "destination",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1556,19 +1590,22 @@
|
|||||||
"deployment_applicationId_application_applicationId_fk": {
|
"deployment_applicationId_application_applicationId_fk": {
|
||||||
"name": "deployment_applicationId_application_applicationId_fk",
|
"name": "deployment_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "deployment",
|
"tableFrom": "deployment",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1661,84 +1698,87 @@
|
|||||||
"mount_applicationId_application_applicationId_fk": {
|
"mount_applicationId_application_applicationId_fk": {
|
||||||
"name": "mount_applicationId_application_applicationId_fk",
|
"name": "mount_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_postgresId_postgres_postgresId_fk": {
|
"mount_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "mount_postgresId_postgres_postgresId_fk",
|
"name": "mount_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mariadbId_mariadb_mariadbId_fk": {
|
"mount_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mongoId_mongo_mongoId_fk": {
|
"mount_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "mount_mongoId_mongo_mongoId_fk",
|
"name": "mount_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mysqlId_mysql_mysqlId_fk": {
|
"mount_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_redisId_redis_redisId_fk": {
|
"mount_redisId_redis_redisId_fk": {
|
||||||
"name": "mount_redisId_redis_redisId_fk",
|
"name": "mount_redisId_redis_redisId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "redis",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "redis",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1787,12 +1827,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"certificate_certificatePath_unique": {
|
"certificate_certificatePath_unique": {
|
||||||
"name": "certificate_certificatePath_unique",
|
"name": "certificate_certificatePath_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"certificatePath"
|
"certificatePath"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1822,19 +1865,22 @@
|
|||||||
"session_user_id_auth_id_fk": {
|
"session_user_id_auth_id_fk": {
|
||||||
"name": "session_user_id_auth_id_fk",
|
"name": "session_user_id_auth_id_fk",
|
||||||
"tableFrom": "session",
|
"tableFrom": "session",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"user_id"
|
"user_id"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1889,19 +1935,22 @@
|
|||||||
"redirect_applicationId_application_applicationId_fk": {
|
"redirect_applicationId_application_applicationId_fk": {
|
||||||
"name": "redirect_applicationId_application_applicationId_fk",
|
"name": "redirect_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "redirect",
|
"tableFrom": "redirect",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1943,28 +1992,31 @@
|
|||||||
"security_applicationId_application_applicationId_fk": {
|
"security_applicationId_application_applicationId_fk": {
|
||||||
"name": "security_applicationId_application_applicationId_fk",
|
"name": "security_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "security",
|
"tableFrom": "security",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"security_username_applicationId_unique": {
|
"security_username_applicationId_unique": {
|
||||||
"name": "security_username_applicationId_unique",
|
"name": "security_username_applicationId_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"username",
|
"username",
|
||||||
"applicationId"
|
"applicationId"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -2007,19 +2059,22 @@
|
|||||||
"port_applicationId_application_applicationId_fk": {
|
"port_applicationId_application_applicationId_fk": {
|
||||||
"name": "port_applicationId_application_applicationId_fk",
|
"name": "port_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "port",
|
"tableFrom": "port",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2129,27 +2184,30 @@
|
|||||||
"redis_projectId_project_projectId_fk": {
|
"redis_projectId_project_projectId_fk": {
|
||||||
"name": "redis_projectId_project_projectId_fk",
|
"name": "redis_projectId_project_projectId_fk",
|
||||||
"tableFrom": "redis",
|
"tableFrom": "redis",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"redis_appName_unique": {
|
"redis_appName_unique": {
|
||||||
"name": "redis_appName_unique",
|
"name": "redis_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.registry": {
|
"public.registry": {
|
||||||
"name": "registry",
|
"name": "registry",
|
||||||
@@ -2211,19 +2269,22 @@
|
|||||||
"registry_adminId_admin_adminId_fk": {
|
"registry_adminId_admin_adminId_fk": {
|
||||||
"name": "registry_adminId_admin_adminId_fk",
|
"name": "registry_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "registry",
|
"tableFrom": "registry",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2331,8 +2392,14 @@
|
|||||||
},
|
},
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"tables": {}
|
"tables": {},
|
||||||
}
|
"columns": {}
|
||||||
|
},
|
||||||
|
"id": "80176730-273b-45e4-a7ca-760e29ad6d02",
|
||||||
|
"prevId": "8ca71247-d512-427d-b115-47a7287ac431",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"id": "54b3cce8-c1ab-46ed-bef9-1bb945d965f9",
|
"version": "7",
|
||||||
"prevId": "80176730-273b-45e4-a7ca-760e29ad6d02",
|
|
||||||
"version": "6",
|
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -226,40 +224,43 @@
|
|||||||
"application_registryId_registry_registryId_fk": {
|
"application_registryId_registry_registryId_fk": {
|
||||||
"name": "application_registryId_registry_registryId_fk",
|
"name": "application_registryId_registry_registryId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "registry",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "registry",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
"onDelete": "set null",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "set null"
|
||||||
},
|
},
|
||||||
"application_projectId_project_projectId_fk": {
|
"application_projectId_project_projectId_fk": {
|
||||||
"name": "application_projectId_project_projectId_fk",
|
"name": "application_projectId_project_projectId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"application_appName_unique": {
|
"application_appName_unique": {
|
||||||
"name": "application_appName_unique",
|
"name": "application_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -381,27 +382,30 @@
|
|||||||
"postgres_projectId_project_projectId_fk": {
|
"postgres_projectId_project_projectId_fk": {
|
||||||
"name": "postgres_projectId_project_projectId_fk",
|
"name": "postgres_projectId_project_projectId_fk",
|
||||||
"tableFrom": "postgres",
|
"tableFrom": "postgres",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"postgres_appName_unique": {
|
"postgres_appName_unique": {
|
||||||
"name": "postgres_appName_unique",
|
"name": "postgres_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -512,32 +516,35 @@
|
|||||||
"user_adminId_admin_adminId_fk": {
|
"user_adminId_admin_adminId_fk": {
|
||||||
"name": "user_adminId_admin_adminId_fk",
|
"name": "user_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"user_authId_auth_id_fk": {
|
"user_authId_auth_id_fk": {
|
||||||
"name": "user_authId_auth_id_fk",
|
"name": "user_authId_auth_id_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -642,19 +649,22 @@
|
|||||||
"admin_authId_auth_id_fk": {
|
"admin_authId_auth_id_fk": {
|
||||||
"name": "admin_authId_auth_id_fk",
|
"name": "admin_authId_auth_id_fk",
|
||||||
"tableFrom": "admin",
|
"tableFrom": "admin",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -717,12 +727,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"auth_email_unique": {
|
"auth_email_unique": {
|
||||||
"name": "auth_email_unique",
|
"name": "auth_email_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"email"
|
"email"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -764,19 +777,22 @@
|
|||||||
"project_adminId_admin_adminId_fk": {
|
"project_adminId_admin_adminId_fk": {
|
||||||
"name": "project_adminId_admin_adminId_fk",
|
"name": "project_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "project",
|
"tableFrom": "project",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -847,19 +863,22 @@
|
|||||||
"domain_applicationId_application_applicationId_fk": {
|
"domain_applicationId_application_applicationId_fk": {
|
||||||
"name": "domain_applicationId_application_applicationId_fk",
|
"name": "domain_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "domain",
|
"tableFrom": "domain",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -987,27 +1006,30 @@
|
|||||||
"mariadb_projectId_project_projectId_fk": {
|
"mariadb_projectId_project_projectId_fk": {
|
||||||
"name": "mariadb_projectId_project_projectId_fk",
|
"name": "mariadb_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mariadb",
|
"tableFrom": "mariadb",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mariadb_appName_unique": {
|
"mariadb_appName_unique": {
|
||||||
"name": "mariadb_appName_unique",
|
"name": "mariadb_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1123,27 +1145,30 @@
|
|||||||
"mongo_projectId_project_projectId_fk": {
|
"mongo_projectId_project_projectId_fk": {
|
||||||
"name": "mongo_projectId_project_projectId_fk",
|
"name": "mongo_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mongo",
|
"tableFrom": "mongo",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mongo_appName_unique": {
|
"mongo_appName_unique": {
|
||||||
"name": "mongo_appName_unique",
|
"name": "mongo_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1271,27 +1296,30 @@
|
|||||||
"mysql_projectId_project_projectId_fk": {
|
"mysql_projectId_project_projectId_fk": {
|
||||||
"name": "mysql_projectId_project_projectId_fk",
|
"name": "mysql_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mysql",
|
"tableFrom": "mysql",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mysql_appName_unique": {
|
"mysql_appName_unique": {
|
||||||
"name": "mysql_appName_unique",
|
"name": "mysql_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1370,71 +1398,74 @@
|
|||||||
"backup_destinationId_destination_destinationId_fk": {
|
"backup_destinationId_destination_destinationId_fk": {
|
||||||
"name": "backup_destinationId_destination_destinationId_fk",
|
"name": "backup_destinationId_destination_destinationId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "destination",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "destination",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_postgresId_postgres_postgresId_fk": {
|
"backup_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "backup_postgresId_postgres_postgresId_fk",
|
"name": "backup_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mariadbId_mariadb_mariadbId_fk": {
|
"backup_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mysqlId_mysql_mysqlId_fk": {
|
"backup_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mongoId_mongo_mongoId_fk": {
|
"backup_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "backup_mongoId_mongo_mongoId_fk",
|
"name": "backup_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1494,19 +1525,22 @@
|
|||||||
"destination_adminId_admin_adminId_fk": {
|
"destination_adminId_admin_adminId_fk": {
|
||||||
"name": "destination_adminId_admin_adminId_fk",
|
"name": "destination_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "destination",
|
"tableFrom": "destination",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1556,19 +1590,22 @@
|
|||||||
"deployment_applicationId_application_applicationId_fk": {
|
"deployment_applicationId_application_applicationId_fk": {
|
||||||
"name": "deployment_applicationId_application_applicationId_fk",
|
"name": "deployment_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "deployment",
|
"tableFrom": "deployment",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1661,84 +1698,87 @@
|
|||||||
"mount_applicationId_application_applicationId_fk": {
|
"mount_applicationId_application_applicationId_fk": {
|
||||||
"name": "mount_applicationId_application_applicationId_fk",
|
"name": "mount_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_postgresId_postgres_postgresId_fk": {
|
"mount_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "mount_postgresId_postgres_postgresId_fk",
|
"name": "mount_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mariadbId_mariadb_mariadbId_fk": {
|
"mount_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mongoId_mongo_mongoId_fk": {
|
"mount_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "mount_mongoId_mongo_mongoId_fk",
|
"name": "mount_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mysqlId_mysql_mysqlId_fk": {
|
"mount_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_redisId_redis_redisId_fk": {
|
"mount_redisId_redis_redisId_fk": {
|
||||||
"name": "mount_redisId_redis_redisId_fk",
|
"name": "mount_redisId_redis_redisId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "redis",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "redis",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1787,12 +1827,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"certificate_certificatePath_unique": {
|
"certificate_certificatePath_unique": {
|
||||||
"name": "certificate_certificatePath_unique",
|
"name": "certificate_certificatePath_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"certificatePath"
|
"certificatePath"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1822,19 +1865,22 @@
|
|||||||
"session_user_id_auth_id_fk": {
|
"session_user_id_auth_id_fk": {
|
||||||
"name": "session_user_id_auth_id_fk",
|
"name": "session_user_id_auth_id_fk",
|
||||||
"tableFrom": "session",
|
"tableFrom": "session",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"user_id"
|
"user_id"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1889,19 +1935,22 @@
|
|||||||
"redirect_applicationId_application_applicationId_fk": {
|
"redirect_applicationId_application_applicationId_fk": {
|
||||||
"name": "redirect_applicationId_application_applicationId_fk",
|
"name": "redirect_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "redirect",
|
"tableFrom": "redirect",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1943,28 +1992,31 @@
|
|||||||
"security_applicationId_application_applicationId_fk": {
|
"security_applicationId_application_applicationId_fk": {
|
||||||
"name": "security_applicationId_application_applicationId_fk",
|
"name": "security_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "security",
|
"tableFrom": "security",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"security_username_applicationId_unique": {
|
"security_username_applicationId_unique": {
|
||||||
"name": "security_username_applicationId_unique",
|
"name": "security_username_applicationId_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"username",
|
"username",
|
||||||
"applicationId"
|
"applicationId"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -2007,19 +2059,22 @@
|
|||||||
"port_applicationId_application_applicationId_fk": {
|
"port_applicationId_application_applicationId_fk": {
|
||||||
"name": "port_applicationId_application_applicationId_fk",
|
"name": "port_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "port",
|
"tableFrom": "port",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2129,27 +2184,30 @@
|
|||||||
"redis_projectId_project_projectId_fk": {
|
"redis_projectId_project_projectId_fk": {
|
||||||
"name": "redis_projectId_project_projectId_fk",
|
"name": "redis_projectId_project_projectId_fk",
|
||||||
"tableFrom": "redis",
|
"tableFrom": "redis",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"redis_appName_unique": {
|
"redis_appName_unique": {
|
||||||
"name": "redis_appName_unique",
|
"name": "redis_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.registry": {
|
"public.registry": {
|
||||||
"name": "registry",
|
"name": "registry",
|
||||||
@@ -2211,19 +2269,22 @@
|
|||||||
"registry_adminId_admin_adminId_fk": {
|
"registry_adminId_admin_adminId_fk": {
|
||||||
"name": "registry_adminId_admin_adminId_fk",
|
"name": "registry_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "registry",
|
"tableFrom": "registry",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2331,8 +2392,14 @@
|
|||||||
},
|
},
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"tables": {}
|
"tables": {},
|
||||||
}
|
"columns": {}
|
||||||
|
},
|
||||||
|
"id": "54b3cce8-c1ab-46ed-bef9-1bb945d965f9",
|
||||||
|
"prevId": "80176730-273b-45e4-a7ca-760e29ad6d02",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"id": "81eb82a8-2190-4dee-a6c8-416ea98e2547",
|
"version": "7",
|
||||||
"prevId": "54b3cce8-c1ab-46ed-bef9-1bb945d965f9",
|
|
||||||
"version": "6",
|
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -226,40 +224,43 @@
|
|||||||
"application_registryId_registry_registryId_fk": {
|
"application_registryId_registry_registryId_fk": {
|
||||||
"name": "application_registryId_registry_registryId_fk",
|
"name": "application_registryId_registry_registryId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "registry",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "registry",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
"onDelete": "set null",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "set null"
|
||||||
},
|
},
|
||||||
"application_projectId_project_projectId_fk": {
|
"application_projectId_project_projectId_fk": {
|
||||||
"name": "application_projectId_project_projectId_fk",
|
"name": "application_projectId_project_projectId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"application_appName_unique": {
|
"application_appName_unique": {
|
||||||
"name": "application_appName_unique",
|
"name": "application_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -381,27 +382,30 @@
|
|||||||
"postgres_projectId_project_projectId_fk": {
|
"postgres_projectId_project_projectId_fk": {
|
||||||
"name": "postgres_projectId_project_projectId_fk",
|
"name": "postgres_projectId_project_projectId_fk",
|
||||||
"tableFrom": "postgres",
|
"tableFrom": "postgres",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"postgres_appName_unique": {
|
"postgres_appName_unique": {
|
||||||
"name": "postgres_appName_unique",
|
"name": "postgres_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -512,32 +516,35 @@
|
|||||||
"user_adminId_admin_adminId_fk": {
|
"user_adminId_admin_adminId_fk": {
|
||||||
"name": "user_adminId_admin_adminId_fk",
|
"name": "user_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"user_authId_auth_id_fk": {
|
"user_authId_auth_id_fk": {
|
||||||
"name": "user_authId_auth_id_fk",
|
"name": "user_authId_auth_id_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -642,19 +649,22 @@
|
|||||||
"admin_authId_auth_id_fk": {
|
"admin_authId_auth_id_fk": {
|
||||||
"name": "admin_authId_auth_id_fk",
|
"name": "admin_authId_auth_id_fk",
|
||||||
"tableFrom": "admin",
|
"tableFrom": "admin",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -717,12 +727,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"auth_email_unique": {
|
"auth_email_unique": {
|
||||||
"name": "auth_email_unique",
|
"name": "auth_email_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"email"
|
"email"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -764,19 +777,22 @@
|
|||||||
"project_adminId_admin_adminId_fk": {
|
"project_adminId_admin_adminId_fk": {
|
||||||
"name": "project_adminId_admin_adminId_fk",
|
"name": "project_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "project",
|
"tableFrom": "project",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -847,19 +863,22 @@
|
|||||||
"domain_applicationId_application_applicationId_fk": {
|
"domain_applicationId_application_applicationId_fk": {
|
||||||
"name": "domain_applicationId_application_applicationId_fk",
|
"name": "domain_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "domain",
|
"tableFrom": "domain",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -987,27 +1006,30 @@
|
|||||||
"mariadb_projectId_project_projectId_fk": {
|
"mariadb_projectId_project_projectId_fk": {
|
||||||
"name": "mariadb_projectId_project_projectId_fk",
|
"name": "mariadb_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mariadb",
|
"tableFrom": "mariadb",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mariadb_appName_unique": {
|
"mariadb_appName_unique": {
|
||||||
"name": "mariadb_appName_unique",
|
"name": "mariadb_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1123,27 +1145,30 @@
|
|||||||
"mongo_projectId_project_projectId_fk": {
|
"mongo_projectId_project_projectId_fk": {
|
||||||
"name": "mongo_projectId_project_projectId_fk",
|
"name": "mongo_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mongo",
|
"tableFrom": "mongo",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mongo_appName_unique": {
|
"mongo_appName_unique": {
|
||||||
"name": "mongo_appName_unique",
|
"name": "mongo_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1271,27 +1296,30 @@
|
|||||||
"mysql_projectId_project_projectId_fk": {
|
"mysql_projectId_project_projectId_fk": {
|
||||||
"name": "mysql_projectId_project_projectId_fk",
|
"name": "mysql_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mysql",
|
"tableFrom": "mysql",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mysql_appName_unique": {
|
"mysql_appName_unique": {
|
||||||
"name": "mysql_appName_unique",
|
"name": "mysql_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1370,71 +1398,74 @@
|
|||||||
"backup_destinationId_destination_destinationId_fk": {
|
"backup_destinationId_destination_destinationId_fk": {
|
||||||
"name": "backup_destinationId_destination_destinationId_fk",
|
"name": "backup_destinationId_destination_destinationId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "destination",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "destination",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_postgresId_postgres_postgresId_fk": {
|
"backup_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "backup_postgresId_postgres_postgresId_fk",
|
"name": "backup_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mariadbId_mariadb_mariadbId_fk": {
|
"backup_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mysqlId_mysql_mysqlId_fk": {
|
"backup_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mongoId_mongo_mongoId_fk": {
|
"backup_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "backup_mongoId_mongo_mongoId_fk",
|
"name": "backup_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1494,19 +1525,22 @@
|
|||||||
"destination_adminId_admin_adminId_fk": {
|
"destination_adminId_admin_adminId_fk": {
|
||||||
"name": "destination_adminId_admin_adminId_fk",
|
"name": "destination_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "destination",
|
"tableFrom": "destination",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1556,19 +1590,22 @@
|
|||||||
"deployment_applicationId_application_applicationId_fk": {
|
"deployment_applicationId_application_applicationId_fk": {
|
||||||
"name": "deployment_applicationId_application_applicationId_fk",
|
"name": "deployment_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "deployment",
|
"tableFrom": "deployment",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1661,84 +1698,87 @@
|
|||||||
"mount_applicationId_application_applicationId_fk": {
|
"mount_applicationId_application_applicationId_fk": {
|
||||||
"name": "mount_applicationId_application_applicationId_fk",
|
"name": "mount_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_postgresId_postgres_postgresId_fk": {
|
"mount_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "mount_postgresId_postgres_postgresId_fk",
|
"name": "mount_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mariadbId_mariadb_mariadbId_fk": {
|
"mount_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mongoId_mongo_mongoId_fk": {
|
"mount_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "mount_mongoId_mongo_mongoId_fk",
|
"name": "mount_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mysqlId_mysql_mysqlId_fk": {
|
"mount_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_redisId_redis_redisId_fk": {
|
"mount_redisId_redis_redisId_fk": {
|
||||||
"name": "mount_redisId_redis_redisId_fk",
|
"name": "mount_redisId_redis_redisId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "redis",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "redis",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1787,12 +1827,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"certificate_certificatePath_unique": {
|
"certificate_certificatePath_unique": {
|
||||||
"name": "certificate_certificatePath_unique",
|
"name": "certificate_certificatePath_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"certificatePath"
|
"certificatePath"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1822,19 +1865,22 @@
|
|||||||
"session_user_id_auth_id_fk": {
|
"session_user_id_auth_id_fk": {
|
||||||
"name": "session_user_id_auth_id_fk",
|
"name": "session_user_id_auth_id_fk",
|
||||||
"tableFrom": "session",
|
"tableFrom": "session",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"user_id"
|
"user_id"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1889,19 +1935,22 @@
|
|||||||
"redirect_applicationId_application_applicationId_fk": {
|
"redirect_applicationId_application_applicationId_fk": {
|
||||||
"name": "redirect_applicationId_application_applicationId_fk",
|
"name": "redirect_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "redirect",
|
"tableFrom": "redirect",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1943,28 +1992,31 @@
|
|||||||
"security_applicationId_application_applicationId_fk": {
|
"security_applicationId_application_applicationId_fk": {
|
||||||
"name": "security_applicationId_application_applicationId_fk",
|
"name": "security_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "security",
|
"tableFrom": "security",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"security_username_applicationId_unique": {
|
"security_username_applicationId_unique": {
|
||||||
"name": "security_username_applicationId_unique",
|
"name": "security_username_applicationId_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"username",
|
"username",
|
||||||
"applicationId"
|
"applicationId"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -2007,19 +2059,22 @@
|
|||||||
"port_applicationId_application_applicationId_fk": {
|
"port_applicationId_application_applicationId_fk": {
|
||||||
"name": "port_applicationId_application_applicationId_fk",
|
"name": "port_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "port",
|
"tableFrom": "port",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2129,27 +2184,30 @@
|
|||||||
"redis_projectId_project_projectId_fk": {
|
"redis_projectId_project_projectId_fk": {
|
||||||
"name": "redis_projectId_project_projectId_fk",
|
"name": "redis_projectId_project_projectId_fk",
|
||||||
"tableFrom": "redis",
|
"tableFrom": "redis",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"redis_appName_unique": {
|
"redis_appName_unique": {
|
||||||
"name": "redis_appName_unique",
|
"name": "redis_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.registry": {
|
"public.registry": {
|
||||||
"name": "registry",
|
"name": "registry",
|
||||||
@@ -2211,19 +2269,22 @@
|
|||||||
"registry_adminId_admin_adminId_fk": {
|
"registry_adminId_admin_adminId_fk": {
|
||||||
"name": "registry_adminId_admin_adminId_fk",
|
"name": "registry_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "registry",
|
"tableFrom": "registry",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2331,8 +2392,14 @@
|
|||||||
},
|
},
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"tables": {}
|
"tables": {},
|
||||||
}
|
"columns": {}
|
||||||
|
},
|
||||||
|
"id": "81eb82a8-2190-4dee-a6c8-416ea98e2547",
|
||||||
|
"prevId": "54b3cce8-c1ab-46ed-bef9-1bb945d965f9",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
{
|
{
|
||||||
"id": "c4f34dc8-69d6-49f3-809d-be474f0f0fcf",
|
"version": "7",
|
||||||
"prevId": "81eb82a8-2190-4dee-a6c8-416ea98e2547",
|
|
||||||
"version": "6",
|
|
||||||
"dialect": "postgresql",
|
"dialect": "postgresql",
|
||||||
"tables": {
|
"tables": {
|
||||||
"public.application": {
|
"public.application": {
|
||||||
@@ -226,40 +224,43 @@
|
|||||||
"application_registryId_registry_registryId_fk": {
|
"application_registryId_registry_registryId_fk": {
|
||||||
"name": "application_registryId_registry_registryId_fk",
|
"name": "application_registryId_registry_registryId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "registry",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "registry",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"registryId"
|
"registryId"
|
||||||
],
|
],
|
||||||
"onDelete": "set null",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "set null"
|
||||||
},
|
},
|
||||||
"application_projectId_project_projectId_fk": {
|
"application_projectId_project_projectId_fk": {
|
||||||
"name": "application_projectId_project_projectId_fk",
|
"name": "application_projectId_project_projectId_fk",
|
||||||
"tableFrom": "application",
|
"tableFrom": "application",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"application_appName_unique": {
|
"application_appName_unique": {
|
||||||
"name": "application_appName_unique",
|
"name": "application_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.postgres": {
|
"public.postgres": {
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
@@ -381,27 +382,30 @@
|
|||||||
"postgres_projectId_project_projectId_fk": {
|
"postgres_projectId_project_projectId_fk": {
|
||||||
"name": "postgres_projectId_project_projectId_fk",
|
"name": "postgres_projectId_project_projectId_fk",
|
||||||
"tableFrom": "postgres",
|
"tableFrom": "postgres",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"postgres_appName_unique": {
|
"postgres_appName_unique": {
|
||||||
"name": "postgres_appName_unique",
|
"name": "postgres_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.user": {
|
"public.user": {
|
||||||
"name": "user",
|
"name": "user",
|
||||||
@@ -512,32 +516,35 @@
|
|||||||
"user_adminId_admin_adminId_fk": {
|
"user_adminId_admin_adminId_fk": {
|
||||||
"name": "user_adminId_admin_adminId_fk",
|
"name": "user_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"user_authId_auth_id_fk": {
|
"user_authId_auth_id_fk": {
|
||||||
"name": "user_authId_auth_id_fk",
|
"name": "user_authId_auth_id_fk",
|
||||||
"tableFrom": "user",
|
"tableFrom": "user",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.admin": {
|
"public.admin": {
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
@@ -642,19 +649,22 @@
|
|||||||
"admin_authId_auth_id_fk": {
|
"admin_authId_auth_id_fk": {
|
||||||
"name": "admin_authId_auth_id_fk",
|
"name": "admin_authId_auth_id_fk",
|
||||||
"tableFrom": "admin",
|
"tableFrom": "admin",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"authId"
|
"authId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.auth": {
|
"public.auth": {
|
||||||
"name": "auth",
|
"name": "auth",
|
||||||
@@ -717,12 +727,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"auth_email_unique": {
|
"auth_email_unique": {
|
||||||
"name": "auth_email_unique",
|
"name": "auth_email_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"email"
|
"email"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.project": {
|
"public.project": {
|
||||||
"name": "project",
|
"name": "project",
|
||||||
@@ -764,19 +777,22 @@
|
|||||||
"project_adminId_admin_adminId_fk": {
|
"project_adminId_admin_adminId_fk": {
|
||||||
"name": "project_adminId_admin_adminId_fk",
|
"name": "project_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "project",
|
"tableFrom": "project",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.domain": {
|
"public.domain": {
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
@@ -847,19 +863,22 @@
|
|||||||
"domain_applicationId_application_applicationId_fk": {
|
"domain_applicationId_application_applicationId_fk": {
|
||||||
"name": "domain_applicationId_application_applicationId_fk",
|
"name": "domain_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "domain",
|
"tableFrom": "domain",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mariadb": {
|
"public.mariadb": {
|
||||||
"name": "mariadb",
|
"name": "mariadb",
|
||||||
@@ -987,27 +1006,30 @@
|
|||||||
"mariadb_projectId_project_projectId_fk": {
|
"mariadb_projectId_project_projectId_fk": {
|
||||||
"name": "mariadb_projectId_project_projectId_fk",
|
"name": "mariadb_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mariadb",
|
"tableFrom": "mariadb",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mariadb_appName_unique": {
|
"mariadb_appName_unique": {
|
||||||
"name": "mariadb_appName_unique",
|
"name": "mariadb_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mongo": {
|
"public.mongo": {
|
||||||
"name": "mongo",
|
"name": "mongo",
|
||||||
@@ -1123,27 +1145,30 @@
|
|||||||
"mongo_projectId_project_projectId_fk": {
|
"mongo_projectId_project_projectId_fk": {
|
||||||
"name": "mongo_projectId_project_projectId_fk",
|
"name": "mongo_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mongo",
|
"tableFrom": "mongo",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mongo_appName_unique": {
|
"mongo_appName_unique": {
|
||||||
"name": "mongo_appName_unique",
|
"name": "mongo_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mysql": {
|
"public.mysql": {
|
||||||
"name": "mysql",
|
"name": "mysql",
|
||||||
@@ -1271,27 +1296,30 @@
|
|||||||
"mysql_projectId_project_projectId_fk": {
|
"mysql_projectId_project_projectId_fk": {
|
||||||
"name": "mysql_projectId_project_projectId_fk",
|
"name": "mysql_projectId_project_projectId_fk",
|
||||||
"tableFrom": "mysql",
|
"tableFrom": "mysql",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"mysql_appName_unique": {
|
"mysql_appName_unique": {
|
||||||
"name": "mysql_appName_unique",
|
"name": "mysql_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.backup": {
|
"public.backup": {
|
||||||
"name": "backup",
|
"name": "backup",
|
||||||
@@ -1370,71 +1398,74 @@
|
|||||||
"backup_destinationId_destination_destinationId_fk": {
|
"backup_destinationId_destination_destinationId_fk": {
|
||||||
"name": "backup_destinationId_destination_destinationId_fk",
|
"name": "backup_destinationId_destination_destinationId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "destination",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "destination",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"destinationId"
|
"destinationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_postgresId_postgres_postgresId_fk": {
|
"backup_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "backup_postgresId_postgres_postgresId_fk",
|
"name": "backup_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mariadbId_mariadb_mariadbId_fk": {
|
"backup_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
"name": "backup_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mysqlId_mysql_mysqlId_fk": {
|
"backup_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
"name": "backup_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"backup_mongoId_mongo_mongoId_fk": {
|
"backup_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "backup_mongoId_mongo_mongoId_fk",
|
"name": "backup_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "backup",
|
"tableFrom": "backup",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.destination": {
|
"public.destination": {
|
||||||
"name": "destination",
|
"name": "destination",
|
||||||
@@ -1494,19 +1525,22 @@
|
|||||||
"destination_adminId_admin_adminId_fk": {
|
"destination_adminId_admin_adminId_fk": {
|
||||||
"name": "destination_adminId_admin_adminId_fk",
|
"name": "destination_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "destination",
|
"tableFrom": "destination",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.deployment": {
|
"public.deployment": {
|
||||||
"name": "deployment",
|
"name": "deployment",
|
||||||
@@ -1556,19 +1590,22 @@
|
|||||||
"deployment_applicationId_application_applicationId_fk": {
|
"deployment_applicationId_application_applicationId_fk": {
|
||||||
"name": "deployment_applicationId_application_applicationId_fk",
|
"name": "deployment_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "deployment",
|
"tableFrom": "deployment",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.mount": {
|
"public.mount": {
|
||||||
"name": "mount",
|
"name": "mount",
|
||||||
@@ -1661,84 +1698,87 @@
|
|||||||
"mount_applicationId_application_applicationId_fk": {
|
"mount_applicationId_application_applicationId_fk": {
|
||||||
"name": "mount_applicationId_application_applicationId_fk",
|
"name": "mount_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_postgresId_postgres_postgresId_fk": {
|
"mount_postgresId_postgres_postgresId_fk": {
|
||||||
"name": "mount_postgresId_postgres_postgresId_fk",
|
"name": "mount_postgresId_postgres_postgresId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "postgres",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "postgres",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"postgresId"
|
"postgresId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mariadbId_mariadb_mariadbId_fk": {
|
"mount_mariadbId_mariadb_mariadbId_fk": {
|
||||||
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
"name": "mount_mariadbId_mariadb_mariadbId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mariadb",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mariadb",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mariadbId"
|
"mariadbId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mongoId_mongo_mongoId_fk": {
|
"mount_mongoId_mongo_mongoId_fk": {
|
||||||
"name": "mount_mongoId_mongo_mongoId_fk",
|
"name": "mount_mongoId_mongo_mongoId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mongo",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mongo",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mongoId"
|
"mongoId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_mysqlId_mysql_mysqlId_fk": {
|
"mount_mysqlId_mysql_mysqlId_fk": {
|
||||||
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
"name": "mount_mysqlId_mysql_mysqlId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "mysql",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "mysql",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"mysqlId"
|
"mysqlId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
},
|
},
|
||||||
"mount_redisId_redis_redisId_fk": {
|
"mount_redisId_redis_redisId_fk": {
|
||||||
"name": "mount_redisId_redis_redisId_fk",
|
"name": "mount_redisId_redis_redisId_fk",
|
||||||
"tableFrom": "mount",
|
"tableFrom": "mount",
|
||||||
"tableTo": "redis",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "redis",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"redisId"
|
"redisId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.certificate": {
|
"public.certificate": {
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
@@ -1787,12 +1827,15 @@
|
|||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"certificate_certificatePath_unique": {
|
"certificate_certificatePath_unique": {
|
||||||
"name": "certificate_certificatePath_unique",
|
"name": "certificate_certificatePath_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"certificatePath"
|
"certificatePath"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.session": {
|
"public.session": {
|
||||||
"name": "session",
|
"name": "session",
|
||||||
@@ -1822,19 +1865,22 @@
|
|||||||
"session_user_id_auth_id_fk": {
|
"session_user_id_auth_id_fk": {
|
||||||
"name": "session_user_id_auth_id_fk",
|
"name": "session_user_id_auth_id_fk",
|
||||||
"tableFrom": "session",
|
"tableFrom": "session",
|
||||||
"tableTo": "auth",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"user_id"
|
"user_id"
|
||||||
],
|
],
|
||||||
|
"tableTo": "auth",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redirect": {
|
"public.redirect": {
|
||||||
"name": "redirect",
|
"name": "redirect",
|
||||||
@@ -1889,19 +1935,22 @@
|
|||||||
"redirect_applicationId_application_applicationId_fk": {
|
"redirect_applicationId_application_applicationId_fk": {
|
||||||
"name": "redirect_applicationId_application_applicationId_fk",
|
"name": "redirect_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "redirect",
|
"tableFrom": "redirect",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.security": {
|
"public.security": {
|
||||||
"name": "security",
|
"name": "security",
|
||||||
@@ -1943,28 +1992,31 @@
|
|||||||
"security_applicationId_application_applicationId_fk": {
|
"security_applicationId_application_applicationId_fk": {
|
||||||
"name": "security_applicationId_application_applicationId_fk",
|
"name": "security_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "security",
|
"tableFrom": "security",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"security_username_applicationId_unique": {
|
"security_username_applicationId_unique": {
|
||||||
"name": "security_username_applicationId_unique",
|
"name": "security_username_applicationId_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"username",
|
"username",
|
||||||
"applicationId"
|
"applicationId"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.port": {
|
"public.port": {
|
||||||
"name": "port",
|
"name": "port",
|
||||||
@@ -2007,19 +2059,22 @@
|
|||||||
"port_applicationId_application_applicationId_fk": {
|
"port_applicationId_application_applicationId_fk": {
|
||||||
"name": "port_applicationId_application_applicationId_fk",
|
"name": "port_applicationId_application_applicationId_fk",
|
||||||
"tableFrom": "port",
|
"tableFrom": "port",
|
||||||
"tableTo": "application",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "application",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"applicationId"
|
"applicationId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.redis": {
|
"public.redis": {
|
||||||
"name": "redis",
|
"name": "redis",
|
||||||
@@ -2129,27 +2184,30 @@
|
|||||||
"redis_projectId_project_projectId_fk": {
|
"redis_projectId_project_projectId_fk": {
|
||||||
"name": "redis_projectId_project_projectId_fk",
|
"name": "redis_projectId_project_projectId_fk",
|
||||||
"tableFrom": "redis",
|
"tableFrom": "redis",
|
||||||
"tableTo": "project",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "project",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"projectId"
|
"projectId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {
|
"uniqueConstraints": {
|
||||||
"redis_appName_unique": {
|
"redis_appName_unique": {
|
||||||
"name": "redis_appName_unique",
|
"name": "redis_appName_unique",
|
||||||
"nullsNotDistinct": false,
|
|
||||||
"columns": [
|
"columns": [
|
||||||
"appName"
|
"appName"
|
||||||
]
|
],
|
||||||
|
"nullsNotDistinct": false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
},
|
},
|
||||||
"public.registry": {
|
"public.registry": {
|
||||||
"name": "registry",
|
"name": "registry",
|
||||||
@@ -2217,19 +2275,22 @@
|
|||||||
"registry_adminId_admin_adminId_fk": {
|
"registry_adminId_admin_adminId_fk": {
|
||||||
"name": "registry_adminId_admin_adminId_fk",
|
"name": "registry_adminId_admin_adminId_fk",
|
||||||
"tableFrom": "registry",
|
"tableFrom": "registry",
|
||||||
"tableTo": "admin",
|
|
||||||
"columnsFrom": [
|
"columnsFrom": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
|
"tableTo": "admin",
|
||||||
"columnsTo": [
|
"columnsTo": [
|
||||||
"adminId"
|
"adminId"
|
||||||
],
|
],
|
||||||
"onDelete": "cascade",
|
"onUpdate": "no action",
|
||||||
"onUpdate": "no action"
|
"onDelete": "cascade"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compositePrimaryKeys": {},
|
"compositePrimaryKeys": {},
|
||||||
"uniqueConstraints": {}
|
"uniqueConstraints": {},
|
||||||
|
"policies": {},
|
||||||
|
"isRLSEnabled": false,
|
||||||
|
"checkConstraints": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enums": {
|
"enums": {
|
||||||
@@ -2337,8 +2398,14 @@
|
|||||||
},
|
},
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"columns": {},
|
|
||||||
"schemas": {},
|
"schemas": {},
|
||||||
"tables": {}
|
"tables": {},
|
||||||
}
|
"columns": {}
|
||||||
|
},
|
||||||
|
"id": "c4f34dc8-69d6-49f3-809d-be474f0f0fcf",
|
||||||
|
"prevId": "81eb82a8-2190-4dee-a6c8-416ea98e2547",
|
||||||
|
"sequences": {},
|
||||||
|
"policies": {},
|
||||||
|
"views": {},
|
||||||
|
"roles": {}
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user