@stacksjs/ts-cloud 0.7.56 → 0.7.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alerts/alerts.test.d.ts +1 -0
- package/dist/alerts/delivery.d.ts +45 -0
- package/dist/alerts/evaluator.d.ts +12 -0
- package/dist/alerts/health.d.ts +34 -0
- package/dist/alerts/index.d.ts +6 -0
- package/dist/alerts/model.d.ts +170 -0
- package/dist/alerts/store.d.ts +90 -0
- package/dist/alerts/telemetry.d.ts +3 -0
- package/dist/api/client.d.ts +197 -0
- package/dist/api/handler.d.ts +18 -0
- package/dist/api/handler.test.d.ts +1 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/openapi.d.ts +2 -0
- package/dist/api/service.d.ts +28 -0
- package/dist/api/types.d.ts +119 -0
- package/dist/auth/encryption.d.ts +3 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/mailer.d.ts +9 -0
- package/dist/auth/oidc.d.ts +36 -0
- package/dist/auth/oidc.test.d.ts +1 -0
- package/dist/auth/store.d.ts +121 -0
- package/dist/auth/store.test.d.ts +1 -0
- package/dist/auth/totp.d.ts +11 -0
- package/dist/auth/totp.test.d.ts +1 -0
- package/dist/auth/types.d.ts +138 -0
- package/dist/automation/index.d.ts +2 -0
- package/dist/automation/store.d.ts +46 -0
- package/dist/automation/store.test.d.ts +1 -0
- package/dist/automation/types.d.ts +66 -0
- package/dist/aws/acm.d.ts +0 -4
- package/dist/aws/application-autoscaling.d.ts +0 -5
- package/dist/aws/backup.d.ts +42 -0
- package/dist/aws/bedrock.d.ts +0 -5
- package/dist/aws/client.d.ts +3 -6
- package/dist/aws/cloudformation.d.ts +0 -4
- package/dist/aws/cloudfront-media.test.d.ts +1 -0
- package/dist/aws/cloudfront-origin.test.d.ts +1 -0
- package/dist/aws/cloudfront.d.ts +87 -3
- package/dist/aws/cloudwatch-logs.d.ts +2 -4
- package/dist/aws/cloudwatch.d.ts +1 -1
- package/dist/aws/comprehend.d.ts +0 -5
- package/dist/aws/connect.d.ts +0 -4
- package/dist/aws/cost-explorer-cache.d.ts +1 -15
- package/dist/aws/cost-explorer.d.ts +18 -9
- package/dist/aws/cost-explorer.test.d.ts +1 -0
- package/dist/aws/dynamodb.d.ts +0 -4
- package/dist/aws/ec2.d.ts +0 -4
- package/dist/aws/ecr.d.ts +0 -4
- package/dist/aws/ecs.d.ts +17 -7
- package/dist/aws/efs.d.ts +0 -4
- package/dist/aws/elasticache.d.ts +0 -4
- package/dist/aws/elbv2.d.ts +0 -7
- package/dist/aws/email.d.ts +0 -10
- package/dist/aws/eventbridge.d.ts +0 -4
- package/dist/aws/iam.d.ts +1 -5
- package/dist/aws/imap-server.d.ts +0 -7
- package/dist/aws/index.d.ts +4 -3
- package/dist/aws/index.js +31 -31
- package/dist/aws/kendra.d.ts +0 -5
- package/dist/aws/lambda.d.ts +3 -5
- package/dist/aws/opensearch.d.ts +0 -4
- package/dist/aws/personalize.d.ts +0 -5
- package/dist/aws/polly.d.ts +0 -5
- package/dist/aws/rds.d.ts +59 -4
- package/dist/aws/rekognition.d.ts +0 -5
- package/dist/aws/route53-domains.d.ts +0 -4
- package/dist/aws/route53.d.ts +0 -4
- package/dist/aws/s3.d.ts +10 -6
- package/dist/aws/scheduler.d.ts +0 -4
- package/dist/aws/secrets-manager.d.ts +0 -4
- package/dist/aws/setup-sms.d.ts +0 -14
- package/dist/aws/sms.d.ts +0 -10
- package/dist/aws/smtp-server.d.ts +0 -11
- package/dist/aws/sns.d.ts +0 -4
- package/dist/aws/sqs.d.ts +0 -4
- package/dist/aws/ssm.d.ts +0 -4
- package/dist/aws/sts.d.ts +0 -4
- package/dist/aws/support.d.ts +0 -4
- package/dist/aws/textract.d.ts +0 -5
- package/dist/aws/transcribe.d.ts +0 -4
- package/dist/aws/translate.d.ts +0 -5
- package/dist/aws/voice.d.ts +0 -11
- package/dist/aws/xray.d.ts +1 -0
- package/dist/backups/aws-database-source.d.ts +19 -0
- package/dist/backups/aws-database-source.test.d.ts +1 -0
- package/dist/backups/aws-infrastructure-source.d.ts +43 -0
- package/dist/backups/aws-infrastructure-source.test.d.ts +1 -0
- package/dist/backups/control-plane-source.d.ts +16 -0
- package/dist/backups/control-plane-source.test.d.ts +1 -0
- package/dist/backups/docker-volume-source.d.ts +31 -0
- package/dist/backups/docker-volume-source.test.d.ts +1 -0
- package/dist/backups/filesystem-source.d.ts +34 -0
- package/dist/backups/filesystem-source.test.d.ts +1 -0
- package/dist/backups/index.d.ts +10 -0
- package/dist/backups/logical-database-source.d.ts +16 -0
- package/dist/backups/logical-database-source.test.d.ts +1 -0
- package/dist/backups/model.d.ts +121 -0
- package/dist/backups/s3-destination.d.ts +85 -0
- package/dist/backups/s3-destination.test.d.ts +1 -0
- package/dist/backups/service.d.ts +80 -0
- package/dist/backups/service.test.d.ts +1 -0
- package/dist/backups/store.d.ts +30 -0
- package/dist/backups/store.test.d.ts +1 -0
- package/dist/bin/cli.js +3360 -1802
- package/dist/{chunk-tjjgajbh.js → chunk-01d86gt1.js} +301 -9
- package/dist/{chunk-73vcqg6z.js → chunk-0z43x8re.js} +7 -7
- package/dist/{chunk-tnztxpcb.js → chunk-32e7ya18.js} +61 -49
- package/dist/{chunk-qpj3edwz.js → chunk-4cjrg98a.js} +3 -7
- package/dist/{chunk-hsk6fe6x.js → chunk-50jpda9q.js} +2 -2
- package/dist/{chunk-93hjhs78.js → chunk-703nkybg.js} +1 -1
- package/dist/{chunk-d5vqwj8s.js → chunk-9m6b4m74.js} +755 -720
- package/dist/chunk-e05phx5f.js +10 -0
- package/dist/{chunk-f29w04w5.js → chunk-exbcsab2.js} +10 -4
- package/dist/{chunk-eq08r166.js → chunk-f55nkpvb.js} +2 -2
- package/dist/{chunk-3bfv1z4v.js → chunk-fv1bj3yt.js} +63 -56
- package/dist/chunk-fw3q88wk.js +48641 -0
- package/dist/{chunk-3knnr7wh.js → chunk-he9a874b.js} +170 -2
- package/dist/{chunk-zn0nxxa8.js → chunk-hpv68b4a.js} +1070 -1070
- package/dist/chunk-k114qwg9.js +12 -0
- package/dist/{chunk-r16e02bc.js → chunk-vdk53yyq.js} +3900 -4101
- package/dist/{chunk-jp2a8yad.js → chunk-vvkd46k1.js} +15 -13
- package/dist/{chunk-vd87cpvn.js → chunk-wj3s95p9.js} +62 -46
- package/dist/{chunk-mj1tmhte.js → chunk-x9s0cqfx.js} +1 -1
- package/dist/{chunk-3rsfns7x.js → chunk-ybcz6sxc.js} +2048 -387
- package/dist/{chunk-arsh1g5h.js → chunk-zqtpg06c.js} +14 -11
- package/dist/compose/index.d.ts +6 -0
- package/dist/compose/parser.d.ts +13 -0
- package/dist/compose/parser.test.d.ts +1 -0
- package/dist/compose/runtime.d.ts +10 -0
- package/dist/compose/service.d.ts +18 -0
- package/dist/compose/store.d.ts +59 -0
- package/dist/compose/store.test.d.ts +1 -0
- package/dist/compose/templates.d.ts +17 -0
- package/dist/compose/types.d.ts +164 -0
- package/dist/configuration/backends.d.ts +66 -0
- package/dist/configuration/backends.test.d.ts +1 -0
- package/dist/configuration/dotenv.d.ts +14 -0
- package/dist/configuration/dotenv.test.d.ts +1 -0
- package/dist/configuration/index.d.ts +6 -0
- package/dist/configuration/migrate.d.ts +10 -0
- package/dist/configuration/migrate.test.d.ts +1 -0
- package/dist/configuration/model.d.ts +50 -0
- package/dist/configuration/service.d.ts +144 -0
- package/dist/configuration/service.test.d.ts +1 -0
- package/dist/configuration/store.d.ts +33 -0
- package/dist/configuration/store.test.d.ts +1 -0
- package/dist/control-plane/authorization.d.ts +24 -0
- package/dist/control-plane/authorization.test.d.ts +1 -0
- package/dist/control-plane/index.d.ts +8 -0
- package/dist/control-plane/migrations.d.ts +7 -0
- package/dist/control-plane/search.d.ts +25 -0
- package/dist/control-plane/store.d.ts +117 -0
- package/dist/control-plane/store.test.d.ts +1 -0
- package/dist/control-plane/types.d.ts +381 -0
- package/dist/cost/reporting.d.ts +24 -0
- package/dist/cost/reporting.test.d.ts +1 -0
- package/dist/cost/resource-inventory.d.ts +32 -0
- package/dist/cost/resource-inventory.test.d.ts +1 -0
- package/dist/cost/resource-optimization.d.ts +59 -0
- package/dist/cost/resource-optimization.test.d.ts +1 -0
- package/dist/data-services/adapters.d.ts +39 -0
- package/dist/data-services/aws-transports.d.ts +29 -0
- package/dist/data-services/aws-transports.test.d.ts +1 -0
- package/dist/data-services/capabilities.d.ts +2 -0
- package/dist/data-services/data-services.test.d.ts +1 -0
- package/dist/data-services/docker-transport.d.ts +55 -0
- package/dist/data-services/docker-transport.test.d.ts +1 -0
- package/dist/data-services/index.d.ts +8 -0
- package/dist/data-services/model.d.ts +79 -0
- package/dist/data-services/secrets.d.ts +13 -0
- package/dist/data-services/secrets.test.d.ts +1 -0
- package/dist/data-services/service.d.ts +51 -0
- package/dist/data-services/store.d.ts +17 -0
- package/dist/deploy/container-image.d.ts +28 -0
- package/dist/deploy/container-image.test.d.ts +1 -0
- package/dist/deploy/dashboard-audit.test.d.ts +1 -0
- package/dist/deploy/dashboard-auth.d.ts +4 -23
- package/dist/deploy/dashboard-backups.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-configuration.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-control-plane.d.ts +37 -0
- package/dist/deploy/dashboard-control-plane.test.d.ts +1 -0
- package/dist/deploy/dashboard-data-services.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-environment-scope.test.d.ts +1 -0
- package/dist/deploy/dashboard-guard.d.ts +12 -0
- package/dist/deploy/dashboard-guard.test.d.ts +1 -0
- package/dist/deploy/dashboard-identities.d.ts +15 -0
- package/dist/deploy/dashboard-identities.test.d.ts +1 -0
- package/dist/deploy/dashboard-jobs.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-login-page.d.ts +5 -5
- package/dist/deploy/dashboard-login-page.test.d.ts +1 -0
- package/dist/deploy/dashboard-oidc.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-onboarding.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-policy.d.ts +4 -2
- package/dist/deploy/dashboard-queue-worker.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-release.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-route-manifest.d.ts +14 -0
- package/dist/deploy/dashboard-route-manifest.test.d.ts +1 -0
- package/dist/deploy/dashboard-security.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-session.d.ts +3 -14
- package/dist/deploy/dashboard-source.integration.test.d.ts +1 -0
- package/dist/deploy/dashboard-users.d.ts +3 -0
- package/dist/deploy/fullstack-container.d.ts +87 -0
- package/dist/deploy/fullstack-container.test.d.ts +1 -0
- package/dist/deploy/index.d.ts +7 -2
- package/dist/deploy/index.js +65 -25
- package/dist/deploy/local-dashboard-server.d.ts +30 -0
- package/dist/deploy/quick-deploy.d.ts +1 -1
- package/dist/deploy/serverless-operations.d.ts +1 -0
- package/dist/deploy/site-target.d.ts +16 -0
- package/dist/deploy/static-api-origin.d.ts +107 -0
- package/dist/deploy/static-api-origin.test.d.ts +1 -0
- package/dist/deploy/static-site-helper.d.ts +0 -16
- package/dist/deploy/telemetry-access.d.ts +5 -0
- package/dist/deploy/telemetry-access.test.d.ts +1 -0
- package/dist/deploy/telemetry-collection.d.ts +44 -0
- package/dist/deploy/telemetry-collection.test.d.ts +1 -0
- package/dist/dns/index.js +3 -3
- package/dist/dns/route53-adapter.d.ts +1 -1
- package/dist/drivers/hetzner/cloud-init.d.ts +1 -1
- package/dist/drivers/index.d.ts +2 -2
- package/dist/drivers/index.js +6 -6
- package/dist/drivers/shared/notifications.d.ts +1 -1
- package/dist/drivers/shared/rpx-gateway.d.ts +1 -0
- package/dist/fleet/fleet.test.d.ts +1 -0
- package/dist/fleet/index.d.ts +144 -0
- package/dist/fleet/queue.d.ts +3 -0
- package/dist/fleet/ssh-driver.d.ts +34 -0
- package/dist/index.d.ts +28 -4
- package/dist/index.js +1132 -424
- package/dist/jobs/adapters.d.ts +23 -0
- package/dist/jobs/index.d.ts +7 -0
- package/dist/jobs/jobs.test.d.ts +1 -0
- package/dist/jobs/model.d.ts +100 -0
- package/dist/jobs/provider-adapters.d.ts +49 -0
- package/dist/jobs/reconcile.d.ts +19 -0
- package/dist/jobs/schedule.d.ts +9 -0
- package/dist/jobs/service.d.ts +30 -0
- package/dist/jobs/store.d.ts +48 -0
- package/dist/maintenance/drivers.d.ts +117 -0
- package/dist/maintenance/index.d.ts +6 -0
- package/dist/maintenance/maintenance.test.d.ts +1 -0
- package/dist/maintenance/manifest.d.ts +15 -0
- package/dist/maintenance/queue.d.ts +9 -0
- package/dist/maintenance/service.d.ts +31 -0
- package/dist/maintenance/store.d.ts +84 -0
- package/dist/maintenance/types.d.ts +192 -0
- package/dist/media.d.ts +62 -0
- package/dist/media.test.d.ts +1 -0
- package/dist/object-storage/index.d.ts +0 -24
- package/dist/onboarding/archive.d.ts +12 -0
- package/dist/onboarding/artifact-store.d.ts +22 -0
- package/dist/onboarding/detection.d.ts +8 -0
- package/dist/onboarding/index.d.ts +9 -0
- package/dist/onboarding/migrations.d.ts +3 -0
- package/dist/onboarding/onboarding.test.d.ts +1 -0
- package/dist/onboarding/plan.d.ts +3 -0
- package/dist/onboarding/registry.d.ts +41 -0
- package/dist/onboarding/service.d.ts +16 -0
- package/dist/onboarding/store.d.ts +30 -0
- package/dist/onboarding/types.d.ts +204 -0
- package/dist/placement/builds.d.ts +20 -0
- package/dist/placement/drivers.d.ts +54 -0
- package/dist/placement/index.d.ts +6 -0
- package/dist/placement/placement.test.d.ts +1 -0
- package/dist/placement/queue.d.ts +4 -0
- package/dist/placement/service.d.ts +34 -0
- package/dist/placement/store.d.ts +49 -0
- package/dist/placement/types.d.ts +109 -0
- package/dist/preview/index.d.ts +3 -0
- package/dist/preview/service.d.ts +45 -0
- package/dist/preview/service.test.d.ts +1 -0
- package/dist/preview/store.d.ts +47 -0
- package/dist/preview/store.test.d.ts +1 -0
- package/dist/preview/types.d.ts +99 -0
- package/dist/push/apns.d.ts +0 -26
- package/dist/push/fcm.d.ts +0 -23
- package/dist/push/index.d.ts +2 -2
- package/dist/push/index.js +1 -1
- package/dist/queue/deployment-handlers.d.ts +27 -0
- package/dist/queue/deployment-handlers.test.d.ts +1 -0
- package/dist/queue/index.d.ts +4 -0
- package/dist/queue/queue.d.ts +57 -0
- package/dist/queue/queue.test.d.ts +1 -0
- package/dist/queue/types.d.ts +93 -0
- package/dist/queue/worker.d.ts +32 -0
- package/dist/queue/worker.test.d.ts +1 -0
- package/dist/regions/drivers.d.ts +139 -0
- package/dist/regions/index.d.ts +5 -0
- package/dist/regions/queue.d.ts +4 -0
- package/dist/regions/regions.test.d.ts +1 -0
- package/dist/regions/service.d.ts +23 -0
- package/dist/regions/store.d.ts +41 -0
- package/dist/regions/types.d.ts +132 -0
- package/dist/release/index.d.ts +6 -0
- package/dist/release/queue.d.ts +15 -0
- package/dist/release/queue.test.d.ts +1 -0
- package/dist/release/runtime.d.ts +35 -0
- package/dist/release/runtime.test.d.ts +1 -0
- package/dist/release/service.d.ts +28 -0
- package/dist/release/store.d.ts +88 -0
- package/dist/release/store.test.d.ts +1 -0
- package/dist/release/strategy.d.ts +8 -0
- package/dist/release/types.d.ts +103 -0
- package/dist/runtime/adapters/aws.d.ts +5 -0
- package/dist/runtime/adapters/docker.d.ts +53 -0
- package/dist/runtime/adapters/systemd.d.ts +26 -0
- package/dist/runtime/index.d.ts +9 -0
- package/dist/runtime/inventory.d.ts +6 -0
- package/dist/runtime/model.d.ts +130 -0
- package/dist/runtime/normalize.d.ts +5 -0
- package/dist/runtime/operations.d.ts +113 -0
- package/dist/runtime/service.d.ts +32 -0
- package/dist/runtime/streams.d.ts +49 -0
- package/dist/security/artifacts.d.ts +105 -0
- package/dist/security/artifacts.test.d.ts +1 -0
- package/dist/security/container-release.d.ts +35 -0
- package/dist/security/container-release.test.d.ts +1 -0
- package/dist/security/index.d.ts +8 -0
- package/dist/security/integration.d.ts +41 -0
- package/dist/security/integration.test.d.ts +1 -0
- package/dist/security/posture-store.d.ts +80 -0
- package/dist/security/posture-store.test.d.ts +1 -0
- package/dist/security/pre-deploy-scanner.d.ts +0 -4
- package/dist/security/scanners.d.ts +81 -0
- package/dist/security/scanners.test.d.ts +1 -0
- package/dist/security/types.d.ts +150 -0
- package/dist/source/git-workspace.d.ts +26 -0
- package/dist/source/git-workspace.test.d.ts +1 -0
- package/dist/source/index.d.ts +6 -0
- package/dist/source/providers.d.ts +199 -0
- package/dist/source/providers.test.d.ts +1 -0
- package/dist/source/service.d.ts +18 -0
- package/dist/source/store.d.ts +149 -0
- package/dist/source/store.test.d.ts +1 -0
- package/dist/source/types.d.ts +191 -0
- package/dist/source/webhooks.d.ts +33 -0
- package/dist/source/webhooks.test.d.ts +1 -0
- package/dist/ssl/acme-client.d.ts +0 -6
- package/dist/storage/compose.d.ts +4 -0
- package/dist/storage/compose.test.d.ts +1 -0
- package/dist/storage/drivers.d.ts +107 -0
- package/dist/storage/drivers.test.d.ts +1 -0
- package/dist/storage/index.d.ts +5 -0
- package/dist/storage/model.d.ts +112 -0
- package/dist/storage/service.d.ts +95 -0
- package/dist/storage/storage.test.d.ts +1 -0
- package/dist/storage/store.d.ts +40 -0
- package/dist/telemetry/correlation.test.d.ts +1 -0
- package/dist/telemetry/index.d.ts +4 -0
- package/dist/telemetry/model.d.ts +145 -0
- package/dist/telemetry/policy.d.ts +8 -0
- package/dist/telemetry/policy.test.d.ts +1 -0
- package/dist/telemetry/redaction.d.ts +9 -0
- package/dist/telemetry/store.d.ts +34 -0
- package/dist/telemetry/store.test.d.ts +1 -0
- package/dist/ui/404.html +1506 -17
- package/dist/ui/accept-invitation.html +1163 -0
- package/dist/ui/{server/backups.html → access-denied.html} +344 -55
- package/dist/ui/account/automation.html +1669 -0
- package/dist/ui/account/security.html +1646 -0
- package/dist/ui/applications/compose.html +1590 -0
- package/dist/ui/applications/new.html +1868 -0
- package/dist/ui/data/backups.html +1757 -0
- package/dist/ui/data/services.html +1723 -0
- package/dist/ui/data/volumes.html +1639 -0
- package/dist/ui/index.html +392 -29
- package/dist/ui/integrations.html +1865 -0
- package/dist/ui/operations/alerts.html +1610 -0
- package/dist/ui/operations/configuration.html +1746 -0
- package/dist/ui/operations/jobs.html +1709 -0
- package/dist/ui/operations/maintenance.html +1540 -0
- package/dist/ui/operations/observability.html +1742 -0
- package/dist/ui/{serverless/scheduler.html → operations/previews.html} +447 -46
- package/dist/ui/operations/queue.html +1615 -0
- package/dist/ui/{server/workers.html → operations/regions.html} +413 -49
- package/dist/ui/operations/releases.html +1596 -0
- package/dist/ui/operations/workloads.html +1775 -0
- package/dist/ui/security.html +1767 -0
- package/dist/ui/server/actions.html +446 -57
- package/dist/ui/server/activity.html +346 -1
- package/dist/ui/server/capacity.html +1542 -0
- package/dist/ui/server/database.html +443 -36
- package/dist/ui/server/deployments.html +439 -53
- package/dist/ui/server/diagnostics.html +346 -1
- package/dist/ui/server/firewall.html +476 -50
- package/dist/ui/server/fleet.html +1577 -0
- package/dist/ui/server/logs.html +389 -25
- package/dist/ui/server/metrics.html +346 -1
- package/dist/ui/server/security.html +346 -1
- package/dist/ui/server/services.html +421 -46
- package/dist/ui/server/sites.html +476 -95
- package/dist/ui/server/ssh-keys.html +476 -46
- package/dist/ui/server/team.html +700 -77
- package/dist/ui/server/terminal.html +444 -54
- package/dist/ui/serverless/alarms.html +430 -42
- package/dist/ui/serverless/assets.html +421 -46
- package/dist/ui/serverless/cost.html +346 -1
- package/dist/ui/serverless/data.html +422 -47
- package/dist/ui/serverless/deployments.html +421 -46
- package/dist/ui/serverless/firewall.html +346 -1
- package/dist/ui/serverless/functions.html +423 -48
- package/dist/ui/serverless/logs.html +389 -25
- package/dist/ui/serverless/metrics.html +346 -1
- package/dist/ui/serverless/queues.html +448 -62
- package/dist/ui/serverless/secrets.html +448 -42
- package/dist/ui/serverless/traces.html +350 -5
- package/dist/ui/serverless.html +434 -58
- package/dist/ui-src/pages/404.stx +18 -0
- package/dist/ui-src/pages/accept-invitation.stx +50 -0
- package/dist/ui-src/pages/access-denied.stx +18 -0
- package/dist/ui-src/pages/account/automation.stx +187 -0
- package/dist/ui-src/pages/account/security.stx +249 -0
- package/dist/ui-src/pages/applications/compose.stx +38 -0
- package/dist/ui-src/pages/applications/new.stx +76 -0
- package/dist/ui-src/pages/data/backups.stx +214 -0
- package/dist/ui-src/pages/data/services.stx +257 -0
- package/dist/ui-src/pages/data/volumes.stx +40 -0
- package/dist/ui-src/pages/index.stx +24 -10
- package/dist/ui-src/pages/integrations.stx +186 -0
- package/dist/ui-src/pages/operations/alerts.stx +40 -0
- package/dist/ui-src/pages/operations/configuration.stx +164 -0
- package/dist/ui-src/pages/operations/jobs.stx +238 -0
- package/dist/ui-src/pages/operations/maintenance.stx +15 -0
- package/dist/ui-src/pages/operations/observability.stx +76 -0
- package/dist/ui-src/pages/operations/previews.stx +62 -0
- package/dist/ui-src/pages/operations/queue.stx +158 -0
- package/dist/ui-src/pages/operations/regions.stx +12 -0
- package/dist/ui-src/pages/operations/releases.stx +39 -0
- package/dist/ui-src/pages/operations/workloads.stx +151 -0
- package/dist/ui-src/pages/partials/head.stx +148 -15
- package/dist/ui-src/pages/partials/nav.stx +491 -74
- package/dist/ui-src/pages/partials/op-confirm.stx +6 -6
- package/dist/ui-src/pages/security.stx +264 -0
- package/dist/ui-src/pages/server/actions.stx +17 -26
- package/dist/ui-src/pages/server/capacity.stx +16 -0
- package/dist/ui-src/pages/server/database.stx +31 -16
- package/dist/ui-src/pages/server/deployments.stx +28 -30
- package/dist/ui-src/pages/server/firewall.stx +25 -30
- package/dist/ui-src/pages/server/fleet.stx +10 -0
- package/dist/ui-src/pages/server/logs.stx +11 -9
- package/dist/ui-src/pages/server/metrics.stx +8 -16
- package/dist/ui-src/pages/server/services.stx +19 -28
- package/dist/ui-src/pages/server/sites.stx +75 -72
- package/dist/ui-src/pages/server/ssh-keys.stx +24 -30
- package/dist/ui-src/pages/server/team.stx +286 -149
- package/dist/ui-src/pages/server/terminal.stx +6 -28
- package/dist/ui-src/pages/serverless/alarms.stx +17 -31
- package/dist/ui-src/pages/serverless/assets.stx +13 -22
- package/dist/ui-src/pages/serverless/cost.stx +15 -3
- package/dist/ui-src/pages/serverless/data.stx +12 -25
- package/dist/ui-src/pages/serverless/deployments.stx +14 -23
- package/dist/ui-src/pages/serverless/firewall.stx +5 -1
- package/dist/ui-src/pages/serverless/functions.stx +20 -26
- package/dist/ui-src/pages/serverless/logs.stx +11 -10
- package/dist/ui-src/pages/serverless/metrics.stx +18 -17
- package/dist/ui-src/pages/serverless/queues.stx +34 -42
- package/dist/ui-src/pages/serverless/secrets.stx +31 -34
- package/dist/ui-src/pages/serverless/traces.stx +2 -6
- package/dist/ui-src/pages/serverless.stx +40 -74
- package/package.json +11 -11
- package/dist/chunk-b17vf1g1.js +0 -13787
- package/dist/chunk-b82pbxyp.js +0 -1572
- package/dist/chunk-pqfzdg68.js +0 -12
- package/dist/chunk-z58fqnjm.js +0 -10
- package/dist/ui-src/pages/server/backups.stx +0 -91
- package/dist/ui-src/pages/server/workers.stx +0 -99
- package/dist/ui-src/pages/serverless/scheduler.stx +0 -89
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
let __d = null
|
|
3
|
+
try { __d = JSON.parse(process.env.TSCLOUD_DASHBOARD_DATA || '') } catch { __d = null }
|
|
4
|
+
const project = __d?.project ?? { name: 'Project' }
|
|
5
|
+
const environment = __d?.environment ?? 'production'
|
|
6
|
+
</script>
|
|
7
|
+
<!DOCTYPE html>
|
|
8
|
+
<html lang="en" data-theme="dark">
|
|
9
|
+
<head>
|
|
10
|
+
@include('../partials/head', { title: 'ts-cloud - Create application' })
|
|
11
|
+
<style>
|
|
12
|
+
.wizard-hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.wizard-shell{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px;align-items:start}.wizard-main{min-width:0}.stepper{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin:18px 0}.step{border:0;background:transparent;color:var(--muted);display:grid;gap:7px;text-align:left;font-size:.7rem;padding:0}.step::before{content:"";height:3px;border-radius:4px;background:var(--line)}.step.active{color:var(--txt)}.step.active::before,.step.done::before{background:var(--accent)}
|
|
13
|
+
.wizard-card{border:1px solid var(--line);border-radius:13px;background:var(--panel);padding:22px}.wizard-panel{display:none;gap:16px}.wizard-panel.active{display:grid}.wizard-panel h2{margin:0}.wizard-panel>p{margin:-8px 0 0}.choice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.choice{position:relative;border:1px solid var(--line);border-radius:10px;padding:14px;display:grid;gap:5px;cursor:pointer}.choice:has(input:checked){border-color:var(--accent);background:rgba(90,139,224,.1)}.choice input{position:absolute;opacity:0}.choice strong{font-size:.9rem}.choice small{color:var(--muted);line-height:1.4}
|
|
14
|
+
.fields{display:grid;grid-template-columns:1fr 1fr;gap:11px}.fields.three{grid-template-columns:repeat(3,1fr)}label.field{display:grid;gap:6px;color:var(--txt3);font-size:.72rem;font-weight:750;letter-spacing:.035em}.field input,.field select,.field textarea{width:100%;box-sizing:border-box;background:rgba(255,255,255,.045);border:1px solid var(--panel-br);border-radius:8px;padding:10px;color:var(--txt);font:inherit;font-weight:450;letter-spacing:0}.field :is(input,select,textarea):focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(90,139,224,.12)}.field.check{display:flex;align-items:center;gap:8px}.field.check input{width:auto}.conditional[hidden]{display:none}.advanced{border:1px solid var(--line);border-radius:9px;padding:11px}.advanced summary{cursor:pointer;font-weight:700;font-size:.8rem}.advanced>div{display:grid;gap:11px;margin-top:12px}
|
|
15
|
+
.detect-card,.plan-block,.draft-card,.registry-row{border:1px solid var(--line);border-radius:10px;padding:13px;display:grid;gap:8px}.detect-card.selected{border-color:var(--accent)}.detect-head,.draft-head,.registry-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.evidence{display:flex;gap:6px;flex-wrap:wrap}.evidence span{font-size:.68rem;padding:4px 7px;border-radius:99px;background:rgba(255,255,255,.05);color:var(--muted)}.dropzone{border:1px dashed var(--line);border-radius:11px;padding:24px;text-align:center;color:var(--muted)}.dropzone.drag{border-color:var(--accent);background:rgba(90,139,224,.08)}
|
|
16
|
+
.wizard-footer{display:flex;justify-content:space-between;gap:10px;margin-top:16px}.footer-group{display:flex;gap:8px;flex-wrap:wrap}.wizard-aside{position:sticky;top:18px;display:grid;gap:14px}.drafts{display:grid;gap:8px;max-height:420px;overflow:auto}.draft-card{background:rgba(255,255,255,.025)}.draft-card h3{margin:0;font-size:.85rem}.draft-card p{margin:0}.review-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.plan-block h3{margin:0;font-size:.82rem}.plan-block ul{margin:0;padding-left:18px}.config-preview{max-height:310px;overflow:auto;font-size:.72rem;white-space:pre-wrap;word-break:break-word}.issue{color:#ff9ca2}.ok-text{color:#7adba0}.confirm-box{border:1px solid rgba(235,188,82,.45);background:rgba(235,188,82,.07);border-radius:10px;padding:13px}.status-line{min-height:1.3em;color:var(--muted)}
|
|
17
|
+
@media(max-width:1000px){.wizard-shell{grid-template-columns:1fr}.wizard-aside{position:static;grid-template-columns:1fr 1fr}.choice-grid{grid-template-columns:1fr 1fr}.step span{display:none}}@media(max-width:620px){.fields,.fields.three,.review-grid,.wizard-aside{grid-template-columns:1fr}.choice-grid{grid-template-columns:1fr}.wizard-card{padding:16px}.wizard-hero{display:grid}.wizard-footer{align-items:flex-start}.stepper{gap:3px}}
|
|
18
|
+
</style>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
@include('../partials/nav', { active: 'application-create', name: project.name, env: environment })
|
|
22
|
+
<div class="wrap" id="main-content">
|
|
23
|
+
<div class="crumbs"><a href="/serverless">{{ project.name }}</a><span class="sep">/</span>Create application</div>
|
|
24
|
+
<header class="page wizard-hero"><div><h1>Create application</h1><p>Import source, review detected defaults, and deploy one reproducible manifest.</p></div><button class="btn ghost" type="button" id="new-draft">Start over</button></header>
|
|
25
|
+
<div class="section wizard-shell">
|
|
26
|
+
<main class="wizard-main">
|
|
27
|
+
<nav class="stepper" aria-label="Application setup"><button class="active step" data-step="source"><span>1 · Source</span></button><button class="step" data-step="build"><span>2 · Build</span></button><button class="step" data-step="runtime"><span>3 · Runtime</span></button><button class="step" data-step="environment"><span>4 · Environment</span></button><button class="step" data-step="domain"><span>5 · Domain</span></button><button class="step" data-step="review"><span>6 · Review</span></button></nav>
|
|
28
|
+
<form class="wizard-card" id="wizard-form">
|
|
29
|
+
<section class="active wizard-panel" data-panel="source"><div><h2>Choose source</h2><p class="note">Credentials stay in their connection stores, outside the application manifest.</p></div>
|
|
30
|
+
<div class="choice-grid"><label class="choice"><input type="radio" name="sourceKind" value="git" checked><strong>Git repository</strong><small>Authorized provider connection and ref.</small></label><label class="choice"><input type="radio" name="sourceKind" value="local"><strong>Local config</strong><small>Inspect this project without executing code.</small></label><label class="choice"><input type="radio" name="sourceKind" value="artifact"><strong>Upload artifact</strong><small>Secure ZIP or TAR inspection.</small></label><label class="choice"><input type="radio" name="sourceKind" value="image"><strong>OCI image</strong><small>Prebuilt image from a registry.</small></label></div>
|
|
31
|
+
<div class="conditional" data-source="git"><div class="fields"><label class="field">Connection<select name="gitConnection"></select></label><label class="field">Repository<select name="gitRepository"></select></label><label class="field">Branch or tag<input name="gitRef" value="main"></label><label class="field">Monorepo root<input name="gitRoot" value="."></label></div><details class="advanced"><summary>Advanced Git options</summary><div><div class="fields"><label class="field">Sparse paths<textarea name="sparsePaths" rows="2" placeholder="apps/web packages/shared"></textarea></label><label class="field">Watched paths<textarea name="watchPaths" rows="2" placeholder="apps/web/**"></textarea></label></div><label class="check field"><input type="checkbox" name="submodules">Include submodules</label></div></details></div>
|
|
32
|
+
<div class="conditional" data-source="local" hidden><label class="field">Project-relative root<input name="localRoot" value="."></label></div>
|
|
33
|
+
<div class="conditional" data-source="artifact" hidden><div class="dropzone" id="artifact-drop">Drop a .zip or .tar here, or <button class="btn ghost sm" type="button" id="choose-artifact">choose a file</button><input id="artifact-file" type="file" accept=".zip,.tar" hidden><div id="artifact-choice"></div></div></div>
|
|
34
|
+
<div class="conditional" data-source="image" hidden><div class="fields"><label class="field">Image reference<input name="image" placeholder="registry.example/acme/web:release"></label><label class="field">Registry connection<select name="registryConnection"><option value="">Public image / none</option></select></label></div><details class="advanced"><summary>Add private registry</summary><div><div class="fields"><label class="field">Name<input name="registryName" placeholder="Production OCI"></label><label class="field">Host<input name="registryHost" placeholder="https://registry.example"></label><label class="field">Username<input name="registryUsername" autocomplete="off"></label><label class="field">Password or token<input name="registryPassword" type="password" autocomplete="new-password"></label></div><button class="btn ghost" id="add-registry" type="button">Encrypt connection</button></div></details></div>
|
|
35
|
+
<div class="fields"><label class="field">Application name<input name="name" value="Web" required></label><label class="field">Slug<input name="slug" value="web" pattern="[a-z0-9][a-z0-9-]{1,62}" required></label></div><div class="footer-group"><button class="btn ghost" type="button" id="detect">Detect framework & build</button><span class="status-line" id="detect-status"></span></div>
|
|
36
|
+
</section>
|
|
37
|
+
<section class="wizard-panel" data-panel="build"><div><h2>Detection & build</h2><p class="note">Evidence is shown explicitly. Pick any strategy to override the recommendation.</p></div><div id="detection-results"></div><div class="fields"><label class="field">Build strategy<select name="strategy"><option value="buildpack">Buildpack-style detection</option><option value="server">Server command</option><option value="static">Static output</option><option value="dockerfile">Dockerfile</option><option value="serverless">Serverless package</option><option value="prebuilt_image">Prebuilt image</option></select></label><label class="field">Language runtime<select name="languageRuntime"><option value="bun">Bun</option><option value="node">Node.js</option><option value="php">PHP</option></select></label></div><div class="fields"><label class="field">Install command<input name="installCommand"></label><label class="field">Build command<input name="buildCommand"></label><label class="field">Start command<input name="startCommand"></label><label class="field">Publish directory<input name="publishDirectory" value="dist"></label></div><details class="advanced"><summary>Advanced build options</summary><div><div class="fields"><label class="field">Build context<input name="buildContext" value="."></label><label class="field">Dockerfile path<input name="dockerfile" value="Dockerfile"></label><label class="field">Target stage<input name="targetStage"></label><label class="field">Runtime version<input name="runtimeVersion"></label><label class="field">Build args<textarea name="buildArgs" rows="3" placeholder="PUBLIC_URL=/"></textarea></label><label class="field">Write-only build secret names<textarea name="buildSecrets" rows="3" placeholder="NPM_TOKEN"></textarea></label></div></div></details></section>
|
|
38
|
+
<section class="wizard-panel" data-panel="runtime"><div><h2>Runtime & resources</h2><p class="note">Unsupported build/runtime combinations are rejected before provider mutation.</p></div><div class="fields three"><label class="field">Target<select name="target"><option value="server">Server</option><option value="serverless">Serverless</option><option value="container">Container / Fargate</option></select></label><label class="field">Architecture<select name="architecture"><option value="x86_64">x86_64</option><option value="arm64">arm64</option></select></label><label class="field">Port<input name="port" type="number" min="1" max="65535" value="3000"></label><label class="field">CPU (vCPU)<input name="cpu" type="number" min="0.25" step="0.25" value="0.5"></label><label class="field">Memory (MB)<input name="memory" type="number" min="128" step="128" value="512"></label><label class="field">Minimum instances<input name="minInstances" type="number" min="0" value="0"></label></div><p class="note">Container target uses the full-stack ECS/Fargate service path, including image/build, health, networking, and scaling settings.</p></section>
|
|
39
|
+
<section class="wizard-panel" data-panel="environment"><div><h2>Environment & secrets</h2><p class="note">Drafts store secret names only. Secret values must already exist in the environment secrets boundary.</p></div><div class="fields"><label class="field">Plain environment variables<textarea name="environmentValues" rows="7" placeholder="APP_ENV=production LOG_LEVEL=info"></textarea></label><label class="field">Required secret names<textarea name="secretNames" rows="7" placeholder="DATABASE_PASSWORD API_TOKEN"></textarea></label></div><label class="field">Secret names already configured<textarea name="suppliedSecretNames" rows="3" placeholder="DATABASE_PASSWORD"></textarea></label></section>
|
|
40
|
+
<section class="wizard-panel" data-panel="domain"><div><h2>Domain & health</h2><p class="note">Validation happens before a resource or DNS record is created.</p></div><div class="fields"><label class="field">Environment<select name="environmentId"></select></label><label class="field">Hostname<input name="hostname" placeholder="web.example.com"></label><label class="field">Health protocol<select name="healthProtocol"><option value="http">HTTP</option><option value="https">HTTPS</option><option value="tcp">TCP</option></select></label><label class="field">Health path<input name="healthPath" value="/health"></label></div><label class="check field"><input type="checkbox" name="tls" checked>Provision TLS when a hostname is set</label></section>
|
|
41
|
+
<section class="wizard-panel" data-panel="review"><div><h2>Review & deploy</h2><p class="note">This exact manifest is shared with CLI and API automation.</p></div><div class="review-grid"><div class="plan-block"><h3>Preflight</h3><div id="plan-issues"></div></div><div class="plan-block"><h3>Capabilities & cost drivers</h3><div id="plan-cost"></div></div></div><div class="plan-block"><h3>Generated manifest</h3><pre class="config-preview" id="manifest-preview"></pre></div><div class="plan-block"><h3>Config patch</h3><pre class="config-preview" id="patch-preview"></pre></div><div class="confirm-box"><label class="field">Type the target environment to confirm<input name="confirmEnvironment" autocomplete="off"></label><p class="note" id="confirm-help"></p></div></section>
|
|
42
|
+
<div class="wizard-footer"><div class="footer-group"><button class="btn ghost" id="back" type="button">Back</button><button class="btn ghost" id="save" type="button">Save draft</button></div><div class="footer-group"><button class="btn" id="next" type="button">Continue</button><button class="btn" id="deploy" type="button" hidden>Confirm & deploy</button></div></div><p class="status-line" id="wizard-status" role="status"></p>
|
|
43
|
+
</form>
|
|
44
|
+
</main>
|
|
45
|
+
<aside class="wizard-aside"><section class="panel"><div class="section-heading"><div><h2>Saved drafts</h2><p class="note">Resume without hidden secret values.</p></div></div><div class="drafts" id="draft-list"><div class="note">Loading…</div></div></section><section class="panel"><h2>After creation</h2><ul class="note"><li>Watch the queued operation</li><li>Confirm health checks</li><li>Verify domain and TLS</li><li>Enable Git auto-deploy</li><li>Set alerts and scaling</li></ul></section></aside>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<script>
|
|
49
|
+
(()=>{
|
|
50
|
+
const steps=['source','build','runtime','environment','domain','review'];let current=0,data=null,record=null,artifact=null,candidates=[],lastPlan=null;const form=document.querySelector('#wizard-form'),status=document.querySelector('#wizard-status');
|
|
51
|
+
const lines=value=>String(value||'').split(/\r?\n|,/).map(item=>item.trim()).filter(Boolean);const pairs=value=>Object.fromEntries(lines(value).map(line=>{const at=line.indexOf('=');return at<1?[line,'']:[line.slice(0,at).trim(),line.slice(at+1)]}));
|
|
52
|
+
const request=async(path,options={})=>{const response=await fetch(path,{credentials:'same-origin',...options});const body=await response.json().catch(()=>({}));if(!response.ok)throw new Error(body.error||`Request failed (${response.status})`);return body};const api=(path,method,body)=>request(path,{method,headers:{'content-type':'application/json'},body:JSON.stringify(body)});const setStatus=(message,bad=false)=>{status.textContent=message;status.style.color=bad?'#ff858c':''};
|
|
53
|
+
function sourceKind(){return form.elements.sourceKind.value}function selectedRepo(){return data.repositories.find(item=>item.id===form.elements.gitRepository.value)}
|
|
54
|
+
function showSource(){const kind=sourceKind();document.querySelectorAll('[data-source]').forEach(node=>node.hidden=node.dataset.source!==kind);if(kind==='image')form.elements.strategy.value='prebuilt_image'}
|
|
55
|
+
function showStep(index){current=Math.max(0,Math.min(steps.length-1,index));document.querySelectorAll('.step').forEach((node,i)=>{node.classList.toggle('active',i===current);node.classList.toggle('done',i<current)});document.querySelectorAll('.wizard-panel').forEach(node=>node.classList.toggle('active',node.dataset.panel===steps[current]));document.querySelector('#back').disabled=current===0;document.querySelector('#next').hidden=current===steps.length-1;document.querySelector('#deploy').hidden=current!==steps.length-1;if(steps[current]==='review')refreshPlan()}
|
|
56
|
+
function source(){const kind=sourceKind();if(kind==='git'){const repo=selectedRepo();return{kind:'git',connectionId:form.elements.gitConnection.value,repositoryId:form.elements.gitRepository.value,repositoryFullName:repo?.fullName||'',ref:form.elements.gitRef.value||repo?.defaultBranch||'main',monorepoRoot:form.elements.gitRoot.value||'.',sparsePaths:lines(form.elements.sparsePaths.value),includePaths:lines(form.elements.watchPaths.value),submodules:form.elements.submodules.checked}}if(kind==='artifact')return{kind:'artifact',artifactId:artifact?.id||'',filename:artifact?.filename||'',sha256:artifact?.sha256||'',size:artifact?.size||0};if(kind==='image')return{kind:'image',image:form.elements.image.value,registryConnectionId:form.elements.registryConnection.value||undefined};return{kind:'local',root:form.elements.localRoot.value||'.'}}
|
|
57
|
+
function build(){const kind=form.elements.strategy.value,runtime=form.elements.languageRuntime.value,installCommand=form.elements.installCommand.value||undefined,buildCommand=form.elements.buildCommand.value||undefined,startCommand=form.elements.startCommand.value||undefined,runtimeVersion=form.elements.runtimeVersion.value||undefined;if(kind==='dockerfile')return{kind,context:form.elements.buildContext.value||'.',dockerfile:form.elements.dockerfile.value||'Dockerfile',target:form.elements.targetStage.value||undefined,buildArgs:pairs(form.elements.buildArgs.value),secretNames:lines(form.elements.buildSecrets.value)};if(kind==='static')return{kind,publishDirectory:form.elements.publishDirectory.value||'dist',installCommand,buildCommand};if(kind==='server')return{kind,runtime,runtimeVersion,installCommand,buildCommand,startCommand:startCommand||''};if(kind==='serverless')return{kind,runtime,runtimeVersion,packageRoot:form.elements.buildContext.value||'.'};if(kind==='prebuilt_image')return{kind,image:form.elements.image.value,registryConnectionId:form.elements.registryConnection.value||undefined};return{kind,runtime,runtimeVersion,installCommand,buildCommand,startCommand,publishDirectory:form.elements.publishDirectory.value||undefined}}
|
|
58
|
+
function draft(){const env=pairs(form.elements.environmentValues.value);for(const name of lines(form.elements.secretNames.value))env[name]={secretRef:name};const protocol=form.elements.healthProtocol.value;return{schemaVersion:1,name:form.elements.name.value,slug:form.elements.slug.value,projectId:data.project.id,environmentId:form.elements.environmentId.value,source:source(),build:build(),runtime:{target:form.elements.target.value,architecture:form.elements.architecture.value,port:form.elements.port.value?Number(form.elements.port.value):undefined,cpu:form.elements.cpu.value?Number(form.elements.cpu.value):undefined,memoryMb:form.elements.memory.value?Number(form.elements.memory.value):undefined,minInstances:Number(form.elements.minInstances.value||0),healthCheck:protocol?{protocol,path:protocol==='tcp'?undefined:form.elements.healthPath.value}:undefined},environment:env,requiredSecretNames:lines(form.elements.secretNames.value),domain:form.elements.hostname.value?{hostname:form.elements.hostname.value,tls:form.elements.tls.checked}:undefined}}
|
|
59
|
+
function repositories(){const connection=form.elements.gitConnection.value,select=form.elements.gitRepository,previous=select.value;select.replaceChildren();for(const repo of data.repositories.filter(item=>item.connectionId===connection))select.append(new Option(repo.fullName,repo.id));if([...select.options].some(item=>item.value===previous))select.value=previous;const repo=selectedRepo();if(repo&&!form.elements.gitRef.value)form.elements.gitRef.value=repo.defaultBranch}
|
|
60
|
+
function populate(){const connections=form.elements.gitConnection;connections.replaceChildren();for(const item of data.sourceConnections)connections.append(new Option(`${item.name} · ${item.status}`,item.id));repositories();const registries=form.elements.registryConnection;registries.replaceChildren(new Option('Public image / none',''));for(const item of data.registries)registries.append(new Option(`${item.name} · ${item.status}`,item.id));const environments=form.elements.environmentId;environments.replaceChildren();for(const item of data.environments)environments.append(new Option(`${item.name} · ${item.region||'default region'}`,item.id));const requested=new URLSearchParams(location.search).get('env');const match=data.environments.find(item=>item.slug===requested)||data.environments[0];if(match)environments.value=match.id;renderDrafts()}
|
|
61
|
+
function renderDrafts(){const list=document.querySelector('#draft-list');list.replaceChildren();if(!data.drafts.length){list.append(Object.assign(document.createElement('div'),{className:'note',textContent:'No saved drafts.'}));return}for(const item of data.drafts){const card=document.createElement('button');card.type='button';card.className='draft-card';card.innerHTML=`<div class="draft-head"><h3></h3><span class="pill ${item.status==='ready'?'ok':'warn'}"></span></div><p class="note"></p>`;card.querySelector('h3').textContent=item.input.name;card.querySelector('.pill').textContent=item.status;card.querySelector('p').textContent=`${item.step} · updated ${new Date(item.updatedAt).toLocaleString()}`;card.addEventListener('click',()=>resume(item));list.append(card)}}
|
|
62
|
+
function resume(item){record=item;const d=item.input;form.elements.name.value=d.name;form.elements.slug.value=d.slug;form.elements.sourceKind.value=d.source.kind;showSource();if(d.source.kind==='git'){form.elements.gitConnection.value=d.source.connectionId;repositories();form.elements.gitRepository.value=d.source.repositoryId;form.elements.gitRef.value=d.source.ref;form.elements.gitRoot.value=d.source.monorepoRoot||'.';form.elements.sparsePaths.value=(d.source.sparsePaths||[]).join('\n');form.elements.watchPaths.value=(d.source.includePaths||[]).join('\n');form.elements.submodules.checked=!!d.source.submodules}else if(d.source.kind==='local')form.elements.localRoot.value=d.source.root;else if(d.source.kind==='artifact'){artifact=data.artifacts.find(a=>a.id===d.source.artifactId)||d.source;document.querySelector('#artifact-choice').textContent=artifact.filename}else if(d.source.kind==='image'){form.elements.image.value=d.source.image;form.elements.registryConnection.value=d.source.registryConnectionId||''}hydrateBuild(d.build);form.elements.environmentId.value=d.environmentId;form.elements.target.value=d.runtime.target;form.elements.architecture.value=d.runtime.architecture;form.elements.port.value=d.runtime.port||'';form.elements.cpu.value=d.runtime.cpu||'';form.elements.memory.value=d.runtime.memoryMb||'';form.elements.minInstances.value=d.runtime.minInstances||0;form.elements.healthProtocol.value=d.runtime.healthCheck?.protocol||'http';form.elements.healthPath.value=d.runtime.healthCheck?.path||'/health';form.elements.environmentValues.value=Object.entries(d.environment||{}).filter(([,v])=>typeof v==='string').map(([k,v])=>`${k}=${v}`).join('\n');form.elements.secretNames.value=[...new Set([...(d.requiredSecretNames||[]),...Object.values(d.environment||{}).filter(v=>typeof v==='object').map(v=>v.secretRef)])].join('\n');form.elements.suppliedSecretNames.value=(item.suppliedSecretNames||[]).join('\n');form.elements.hostname.value=d.domain?.hostname||'';form.elements.tls.checked=d.domain?.tls!==false;showStep(steps.indexOf(item.step));setStatus(`Resumed ${item.input.name}.`)}
|
|
63
|
+
function hydrateBuild(value){form.elements.strategy.value=value.kind;form.elements.languageRuntime.value=value.runtime||'bun';form.elements.installCommand.value=value.installCommand||'';form.elements.buildCommand.value=value.buildCommand||'';form.elements.startCommand.value=value.startCommand||'';form.elements.publishDirectory.value=value.publishDirectory||'dist';form.elements.buildContext.value=value.context||value.packageRoot||'.';form.elements.dockerfile.value=value.dockerfile||'Dockerfile';form.elements.targetStage.value=value.target||'';form.elements.runtimeVersion.value=value.runtimeVersion||'';form.elements.buildArgs.value=Object.entries(value.buildArgs||{}).map(([k,v])=>`${k}=${v}`).join('\n');form.elements.buildSecrets.value=(value.secretNames||[]).join('\n');if(value.kind==='static'||value.kind==='serverless')form.elements.target.value='serverless';if(value.kind==='dockerfile'||value.kind==='prebuilt_image')form.elements.target.value='container'}
|
|
64
|
+
async function detect(){const out=document.querySelector('#detect-status');out.textContent='Inspecting source safely…';try{let body;if(sourceKind()==='git')body={source:source()};else if(sourceKind()==='local')body={root:form.elements.localRoot.value||'.'};else{out.textContent='Choose a build strategy manually for images and uploaded artifacts.';return}const result=await api(`/api/onboarding/detect${location.search}`,'POST',body);candidates=result.candidates;renderDetection();if(candidates[0]?.defaults?.build)hydrateBuild(candidates[0].defaults.build);out.textContent=`Detected ${candidates[0]?.framework||'unknown'} · ${Math.round((candidates[0]?.confidence||0)*100)}% confidence`}catch(error){out.textContent=error.message;out.style.color='#ff858c'}}
|
|
65
|
+
function renderDetection(){const root=document.querySelector('#detection-results');root.replaceChildren();for(const [index,item] of candidates.entries()){const card=document.createElement('button');card.type='button';card.className=`detect-card${index===0?' selected':''}`;const head=document.createElement('div');head.className='detect-head';const title=document.createElement('strong');title.textContent=`${item.framework} · ${item.strategy}`;const confidence=document.createElement('span');confidence.className='pill '+(item.confidence>.8?'ok':'warn');confidence.textContent=`${Math.round(item.confidence*100)}%`;head.append(title,confidence);const desc=document.createElement('p');desc.className='note';desc.textContent=item.description;const ev=document.createElement('div');ev.className='evidence';for(const evidence of item.evidence){const chip=document.createElement('span');chip.textContent=`${evidence.path}: ${evidence.reason}`;ev.append(chip)}card.append(head,desc,ev);card.addEventListener('click',()=>{hydrateBuild(item.defaults.build);root.querySelectorAll('.detect-card').forEach(node=>node.classList.remove('selected'));card.classList.add('selected')});root.append(card)}}
|
|
66
|
+
async function refreshPlan(){try{const result=await api(`/api/onboarding/plan${location.search}`,'POST',{draft:draft(),suppliedSecretNames:lines(form.elements.suppliedSecretNames.value)});lastPlan=result.plan;const issues=document.querySelector('#plan-issues');issues.replaceChildren();if(lastPlan.valid){const ok=document.createElement('p');ok.className='ok-text';ok.textContent='All preflight checks passed.';issues.append(ok)}for(const item of lastPlan.issues){const p=document.createElement('p');p.className='issue';p.textContent=`${item.path}: ${item.message}`;issues.append(p)}for(const name of lastPlan.missingSecrets){const p=document.createElement('p');p.className='issue';p.textContent=`Missing secret: ${name}`;issues.append(p)}document.querySelector('#plan-cost').innerHTML=`<p class="note">Required: ${lastPlan.capabilityRequirements.join(', ')}</p><ul>${lastPlan.costDrivers.map(item=>`<li>${String(item).replace(/[<&]/g,'')}</li>`).join('')}</ul>`;document.querySelector('#manifest-preview').textContent=JSON.stringify(lastPlan.manifest,null,2);document.querySelector('#patch-preview').textContent=JSON.stringify(lastPlan.configPatch,null,2);const env=data.environments.find(item=>item.id===form.elements.environmentId.value);document.querySelector('#confirm-help').textContent=`This queues creation in ${env?.slug}. Recurring drivers: ${lastPlan.costDrivers.join(', ')}.`}catch(error){setStatus(error.message,true)}}
|
|
67
|
+
async function save(){setStatus('Saving draft…');try{const payload={draft:draft(),step:steps[current],suppliedSecretNames:lines(form.elements.suppliedSecretNames.value)};const result=record?await api(`/api/onboarding/drafts${location.search}`,'PATCH',{id:record.id,version:record.version,...payload}):await api(`/api/onboarding/drafts${location.search}`,'POST',payload);record=result.draft;await load(false);setStatus(`Draft saved · version ${record.version}.`)}catch(error){setStatus(error.message,true)}}
|
|
68
|
+
async function deploy(){await refreshPlan();if(!lastPlan?.valid){setStatus('Resolve every preflight issue and missing secret before deploy.',true);return}setStatus('Confirming target and queuing application…');try{if(!record)await save();const result=await api(`/api/onboarding/apply${location.search}`,'POST',{id:record.id,version:record.version,confirmEnvironment:form.elements.confirmEnvironment.value});record={...record,status:'applied',version:record.version+1};setStatus(`Application queued · operation ${result.operation.id}.`);document.querySelector('#deploy').disabled=true;await load(false)}catch(error){setStatus(error.message,true)}}
|
|
69
|
+
async function upload(file){setStatus(`Inspecting ${file.name}…`);try{const result=await request(`/api/onboarding/artifacts${location.search}`,{method:'POST',headers:{'content-type':'application/octet-stream','x-artifact-filename':file.name},body:file});artifact=result.artifact;document.querySelector('#artifact-choice').textContent=`${artifact.filename} · ${artifact.entryCount} entries · ${(artifact.size/1024).toFixed(1)} KB`;setStatus('Artifact passed security inspection.')}catch(error){setStatus(error.message,true)}}
|
|
70
|
+
async function addRegistry(){try{const result=await api(`/api/onboarding/registries${location.search}`,'POST',{provider:'generic',name:form.elements.registryName.value,host:form.elements.registryHost.value,username:form.elements.registryUsername.value,password:form.elements.registryPassword.value});form.elements.registryPassword.value='';data.registries.push(result.registry);populate();form.elements.registryConnection.value=result.registry.id;setStatus('Registry credential encrypted.')}catch(error){setStatus(error.message,true)}}
|
|
71
|
+
async function load(reset=true){data=await request(`/api/onboarding${location.search}`);populate();if(reset){record=null;artifact=null;candidates=[];form.reset();form.elements.sourceKind.value='git';showSource();populate();showStep(0)}}
|
|
72
|
+
form.addEventListener('submit',event=>event.preventDefault());form.elements.sourceKind.forEach(input=>input.addEventListener('change',showSource));form.elements.gitConnection.addEventListener('change',repositories);document.querySelector('#detect').addEventListener('click',detect);document.querySelector('#back').addEventListener('click',()=>showStep(current-1));document.querySelector('#next').addEventListener('click',()=>showStep(current+1));document.querySelector('#save').addEventListener('click',save);document.querySelector('#deploy').addEventListener('click',deploy);document.querySelector('#new-draft').addEventListener('click',()=>load(true));document.querySelector('#add-registry').addEventListener('click',addRegistry);document.querySelector('#choose-artifact').addEventListener('click',()=>document.querySelector('#artifact-file').click());document.querySelector('#artifact-file').addEventListener('change',event=>event.target.files[0]&&upload(event.target.files[0]));const drop=document.querySelector('#artifact-drop');drop.addEventListener('dragover',event=>{event.preventDefault();drop.classList.add('drag')});drop.addEventListener('dragleave',()=>drop.classList.remove('drag'));drop.addEventListener('drop',event=>{event.preventDefault();drop.classList.remove('drag');if(event.dataTransfer.files[0])upload(event.dataTransfer.files[0])});document.querySelectorAll('.step').forEach((button,index)=>button.addEventListener('click',()=>showStep(index)));load().catch(error=>setStatus(error.message,true));
|
|
73
|
+
})()
|
|
74
|
+
</script>
|
|
75
|
+
</body>
|
|
76
|
+
</html>
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
<script client>
|
|
2
|
+
import { usePolling } from '../../functions/usePolling.ts'
|
|
3
|
+
|
|
4
|
+
const inventory = state({ destinations: [], policies: [], recoveryPoints: [], jobs: [], coverage: [], resources: [] })
|
|
5
|
+
const services = state([])
|
|
6
|
+
const tab = state('overview')
|
|
7
|
+
const notice = state('')
|
|
8
|
+
const actionError = state('')
|
|
9
|
+
const busy = state(false)
|
|
10
|
+
const destinationOpen = state(false)
|
|
11
|
+
const policyOpen = state(false)
|
|
12
|
+
const selectedPoint = state(null)
|
|
13
|
+
const restorePlan = state(null)
|
|
14
|
+
|
|
15
|
+
function endpoint(path) {
|
|
16
|
+
const env = new URLSearchParams(location.search).get('env')
|
|
17
|
+
return env ? `${path}${path.includes('?') ? '&' : '?'}env=${encodeURIComponent(env)}` : path
|
|
18
|
+
}
|
|
19
|
+
async function api(path, options) {
|
|
20
|
+
const response = await fetch(endpoint(path), options)
|
|
21
|
+
const body = await response.json()
|
|
22
|
+
if (!response.ok || body.ok === false) {
|
|
23
|
+
const error = new Error(body.error || 'Request failed.')
|
|
24
|
+
error.stepUpRequired = body.stepUpRequired
|
|
25
|
+
throw error
|
|
26
|
+
}
|
|
27
|
+
return body
|
|
28
|
+
}
|
|
29
|
+
async function load() {
|
|
30
|
+
const [backups, data] = await Promise.all([
|
|
31
|
+
api('/api/backups'),
|
|
32
|
+
api('/api/data-services').catch(() => ({ services: [] })),
|
|
33
|
+
])
|
|
34
|
+
inventory.set(backups)
|
|
35
|
+
services.set(data.services || [])
|
|
36
|
+
if (selectedPoint()) selectedPoint.set(backups.recoveryPoints.find(item => item.id === selectedPoint().id) || null)
|
|
37
|
+
}
|
|
38
|
+
const { pollingState, pollingError, lastUpdatedAt, refresh } = usePolling(load, 12000)
|
|
39
|
+
function post(path, value) { return api(path, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(value) }) }
|
|
40
|
+
function values(form) { return Object.fromEntries(new FormData(form)) }
|
|
41
|
+
function tone(value) { return ['healthy','available','verified','succeeded'].includes(value) ? 'ok' : ['failing','failed','corrupt','cleanup_required','missed'].includes(value) ? 'bad' : 'warn' }
|
|
42
|
+
function when(value) { return value ? new Date(value).toLocaleString() : '—' }
|
|
43
|
+
function bytes(value) {
|
|
44
|
+
const size = Number(value || 0)
|
|
45
|
+
if (!size) return 'provider managed'
|
|
46
|
+
const units = ['B','KB','MB','GB','TB']; let current = size; let unit = 0
|
|
47
|
+
while (current >= 1024 && unit < units.length - 1) { current /= 1024; unit++ }
|
|
48
|
+
return `${current.toFixed(current >= 10 || unit === 0 ? 0 : 1)} ${units[unit]}`
|
|
49
|
+
}
|
|
50
|
+
function policyName(id) { return inventory().policies.find(item => item.id === id)?.name || 'manual recovery point' }
|
|
51
|
+
function destinationName(id) { return inventory().destinations.find(item => item.id === id)?.name || 'unknown destination' }
|
|
52
|
+
function jobsForPoint(id) { return inventory().jobs.filter(item => item.recoveryPointId === id) }
|
|
53
|
+
function activeJobs() { return inventory().jobs.filter(item => ['queued','running','cleanup_required'].includes(item.status)) }
|
|
54
|
+
function latestFailures() { return inventory().jobs.filter(item => ['failed','cleanup_required'].includes(item.status)).length }
|
|
55
|
+
function safeError(error) { actionError.set(error.stepUpRequired ? `${error.message} Verify your session from Sign-in & security, then retry.` : error.message) }
|
|
56
|
+
|
|
57
|
+
async function createDestination(event) {
|
|
58
|
+
event.preventDefault(); busy.set(true); actionError.set('')
|
|
59
|
+
try {
|
|
60
|
+
const value = values(event.currentTarget), credentials = value.accessKeyId || value.secretAccessKey ? { accessKeyId: value.accessKeyId, secretAccessKey: value.secretAccessKey, ...(value.sessionToken ? { sessionToken: value.sessionToken } : {}), ...(value.credentialExpiresAt ? { expiresAt: new Date(value.credentialExpiresAt).toISOString() } : {}) } : undefined
|
|
61
|
+
const result = await post('/api/backups/destinations', {
|
|
62
|
+
name: value.name, provider: value.provider, endpoint: value.endpoint || undefined,
|
|
63
|
+
endpointPolicy: value.endpointPolicy, bucket: value.bucket || undefined,
|
|
64
|
+
prefix: value.prefix || '', region: value.region || undefined,
|
|
65
|
+
forcePathStyle: value.forcePathStyle === 'on', encryption: value.encryption,
|
|
66
|
+
credentials, encryptionKey: value.encryptionKey || undefined,
|
|
67
|
+
immutability: { objectLock: value.objectLock === 'on', defaultRetentionDays: value.lockDays ? Number(value.lockDays) : undefined },
|
|
68
|
+
})
|
|
69
|
+
notice.set(`${result.destination.name} created. Test it before attaching production policies.`)
|
|
70
|
+
event.currentTarget.reset(); destinationOpen.set(false); await refresh()
|
|
71
|
+
}
|
|
72
|
+
catch (error) { safeError(error) }
|
|
73
|
+
finally { busy.set(false) }
|
|
74
|
+
}
|
|
75
|
+
async function testDestination(item) {
|
|
76
|
+
busy.set(true); actionError.set('')
|
|
77
|
+
try { await post('/api/backups/destinations/test', { id: item.id }); notice.set(`${item.name} passed write, read, checksum, and cleanup checks.`); await refresh() }
|
|
78
|
+
catch (error) { safeError(error); await refresh() }
|
|
79
|
+
finally { busy.set(false) }
|
|
80
|
+
}
|
|
81
|
+
async function createPolicy(event) {
|
|
82
|
+
event.preventDefault(); busy.set(true); actionError.set('')
|
|
83
|
+
try {
|
|
84
|
+
const value = values(event.currentTarget), retention = {
|
|
85
|
+
keepLast: value.keepLast ? Number(value.keepLast) : undefined,
|
|
86
|
+
daily: value.daily ? Number(value.daily) : undefined,
|
|
87
|
+
weekly: value.weekly ? Number(value.weekly) : undefined,
|
|
88
|
+
monthly: value.monthly ? Number(value.monthly) : undefined,
|
|
89
|
+
expireAfterDays: value.expireAfterDays ? Number(value.expireAfterDays) : undefined,
|
|
90
|
+
}
|
|
91
|
+
const result = await post('/api/backups/policies', {
|
|
92
|
+
name: value.name, destinationId: value.destinationId, resourceKind: value.resourceKind,
|
|
93
|
+
dataServiceId: value.dataServiceId || undefined, resourceId: value.resourceId || undefined,
|
|
94
|
+
volumeName: value.volumeName || undefined, schedule: value.schedule, timezone: value.timezone,
|
|
95
|
+
retention, compression: value.compression, encryption: value.encryption,
|
|
96
|
+
includePatterns: String(value.includePatterns || '').split(/[\n,]/).map(item=>item.trim()).filter(Boolean),
|
|
97
|
+
excludePatterns: String(value.excludePatterns || '').split(/[\n,]/).map(item=>item.trim()).filter(Boolean),
|
|
98
|
+
expectedRpoMinutes: Number(value.expectedRpoMinutes), expectedRtoMinutes: Number(value.expectedRtoMinutes),
|
|
99
|
+
enabled: value.enabled === 'on',
|
|
100
|
+
})
|
|
101
|
+
notice.set(`${result.policy.name} scheduled; the first due run will create and verify a recovery point.`)
|
|
102
|
+
event.currentTarget.reset(); policyOpen.set(false); await refresh()
|
|
103
|
+
}
|
|
104
|
+
catch (error) { safeError(error) }
|
|
105
|
+
finally { busy.set(false) }
|
|
106
|
+
}
|
|
107
|
+
async function runPolicy(item) {
|
|
108
|
+
busy.set(true); actionError.set('')
|
|
109
|
+
try { const result = await post('/api/backups/run', { policyId: item.id }); notice.set(`Backup queued as ${result.job.id}.`); tab.set('jobs'); await refresh() }
|
|
110
|
+
catch (error) { safeError(error) }
|
|
111
|
+
finally { busy.set(false) }
|
|
112
|
+
}
|
|
113
|
+
async function verifyPoint(item) {
|
|
114
|
+
busy.set(true); actionError.set('')
|
|
115
|
+
try { const result = await post('/api/backups/verify', { recoveryPointId: item.id }); notice.set(`Verification queued as ${result.job.id}.`); await refresh() }
|
|
116
|
+
catch (error) { safeError(error) }
|
|
117
|
+
finally { busy.set(false) }
|
|
118
|
+
}
|
|
119
|
+
async function protectPoint(item, field) {
|
|
120
|
+
busy.set(true); actionError.set('')
|
|
121
|
+
try { await post('/api/backups/recovery-points', { id: item.id, [field]: !item[field] }); notice.set(`${field === 'held' ? 'Legal hold' : 'Pin'} ${item[field] ? 'removed' : 'enabled'} for this recovery point.`); await refresh() }
|
|
122
|
+
catch (error) { safeError(error) }
|
|
123
|
+
finally { busy.set(false) }
|
|
124
|
+
}
|
|
125
|
+
function openRestore(item) { selectedPoint.set(item); restorePlan.set(null); actionError.set(''); document.querySelector('#restore-workspace')?.scrollIntoView({ behavior: 'smooth' }) }
|
|
126
|
+
function restoreTarget(point, name, metadata) {
|
|
127
|
+
if (point.kind === 'volume') return { volumeName: name }
|
|
128
|
+
if (point.kind === 'logical_database') return { targetId: name, dataServiceId: name }
|
|
129
|
+
if (point.kind === 'infrastructure') return { targetId: name, metadata: JSON.parse(metadata || '{}') }
|
|
130
|
+
return { targetId: name }
|
|
131
|
+
}
|
|
132
|
+
async function submitRestore(event) {
|
|
133
|
+
event.preventDefault(); busy.set(true); actionError.set('')
|
|
134
|
+
try {
|
|
135
|
+
const point = selectedPoint(), value = values(event.currentTarget), execute = event.submitter?.value === 'execute', mode = value.mode === 'in_place' ? 'in_place' : 'isolated'
|
|
136
|
+
const payload = {
|
|
137
|
+
recoveryPointId: point.id, mode, targetName: value.targetName,
|
|
138
|
+
target: restoreTarget(point, value.targetName, value.providerMetadata), confirm: value.confirm || undefined,
|
|
139
|
+
downtimeAcknowledged: value.downtimeAcknowledged === 'on', safetyBackupId: value.safetyBackupId || undefined,
|
|
140
|
+
drill: value.drill === 'on', execute,
|
|
141
|
+
}
|
|
142
|
+
const result = await post('/api/backups/restore', payload)
|
|
143
|
+
restorePlan.set(result.plan)
|
|
144
|
+
notice.set(execute ? `${payload.drill ? 'Recovery drill' : 'Restore'} queued as ${result.job.id}.` : 'Restore plan validated. Review the warnings before execution.')
|
|
145
|
+
if (execute) { tab.set('jobs'); await refresh() }
|
|
146
|
+
}
|
|
147
|
+
catch (error) { safeError(error) }
|
|
148
|
+
finally { busy.set(false) }
|
|
149
|
+
}
|
|
150
|
+
</script>
|
|
151
|
+
<!DOCTYPE html>
|
|
152
|
+
<html lang="en" data-theme="dark">
|
|
153
|
+
<head>@include('../partials/head', { title: 'ts-cloud · Backups & recovery' })</head>
|
|
154
|
+
<body>
|
|
155
|
+
@include('../partials/nav', { active: 'backups', env: 'production' })
|
|
156
|
+
<main class="recovery-wrap wrap" id="main-content">
|
|
157
|
+
<div class="crumbs">Operations <span class="sep">/</span> Backups & recovery</div>
|
|
158
|
+
<header class="page">
|
|
159
|
+
<div><h1>Backups & recovery</h1><p>One inventory for scheduled protection, verified recovery points, retention, restores, and drills.</p></div>
|
|
160
|
+
<div class="header-actions"><span class="pill" :class="pollingState()==='live'?'ok':'warn'">{{ pollingState() }}</span><small>{{ lastUpdatedAt()?.toLocaleTimeString() || 'connecting' }}</small><button class="btn ghost sm" @click="refresh()">Refresh</button><button class="btn ghost sm" @click="destinationOpen.set(!destinationOpen())">New destination</button><button class="btn sm" @click="policyOpen.set(!policyOpen())">New policy</button></div>
|
|
161
|
+
</header>
|
|
162
|
+
<p class="notice" role="status" @show="!!notice()">{{ notice() }}</p>
|
|
163
|
+
<p class="bad notice" role="alert" @show="!!actionError() || !!pollingError()">{{ actionError() || pollingError() }}</p>
|
|
164
|
+
|
|
165
|
+
<section class="summary">
|
|
166
|
+
<article class="panel"><b>Protected policies</b><strong>{{ inventory().coverage.filter(item=>!item.missedRpo).length }}/{{ inventory().coverage.length }}</strong><small>inside expected RPO</small></article>
|
|
167
|
+
<article class="panel"><b>Missed RPO</b><strong :class="inventory().coverage.some(item=>item.missedRpo)?'bad':''">{{ inventory().coverage.filter(item=>item.missedRpo).length }}</strong><small>requires operator attention</small></article>
|
|
168
|
+
<article class="panel"><b>Unverified points</b><strong :class="inventory().coverage.some(item=>item.unverified)?'warn':''">{{ inventory().coverage.reduce((sum,item)=>sum+item.unverified,0) }}</strong><small>uploaded but not trusted</small></article>
|
|
169
|
+
<article class="panel"><b>Active work</b><strong>{{ activeJobs().length }}</strong><small>{{ latestFailures() }} failed / cleanup required</small></article>
|
|
170
|
+
</section>
|
|
171
|
+
|
|
172
|
+
<nav class="tabs" aria-label="Recovery views"><button :class="{active:tab()==='overview'}" @click="tab.set('overview')">Coverage</button><button :class="{active:tab()==='recovery'}" @click="tab.set('recovery')">Recovery points</button><button :class="{active:tab()==='policies'}" @click="tab.set('policies')">Policies</button><button :class="{active:tab()==='destinations'}" @click="tab.set('destinations')">Destinations</button><button :class="{active:tab()==='jobs'}" @click="tab.set('jobs')">Jobs</button></nav>
|
|
173
|
+
|
|
174
|
+
<form class="form-grid panel" @show="destinationOpen()" @submit="createDestination($event)">
|
|
175
|
+
<div class="wide"><h2>Connect a destination</h2><p class="note">Credentials and client-side encryption keys are encrypted at rest, never returned by the API, and excluded from logs.</p></div>
|
|
176
|
+
<label>Name<input name="name" required pattern="[a-z0-9][a-z0-9-]{1,62}" placeholder="production-recovery"></label>
|
|
177
|
+
<label>Provider<select name="provider"><option value="aws_s3">AWS S3</option><option value="s3_compatible">S3-compatible</option><option value="aws_backup">AWS Backup</option></select></label>
|
|
178
|
+
<label>Bucket<input name="bucket" placeholder="acme-recovery"></label><label>Region<input name="region" value="us-east-1"></label>
|
|
179
|
+
<label class="wide">Endpoint (S3-compatible)<input name="endpoint" type="url" placeholder="https://objects.example.com"></label>
|
|
180
|
+
<label>Endpoint network policy<select name="endpointPolicy"><option value="public_https">Public HTTPS only</option><option value="allow_private">Allow private endpoint</option></select></label><label>Prefix<input name="prefix" placeholder="production"></label>
|
|
181
|
+
<label>Access key ID<input name="accessKeyId" autocomplete="off"></label><label>Secret access key<input name="secretAccessKey" type="password" autocomplete="new-password"></label><label>Session token<input name="sessionToken" type="password" autocomplete="new-password"></label><label>Credential expires<input name="credentialExpiresAt" type="datetime-local"></label>
|
|
182
|
+
<label>Encryption<select name="encryption"><option value="provider">Provider managed</option><option value="both">Provider + client side</option><option value="client_side">Client side</option></select></label><label class="wide">Client encryption key<input name="encryptionKey" type="password" minlength="32" autocomplete="new-password"></label>
|
|
183
|
+
<label>Object-lock days<input name="lockDays" type="number" min="1"></label><label class="check"><input name="objectLock" type="checkbox"> Object lock enabled</label><label class="check"><input name="forcePathStyle" type="checkbox"> Force path-style URLs</label>
|
|
184
|
+
<button class="btn wide" type="submit" :disabled="busy()">{{ busy()?'Saving…':'Save destination' }}</button>
|
|
185
|
+
</form>
|
|
186
|
+
|
|
187
|
+
<form class="form-grid panel" @show="policyOpen()" @submit="createPolicy($event)">
|
|
188
|
+
<div class="wide"><h2>Schedule protection</h2><p class="note">RPO is the maximum acceptable point age; RTO is the recovery time target shown during incidents and drills.</p></div>
|
|
189
|
+
<label>Name<input name="name" required pattern="[a-z0-9][a-z0-9-]{1,62}" placeholder="orders-hourly"></label><label>Destination<select name="destinationId" required><template :for="item in inventory().destinations"><option :value="item.id">{{ item.name }} · {{ item.status }}</option></template></select></label>
|
|
190
|
+
<label>Resource kind<select name="resourceKind"><option value="managed_database">Managed database snapshot</option><option value="logical_database">Logical database dump</option><option value="volume">Named volume</option><option value="files">Application files</option><option value="control_plane">Control plane + config</option><option value="infrastructure">AWS infrastructure resource</option></select></label>
|
|
191
|
+
<label>Data service<select name="dataServiceId"><option value="">Not a database</option><template :for="item in services()"><option :value="item.id">{{ item.name }} · {{ item.engine }} · {{ item.provider }}</option></template></select></label>
|
|
192
|
+
<label>Application / resource<select name="resourceId"><option value="">Not an application volume</option><template :for="item in inventory().resources"><option :value="item.id">{{ item.name }} · {{ item.kind }}</option></template></select></label><label>Named volume<input name="volumeName" placeholder="orders-data"></label>
|
|
193
|
+
<label class="wide">Include paths / resource settings<textarea name="includePatterns" rows="2" placeholder="storage/uploads, public/media — or resource:arn:…, role:arn:…, vault:Default"></textarea></label><label class="wide">Exclude patterns<textarea name="excludePatterns" rows="2" placeholder="*.tmp, cache/**"></textarea></label>
|
|
194
|
+
<label>Schedule<input name="schedule" value="hourly" required></label><label>Timezone<input name="timezone" value="UTC" required></label><label>RPO minutes<input name="expectedRpoMinutes" type="number" min="1" value="60"></label><label>RTO minutes<input name="expectedRtoMinutes" type="number" min="1" value="120"></label>
|
|
195
|
+
<label>Keep last<input name="keepLast" type="number" min="1" value="24"></label><label>Daily<input name="daily" type="number" min="0" value="7"></label><label>Weekly<input name="weekly" type="number" min="0" value="4"></label><label>Monthly<input name="monthly" type="number" min="0" value="12"></label><label>Expire after days<input name="expireAfterDays" type="number" min="1" value="30"></label>
|
|
196
|
+
<label>Compression<select name="compression"><option value="gzip">gzip</option><option value="zstd">zstd</option><option value="none">none</option></select></label><label>Encryption<select name="encryption"><option value="destination">Destination policy</option><option value="both">Destination + source</option><option value="client_side">Client side</option></select></label><label class="check"><input name="enabled" type="checkbox" checked> Enabled</label>
|
|
197
|
+
<button class="btn wide" type="submit" :disabled="busy()">{{ busy()?'Scheduling…':'Create policy' }}</button>
|
|
198
|
+
</form>
|
|
199
|
+
|
|
200
|
+
<section @show="tab()==='overview'" class="stack"><template :for="item in inventory().coverage"><article class="coverage-card panel"><div><span class="pill" :class="item.missedRpo?'bad':'ok'">{{ item.missedRpo?'missed RPO':'protected' }}</span><span class="pill" :class="item.destinationHealthy?'ok':'bad'">{{ item.destinationHealthy?'destination healthy':'destination attention' }}</span><h2>{{ item.policy.name }}</h2><p>{{ item.policy.resourceKind.replaceAll('_',' ') }} · every {{ item.policy.schedule }} · RPO {{ item.policy.expectedRpoMinutes }}m · RTO {{ item.policy.expectedRtoMinutes }}m</p></div><div class="coverage-latest"><small>Latest recovery point</small><b>{{ when(item.lastRecoveryPoint?.pointInTime) }}</b><span>{{ item.lastRecoveryPoint ? item.lastRecoveryPoint.verificationState : 'No recovery point yet' }}</span></div><button class="btn sm" @click="runPolicy(item.policy)" :disabled="busy()">Run now</button></article></template><div class="empty panel" @show="!inventory().coverage.length"><strong>No protection policies</strong><span>Connect a destination, then define the first RPO-backed schedule.</span></div></section>
|
|
201
|
+
|
|
202
|
+
<section @show="tab()==='recovery'" class="stack"><template :for="item in inventory().recoveryPoints"><article class="panel point-card"><div class="point-head"><div><span class="pill" :class="tone(item.status)">{{ item.status }}</span><span class="pill" :class="tone(item.verificationState)">{{ item.verificationState }}</span><span class="pill" @show="item.held">legal hold</span><span class="pill" @show="item.pinned">pinned</span><h2>{{ policyName(item.policyId) }}</h2></div><button class="btn sm" @click="openRestore(item)" :disabled="item.status!=='available'||item.verificationState!=='verified'">Restore / drill</button></div><div class="point-grid"><div><small>Point in time</small><b>{{ when(item.pointInTime) }}</b></div><div><small>Kind</small><b>{{ item.kind.replaceAll('_',' ') }}</b></div><div><small>Stored</small><b>{{ bytes(item.sizeBytes) }}</b></div><div><small>Expires</small><b>{{ when(item.expiresAt) }}</b></div><div><small>Destination</small><b>{{ destinationName(item.destinationId) }}</b></div><div><small>Recent jobs</small><b>{{ jobsForPoint(item.id).length }}</b></div></div><div class="actions"><button class="btn ghost sm" @click="verifyPoint(item)" :disabled="busy()">Verify again</button><button class="btn ghost sm" @click="protectPoint(item,'pinned')">{{ item.pinned?'Unpin':'Pin' }}</button><button class="btn ghost sm" @click="protectPoint(item,'held')">{{ item.held?'Release hold':'Legal hold' }}</button></div></article></template><div class="empty panel" @show="!inventory().recoveryPoints.length"><strong>No recovery points</strong><span>Run a policy to create the first independently verified recovery point.</span></div></section>
|
|
203
|
+
|
|
204
|
+
<section id="restore-workspace" class="panel restore" @show="!!selectedPoint()"><div class="restore-head"><div><small>Selected recovery point</small><h2>{{ policyName(selectedPoint()?.policyId) }}</h2><p>{{ when(selectedPoint()?.pointInTime) }} · {{ selectedPoint()?.kind?.replaceAll('_',' ') }}</p></div><button class="btn ghost sm" @click="selectedPoint.set(null)">Close</button></div><form class="form-grid" @submit="submitRestore($event)"><label>Mode<select name="mode"><option value="isolated">Isolated target (recommended)</option><option value="in_place">In-place replacement</option></select></label><label>Target name / ID<input name="targetName" required placeholder="orders-recovery-drill"></label><label>Safety recovery point<select name="safetyBackupId"><option value="">Required for in-place only</option><template :for="item in inventory().recoveryPoints.filter(item=>item.id!==selectedPoint()?.id&&item.verificationState==='verified')"><option :value="item.id">{{ policyName(item.policyId) }} · {{ when(item.pointInTime) }}</option></template></select></label><label>Typed confirmation<input name="confirm" placeholder="Same as target for in-place"></label><label class="wide" @show="selectedPoint()?.kind==='infrastructure'">AWS restore metadata (JSON)<textarea name="providerMetadata" rows="3" placeholder='{"availabilityZone":"us-east-1a"}'></textarea></label><label class="check"><input name="downtimeAcknowledged" type="checkbox"> I acknowledge downtime and data replacement</label><label class="check"><input name="drill" type="checkbox" :disabled="selectedPoint()?.kind==='infrastructure'"> Drill: validate health, then clean isolated target</label><div class="actions wide"><button class="btn ghost" type="submit" value="plan">Validate plan</button><button class="btn danger" type="submit" value="execute" :disabled="busy()">{{ busy()?'Queueing…':'Queue restore' }}</button></div></form><div class="plan" @show="!!restorePlan()"><h3>Validated plan</h3><span class="pill">{{ restorePlan()?.mode }}</span><ul><template :for="warning in restorePlan()?.warnings || []"><li>{{ warning }}</li></template></ul></div></section>
|
|
205
|
+
|
|
206
|
+
<section @show="tab()==='policies'" class="stack"><template :for="item in inventory().policies"><article class="row-card panel"><div><span class="pill" :class="item.enabled?'ok':'warn'">{{ item.enabled?'enabled':'disabled' }}</span><b>{{ item.name }}</b><code>{{ item.schedule }} · {{ item.timezone }}</code><p class="note">{{ item.resourceKind.replaceAll('_',' ') }} · {{ destinationName(item.destinationId) }} · RPO {{ item.expectedRpoMinutes }}m / RTO {{ item.expectedRtoMinutes }}m · next {{ when(item.nextRunAt) }}</p></div><button class="btn sm" @click="runPolicy(item)">Run now</button></article></template></section>
|
|
207
|
+
<section @show="tab()==='destinations'" class="stack"><template :for="item in inventory().destinations"><article class="row-card panel"><div><span class="pill" :class="tone(item.status)">{{ item.status }}</span><span class="pill" :class="['expired','invalid'].includes(item.credentialStatus?.status)?'bad':item.credentialStatus?.status==='expiring'?'warn':'ok'">credentials {{ item.credentialStatus?.status || 'unknown' }}</span><b>{{ item.name }}</b><code>{{ item.provider }} · {{ item.bucket || 'provider vault' }}</code><p class="note">{{ item.endpoint || item.region || 'provider default' }} · {{ item.encryption }} encryption · last tested {{ when(item.lastTestedAt) }}<span @show="!!item.credentialStatus?.expiresAt"> · credentials expire {{ when(item.credentialStatus?.expiresAt) }}</span></p><p class="bad note" @show="!!item.lastError">{{ item.lastError }}</p></div><button class="btn ghost sm" @click="testDestination(item)" :disabled="item.provider==='aws_backup'||busy()">Test write/read</button></article></template></section>
|
|
208
|
+
<section @show="tab()==='jobs'" class="stack"><template :for="item in inventory().jobs"><article class="job-card panel"><span class="pill" :class="tone(item.status)">{{ item.status }}</span><div><b>{{ item.kind }}</b><code>{{ item.id }}</code><p class="note">{{ item.progress?.phase || 'queued' }} · {{ when(item.startedAt || item.createdAt) }}<span @show="!!item.error"> · {{ item.error }}</span></p></div><span>{{ item.cancellability.replaceAll('_',' ') }}</span></article></template><div class="empty panel" @show="!inventory().jobs.length"><strong>No recovery jobs</strong><span>Scheduled and manual work appears here with durable progress and failures.</span></div></section>
|
|
209
|
+
</main>
|
|
210
|
+
<style>
|
|
211
|
+
.recovery-wrap{max-width:1500px}.header-actions,.actions,.point-head>div{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.summary article{display:grid;gap:5px}.summary strong{font-size:28px}.summary small,.point-grid small,.restore small{color:var(--txt3)}.tabs{display:flex;gap:5px;border-bottom:1px solid var(--line);margin-bottom:14px;overflow:auto}.tabs button{border:0;background:none;color:var(--txt3);padding:10px 13px;border-bottom:2px solid transparent;white-space:nowrap}.tabs button.active{color:var(--txt);border-color:var(--accent)}.form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.form-grid label{display:grid;gap:5px;color:var(--txt3);font-size:11px}.form-grid input,.form-grid select,.form-grid textarea{width:100%;background:var(--bg2);border:1px solid var(--line);border-radius:8px;color:var(--txt);padding:9px}.form-grid textarea{resize:vertical}.form-grid .check{display:flex;align-items:center;gap:7px}.form-grid .check input{width:auto}.wide{grid-column:1/-1}.stack{display:grid;gap:10px}.coverage-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.4fr) auto;gap:16px;align-items:center}.coverage-card h2,.point-card h2,.restore h2{margin:7px 0 3px}.coverage-card p,.restore p{margin:0;color:var(--txt3)}.coverage-latest{display:grid;gap:4px}.point-head,.restore-head,.row-card{display:flex;justify-content:space-between;gap:14px;align-items:center}.point-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin:14px 0}.point-grid>div{display:grid;gap:4px;min-width:0}.point-grid b{overflow-wrap:anywhere}.restore{margin:14px 0;border-color:var(--accent)}.restore .form-grid{margin:14px 0 0}.plan{background:var(--bg2);border-radius:8px;padding:12px}.row-card>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row-card p{flex-basis:100%;margin:0}.job-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center}.job-card div{display:grid;gap:4px}.job-card p{margin:0}.mono,code{font-family:var(--mono)}@media(max-width:1050px){.form-grid{grid-template-columns:repeat(2,1fr)}.point-grid{grid-template-columns:repeat(3,1fr)}.coverage-card{grid-template-columns:1fr auto}.coverage-latest{grid-column:1/-1}.summary{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.form-grid,.point-grid,.summary{grid-template-columns:1fr}.form-grid>*{grid-column:1!important}.coverage-card,.job-card{grid-template-columns:1fr}.row-card,.point-head,.restore-head{align-items:flex-start;flex-direction:column}.header-actions{justify-content:flex-start}}
|
|
212
|
+
</style>
|
|
213
|
+
</body>
|
|
214
|
+
</html>
|