Complete Hub Admin Dashboard with analytics, settings, and enterprise features
Major additions: - Analytics dashboard with charts (line, bar, donut) - Enterprise client monitoring with container management - Staff management with 2FA support - Profile management and settings pages - Netcup server integration - DNS verification panel - Portainer integration - Container logs and health monitoring - Automation controls for orders New API endpoints: - /api/v1/admin/analytics - /api/v1/admin/enterprise-clients - /api/v1/admin/netcup - /api/v1/admin/settings - /api/v1/admin/staff - /api/v1/profile Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "StaffStatus" AS ENUM ('ACTIVE', 'SUSPENDED');
|
||||
|
||||
-- AlterEnum
|
||||
-- This migration adds more than one value to an enum.
|
||||
-- With PostgreSQL versions 11 and earlier, this is not possible
|
||||
-- in a single migration. This can be worked around by creating
|
||||
-- multiple migrations, each migration adding only one value to
|
||||
-- the enum.
|
||||
|
||||
|
||||
ALTER TYPE "StaffRole" ADD VALUE 'OWNER';
|
||||
ALTER TYPE "StaffRole" ADD VALUE 'MANAGER';
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "staff" ADD COLUMN "backup_codes_enc" TEXT,
|
||||
ADD COLUMN "invited_by" TEXT,
|
||||
ADD COLUMN "status" "StaffStatus" NOT NULL DEFAULT 'ACTIVE',
|
||||
ADD COLUMN "two_factor_enabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
ADD COLUMN "two_factor_secret_enc" TEXT,
|
||||
ADD COLUMN "two_factor_verified_at" TIMESTAMP(3);
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "users" ADD COLUMN "backup_codes_enc" TEXT,
|
||||
ADD COLUMN "two_factor_enabled" BOOLEAN NOT NULL DEFAULT false,
|
||||
ADD COLUMN "two_factor_secret_enc" TEXT,
|
||||
ADD COLUMN "two_factor_verified_at" TIMESTAMP(3);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "staff_invitations" (
|
||||
"id" TEXT NOT NULL,
|
||||
"email" TEXT NOT NULL,
|
||||
"role" "StaffRole" NOT NULL DEFAULT 'SUPPORT',
|
||||
"token" TEXT NOT NULL,
|
||||
"expires_at" TIMESTAMP(3) NOT NULL,
|
||||
"invited_by" TEXT NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "staff_invitations_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "staff_invitations_email_key" ON "staff_invitations"("email");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "staff_invitations_token_key" ON "staff_invitations"("token");
|
||||
Reference in New Issue
Block a user