Compare commits

..

No commits in common. "f95770dec6032c4861a3d00c9b6b175e8ca12399" and "1ecc1374d284c4f0bf2a02dd4f3cc71b614ecb21" have entirely different histories.

123 changed files with 27 additions and 897 deletions

View File

@ -1,97 +0,0 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
`turboci-admin` is a Next.js (Pages Router) admin panel for TurboCI, a CI/CD deployment system. It manages deployments, services, and servers across cloud providers.
## Commands
### Development
```bash
bun run project:init # Full first-time setup: install deps, init twui submodule, generate DB schema
bun run dev # Next.js dev server on port 3772 (web only)
bun run pm2:dev # Start all 3 processes (web + cron + websocket) via PM2 in dev/watch mode
bun run pm2:start # Start all 3 processes via PM2 in production mode
bun run pm2:kill # Kill all PM2 processes
```
### Build & Database
```bash
bun run build # Production Next.js build
bun run db:schema # Regenerate SQLite types from schema (run after DB changes)
```
### Docker
```bash
bun run docker:start # Rebuild and start all containers
bun run docker:logs # Tail Docker logs
```
### Submodule (twui)
```bash
bun run twui:update # Pull latest twui component library
```
## Architecture
### Process Model
The app runs as **three separate processes**, managed by PM2 (dev) or Docker Compose (prod):
| Process | Entry Point | Description |
|---|---|---|
| `turboci-web` | Next.js (port 3772) | Pages Router app + API routes |
| `turboci-websocket` | `src/websocket/index.ts` | Bun native WebSocket server (port from `WEB_SOCKET_PORT` env) |
| `turboci-cron` | `src/cron/index.ts` | Polls every 30s (`AppData.CronInterval`) to check services |
### Database
- **ORM**: `@moduletrace/nsqlite` — SQLite with Bun
- **Config**: `nsqlite.config.js` — DB name `turboci-admin`, stored in `src/db/`
- **Types**: Auto-generated in `src/db/types.ts` via `bun run db:schema`
- **Tables**: `users`, `users_ports`
### Key Directories
- `src/pages/` — Next.js pages and API routes (`/api/*`)
- `src/websocket/` — Bun WebSocket server; events are dispatched via a switch in `socket-message.ts`
- `src/cron/` — Background cron job (service health checks)
- `src/functions/` — Business logic (auth, deployment users, pages, ttyd)
- `src/utils/` — Utilities including SSH execution, config file access, port management
- `src/components/` — React components organized by page
- `src/types/index.ts` — All shared TypeScript types including `TCIConfig`, `WebSocketEvents`, `PagePropsType`
- `src/data/app-data.ts` — Central constants (`AppData`): cookie names, port ranges, timeouts
- `src/exports/client-exports.ts` — Re-exports from `@moduletrace/datasquirel` (use `_n` for number coercion, `EJSON` for WebSocket serialization)
- `twui/` — Git submodule: internal Tailwind UI component library
### TurboCI Config Files (Runtime)
The app reads deployment config from the host at runtime:
- `/root/.turboci/.config/turboci.json` — Main deployment config (`TCIGlobalConfig` type)
- `/root/.turboci/.ssh/turboci` — SSH private key for connecting to deployment servers
- `/root/.turboci/deployment_id` — Current deployment identifier
Use `grabDirNames()` (`src/utils/grab-dir-names.ts`) to get these paths, never hardcode them.
### WebSocket Event Flow
Client sends EJSON-serialized `WebSocketDataType``socket-message.ts` dispatches by `event` field → handler in `src/websocket/events/`. Connected users tracked in `global.WEBSOCKET_CONNECTED_USERS_DATA`.
### Auth
Cookie-based auth using `@moduletrace/datasquirel`. Cookie names are in `AppData` (`AuthCookieName`, `AuthCSRFCookieName`). Use `userAuth` (`src/utils/user-auth.ts`) in API routes and `getServerSideProps`.
### Environment Variables
Required in `.env` (see `test.env` for reference keys):
- `DSQL_ENCRYPTION_PASSWORD` / `DSQL_ENCRYPTION_SALT` — Used by datasquirel for auth token encryption
- `PORT` — Web server port (default 3772)
- `WEB_SOCKET_PORT` — WebSocket server port
- `HOST` — Full host URL (e.g. `http://localhost:3772`)

1
dist/web/BUILD_ID vendored
View File

@ -1 +0,0 @@
kY91tNX3MJRP3IyRET4kY

View File

@ -1,174 +0,0 @@
{
"polyfillFiles": [
"static/chunks/polyfills-42372ed130431b0a.js"
],
"devFiles": [],
"ampDevFiles": [],
"lowPriorityFiles": [
"static/kY91tNX3MJRP3IyRET4kY/_buildManifest.js",
"static/kY91tNX3MJRP3IyRET4kY/_ssgManifest.js"
],
"rootMainFiles": [],
"pages": {
"/": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/225-f257bb5bd6014d68.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/827-7975edcf8481ec69.js",
"static/chunks/pages/index-5ce092dbf4b7ea2c.js"
],
"/404": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/pages/404-8292e1046538596b.js"
],
"/_app": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/css/5c1cfee54482a455.css",
"static/chunks/pages/_app-d5effc98f319eb8e.js"
],
"/_error": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/pages/_error-10090a8ee211d5fd.js"
],
"/admin": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/827-7975edcf8481ec69.js",
"static/chunks/242-b8336fba4de93a9a.js",
"static/chunks/696-9f47b10ab1f27d0e.js",
"static/chunks/pages/admin-83b6b2d79d15b7e5.js"
],
"/admin/services": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/827-7975edcf8481ec69.js",
"static/chunks/242-b8336fba4de93a9a.js",
"static/chunks/696-9f47b10ab1f27d0e.js",
"static/chunks/pages/admin/services-48ec8a74b0ca56be.js"
],
"/admin/services/[service_name]": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/827-7975edcf8481ec69.js",
"static/chunks/242-b8336fba4de93a9a.js",
"static/chunks/696-9f47b10ab1f27d0e.js",
"static/chunks/pages/admin/services/[service_name]-0fc288a6bcc41043.js"
],
"/admin/settings": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/827-7975edcf8481ec69.js",
"static/chunks/242-b8336fba4de93a9a.js",
"static/chunks/pages/admin/settings-bd82e576fc0744d5.js"
],
"/admin/users": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/242-b8336fba4de93a9a.js",
"static/chunks/pages/admin/users-9119f10d67bb4442.js"
],
"/admin/users/[deployment_user_id]": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/242-b8336fba4de93a9a.js",
"static/chunks/pages/admin/users/[deployment_user_id]-e11d7e3f20a9460d.js"
],
"/admin/users/add-user": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/827-7975edcf8481ec69.js",
"static/chunks/242-b8336fba4de93a9a.js",
"static/chunks/pages/admin/users/add-user-cb427987939b9d0b.js"
],
"/auth/login": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/225-f257bb5bd6014d68.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/827-7975edcf8481ec69.js",
"static/chunks/pages/auth/login-3f936f997e58438c.js"
],
"/auth/logout": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/pages/auth/logout-c8b207f96be4f684.js"
],
"/auth/signup": [
"static/chunks/webpack-38cee4c0e358b1a3.js",
"static/chunks/framework-bfa817c72d812316.js",
"static/chunks/main-761b7faf59ba862f.js",
"static/chunks/29107295-2819ba6e51dbf961.js",
"static/chunks/e5d67320-ccbab4288ca637ad.js",
"static/chunks/664-e347d64e56042a02.js",
"static/chunks/433-ace0b205fb566ad3.js",
"static/chunks/7-2db8c3551ba01919.js",
"static/chunks/827-7975edcf8481ec69.js",
"static/chunks/pages/auth/signup-726f0563911fb18e.js"
]
},
"ampFirstPages": []
}

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
{"version":1,"hasExportPathMap":false,"exportTrailingSlash":false,"isNextImageImported":false}

View File

@ -1 +0,0 @@
{"version":1,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"inline","remotePatterns":[],"unoptimized":false,"sizes":[640,750,828,1080,1200,1920,2048,3840,16,32,48,64,96,128,256,384]}}

View File

@ -1 +0,0 @@
{"version":1,"files":["../../node_modules/styled-jsx/index.js","../../node_modules/styled-jsx/package.json","../../node_modules/styled-jsx/dist/index/index.js","../../node_modules/react/package.json","../../node_modules/react/index.js","../../node_modules/client-only/package.json","../../node_modules/react/cjs/react.production.js","../../node_modules/client-only/index.js","../../node_modules/styled-jsx/style.js","../../node_modules/next/dist/compiled/next-server/server.runtime.prod.js","../../node_modules/next/package.json","../../node_modules/next/dist/server/body-streams.js","../../node_modules/next/dist/lib/constants.js","../../node_modules/next/dist/lib/picocolors.js","../../node_modules/next/dist/shared/lib/constants.js","../../node_modules/next/dist/server/web/utils.js","../../node_modules/next/dist/client/components/app-router-headers.js","../../node_modules/next/dist/server/lib/trace/tracer.js","../../node_modules/next/dist/server/lib/trace/constants.js","../../node_modules/next/dist/shared/lib/modern-browserslist-target.js","../../node_modules/next/dist/shared/lib/runtime-config.external.js","../../node_modules/next/dist/compiled/lru-cache/package.json","../../node_modules/next/dist/compiled/node-html-parser/package.json","../../node_modules/next/dist/compiled/ws/package.json","../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../node_modules/next/dist/compiled/lru-cache/index.js","../../node_modules/next/dist/compiled/node-html-parser/index.js","../../node_modules/next/dist/compiled/ws/index.js","../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../node_modules/@swc/helpers/package.json","../../node_modules/next/dist/client/components/async-local-storage.js","../../node_modules/next/dist/shared/lib/error-source.js","../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../node_modules/next/dist/compiled/debug/package.json","../../node_modules/next/dist/lib/semver-noop.js","../../node_modules/next/dist/compiled/debug/index.js","../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/amp-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/app-router-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/entrypoints.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/head-manager-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/hooks-client-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/html-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/image-config-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/loadable-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/loadable.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/router-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/server-inserted-html.js","../../node_modules/next/dist/server/future/route-modules/app-page/module.compiled.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/amp-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/app-router-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/entrypoints.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/head-manager-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/hooks-client-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/html-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/image-config-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/loadable-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/loadable.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/router-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/server-inserted-html.js","../../node_modules/next/dist/server/future/route-modules/pages/module.compiled.js"]}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"type": "commonjs"}

View File

@ -1 +0,0 @@
{"version":4,"routes":{},"dynamicRoutes":{},"preview":{"previewModeId":"50498733e59b134cfaca076ef5ae2283","previewModeSigningKey":"18691635f3b7718f5a926e6901267c93b1afb99affea2c7073efb07adc0d88ff","previewModeEncryptionKey":"f704b66d9f4b84abc4a9a73edb2daa82310de8ac70d82f72b908a700d05a1016"},"notFoundRoutes":[]}

View File

@ -1 +0,0 @@
{}

View File

@ -1 +0,0 @@
{"version":1,"config":{"env":{},"webpack":null,"eslint":{"ignoreDuringBuilds":false},"typescript":{"ignoreBuildErrors":false,"tsconfigPath":"tsconfig.json"},"distDir":"dist/web","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.js","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"analyticsId":"","images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"inline","remotePatterns":[],"unoptimized":false},"devIndicators":{"buildActivity":true,"buildActivityPosition":"bottom-right"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"amp":{"canonicalBase":""},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"optimizeFonts":true,"excludeDefaultMomentLocales":true,"serverRuntimeConfig":{},"publicRuntimeConfig":{},"reactProductionProfiling":false,"reactStrictMode":true,"httpAgentOptions":{"keepAlive":true},"outputFileTracing":true,"staticPageGenerationTimeout":60,"swcMinify":true,"modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"experimental":{"multiZoneDraftMode":false,"prerenderEarlyExit":false,"serverMinification":true,"serverSourceMaps":false,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","middlewarePrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":2,"memoryBasedWorkersCount":false,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"outputFileTracingRoot":"","swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"adjustFontFallbacks":false,"adjustFontFallbacksWithSizeAdjust":false,"typedRoutes":false,"instrumentationHook":false,"bundlePagesExternals":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"missingSuspenseWithCSRBailout":true,"optimizeServerReact":true,"useEarlyImport":false,"staleTimes":{"dynamic":30,"static":300},"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"configFileName":"next.config.js"},"appDir":"/root/.turboci/admin","relativeAppDir":"","files":["dist/web/routes-manifest.json","dist/web/server/pages-manifest.json","dist/web/build-manifest.json","dist/web/prerender-manifest.json","dist/web/server/middleware-manifest.json","dist/web/server/middleware-build-manifest.js","dist/web/server/middleware-react-loadable-manifest.js","dist/web/react-loadable-manifest.json","dist/web/server/font-manifest.json","dist/web/BUILD_ID","dist/web/server/next-font-manifest.js","dist/web/server/next-font-manifest.json"],"ignore":["node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*"]}

View File

@ -1 +0,0 @@
{"version":3,"pages404":true,"caseSensitive":false,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/admin/services/[service_name]","regex":"^/admin/services/([^/]+?)(?:/)?$","routeKeys":{"nxtPservice_name":"nxtPservice_name"},"namedRegex":"^/admin/services/(?<nxtPservice_name>[^/]+?)(?:/)?$"},{"page":"/admin/users/[deployment_user_id]","regex":"^/admin/users/([^/]+?)(?:/)?$","routeKeys":{"nxtPdeployment_user_id":"nxtPdeployment_user_id"},"namedRegex":"^/admin/users/(?<nxtPdeployment_user_id>[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"},{"page":"/admin","regex":"^/admin(?:/)?$","routeKeys":{},"namedRegex":"^/admin(?:/)?$"},{"page":"/admin/services","regex":"^/admin/services(?:/)?$","routeKeys":{},"namedRegex":"^/admin/services(?:/)?$"},{"page":"/admin/settings","regex":"^/admin/settings(?:/)?$","routeKeys":{},"namedRegex":"^/admin/settings(?:/)?$"},{"page":"/admin/users","regex":"^/admin/users(?:/)?$","routeKeys":{},"namedRegex":"^/admin/users(?:/)?$"},{"page":"/admin/users/add-user","regex":"^/admin/users/add\\-user(?:/)?$","routeKeys":{},"namedRegex":"^/admin/users/add\\-user(?:/)?$"},{"page":"/auth/login","regex":"^/auth/login(?:/)?$","routeKeys":{},"namedRegex":"^/auth/login(?:/)?$"},{"page":"/auth/logout","regex":"^/auth/logout(?:/)?$","routeKeys":{},"namedRegex":"^/auth/logout(?:/)?$"},{"page":"/auth/signup","regex":"^/auth/signup(?:/)?$","routeKeys":{},"namedRegex":"^/auth/signup(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/index.json$"},{"page":"/admin","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin.json$"},{"page":"/admin/services","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin/services.json$"},{"page":"/admin/services/[service_name]","routeKeys":{"nxtPservice_name":"nxtPservice_name"},"dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin/services/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin/services/(?<nxtPservice_name>[^/]+?)\\.json$"},{"page":"/admin/settings","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin/settings.json$"},{"page":"/admin/users","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin/users.json$"},{"page":"/admin/users/add-user","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin/users/add-user.json$"},{"page":"/admin/users/[deployment_user_id]","routeKeys":{"nxtPdeployment_user_id":"nxtPdeployment_user_id"},"dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin/users/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/admin/users/(?<nxtPdeployment_user_id>[^/]+?)\\.json$"},{"page":"/auth/login","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/auth/login.json$"},{"page":"/auth/logout","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/auth/logout.json$"},{"page":"/auth/signup","dataRouteRegex":"^/_next/data/kY91tNX3MJRP3IyRET4kY/auth/signup.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","prefetchHeader":"Next-Router-Prefetch","didPostponeHeader":"x-nextjs-postponed","contentTypeHeader":"text/x-component","suffix":".rsc","prefetchSuffix":".prefetch.rsc"},"rewrites":[]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
[]

View File

@ -1 +0,0 @@
{"version":1,"functions":{"/admin/services/[service_name]":{},"/admin/users/add-user":{},"/admin/services":{},"/admin/settings":{},"/admin":{},"/admin/users":{},"/admin/users/[deployment_user_id]":{},"/_app":{},"/auth/login":{},"/auth/logout":{},"/":{},"/auth/signup":{}}}

View File

@ -1 +0,0 @@
self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST="[]";

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
{
"version": 3,
"middleware": {},
"functions": {},
"sortedMiddleware": []
}

View File

@ -1 +0,0 @@
self.__REACT_LOADABLE_MANIFEST="{}";

View File

@ -1 +0,0 @@
self.__NEXT_FONT_MANIFEST='{"pages":{},"app":{},"appUsingSizeAdjust":false,"pagesUsingSizeAdjust":false}';

View File

@ -1 +0,0 @@
{"pages":{},"app":{},"appUsingSizeAdjust":false,"pagesUsingSizeAdjust":false}

View File

@ -1 +0,0 @@
{"/_error":"pages/_error.js","/404":"pages/404.html","/_document":"pages/_document.js","/api/admin/settings":"pages/api/admin/settings.js","/api/auth/login":"pages/api/auth/login.js","/api/auth/signup":"pages/api/auth/signup.js","/api/hello":"pages/api/hello.js","/admin/services/[service_name]":"pages/admin/services/[service_name].js","/admin/settings":"pages/admin/settings.js","/admin/services":"pages/admin/services.js","/admin":"pages/admin.js","/admin/users/[deployment_user_id]":"pages/admin/users/[deployment_user_id].js","/admin/users/add-user":"pages/admin/users/add-user.js","/admin/users":"pages/admin/users.js","/":"pages/index.js","/auth/logout":"pages/auth/logout.js","/auth/login":"pages/auth/login.js","/auth/signup":"pages/auth/signup.js","/_app":"pages/_app.js"}

View File

@ -1 +0,0 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/5c1cfee54482a455.css" as="style"/><link rel="stylesheet" href="/_next/static/css/5c1cfee54482a455.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-38cee4c0e358b1a3.js" defer=""></script><script src="/_next/static/chunks/framework-bfa817c72d812316.js" defer=""></script><script src="/_next/static/chunks/main-761b7faf59ba862f.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d5effc98f319eb8e.js" defer=""></script><script src="/_next/static/chunks/29107295-2819ba6e51dbf961.js" defer=""></script><script src="/_next/static/chunks/664-e347d64e56042a02.js" defer=""></script><script src="/_next/static/chunks/pages/404-8292e1046538596b.js" defer=""></script><script src="/_next/static/kY91tNX3MJRP3IyRET4kY/_buildManifest.js" defer=""></script><script src="/_next/static/kY91tNX3MJRP3IyRET4kY/_ssgManifest.js" defer=""></script></head><body class="antialiased"><div id="__next"><main class="flex flex-col items-center twui-main w-screen h-screen overflow-hidden"><section class="flex flex-col items-center px-4 sm:px-10 py-10 twui-section w-full h-full"><div class="flex w-full max-w-container gap-4 justify-between flex-wrap flex-col xl:flex-row items-start xl:items-center twui-container grid-frame grid-cols-1 h-full"><div class="flex flex-col items-start gap-4 twui-stack w-full justify-between h-full grid-cell"><div class="flex flex-col items-start twui-stack gap-0"><div class="flex flex-row gap-2 flex-wrap items-center twui-row"><div class="flex flex-row gap-2 flex-wrap items-center twui-row p-6"><a aria-label="TurboCI home" class="inline-flex items-center gap-3" href="/"><svg viewBox="0 0 48 48" aria-hidden="true" class="h-10 w-10 shrink-0"><defs><linearGradient id="_R_1am_" x1="9" y1="9" x2="31" y2="34" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="#9cf0c0"></stop><stop offset="100%" stop-color="#42d392"></stop></linearGradient><linearGradient id="_R_1amH1_" x1="22" y1="22" x2="36" y2="40" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="#2bc67e"></stop><stop offset="100%" stop-color="#1f8458"></stop></linearGradient></defs><path d="M35 6H23.6c-2 0-3.8 1-4.8 2.7L7.5 28.3c-1.4 2.5.4 5.7 3.2 5.7h9.1c2 0 3.8-1 4.8-2.7l11.2-19.6C39.6 9.2 37.8 6 35 6Z" fill="url(#_R_1am_)"></path><path d="M23.9 24h13.4c2.8 0 4.6 3.1 3.2 5.6l-4.1 7.1c-1 1.7-2.8 2.7-4.8 2.7H18.2c-2.8 0-4.6-3.1-3.2-5.6l4.1-7.1c1-1.7 2.8-2.7 4.8-2.7Z" fill="url(#_R_1amH1_)"></path></svg><span class="font-display text-[1.02rem] font-semibold tracking-tight text-foreground">TurboCI</span></a></div><div class="border-slate-200 dark:border-white/10 border-0 border-l h-full min-h-5 twui-divider twui-divider-vertical border-solid"></div></div><div class="border-slate-200 dark:border-white/10 border-0 border-t w-full twui-divider twui-divider-horizontal border-solid"></div></div><div class="flex flex-col items-center justify-center gap-4 w-full h-full twui-center p-10"><h2 class="text-2xl md:text-3xl mb-4 twui-headings twui-heading twui-h2">Page Not Found!</h2></div><div class="flex flex-col items-start gap-4 twui-stack"><div class="border-slate-200 dark:border-white/10 border-0 border-t w-full twui-divider twui-divider-horizontal border-solid"></div><div class="twui-spacer h-20 w-full"></div></div></div></div></section></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"kY91tNX3MJRP3IyRET4kY","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>

View File

@ -1 +0,0 @@
{"version":1,"files":["../webpack-runtime.js","../chunks/859.js","../chunks/800.js","../../../../package.json"]}

View File

@ -1 +0,0 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/5c1cfee54482a455.css" as="style"/><link rel="stylesheet" href="/_next/static/css/5c1cfee54482a455.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-38cee4c0e358b1a3.js" defer=""></script><script src="/_next/static/chunks/framework-bfa817c72d812316.js" defer=""></script><script src="/_next/static/chunks/main-761b7faf59ba862f.js" defer=""></script><script src="/_next/static/chunks/pages/_app-d5effc98f319eb8e.js" defer=""></script><script src="/_next/static/chunks/pages/_error-10090a8ee211d5fd.js" defer=""></script><script src="/_next/static/kY91tNX3MJRP3IyRET4kY/_buildManifest.js" defer=""></script><script src="/_next/static/kY91tNX3MJRP3IyRET4kY/_ssgManifest.js" defer=""></script></head><body class="antialiased"><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"kY91tNX3MJRP3IyRET4kY","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":1,"files":["../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/tailwind-merge/package.json","../../../../package.json","../../../../src/pages/_app.tsx","../../package.json","../chunks/150.js","../chunks/248.js","../chunks/752.js","../chunks/800.js","../chunks/824.js","../chunks/859.js","../chunks/font-manifest.json","../webpack-runtime.js"]}

View File

@ -1 +0,0 @@
"use strict";(()=>{var e={};e.id=660,e.ids=[660],e.modules={1070:(e,r,s)=>{s.r(r),s.d(r,{default:()=>a});var t=s(997),i=s(6859);function a(){return(0,t.jsxs)(i.Html,{lang:"en",children:[t.jsx(i.Head,{}),(0,t.jsxs)("body",{className:"antialiased",children:[t.jsx(i.Main,{}),t.jsx(i.NextScript,{})]})]})}},2785:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},6689:e=>{e.exports=require("react")},997:e=>{e.exports=require("react/jsx-runtime")},5315:e=>{e.exports=require("path")}};var r=require("../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[859],()=>s(1070));module.exports=t})();

View File

@ -1 +0,0 @@
{"version":1,"files":["../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/compiled/node-html-parser/index.js","../../../../node_modules/next/dist/compiled/node-html-parser/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../../src/pages/_document.tsx","../../package.json","../chunks/150.js","../chunks/248.js","../chunks/752.js","../chunks/800.js","../chunks/824.js","../chunks/859.js","../chunks/font-manifest.json","../webpack-runtime.js"]}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":1,"files":["../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/compiled/node-html-parser/index.js","../../../../node_modules/next/dist/compiled/node-html-parser/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/tailwind-merge/package.json","../../package.json","../chunks/150.js","../chunks/248.js","../chunks/752.js","../chunks/800.js","../chunks/824.js","../chunks/859.js","../chunks/font-manifest.json","../webpack-runtime.js"]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(()=>{var e={};e.id=329,e.ids=[329],e.modules={2578:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>g,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>x,getStaticProps:()=>p,reportWebVitals:()=>h,routeModule:()=>P,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>q,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>v});var a=r(7093),i=r(5244),l=r(1323),n=r(1070),c=r(3893),d=r(4300),o=e([c,d]);[c,d]=o.then?(await o)():o;let u=(0,l.l)(d,"default"),p=(0,l.l)(d,"getStaticProps"),x=(0,l.l)(d,"getStaticPaths"),m=(0,l.l)(d,"getServerSideProps"),g=(0,l.l)(d,"config"),h=(0,l.l)(d,"reportWebVitals"),v=(0,l.l)(d,"unstable_getStaticProps"),j=(0,l.l)(d,"unstable_getStaticPaths"),f=(0,l.l)(d,"unstable_getStaticParams"),S=(0,l.l)(d,"unstable_getServerProps"),q=(0,l.l)(d,"unstable_getServerSideProps"),P=new a.PagesRouteModule({definition:{kind:i.x.PAGES,page:"/admin/services/[service_name]",pathname:"/admin/services/[service_name]",bundlePath:"",filename:""},components:{App:c.default,Document:n.default},userland:d});s()}catch(e){s(e)}})},5272:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>u});var a=r(997),i=r(3216),l=r(6689),n=r(3893),c=r(9705),d=r(9986),o=e([i,n,c,d]);function u({service:e}){let{pageProps:t}=(0,l.useContext)(n.AppContext),r=e.servers,[s,o]=(0,l.useState)(r?.[0]),u=!!r?.length&&!!(r.length%2);return a.jsx(i.Z,{className:"w-full grid-cell col-span-1 gap-0",children:(0,a.jsxs)(c.Z,{className:"nested-grid-frame xl:grid-cols-2",children:[r?.map((t,r)=>a.jsx(d.Z,{server:t,service:e,wrapperProps:{className:"grid-cell"}},r)),u?a.jsx("div",{className:"grid-cell"}):null]})})}[i,n,c,d]=o.then?(await o)():o,s()}catch(e){s(e)}})},5094:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>x});var a=r(997),i=r(3216),l=r(6689),n=r(3893),c=r(5272),d=r(9705),o=r(5031),u=r(1309),p=e([i,n,c,d,o,u]);function x(){let{pageProps:e,ws:t}=(0,l.useContext)(n.AppContext),{service:r,deployment:s,children_services:p}=e,x=[r,...p||[]],[m,g]=(0,l.useState)(r||void 0),h=x.findIndex(e=>e?.service_name==m?.service_name)+1;return m?.servers,a.jsx(i.Z,{className:"w-full nested-grid-frame grid-cols-1",children:(0,a.jsxs)(i.Z,{className:"grid-cell gap-0",children:[a.jsx(d.Z,{className:"grid-cell-content flex-nowrap",children:(0,a.jsxs)(d.Z,{className:"w-full justify-between",children:[a.jsx(d.Z,{children:(0,a.jsxs)(u.Z,{children:["Cluster #",h]})}),a.jsx(d.Z,{children:a.jsx(o.Z,{options:x.map((e,t)=>({value:e?.service_name,title:`Cluster #${t+1}`})),wrapperWrapperProps:{className:"max-w-[250px]"},changeHandler:e=>{g(void 0),t.sendData({event:"client:kill-all-ports"}),setTimeout(()=>{g(x.find(t=>t?.service_name==e)||void 0)},200)}})})]})}),a.jsx("hr",{}),m?a.jsx(c.Z,{service:m}):void 0]})})}[i,n,c,d,o,u]=p.then?(await p)():p,s()}catch(e){s(e)}})},7680:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>p});var a=r(997),i=r(6689),l=r(3893),n=r(6425),c=r(2984),d=r(2394),o=r(5094),u=e([l,c,d,o]);function p(){let{pageProps:e}=(0,i.useContext)(l.AppContext),{service:t,deployment:r}=e,s=r?.deployment_name,u=t?.service_name;return(0,a.jsxs)(i.Fragment,{children:[a.jsx(d.Z,{title:`${(0,n.Z)(u)} Service`,description:(0,a.jsxs)(a.Fragment,{children:["Deployment ",a.jsx("code",{children:s})," > ",a.jsx("code",{children:u})]})}),a.jsx(c.Z,{}),a.jsx(o.Z,{})]})}[l,c,d,o]=u.then?(await u)():u,s()}catch(e){s(e)}})},4300:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{default:()=>d,getServerSideProps:()=>o});var a=r(997),i=r(7680),l=r(8688),n=r(3060),c=e([i,n]);function d(){return a.jsx(n.Z,{children:a.jsx(i.Z,{})})}[i,n]=c.then?(await c)():c;let o=async e=>await (0,l.Z)({ctx:e});s()}catch(e){s(e)}})},5191:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},4882:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt")},4605:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson")},1521:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy")},6255:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify")},1635:e=>{e.exports=require("dayjs")},6517:e=>{e.exports=require("lodash")},2423:e=>{e.exports=require("lucide-react")},2785:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},968:e=>{e.exports=require("next/head")},6689:e=>{e.exports=require("react")},6405:e=>{e.exports=require("react-dom")},997:e=>{e.exports=require("react/jsx-runtime")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},8097:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[859,800,752,248,150,824],()=>r(2578));module.exports=s})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(()=>{var e={};e.id=786,e.ids=[786],e.modules={8787:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{config:()=>m,default:()=>c,getServerSideProps:()=>g,getStaticPaths:()=>x,getStaticProps:()=>p,reportWebVitals:()=>y,routeModule:()=>f,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>_,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>b,unstable_getStaticProps:()=>h});var s=r(7093),i=r(5244),n=r(1323),l=r(1070),u=r(3893),d=r(7103),o=e([u,d]);[u,d]=o.then?(await o)():o;let c=(0,n.l)(d,"default"),p=(0,n.l)(d,"getStaticProps"),x=(0,n.l)(d,"getStaticPaths"),g=(0,n.l)(d,"getServerSideProps"),m=(0,n.l)(d,"config"),y=(0,n.l)(d,"reportWebVitals"),h=(0,n.l)(d,"unstable_getStaticProps"),b=(0,n.l)(d,"unstable_getStaticPaths"),q=(0,n.l)(d,"unstable_getStaticParams"),S=(0,n.l)(d,"unstable_getServerProps"),_=(0,n.l)(d,"unstable_getServerSideProps"),f=new s.PagesRouteModule({definition:{kind:i.x.PAGES,page:"/admin/users/[deployment_user_id]",pathname:"/admin/users/[deployment_user_id]",bundlePath:"",filename:""},components:{App:u.default,Document:l.default},userland:d});a()}catch(e){a(e)}})},3523:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{Z:()=>p});var s=r(997),i=r(6689),n=r(3893),l=r(2984),u=r(2394),d=r(1764),o=r(9705),c=e([n,l,u,d,o]);function p(){let{pageProps:e}=(0,i.useContext)(n.AppContext),{deployment_user:t}=e;if(!t?.id)return null;let r=!!t.is_super_admin;return(0,s.jsxs)(i.Fragment,{children:[s.jsx(u.Z,{title:(0,s.jsxs)(o.Z,{children:[s.jsx("span",{children:t?.first_name}),s.jsx("span",{children:t?.last_name}),r?s.jsx(d.Z,{className:"inline",children:"Super Admin"}):null]})}),s.jsx(l.Z,{})]})}[n,l,u,d,o]=c.then?(await c)():c,a()}catch(e){a(e)}})},7103:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.r(t),r.d(t,{default:()=>p,getServerSideProps:()=>x});var s=r(997),i=r(3523),n=r(8683),l=r(8688),u=r(3060),d=r(8804),o=r.n(d),c=e([i,u]);function p(){return s.jsx(u.Z,{children:s.jsx(i.Z,{})})}[i,u]=c.then?(await c)():c;let x=async e=>await (0,l.Z)({ctx:e,propsFn:async({user:e,props:t,query:r})=>e.super_admin?{deployment_user:(await o().select({table:"users",targetId:(0,n._n)(r?.deployment_user_id)})).singleRes}:"/admin"});a()}catch(e){a(e)}})},1764:(e,t,r)=>{r.a(e,async(e,a)=>{try{r.d(t,{Z:()=>l});var s=r(997);r(6689);var i=r(8097),n=e([i]);function l({color:e,variant:t,children:r,href:a,newTab:n,linkProps:l,...u}){let d=s.jsx("div",{...u,className:(0,i.twMerge)("text-xs px-2 py-0.5 rounded-full outline-0","text-center flex items-center justify-center","secondary"==e?"bg-secondary text-white outline-secbg-secondary":"success"==e?"bg-success outline-success text-white":"error"==e?"bg-orange-700 outline-orange-700":"gray"==e?(0,i.twMerge)("bg-slate-100 outline-slate-200 dark:bg-gray-dark dark:outline-gray-dark","text-slate-800 dark:text-white"):"bg-primary text-white outline-primbg-primary twui-tag-primary","outlined"==t?"!bg-transparent outline-1 "+("secondary"==e?"text-secondary":"success"==e?"text-success dark:text-success-dark":"error"==e?"text-orange-700":"gray"==e?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark twui-tag-primary-outlined"):"ghost"==t?"!bg-transparent outline-none border-none "+("secondary"==e?"text-secondary":"success"==e?"text-success dark:text-success-dark":"error"==e?"text-orange-700":"gray"==e?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark"):"","twui-tag",u.className),children:r});return a?s.jsx("a",{href:a,target:n?"_blank":void 0,...l,className:(0,i.twMerge)("hover:opacity-80",l?.className),children:d}):d}i=(n.then?(await n)():n)[0],a()}catch(e){a(e)}})},5191:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},4882:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt")},4605:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson")},1521:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy")},6255:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify")},8804:e=>{e.exports=require("@moduletrace/nsqlite")},1635:e=>{e.exports=require("dayjs")},6517:e=>{e.exports=require("lodash")},2423:e=>{e.exports=require("lucide-react")},2785:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},968:e=>{e.exports=require("next/head")},6689:e=>{e.exports=require("react")},6405:e=>{e.exports=require("react-dom")},997:e=>{e.exports=require("react/jsx-runtime")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},8097:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[859,800,752,150],()=>r(8787));module.exports=a})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(()=>{var e={};e.id=908,e.ids=[908],e.modules={5529:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/hashPassword")},8804:e=>{e.exports=require("@moduletrace/nsqlite")},1635:e=>{e.exports=require("dayjs")},145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},2048:e=>{e.exports=require("fs")},6249:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},6644:(e,t,r)=>{r.r(t),r.d(t,{config:()=>l,default:()=>d,routeModule:()=>c});var i={};r.r(i),r.d(i,{default:()=>u});var s=r(1802),n=r(7153),a=r(6249),o=r(4751);async function u(e,t){try{if("POST"!==e.method)return t.json({success:!1,msg:"Wrong Method"});let{email:r,username:i,password:s}=e.body;if("string"!=typeof s||!s?.match(/./))throw Error("Password is required!");let n=await (0,o.Z)({res:t,email_or_username:r||i,password:s});return t.json(n)}catch(e){return t.json({success:!1,msg:e.message})}}let d=(0,a.l)(i,"default"),l=(0,a.l)(i,"config"),c=new s.PagesAPIRouteModule({definition:{kind:n.x.PAGES_API,page:"/api/auth/login",pathname:"/api/auth/login",bundlePath:"",filename:""},userland:i})},2253:(e,t,r)=>{r.d(t,{dF:()=>a(),_n:()=>l,lV:()=>u()});let i=require("@moduletrace/datasquirel/dist/client");var s=r.n(i);let n=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson");var a=r.n(n);let o=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify");var u=r.n(o);let d=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy"),l=r.n(d)();s().utils.serializeQuery,s().utils.deserializeQuery},4751:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(8804),s=r.n(i),n=r(6941),a=r(2253);let o=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/encrypt");var u=r.n(o),d=r(5529),l=r.n(d),c=r(1635),p=r.n(c),m=r(9786);async function f({res:e,user_id:t,password:r,email_or_username:i}){let o;if(t){let e=await s().select({table:"users",targetId:t});if(!e.singleRes?.id)throw Error("Couldn't Find user for login");o=e.singleRes}if(i){let e=await s().select({table:"users",query:{query:{email:{value:i},username:{value:i}},searchOperator:"OR"}});if(!e.singleRes?.id)throw Error("Couldn't Find user for login");o=e.singleRes}if(!o)return{success:!1,msg:"User Not Found!"};if(r&&l()({password:r})!==o.password)return{success:!1,msg:"Invalid Password."};let d=Date.now(),c=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),f={first_name:o.first_name,last_name:o.last_name,date:d,email:o.email,csrf_k:c,id:o.id,logged_in_status:!0,image:o.image,image_thumbnail:o.image,super_admin:!!o.is_super_admin},g=a.dF.stringify(f),h=u()({data:g||""}),_=p()(Date.now()).add(7,"days");_.add(7,"days");let{auth_key_cookie_name:y,csrf_cookie_name:P}=(0,m.Z)();return(0,n.d8)(e,[{name:y,value:h||"",options:{secure:"localhost"!==process.env.DOMAIN,path:"/",expires:_,domain:process.env.DOMAIN}},{name:P,value:c,options:{path:"/",expires:_,domain:process.env.DOMAIN}}]),{success:!0,singleRes:f}}},6941:(e,t,r)=>{function i(e,t){let r=[];for(let e=0;e<t.length;e++){let{name:i,options:s,value:n}=t[e],a=[`${encodeURIComponent(i)}=${encodeURIComponent(n)}`];s.expires&&a.push(`Expires=${s.expires.toDate().toUTCString()}`),void 0!==s.maxAge&&a.push(`Max-Age=${s.maxAge}`),s.path&&a.push(`Path=${s.path}`),s.domain&&a.push(`Domain=${s.domain}`),s.secure&&a.push("Secure"),s.httpOnly&&a.push("HttpOnly"),r.push(a)}let i=r.map(e=>e.join("; "));e.setHeader("Set-Cookie",i)}function s(e,t){return e.split(";").reduce((e,t)=>{let[r,i]=t.trim().split("=").map(decodeURIComponent);return e[r]=i,e},{})[t]||null}r.d(t,{d8:()=>i,ej:()=>s}),r(1635)},9786:(e,t,r)=>{r.d(t,{Z:()=>a});var i=r(2048);let s=require("path");var n=r.n(s);function a(){let{TURBOCI_DEPLOYMENT_ID_FILE:e}=function(){let e=n().resolve(__dirname,"../../"),t="/root/.turboci",r=n().join(t,".config"),i=n().join(r,"turboci.json"),s=n().join(t,"deployment_id"),a=n().join(t,".ssh"),o=n().join(a,"turboci");return{APP_DIR:e,TURBOCI_CONFIG_DIR:r,TURBOCI_CONFIG_JSON_FILE:i,TURBOCI_DIR:t,TURBOCI_SSH_DIR:a,TURBOCI_SSH_KEY_FILE:o,TURBOCI_DEPLOYMENT_ID_FILE:s}}();if(!(0,i.existsSync)(e))throw Error(`\`${e}\` does not exist.`);let t=(0,i.readFileSync)(e,"utf-8").split("-").shift();if(!t)throw Error("Invalid deployment_id");return{auth_key_cookie_name:`turboci-admin-${t}-auth-key`,csrf_cookie_name:`turboci-admin-${t}-csrf`}}},7153:(e,t)=>{var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1802:(e,t,r)=>{e.exports=r(145)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=6644);module.exports=r})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(()=>{var e={};e.id=453,e.ids=[453],e.modules={145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},6249:(e,n)=>{Object.defineProperty(n,"l",{enumerable:!0,get:function(){return function e(n,t){return t in n?n[t]:"then"in n&&"function"==typeof n.then?n.then(n=>e(n,t)):"function"==typeof n&&"default"===t?n:void 0}}})},98:(e,n,t)=>{t.r(n),t.d(n,{config:()=>d,default:()=>P,routeModule:()=>l});var r={};t.r(r),t.d(r,{default:()=>a});var i=t(1802),o=t(7153),u=t(6249);function a(e,n){n.status(200).json({name:"John Doe"})}let P=(0,u.l)(r,"default"),d=(0,u.l)(r,"config"),l=new i.PagesAPIRouteModule({definition:{kind:o.x.PAGES_API,page:"/api/hello",pathname:"/api/hello",bundlePath:"",filename:""},userland:r})},7153:(e,n)=>{var t;Object.defineProperty(n,"x",{enumerable:!0,get:function(){return t}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(t||(t={}))},1802:(e,n,t)=>{e.exports=t(145)}};var n=require("../../webpack-api-runtime.js");n.C(e);var t=n(n.s=98);module.exports=t})();

View File

@ -1 +0,0 @@
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js","../../../../../node_modules/next/dist/compiled/node-html-parser/index.js","../../../../../node_modules/next/dist/compiled/node-html-parser/package.json","../../../../../node_modules/next/dist/compiled/raw-body/index.js","../../../../../node_modules/next/dist/compiled/raw-body/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../package.json","../../chunks/150.js","../../chunks/248.js","../../chunks/752.js","../../chunks/800.js","../../chunks/824.js","../../chunks/859.js","../../chunks/font-manifest.json","../../webpack-api-runtime.js"]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":1,"files":["../../../../../node_modules/client-only/index.js","../../../../../node_modules/client-only/package.json","../../../../../node_modules/dayjs/dayjs.min.js","../../../../../node_modules/dayjs/package.json","../../../../../node_modules/lodash/lodash.js","../../../../../node_modules/lodash/package.json","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../../node_modules/next/dist/compiled/node-html-parser/index.js","../../../../../node_modules/next/dist/compiled/node-html-parser/package.json","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/cjs/react-dom.production.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/package.json","../../../../../node_modules/react-dom/server.browser.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/react/package.json","../../../../../node_modules/styled-jsx/dist/index/index.js","../../../../../node_modules/styled-jsx/index.js","../../../../../node_modules/styled-jsx/package.json","../../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../../node_modules/tailwind-merge/package.json","../../../../../package.json","../../../package.json","../../chunks/150.js","../../chunks/248.js","../../chunks/752.js","../../chunks/800.js","../../chunks/824.js","../../chunks/859.js","../../chunks/font-manifest.json","../../webpack-runtime.js"]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(()=>{"use strict";var e={},r={};function t(o){var a=r[o];if(void 0!==a)return a.exports;var u=r[o]={exports:{}},n=!0;try{e[o](u,u.exports,t),n=!1}finally{n&&delete r[o]}return u.exports}t.m=e,t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce((r,o)=>(t.f[o](e,r),r),[])),t.u=e=>{},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.X=(e,r,o)=>{var a=r;o||(r=e,o=()=>t(t.s=a)),r.map(t.e,t);var u=o();return void 0===u?e:u},(()=>{var e={165:1},r=r=>{var o=r.modules,a=r.ids,u=r.runtime;for(var n in o)t.o(o,n)&&(t.m[n]=o[n]);u&&u(t);for(var l=0;l<a.length;l++)e[a[l]]=1};t.f.require=(o,a)=>{e[o]||(165!=o?r(require("./chunks/"+t.u(o))):e[o]=1)},module.exports=t,t.C=r})()})();

View File

@ -1 +0,0 @@
(()=>{"use strict";var e={},r={};function o(t){var a=r[t];if(void 0!==a)return a.exports;var n=r[t]={exports:{}},u=!0;try{e[t](n,n.exports,o),u=!1}finally{u&&delete r[t]}return n.exports}o.m=e,(()=>{var e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",r="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",a=e=>{e&&e.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))},n=o=>o.map(o=>{if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){var n=[];n.d=0,o.then(e=>{u[r]=e,a(n)},e=>{u[t]=e,a(n)});var u={};return u[e]=e=>e(n),u}}var p={};return p[e]=e=>{},p[r]=o,p});o.a=(o,u,p)=>{p&&((f=[]).d=-1);var f,i,l,d,s=new Set,c=o.exports,b=new Promise((e,r)=>{d=r,l=e});b[r]=c,b[e]=e=>(f&&e(f),s.forEach(e),b.catch(e=>{})),o.exports=b,u(o=>{i=n(o);var a,u=()=>i.map(e=>{if(e[t])throw e[t];return e[r]}),p=new Promise(r=>{(a=()=>r(u)).r=0;var o=e=>e!==f&&!s.has(e)&&(s.add(e),e&&!e.d&&(a.r++,e.push(a)));i.map(r=>r[e](o))});return a.r?p:u()},e=>(e?d(b[t]=e):l(c),a(f))),f&&f.d<0&&(f.d=0)}})(),o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((r,t)=>(o.f[t](e,r),r),[])),o.u=e=>""+e+".js",o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.X=(e,r,t)=>{var a=r;t||(r=e,t=()=>o(o.s=a)),r.map(o.e,o);var n=t();return void 0===n?e:n},(()=>{var e={658:1},r=r=>{var t=r.modules,a=r.ids,n=r.runtime;for(var u in t)o.o(t,u)&&(o.m[u]=t[u]);n&&n(o);for(var p=0;p<a.length;p++)e[a[p]]=1};o.f.require=(t,a)=>{e[t]||(658!=t?r(require("./chunks/"+o.u(t))):e[t]=1)},module.exports=o,o.C=r})()})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{81981:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(2111)}])}},function(n){n.O(0,[888,774,179],function(){return n(n.s=81981)}),_N_E=n.O()}]);

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[964],{64830:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return s(9854)}])},49533:function(e,n,s){"use strict";s.d(n,{Z:function(){return h}});var i=s(85893),r=s(5606),t=s(60),l=s(67294),c=s(55412),a=s(86609),d=s(94655);function o(e){let{link:n,icon:s,...r}=e;return(0,i.jsx)(a.Z,{href:n.url,...r,...n.linkProps,children:(0,i.jsxs)(d.Z,{children:[(0,i.jsx)("span",{children:n.title}),s||(0,i.jsx)(c.Z,{size:17})]})})}var u=s(56211),v=s(60826),x=s(3326),m=s(25808),p=s(96486),f=s.n(p);function j(e){let{service:n}=e,{pageProps:s,ws:c}=(0,l.useContext)(r.AppContext),{deployment:a}=s,{ready:p,setReady:j}=(0,m.Z)(),h=null==a?void 0:a.services.filter(e=>e.parent_service_name==n.service_name),_=[n,...h||[]],[Z,g]=(0,l.useState)(null==_?void 0:_[0]);_.findIndex(e=>e.service_name==(null==Z?void 0:Z.service_name));let N=null==Z?void 0:Z.servers,[w,C]=(0,l.useState)(null==N?void 0:N[0]),k=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{var e;C(null==Z?void 0:null===(e=Z.servers)||void 0===e?void 0:e[0])},[Z]),(0,l.useEffect)(()=>{if(j(!1),w&&k.current){var e;e=k.current,c.sendData({event:"client:kill-port",server:w,service:f().omit(n,["servers"]),port:e})}setTimeout(()=>{j(!0)},2e3)},[w]),(0,i.jsxs)(t.Z,{className:"grid-cell",children:[(0,i.jsxs)(t.Z,{className:"grid-cell-content",children:[(0,i.jsxs)(d.Z,{className:"w-full justify-between",children:[(0,i.jsx)(u.Z,{children:n.service_name}),(0,i.jsx)(o,{link:{url:"/admin/services/".concat(n.service_name),title:"View"}})]}),(0,i.jsxs)("code",{children:[n.service_name," service"]})]}),(0,i.jsx)("hr",{}),(0,i.jsxs)(t.Z,{className:"gap-0",children:[(0,i.jsxs)(d.Z,{className:"p-4 grid md:grid-cols-2",children:[(0,i.jsx)(x.Z,{options:_.map((e,n)=>({value:e.service_name,title:"Cluster #".concat(n+1)})),changeHandler:e=>{g(_.find(n=>n.service_name==e))}}),N?(0,i.jsx)(x.Z,{options:N.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{C(N.find(n=>n.private_ip==e))}}):void 0]}),p&&w?(0,i.jsx)(v.Z,{server:w,service:n,portRef:k}):void 0]})]})}function h(){let{pageProps:e}=(0,l.useContext)(r.AppContext),{deployment:n,children_services:s}=e,c=null==n?void 0:n.services.filter(e=>!e.parent_service_name);return(0,i.jsx)(t.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:null==c?void 0:c.map((e,n)=>(0,i.jsx)(j,{service:e},n))})}},9854:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return f},default:function(){return j}});var i=s(85893),r=s(5606),t=s(94655),l=s(3668),c=s(60),a=s(67294);function d(){let{pageProps:e}=(0,a.useContext)(r.AppContext),{user:n,deployment:s,deployment_id:d}=e;return s?(0,i.jsx)(c.Z,{className:"w-full gap-0",children:(0,i.jsxs)(c.Z,{className:"grid-cell-content",children:[(0,i.jsxs)(l.Z,{children:[s.services.length," Services"]}),(0,i.jsx)(t.Z,{children:s.services.map((e,n)=>(0,i.jsx)("a",{href:"/admin/services/".concat(e.service_name),children:(0,i.jsx)("code",{children:e.service_name})},n))})]})}):null}var o=s(21147),u=s(38249),v=s(60705),x=s(49533);function m(){let{pageProps:e}=(0,a.useContext)(r.AppContext),{user:n,deployment:s,deployment_id:t}=e,l=null==s?void 0:s.deployment_name;return(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(o.Z,{title:"".concat((0,u.Z)(l)," Deplyoment Dashboard"),description:(0,i.jsxs)(i.Fragment,{children:["Deployment"," ",(0,i.jsx)("code",{children:null==t?void 0:t.split("-").shift()})," > ",(0,i.jsx)("code",{children:null==s?void 0:s.deployment_name})]})}),(0,i.jsx)(v.Z,{}),(0,i.jsx)(d,{}),(0,i.jsx)(v.Z,{}),(0,i.jsx)(x.Z,{})]})}var p=s(89350),f=!0;function j(){return(0,i.jsx)(p.Z,{children:(0,i.jsx)(m,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,242,696,888,774,179],function(){return e(e.s=64830)}),_N_E=e.O()}]);

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{55634:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/services",function(){return s(78701)}])},49533:function(e,n,s){"use strict";s.d(n,{Z:function(){return j}});var i=s(85893),r=s(5606),t=s(60),l=s(67294),c=s(55412),a=s(86609),o=s(94655);function u(e){let{link:n,icon:s,...r}=e;return(0,i.jsx)(a.Z,{href:n.url,...r,...n.linkProps,children:(0,i.jsxs)(o.Z,{children:[(0,i.jsx)("span",{children:n.title}),s||(0,i.jsx)(c.Z,{size:17})]})})}var d=s(56211),v=s(60826),f=s(3326),p=s(25808),x=s(96486),m=s.n(x);function _(e){let{service:n}=e,{pageProps:s,ws:c}=(0,l.useContext)(r.AppContext),{deployment:a}=s,{ready:x,setReady:_}=(0,p.Z)(),j=null==a?void 0:a.services.filter(e=>e.parent_service_name==n.service_name),h=[n,...j||[]],[Z,N]=(0,l.useState)(null==h?void 0:h[0]);h.findIndex(e=>e.service_name==(null==Z?void 0:Z.service_name));let g=null==Z?void 0:Z.servers,[w,C]=(0,l.useState)(null==g?void 0:g[0]),k=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{var e;C(null==Z?void 0:null===(e=Z.servers)||void 0===e?void 0:e[0])},[Z]),(0,l.useEffect)(()=>{if(_(!1),w&&k.current){var e;e=k.current,c.sendData({event:"client:kill-port",server:w,service:m().omit(n,["servers"]),port:e})}setTimeout(()=>{_(!0)},2e3)},[w]),(0,i.jsxs)(t.Z,{className:"grid-cell",children:[(0,i.jsxs)(t.Z,{className:"grid-cell-content",children:[(0,i.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,i.jsx)(d.Z,{children:n.service_name}),(0,i.jsx)(u,{link:{url:"/admin/services/".concat(n.service_name),title:"View"}})]}),(0,i.jsxs)("code",{children:[n.service_name," service"]})]}),(0,i.jsx)("hr",{}),(0,i.jsxs)(t.Z,{className:"gap-0",children:[(0,i.jsxs)(o.Z,{className:"p-4 grid md:grid-cols-2",children:[(0,i.jsx)(f.Z,{options:h.map((e,n)=>({value:e.service_name,title:"Cluster #".concat(n+1)})),changeHandler:e=>{N(h.find(n=>n.service_name==e))}}),g?(0,i.jsx)(f.Z,{options:g.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{C(g.find(n=>n.private_ip==e))}}):void 0]}),x&&w?(0,i.jsx)(v.Z,{server:w,service:n,portRef:k}):void 0]})]})}function j(){let{pageProps:e}=(0,l.useContext)(r.AppContext),{deployment:n,children_services:s}=e,c=null==n?void 0:n.services.filter(e=>!e.parent_service_name);return(0,i.jsx)(t.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:null==c?void 0:c.map((e,n)=>(0,i.jsx)(_,{service:e},n))})}},78701:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return v},default:function(){return f}});var i=s(85893),r=s(67294),t=s(5606),l=s(38249),c=s(60705),a=s(21147),o=s(49533);function u(){let{pageProps:e}=(0,r.useContext)(t.AppContext),{user:n,deployment:s,deployment_id:u}=e,d=null==s?void 0:s.deployment_name;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(a.Z,{title:"".concat((0,l.Z)(d)," Deplyoment Dashboard"),description:(0,i.jsxs)(i.Fragment,{children:["Deployment"," ",(0,i.jsx)("code",{children:null==u?void 0:u.split("-").shift()})," > ",(0,i.jsx)("code",{children:null==s?void 0:s.deployment_name})]})}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(o.Z,{})]})}var d=s(89350),v=!0;function f(){return(0,i.jsx)(d.Z,{children:(0,i.jsx)(u,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,242,696,888,774,179],function(){return e(e.s=55634)}),_N_E=e.O()}]);

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[329],{89426:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/services/[service_name]",function(){return s(52963)}])},52963:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return h},default:function(){return _}});var l=s(85893),r=s(67294),i=s(5606),t=s(38249),c=s(60705),a=s(21147),d=s(60),o=s(94655),u=s(60826);function x(e){let{service:n}=e,{pageProps:s}=(0,r.useContext)(i.AppContext),t=n.servers,[c,a]=(0,r.useState)(null==t?void 0:t[0]),x=null!=t&&!!t.length&&!!(t.length%2);return(0,l.jsx)(d.Z,{className:"w-full grid-cell col-span-1 gap-0",children:(0,l.jsxs)(o.Z,{className:"nested-grid-frame xl:grid-cols-2",children:[null==t?void 0:t.map((e,s)=>(0,l.jsx)(u.Z,{server:e,service:n,wrapperProps:{className:"grid-cell"}},s)),x?(0,l.jsx)("div",{className:"grid-cell"}):null]})})}var v=s(3326),p=s(56211);function m(){let{pageProps:e,ws:n}=(0,r.useContext)(i.AppContext),{service:s,deployment:t,children_services:c}=e,a=[s,...c||[]],[u,m]=(0,r.useState)(s||void 0),j=a.findIndex(e=>(null==e?void 0:e.service_name)==(null==u?void 0:u.service_name))+1;return null==u||u.servers,(0,l.jsx)(d.Z,{className:"w-full nested-grid-frame grid-cols-1",children:(0,l.jsxs)(d.Z,{className:"grid-cell gap-0",children:[(0,l.jsx)(o.Z,{className:"grid-cell-content flex-nowrap",children:(0,l.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,l.jsx)(o.Z,{children:(0,l.jsxs)(p.Z,{children:["Cluster #",j]})}),(0,l.jsx)(o.Z,{children:(0,l.jsx)(v.Z,{options:a.map((e,n)=>({value:null==e?void 0:e.service_name,title:"Cluster #".concat(n+1)})),wrapperWrapperProps:{className:"max-w-[250px]"},changeHandler:e=>{m(void 0),n.sendData({event:"client:kill-all-ports"}),setTimeout(()=>{m(a.find(n=>(null==n?void 0:n.service_name)==e)||void 0)},200)}})})]})}),(0,l.jsx)("hr",{}),u?(0,l.jsx)(x,{service:u}):void 0]})})}function j(){let{pageProps:e}=(0,r.useContext)(i.AppContext),{service:n,deployment:s}=e,d=null==s?void 0:s.deployment_name,o=null==n?void 0:n.service_name;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)(a.Z,{title:"".concat((0,t.Z)(o)," Service"),description:(0,l.jsxs)(l.Fragment,{children:["Deployment ",(0,l.jsx)("code",{children:d})," > ",(0,l.jsx)("code",{children:o})]})}),(0,l.jsx)(c.Z,{}),(0,l.jsx)(m,{})]})}var f=s(89350),h=!0;function _(){return(0,l.jsx)(f.Z,{children:(0,l.jsx)(j,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,242,696,888,774,179],function(){return e(e.s=89426)}),_N_E=e.O()}]);

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[635],{64168:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/users",function(){return r(45446)}])},45446:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return f},default:function(){return y}});var n=r(85893),s=r(67294),a=r(5606),i=r(60705),c=r(21147),u=r(94495),d=r(53151),l=r(88584),o=r(94655),x=r(3668),m=r(60);function g(){let{pageProps:e}=(0,s.useContext)(a.AppContext),{deployment_users:t}=e;return(0,n.jsx)(m.Z,{className:"grid-cell-content",children:null==t?void 0:t.map((e,t)=>{let r=!!e.is_super_admin;return(0,n.jsx)("a",{href:"/admin/users/".concat(e.id),children:(0,n.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(d.Z,{image_url:e.image,title:"".concat(e.first_name," Image"),image_size:40}),(0,n.jsxs)(x.Z,{children:[e.first_name," ",e.last_name]})]}),(0,n.jsx)(o.Z,{children:r?(0,n.jsx)(l.Z,{children:"Super Admin"}):null})]})},t)})})}function h(){let{pageProps:e}=(0,s.useContext)(a.AppContext);return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(c.Z,{title:"Users",description:(0,n.jsx)(n.Fragment,{children:"All Users in this deployment"}),ctas:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u.Z,{title:"Add User",href:"/admin/users/add-user",children:"Add User"})})}),(0,n.jsx)(i.Z,{}),(0,n.jsx)(g,{})]})}var p=r(89350),f=!0;function y(){return(0,n.jsx)(p.Z,{children:(0,n.jsx)(h,{})})}},88584:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(85893);r(67294);var s=r(98388);function a(e){let{color:t,variant:r,children:a,href:i,newTab:c,linkProps:u,...d}=e,l=(0,n.jsx)("div",{...d,className:(0,s.m6)("text-xs px-2 py-0.5 rounded-full outline-0","text-center flex items-center justify-center","secondary"==t?"bg-secondary text-white outline-secbg-secondary":"success"==t?"bg-success outline-success text-white":"error"==t?"bg-orange-700 outline-orange-700":"gray"==t?(0,s.m6)("bg-slate-100 outline-slate-200 dark:bg-gray-dark dark:outline-gray-dark","text-slate-800 dark:text-white"):"bg-primary text-white outline-primbg-primary twui-tag-primary","outlined"==r?"!bg-transparent outline-1 "+("secondary"==t?"text-secondary":"success"==t?"text-success dark:text-success-dark":"error"==t?"text-orange-700":"gray"==t?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark twui-tag-primary-outlined"):"ghost"==r?"!bg-transparent outline-none border-none "+("secondary"==t?"text-secondary":"success"==t?"text-success dark:text-success-dark":"error"==t?"text-orange-700":"gray"==t?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark"):"","twui-tag",d.className),children:a});return i?(0,n.jsx)("a",{href:i,target:c?"_blank":void 0,...u,className:(0,s.m6)("hover:opacity-80",null==u?void 0:u.className),children:l}):l}}},function(e){e.O(0,[662,75,664,433,7,242,888,774,179],function(){return e(e.s=64168)}),_N_E=e.O()}]);

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[786],{79845:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/users/[deployment_user_id]",function(){return r(38347)}])},38347:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return x},default:function(){return g}});var n=r(85893),s=r(67294),a=r(5606),i=r(60705),u=r(21147),c=r(88584),l=r(94655);function o(){let{pageProps:e}=(0,s.useContext)(a.AppContext),{deployment_user:t}=e;if(!(null==t?void 0:t.id))return null;let r=!!t.is_super_admin;return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(u.Z,{title:(0,n.jsxs)(l.Z,{children:[(0,n.jsx)("span",{children:null==t?void 0:t.first_name}),(0,n.jsx)("span",{children:null==t?void 0:t.last_name}),r?(0,n.jsx)(c.Z,{className:"inline",children:"Super Admin"}):null]})}),(0,n.jsx)(i.Z,{})]})}var d=r(89350),x=!0;function g(){return(0,n.jsx)(d.Z,{children:(0,n.jsx)(o,{})})}},88584:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(85893);r(67294);var s=r(98388);function a(e){let{color:t,variant:r,children:a,href:i,newTab:u,linkProps:c,...l}=e,o=(0,n.jsx)("div",{...l,className:(0,s.m6)("text-xs px-2 py-0.5 rounded-full outline-0","text-center flex items-center justify-center","secondary"==t?"bg-secondary text-white outline-secbg-secondary":"success"==t?"bg-success outline-success text-white":"error"==t?"bg-orange-700 outline-orange-700":"gray"==t?(0,s.m6)("bg-slate-100 outline-slate-200 dark:bg-gray-dark dark:outline-gray-dark","text-slate-800 dark:text-white"):"bg-primary text-white outline-primbg-primary twui-tag-primary","outlined"==r?"!bg-transparent outline-1 "+("secondary"==t?"text-secondary":"success"==t?"text-success dark:text-success-dark":"error"==t?"text-orange-700":"gray"==t?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark twui-tag-primary-outlined"):"ghost"==r?"!bg-transparent outline-none border-none "+("secondary"==t?"text-secondary":"success"==t?"text-success dark:text-success-dark":"error"==t?"text-orange-700":"gray"==t?"text-slate-700 dark:text-white/80":"text-primary dark:text-primary-dark"):"","twui-tag",l.className),children:a});return i?(0,n.jsx)("a",{href:i,target:u?"_blank":void 0,...c,className:(0,s.m6)("hover:opacity-80",null==c?void 0:c.className),children:o}):o}}},function(e){e.O(0,[662,75,664,433,7,242,888,774,179],function(){return e(e.s=79845)}),_N_E=e.O()}]);

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[633],{33356:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/users/add-user",function(){return n(28043)}])},78513:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(85893),s=n(77827),o=n(94495),a=n(60),i=n(5606),l=n(25808),c=n(67294),d=n(79265);function u(e){var t,n,u,h;let{new_deployment_user:f}=e,{newUser:p,setNewUser:m,loading:w,setLoading:y,isPasswordConfirmed:g,setIsPasswordConfirmed:j,pageProps:x}=function(e){let{new_deployment_user:t}=e,{pageProps:n}=(0,c.useContext)(i.AppContext),[r,s]=(0,c.useState)({}),{loading:o,setLoading:a}=(0,l.Z)(),[d,u]=(0,c.useState)(!1);return{newUser:r,setNewUser:s,loading:o,setLoading:a,isPasswordConfirmed:d,setIsPasswordConfirmed:u,pageProps:n}}({new_deployment_user:f}),v=!!(g&&(null===(t=p.password)||void 0===t?void 0:t.match(/./))&&(null===(n=p.confirmed_password)||void 0===n?void 0:n.match(/./)));return(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault()},children:(0,r.jsxs)(a.Z,{className:"w-full items-stretch gap-6",children:[(0,r.jsx)(s.Z,{placeholder:"Eg. John",title:"First Name",changeHandler:e=>{m(t=>({...t,first_name:e}))},required:!0,showLabel:!0}),(0,r.jsx)(s.Z,{placeholder:"Eg. Doe",title:"Last Name",changeHandler:e=>{m(t=>({...t,last_name:e}))},showLabel:!0}),(0,r.jsx)(s.Z,{placeholder:"Email Address",title:"Email",type:"email",changeHandler:e=>{m(t=>({...t,email:e}))},required:!0,showLabel:!0}),x.user.id?(0,r.jsx)(s.Z,{placeholder:"Username",title:"Username",changeHandler:e=>{m(t=>({...t,username:e}))},validationRegex:/^[a-z0-9\-]{3,}$/,info:(0,r.jsxs)(r.Fragment,{children:["Allowed characters:"," ",(0,r.jsx)("code",{children:(0,r.jsx)("b",{children:"a-z, 0-9, -"})}),"."]}),wrapperWrapperProps:{className:"items-start!"},required:!0,showLabel:!0}):null,(0,r.jsx)(s.Z,{placeholder:"Password",title:"Password",type:"password",changeHandler:e=>{m(t=>({...t,password:e}))},validity:{isValid:!((null===(u=p.password)||void 0===u?void 0:u.match(/./))&&(null===(h=p.confirmed_password)||void 0===h?void 0:h.match(/./)))||v,msg:"Passwords don't match"},required:!0,showLabel:!0}),(0,r.jsx)(s.Z,{placeholder:"Confirm Password",title:"Confirm Password",type:"password",changeHandler:e=>{m(t=>({...t,confirmed_password:e})),j(e==p.password)},showLabel:!0}),(0,r.jsx)(o.Z,{title:"Login",onClick:()=>{v&&window.confirm("Create Super Admin Account?")&&(y(!0),(0,d.Z)("/api/auth/signup",{method:"POST",body:{new_user:p}}).then(e=>{console.log("res",e),e.success&&window.location.reload()}).finally(()=>{}))},loading:w,children:x.user.super_admin?"Add User":"Signup"})]})})}},28043:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return h},default:function(){return f}});var r=n(85893),s=n(67294),o=n(5606),a=n(60705),i=n(21147),l=n(78513),c=n(60);function d(){let{pageProps:e}=(0,s.useContext)(o.AppContext);return(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)(i.Z,{title:"Add New User"}),(0,r.jsx)(a.Z,{}),(0,r.jsx)(c.Z,{className:"grid-cell-content max-w-[600px]",children:(0,r.jsx)(l.Z,{})})]})}var u=n(89350),h=!0;function f(){return(0,r.jsx)(u.Z,{children:(0,r.jsx)(d,{})})}},79265:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(96486),s=n.n(r),o={stringify:function(e,t,n){try{return JSON.stringify(e,t||void 0,n)}catch(e){return}}};async function a(e,t){let n;let r={"Content-Type":"application/json"};(null==t?void 0:t.csrfKey)&&t.csrfValue&&(r[t.csrfKey]=t.csrfValue);let a=e;if((null==t?void 0:t.query)&&(a+=function(e){let t="?";if("object"!=typeof e)return console.log("Invalid Query type"),t;if(Array.isArray(e))return console.log("Query is an Array. This is invalid."),t;if(!e)return console.log("No Query provided."),t;let n=Object.keys(e),r=[];return n.forEach(t=>{if(!t||!e[t])return;let n=e[t];if("object"==typeof n){let e=o.stringify(n);r.push("".concat(t,"=").concat(encodeURIComponent(String(e))))}else"string"==typeof n||"number"==typeof n?r.push("".concat(t,"=").concat(encodeURIComponent(n))):r.push("".concat(t,"=").concat(String(n)))}),t+=r.join("&")}(t.query)),"string"==typeof t)try{n="post"===t?(await fetch(a,{method:t,headers:r})).json():(await fetch(a)).json()}catch(e){console.log("FetchAPI error #1:",e.message),n=null}else if("object"==typeof t)try{let e;if(t.body&&"object"==typeof t.body){let e=s().cloneDeep(t.body);t.body=JSON.stringify(e)}if(t.headers){t.headers=s().merge(t.headers,r);let n={...t};e=await fetch(a,n)}else{let n={...t,headers:r};e=await fetch(a,n)}n=e.json()}catch(e){console.log("FetchAPI error #2:",e.message),n=null}else try{let e=await fetch(a);n=await e.json()}catch(e){console.log("FetchAPI error #3:",e.message),n=null}return n}}},function(e){e.O(0,[662,75,664,433,7,827,242,888,774,179],function(){return e(e.s=33356)}),_N_E=e.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More