Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4754b97
feat: Update Features Backup & Restore
vncloudsco Oct 6, 2025
52c0c07
feat: Update Features Backup & Restore
vncloudsco Oct 6, 2025
78a4ada
feat: Enhance backup import functionality with confirmation dialog an…
vncloudsco Oct 6, 2025
3d41e98
feat: Add nginx vhost config generation during backup restore
vncloudsco Oct 6, 2025
7cc70bc
feat: Add import warning dialog and file upload functionality in Back…
vncloudsco Oct 6, 2025
188b2d6
feat: Update .gitignore to exclude documentation files and remove SSL…
vncloudsco Oct 6, 2025
b63e88c
feat: Update backup import process to include hashed passwords for us…
vncloudsco Oct 6, 2025
a3ea1cb
feat: Enhance user import functionality to upsert users and profiles …
vncloudsco Oct 6, 2025
200f13c
feat: Add slave node management features with sync capabilities
vncloudsco Oct 6, 2025
5476ea8
fix: Correct sslCertificateId to sslCertificate in collectCurrentConf…
vncloudsco Oct 6, 2025
5a25198
fix: Simplify response handling in syncConfigToNode function
vncloudsco Oct 6, 2025
cd319e5
feat: Enhance slave node registration with API key dialog and authent…
vncloudsco Oct 6, 2025
ba7171a
feat: add system configuration management for master/slave node modes
vncloudsco Oct 6, 2025
d3841de
feat: add health check endpoint for slave nodes
vncloudsco Oct 6, 2025
846fd22
feat: implement sync configuration from master for slave nodes
vncloudsco Oct 6, 2025
85cf2d9
feat: Implement node synchronization between master and slave nodes
vncloudsco Oct 6, 2025
7115724
feat: Update slave node configuration and status during API key valid…
vncloudsco Oct 6, 2025
152f4d9
feat: Add slave node status checker and integrate with application li…
vncloudsco Oct 6, 2025
f3415d3
feat: Add endpoint to get current config hash for slave nodes
vncloudsco Oct 6, 2025
d3464a7
Merge branch 'beta_developer' into features_slave
vncloudsco Oct 6, 2025
48e87ef
feat: Enhance SSRF protection with URL validation and response checks
vncloudsco Oct 6, 2025
335bf71
refactor: Rename variables for SSL certificates, ModSecurity rules, a…
vncloudsco Oct 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
-- CreateEnum
CREATE TYPE "SlaveNodeStatus" AS ENUM ('online', 'offline', 'syncing', 'error');

-- CreateEnum
CREATE TYPE "SyncLogStatus" AS ENUM ('success', 'failed', 'partial', 'running');

-- CreateEnum
CREATE TYPE "SyncLogType" AS ENUM ('full_sync', 'incremental_sync', 'health_check');

-- CreateTable
CREATE TABLE "slave_nodes" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"host" TEXT NOT NULL,
"port" INTEGER NOT NULL DEFAULT 3001,
"apiKey" TEXT NOT NULL,
"status" "SlaveNodeStatus" NOT NULL DEFAULT 'offline',
"lastSeen" TIMESTAMP(3),
"version" TEXT,
"syncEnabled" BOOLEAN NOT NULL DEFAULT true,
"syncInterval" INTEGER NOT NULL DEFAULT 60,
"configHash" TEXT,
"lastSyncAt" TIMESTAMP(3),
"latency" INTEGER,
"cpuUsage" DOUBLE PRECISION,
"memoryUsage" DOUBLE PRECISION,
"diskUsage" DOUBLE PRECISION,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "slave_nodes_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "sync_logs" (
"id" TEXT NOT NULL,
"nodeId" TEXT NOT NULL,
"type" "SyncLogType" NOT NULL,
"status" "SyncLogStatus" NOT NULL DEFAULT 'running',
"configHash" TEXT,
"changesCount" INTEGER,
"errorMessage" TEXT,
"startedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"completedAt" TIMESTAMP(3),
"duration" INTEGER,

CONSTRAINT "sync_logs_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "config_versions" (
"id" TEXT NOT NULL,
"version" SERIAL NOT NULL,
"configHash" TEXT NOT NULL,
"configData" JSONB NOT NULL,
"createdBy" TEXT,
"description" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

CONSTRAINT "config_versions_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "slave_nodes_name_key" ON "slave_nodes"("name");

-- CreateIndex
CREATE UNIQUE INDEX "slave_nodes_apiKey_key" ON "slave_nodes"("apiKey");

-- CreateIndex
CREATE INDEX "slave_nodes_status_idx" ON "slave_nodes"("status");

-- CreateIndex
CREATE INDEX "slave_nodes_lastSeen_idx" ON "slave_nodes"("lastSeen");

-- CreateIndex
CREATE INDEX "sync_logs_nodeId_startedAt_idx" ON "sync_logs"("nodeId", "startedAt");

-- CreateIndex
CREATE UNIQUE INDEX "config_versions_configHash_key" ON "config_versions"("configHash");

-- CreateIndex
CREATE INDEX "config_versions_createdAt_idx" ON "config_versions"("createdAt");

-- AddForeignKey
ALTER TABLE "sync_logs" ADD CONSTRAINT "sync_logs_nodeId_fkey" FOREIGN KEY ("nodeId") REFERENCES "slave_nodes"("id") ON DELETE CASCADE ON UPDATE CASCADE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- CreateEnum
CREATE TYPE "NodeMode" AS ENUM ('master', 'slave');

-- CreateTable
CREATE TABLE "system_configs" (
"id" TEXT NOT NULL,
"nodeMode" "NodeMode" NOT NULL DEFAULT 'master',
"masterApiEnabled" BOOLEAN NOT NULL DEFAULT true,
"slaveApiEnabled" BOOLEAN NOT NULL DEFAULT false,
"masterHost" TEXT,
"masterPort" INTEGER,
"masterApiKey" TEXT,
"connected" BOOLEAN NOT NULL DEFAULT false,
"lastConnectedAt" TIMESTAMP(3),
"connectionError" TEXT,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,

CONSTRAINT "system_configs_pkey" PRIMARY KEY ("id")
);
Loading