Skip to content

Commit

Permalink
refactor: update search with jsonB
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Feb 2, 2025
1 parent 34d4d7d commit 8ea0842
Show file tree
Hide file tree
Showing 9 changed files with 4,556 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const SetupMonitoring = ({ serverId }: Props) => {
refreshRate: 20,
port: 4500,
token: "",
urlCallback: url,
urlCallback: `${url}/api/notification.receiveNotification`,
retentionDays: 7,
thresholds: {
cpu: 0,
Expand All @@ -149,7 +149,9 @@ export const SetupMonitoring = ({ serverId }: Props) => {
refreshRate: data?.metricsConfig?.server?.refreshRate,
port: data?.metricsConfig?.server?.port,
token: data?.metricsConfig?.server?.token || generateToken(),
urlCallback: data?.metricsConfig?.server?.urlCallback || url,
urlCallback:
data?.metricsConfig?.server?.urlCallback ||
`${url}/api/notification.receiveNotification`,
retentionDays: data?.metricsConfig?.server?.retentionDays || 5,
thresholds: {
cpu: data?.metricsConfig?.server?.thresholds?.cpu,
Expand Down
4 changes: 4 additions & 0 deletions apps/dokploy/drizzle/0061_many_molten_man.sql
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit 8ea0842

Please sign in to comment.