refactor: eliminate edge cdn caching layer and update telemetry & assets
This commit is contained in:
@@ -45,7 +45,7 @@ Instead of paying recurring cloud fees for AWS S3, GitHub private repos, or Clou
|
|||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
### 🌌 1. Unified Single Sign-On (SSO)
|
### 🌌 1. Unified Single Sign-On (SSO)
|
||||||
* **One Identity Across Everything:** Single login grants simultaneous access to private S3 storage, Git source control, and CDN workspaces.
|
* **One Identity Across Everything:** Single login grants simultaneous access to private S3 storage and Git source control.
|
||||||
* **Zero Plaintext Credentials:** Industry-standard `bcrypt` salted password hashing. Transient registration credentials exist exclusively in temporary, auto-expiring memory buffers (`sync.Map`) during provisioning.
|
* **Zero Plaintext Credentials:** Industry-standard `bcrypt` salted password hashing. Transient registration credentials exist exclusively in temporary, auto-expiring memory buffers (`sync.Map`) during provisioning.
|
||||||
* **Self-Service Recovery:** Integrated OTP verification and expiring password reset tokens.
|
* **Self-Service Recovery:** Integrated OTP verification and expiring password reset tokens.
|
||||||
|
|
||||||
@@ -59,14 +59,9 @@ Instead of paying recurring cloud fees for AWS S3, GitHub private repos, or Clou
|
|||||||
* **Auto-Healing Authentication:** Smart credential synchronization between Cosmos and Gitea's internal database. If credentials ever become mismatched, Cosmos automatically re-synchronizes and authenticates transparently.
|
* **Auto-Healing Authentication:** Smart credential synchronization between Cosmos and Gitea's internal database. If credentials ever become mismatched, Cosmos automatically re-synchronizes and authenticates transparently.
|
||||||
* **Full Protocol Support:** Clone, push, and pull effortlessly over HTTPS and SSH (`:2222`).
|
* **Full Protocol Support:** Clone, push, and pull effortlessly over HTTPS and SSH (`:2222`).
|
||||||
|
|
||||||
### ⚡ 4. Sub-Millisecond Edge CDN & Caching
|
### 📊 4. 3D Planetary Telemetry & Observability
|
||||||
* **In-Memory Cache Layer:** High-concurrency caching proxy with instantaneous sub-millisecond retrieval.
|
|
||||||
* **HTTP Cache Semantics:** Conditional ETags (`If-None-Match`), `304 Not Modified` responses, and instant cache purge queries (`?nocache=1`).
|
|
||||||
* **Custom Vanity CNAMEs:** Map custom internet domains directly to specific storage buckets.
|
|
||||||
|
|
||||||
### 📊 5. 3D Planetary Telemetry & Observability
|
|
||||||
* **Interactive Canvas Globe:** Orthographic rotating 3D globe rendered dynamically on HTML5 Canvas showing global request node routing.
|
* **Interactive Canvas Globe:** Orthographic rotating 3D globe rendered dynamically on HTML5 Canvas showing global request node routing.
|
||||||
* **Real-Time KPI Tracking:** Total request volume, cache hit ratios, origin loads, bandwidth meters, and HTTP error distributions.
|
* **Real-Time KPI Tracking:** Total request volume, throughput bandwidth, success rates, and HTTP error distributions.
|
||||||
* **Historical Time-Series:** Persistent hourly metric aggregations stored in ScyllaDB for telemetry auditing.
|
* **Historical Time-Series:** Persistent hourly metric aggregations stored in ScyllaDB for telemetry auditing.
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -212,7 +207,6 @@ COSMOS/
|
|||||||
├── main.go # HTTP server, auth router & MinIO broker
|
├── main.go # HTTP server, auth router & MinIO broker
|
||||||
├── oortconsole.go # S3 API endpoints & bucket management
|
├── oortconsole.go # S3 API endpoints & bucket management
|
||||||
├── oortanalytics.go # Real-time telemetry & ScyllaDB flushers
|
├── oortanalytics.go # Real-time telemetry & ScyllaDB flushers
|
||||||
├── s3cache.go # Sub-millisecond in-memory edge cache
|
|
||||||
├── .env.example # Sample environment configuration
|
├── .env.example # Sample environment configuration
|
||||||
├── go.mod # Dependencies manifest
|
├── go.mod # Dependencies manifest
|
||||||
└── LICENSE # MIT License
|
└── LICENSE # MIT License
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
<circle cx="24" cy="26" r="6" fill="#c084fc" class="pulse-beacon"/>
|
<circle cx="24" cy="26" r="6" fill="#c084fc" class="pulse-beacon"/>
|
||||||
<text x="40" y="30" fill="#ffffff" class="hud-title" font-size="14">Cosmos Core (Go)</text>
|
<text x="40" y="30" fill="#ffffff" class="hud-title" font-size="14">Cosmos Core (Go)</text>
|
||||||
<text x="40" y="44" fill="#34d399" class="mono" font-size="9" font-weight="600">● 100% HEALTHY // PORT :8080</text>
|
<text x="40" y="44" fill="#34d399" class="mono" font-size="9" font-weight="600">● 100% HEALTHY // PORT :8080</text>
|
||||||
<text x="16" y="66" fill="#cbd5e1" class="mono" font-size="10">Unified SSO • bcrypt Auth • In-Memory Caching</text>
|
<text x="16" y="66" fill="#cbd5e1" class="mono" font-size="10">Unified SSO • bcrypt Auth • High-Speed Routing</text>
|
||||||
<text x="16" y="82" fill="#94a3b8" class="mono" font-size="9">MinIO Tenant Provisioning • 3D Telemetry Feed</text>
|
<text x="16" y="82" fill="#94a3b8" class="mono" font-size="9">MinIO Tenant Provisioning • 3D Telemetry Feed</text>
|
||||||
</g>
|
</g>
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
+13
-11
@@ -85,26 +85,28 @@
|
|||||||
<text x="54" y="187.5" fill="#c084fc" class="mono-txt" font-size="8" text-anchor="middle">SYNCED</text>
|
<text x="54" y="187.5" fill="#c084fc" class="mono-txt" font-size="8" text-anchor="middle">SYNCED</text>
|
||||||
</g>
|
</g>
|
||||||
|
|
||||||
<!-- Card 3: Edge CDN (Emerald Theme) -->
|
<!-- Card 3: Unified SSO Auth (Emerald Theme) -->
|
||||||
<g transform="translate(470, 20)">
|
<g transform="translate(470, 20)">
|
||||||
<rect width="205" height="200" rx="12" fill="url(#cardGradDark)" stroke="rgba(52,211,153,0.4)" stroke-width="1.2" class="neon-border"/>
|
<rect width="205" height="200" rx="12" fill="url(#cardGradDark)" stroke="rgba(52,211,153,0.4)" stroke-width="1.2" class="neon-border"/>
|
||||||
<!-- Header Icon Pill -->
|
<!-- Header Icon Pill -->
|
||||||
<g transform="translate(16, 16)">
|
<g transform="translate(16, 16)">
|
||||||
<rect width="36" height="36" rx="8" fill="rgba(52,211,153,0.12)" stroke="rgba(52,211,153,0.3)" stroke-width="1"/>
|
<rect width="36" height="36" rx="8" fill="rgba(52,211,153,0.12)" stroke="rgba(52,211,153,0.3)" stroke-width="1"/>
|
||||||
<path d="M 22,12 L 13,21 L 18,21 L 14,26 L 24,17 L 19,17 Z" fill="#34d399"/>
|
<rect x="12" y="15" width="12" height="10" rx="2" fill="none" stroke="#34d399" stroke-width="1.5"/>
|
||||||
|
<path d="M 14,15 L 14,12 A 4,4 0 0,1 22,12 L 22,15" fill="none" stroke="#34d399" stroke-width="1.5"/>
|
||||||
|
<circle cx="18" cy="20" r="1.2" fill="#34d399"/>
|
||||||
</g>
|
</g>
|
||||||
<!-- Text -->
|
<!-- Text -->
|
||||||
<text x="62" y="32" fill="#f8fafc" class="card-title">Edge CDN Layer</text>
|
<text x="62" y="32" fill="#f8fafc" class="card-title">Unified SSO</text>
|
||||||
<text x="62" y="46" fill="#34d399" class="mono-txt">IN-MEMORY CACHE</text>
|
<text x="62" y="46" fill="#34d399" class="mono-txt">SINGLE IDENTITY</text>
|
||||||
<line x1="16" y1="64" x2="189" y2="64" stroke="rgba(255,255,255,0.06)" stroke-width="1"/>
|
<line x1="16" y1="64" x2="189" y2="64" stroke="rgba(255,255,255,0.06)" stroke-width="1"/>
|
||||||
<text x="16" y="86" fill="#cbd5e1" class="mono-txt">• Sub-millisecond TTL</text>
|
<text x="16" y="86" fill="#cbd5e1" class="mono-txt">• Single Master Login</text>
|
||||||
<text x="16" y="106" fill="#94a3b8" class="mono-txt">• ETag Validation</text>
|
<text x="16" y="106" fill="#94a3b8" class="mono-txt">• bcrypt Password Hashes</text>
|
||||||
<text x="16" y="126" fill="#94a3b8" class="mono-txt">• Vanity CNAME Domains</text>
|
<text x="16" y="126" fill="#94a3b8" class="mono-txt">• Auto-Provisioned S3 Keys</text>
|
||||||
<text x="16" y="146" fill="#94a3b8" class="mono-txt">• Automatic Invalidation</text>
|
<text x="16" y="146" fill="#94a3b8" class="mono-txt">• Gitea Account Sync</text>
|
||||||
<text x="16" y="166" fill="#94a3b8" class="mono-txt">• Zero Origin Bottlenecks</text>
|
<text x="16" y="166" fill="#94a3b8" class="mono-txt">• Zero Config Drift</text>
|
||||||
<!-- Footer Tag -->
|
<!-- Footer Tag -->
|
||||||
<rect x="16" y="176" width="76" height="16" rx="8" fill="rgba(52,211,153,0.15)"/>
|
<rect x="16" y="176" width="76" height="16" rx="8" fill="rgba(52,211,153,0.15)"/>
|
||||||
<text x="54" y="187.5" fill="#34d399" class="mono-txt" font-size="8" text-anchor="middle">< 1ms RT</text>
|
<text x="54" y="187.5" fill="#34d399" class="mono-txt" font-size="8" text-anchor="middle">ACTIVE</text>
|
||||||
</g>
|
</g>
|
||||||
|
|
||||||
<!-- Card 4: 3D Observability (Amber/Gold Theme) -->
|
<!-- Card 4: 3D Observability (Amber/Gold Theme) -->
|
||||||
@@ -122,7 +124,7 @@
|
|||||||
<line x1="16" y1="64" x2="189" y2="64" stroke="rgba(255,255,255,0.06)" stroke-width="1"/>
|
<line x1="16" y1="64" x2="189" y2="64" stroke="rgba(255,255,255,0.06)" stroke-width="1"/>
|
||||||
<text x="16" y="86" fill="#cbd5e1" class="mono-txt">• Orthographic 3D Globe</text>
|
<text x="16" y="86" fill="#cbd5e1" class="mono-txt">• Orthographic 3D Globe</text>
|
||||||
<text x="16" y="106" fill="#94a3b8" class="mono-txt">• Live Request Ratios</text>
|
<text x="16" y="106" fill="#94a3b8" class="mono-txt">• Live Request Ratios</text>
|
||||||
<text x="16" y="126" fill="#94a3b8" class="mono-txt">• Cache Hit / Miss Gauges</text>
|
<text x="16" y="126" fill="#94a3b8" class="mono-txt">• Success / Error Gauges</text>
|
||||||
<text x="16" y="146" fill="#94a3b8" class="mono-txt">• Hourly Bandwidth</text>
|
<text x="16" y="146" fill="#94a3b8" class="mono-txt">• Hourly Bandwidth</text>
|
||||||
<text x="16" y="166" fill="#94a3b8" class="mono-txt">• Granular Error Logs</text>
|
<text x="16" y="166" fill="#94a3b8" class="mono-txt">• Granular Error Logs</text>
|
||||||
<!-- Footer Tag -->
|
<!-- Footer Tag -->
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.6 KiB |
+3
-3
@@ -166,7 +166,7 @@
|
|||||||
<g transform="translate(0, 115)">
|
<g transform="translate(0, 115)">
|
||||||
<text x="0" y="0" font-family="'JetBrains Mono', monospace" font-size="14" font-weight="500" fill="#38bdf8" letter-spacing="0.08em">TURN YOUR OLD PC TO WORKSTATION</text>
|
<text x="0" y="0" font-family="'JetBrains Mono', monospace" font-size="14" font-weight="500" fill="#38bdf8" letter-spacing="0.08em">TURN YOUR OLD PC TO WORKSTATION</text>
|
||||||
<text x="0" y="26" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="13" fill="#94a3b8" letter-spacing="0.01em">
|
<text x="0" y="26" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="13" fill="#94a3b8" letter-spacing="0.01em">
|
||||||
Self-hosted S3 Object Storage, Private Git Engine & Edge CDN.
|
Self-hosted S3 Object Storage, Private Git Engine & Unified SSO.
|
||||||
</text>
|
</text>
|
||||||
<text x="0" y="46" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="13" fill="#94a3b8">
|
<text x="0" y="46" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="13" fill="#94a3b8">
|
||||||
One unified login. High-performance ScyllaDB & MinIO architecture.
|
One unified login. High-performance ScyllaDB & MinIO architecture.
|
||||||
@@ -185,10 +185,10 @@
|
|||||||
<rect width="112" height="34" rx="8" fill="rgba(168,85,247,0.1)" stroke="rgba(192,132,252,0.3)" stroke-width="1"/>
|
<rect width="112" height="34" rx="8" fill="rgba(168,85,247,0.1)" stroke="rgba(192,132,252,0.3)" stroke-width="1"/>
|
||||||
<text x="18" y="21" fill="#c084fc" font-family="'JetBrains Mono', monospace" font-size="11" font-weight="600">GIT FORGE</text>
|
<text x="18" y="21" fill="#c084fc" font-family="'JetBrains Mono', monospace" font-size="11" font-weight="600">GIT FORGE</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- Badge 3: Edge CDN -->
|
<!-- Badge 3: SSO Auth -->
|
||||||
<g transform="translate(244, 0)">
|
<g transform="translate(244, 0)">
|
||||||
<rect width="112" height="34" rx="8" fill="rgba(52,211,153,0.1)" stroke="rgba(52,211,153,0.3)" stroke-width="1"/>
|
<rect width="112" height="34" rx="8" fill="rgba(52,211,153,0.1)" stroke="rgba(52,211,153,0.3)" stroke-width="1"/>
|
||||||
<text x="18" y="21" fill="#34d399" font-family="'JetBrains Mono', monospace" font-size="11" font-weight="600">EDGE CDN</text>
|
<text x="22" y="21" fill="#34d399" font-family="'JetBrains Mono', monospace" font-size="11" font-weight="600">SSO AUTH</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- Badge 4: 3D Observability -->
|
<!-- Badge 4: 3D Observability -->
|
||||||
<g transform="translate(366, 0)">
|
<g transform="translate(366, 0)">
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
+5
-10
@@ -40,7 +40,7 @@ Cosmos is an open-source, self-hosted cloud platform engineered to transform ord
|
|||||||
### 1. Unified Identity & Application Core (`portals-go`)
|
### 1. Unified Identity & Application Core (`portals-go`)
|
||||||
* **Language:** Go (Golang) 1.22+
|
* **Language:** Go (Golang) 1.22+
|
||||||
* **Serving:** Native `net/http` server with embedded HTML/CSS templates via `embed.FS`.
|
* **Serving:** Native `net/http` server with embedded HTML/CSS templates via `embed.FS`.
|
||||||
* **Single Sign-On (SSO):** A centralized identity provider managing accounts across S3 Storage, Git Source Control, and CDN.
|
* **Single Sign-On (SSO):** A centralized identity provider managing accounts across S3 Storage and Git Source Control.
|
||||||
* **Security Model:**
|
* **Security Model:**
|
||||||
* Passwords hashed with `golang.org/x/crypto/bcrypt`.
|
* Passwords hashed with `golang.org/x/crypto/bcrypt`.
|
||||||
* Temporary registration passwords stored in transient, self-expiring memory structures (`sync.Map`) only during automated provisioning—never stored plain-text in database storage.
|
* Temporary registration passwords stored in transient, self-expiring memory structures (`sync.Map`) only during automated provisioning—never stored plain-text in database storage.
|
||||||
@@ -54,7 +54,7 @@ Cosmos is an open-source, self-hosted cloud platform engineered to transform ord
|
|||||||
* `cosmos.pending`: Ephemeral registration tokens and OTP codes.
|
* `cosmos.pending`: Ephemeral registration tokens and OTP codes.
|
||||||
* `cosmos.password_reset_tokens`: Time-expiring password reset tokens.
|
* `cosmos.password_reset_tokens`: Time-expiring password reset tokens.
|
||||||
* `cosmos.buckets`: User bucket metadata, ownership tracking, and friendly aliases.
|
* `cosmos.buckets`: User bucket metadata, ownership tracking, and friendly aliases.
|
||||||
* `cosmos.bucket_domains`: Vanity domain and CNAME mapping for edge serving.
|
* `cosmos.bucket_domains`: Vanity domain and CNAME mapping for public bucket serving.
|
||||||
* `cosmos.quota_requests`: Administrative quota elevation queue.
|
* `cosmos.quota_requests`: Administrative quota elevation queue.
|
||||||
* `cosmos.s3_analytics` & `cosmos.s3_analytics_hourly`: Telemetry tracking counters.
|
* `cosmos.s3_analytics` & `cosmos.s3_analytics_hourly`: Telemetry tracking counters.
|
||||||
|
|
||||||
@@ -72,15 +72,10 @@ Cosmos is an open-source, self-hosted cloud platform engineered to transform ord
|
|||||||
* Cosmos manages registration and credential synchronization via CLI/API hooks (`gitea admin user create`, `gitea admin user change-password`).
|
* Cosmos manages registration and credential synchronization via CLI/API hooks (`gitea admin user create`, `gitea admin user change-password`).
|
||||||
* Auto-healing authentication logic: if credentials fall out of sync during login, Cosmos automatically re-synchronizes the bcrypt hash with Gitea's internal database and retries transparently.
|
* Auto-healing authentication logic: if credentials fall out of sync during login, Cosmos automatically re-synchronizes the bcrypt hash with Gitea's internal database and retries transparently.
|
||||||
|
|
||||||
### 5. Edge Caching & CDN Simulation
|
### 5. Real-Time Telemetry & Observability
|
||||||
* **Caching Engine:** In-memory high-concurrency cache (`sync.Map`) with TTL expiration.
|
* **In-Memory Accumulator:** High-throughput `atomic.Int64` counters for request counts, bytes transferred, and status code categories (2xx, 4xx, 5xx).
|
||||||
* **Headers:** Standard HTTP cache control headers (`Cache-Control: public, max-age=...`), ETag generation, and conditional request handling (`If-None-Match`).
|
|
||||||
* **Cache Bypass:** Diagnostic and instant-purge queries (`?nocache=1` or `Cache-Control: no-cache`).
|
|
||||||
|
|
||||||
### 6. Real-Time Telemetry & Observability
|
|
||||||
* **In-Memory Accumulator:** High-throughput `atomic.Int64` counters for request counts, bytes transferred, cache hits/misses, and status code categories (2xx, 4xx, 5xx).
|
|
||||||
* **Periodic Flushing:** Background goroutine flushes aggregated metrics to ScyllaDB hourly tables (`cosmos.s3_analytics_hourly`).
|
* **Periodic Flushing:** Background goroutine flushes aggregated metrics to ScyllaDB hourly tables (`cosmos.s3_analytics_hourly`).
|
||||||
* **Visual Telemetry:** Interactive 3D rotating orthographic globe rendered on HTML5 Canvas using vector latitude/longitude projections, simulating real-time global edge node activity.
|
* **Visual Telemetry:** Interactive 3D rotating orthographic globe rendered on HTML5 Canvas using vector latitude/longitude projections, simulating real-time global traffic node activity.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -380,7 +380,6 @@ func handleVerify(w http.ResponseWriter, r *http.Request, service string) {
|
|||||||
if rawPassword != "" {
|
if rawPassword != "" {
|
||||||
provisionGitea(username, email, rawPassword)
|
provisionGitea(username, email, rawPassword)
|
||||||
}
|
}
|
||||||
// Note: "cdn" / Seafile provisioning removed — Seafile is not deployed
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
if r.Header.Get("Content-Type") == "application/x-www-form-urlencoded" {
|
if r.Header.Get("Content-Type") == "application/x-www-form-urlencoded" {
|
||||||
@@ -449,23 +448,7 @@ h1{font-size:48px;font-weight:700;margin-bottom:8px}
|
|||||||
<div class="card"><div class="lbl">S3 Endpoint</div><div class="val">%s</div></div>
|
<div class="card"><div class="lbl">S3 Endpoint</div><div class="val">%s</div></div>
|
||||||
<a href="/oort/console?sid=%s" class="btn">Open Storage Console →</a>
|
<a href="/oort/console?sid=%s" class="btn">Open Storage Console →</a>
|
||||||
</div></body></html>`, name, ak, sk, bucket, getCosmosBaseURL(), sid)
|
</div></body></html>`, name, ak, sk, bucket, getCosmosBaseURL(), sid)
|
||||||
case "cdn":
|
|
||||||
fmt.Fprintf(w, `<!DOCTYPE html><html><head><meta charset="utf-8"><title>CDN – Cosmos</title><style>
|
|
||||||
*{box-sizing:border-box;margin:0;padding:0}
|
|
||||||
body{background:#000;color:#fff;font-family:-apple-system,sans-serif;min-height:100vh}
|
|
||||||
nav{position:fixed;top:0;width:100%%;height:44px;background:rgba(0,0,0,0.85);backdrop-filter:blur(20px);border-bottom:1px solid rgba(255,255,255,0.1);display:flex;align-items:center;justify-content:center;z-index:999}
|
|
||||||
.ni{max-width:980px;width:100%%;display:flex;justify-content:space-between;padding:0 22px;font-size:12px}
|
|
||||||
nav a{color:rgba(255,255,255,0.8);text-decoration:none}
|
|
||||||
.main{max-width:680px;margin:0 auto;padding:100px 22px 60px;text-align:center}
|
|
||||||
h1{font-size:48px;font-weight:700;margin-bottom:8px}
|
|
||||||
.sub{color:#86868b;font-size:19px;margin-bottom:48px}
|
|
||||||
.btn{display:inline-block;background:#fff;color:#000;padding:18px 40px;border-radius:980px;text-decoration:none;font-size:19px;font-weight:500}
|
|
||||||
</style></head><body>
|
|
||||||
<nav><div class="ni"><a href="/">Cosmos</a><a href="/cdn" style="color:#fff;font-weight:600">Workspace</a><a href="/cdn/logout" style="color:#ff3b30;margin-left:24px;font-weight:600">Sign Out</a></div></nav>
|
|
||||||
<div class="main">
|
|
||||||
<h1>Welcome, %s.</h1><p class="sub">Your personal cdn drive is ready.</p>
|
|
||||||
<a href="/workspace/" class="btn">Open CDN Drive →</a>
|
|
||||||
</div></body></html>`, name)
|
|
||||||
case "git":
|
case "git":
|
||||||
fmt.Fprintf(w, `<!DOCTYPE html><html><head><meta charset="utf-8"><title>Git – Cosmos</title><style>
|
fmt.Fprintf(w, `<!DOCTYPE html><html><head><meta charset="utf-8"><title>Git – Cosmos</title><style>
|
||||||
*{box-sizing:border-box;margin:0;padding:0}
|
*{box-sizing:border-box;margin:0;padding:0}
|
||||||
@@ -831,10 +814,8 @@ func main() {
|
|||||||
RegisterS3ConsoleRoutes(mux)
|
RegisterS3ConsoleRoutes(mux)
|
||||||
mux.HandleFunc("/oort", func(w http.ResponseWriter, r *http.Request) { handleServicePage(w, r, "oort") })
|
mux.HandleFunc("/oort", func(w http.ResponseWriter, r *http.Request) { handleServicePage(w, r, "oort") })
|
||||||
mux.HandleFunc("/git", func(w http.ResponseWriter, r *http.Request) { handleServicePage(w, r, "git") })
|
mux.HandleFunc("/git", func(w http.ResponseWriter, r *http.Request) { handleServicePage(w, r, "git") })
|
||||||
mux.HandleFunc("/cdn", func(w http.ResponseWriter, r *http.Request) { handleServicePage(w, r, "cdn") })
|
|
||||||
mux.HandleFunc("/oort/", serviceRouter("oort"))
|
mux.HandleFunc("/oort/", serviceRouter("oort"))
|
||||||
mux.HandleFunc("/git/", serviceRouter("git"))
|
mux.HandleFunc("/git/", serviceRouter("git"))
|
||||||
mux.HandleFunc("/cdn/", serviceRouter("cdn"))
|
|
||||||
mux.HandleFunc("/", handleIndex)
|
mux.HandleFunc("/", handleIndex)
|
||||||
log.Println("[SERVER] Starting Cosmos Portals on 127.0.0.1:8000")
|
log.Println("[SERVER] Starting Cosmos Portals on 127.0.0.1:8000")
|
||||||
log.Fatal(http.ListenAndServe("127.0.0.1:8000", mux))
|
log.Fatal(http.ListenAndServe("127.0.0.1:8000", mux))
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
@@ -143,3 +144,20 @@ func init() {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type trackingResponseWriter struct {
|
||||||
|
http.ResponseWriter
|
||||||
|
statusCode int
|
||||||
|
bytes int64
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w *trackingResponseWriter) WriteHeader(code int) {
|
||||||
|
w.statusCode = code
|
||||||
|
w.ResponseWriter.WriteHeader(code)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (w *trackingResponseWriter) Write(b []byte) (int, error) {
|
||||||
|
n, err := w.ResponseWriter.Write(b)
|
||||||
|
w.bytes += int64(n)
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
|||||||
+4
-106
@@ -427,9 +427,6 @@ func handleS3UploadComplete(w http.ResponseWriter, r *http.Request) {
|
|||||||
// Record a write hit for analytics
|
// Record a write hit for analytics
|
||||||
go recordHit(bucket, 200, 0, false, r.Header.Get("CF-IPCountry"), "write")
|
go recordHit(bucket, 200, 0, false, r.Header.Get("CF-IPCountry"), "write")
|
||||||
|
|
||||||
// Invalidate cache
|
|
||||||
cdnCache.Delete("/" + bucket + "/" + req.Key)
|
|
||||||
|
|
||||||
jsonOK(w, map[string]any{
|
jsonOK(w, map[string]any{
|
||||||
"key": upload.Key,
|
"key": upload.Key,
|
||||||
"etag": strings.Trim(upload.ETag, "\""),
|
"etag": strings.Trim(upload.ETag, "\""),
|
||||||
@@ -505,18 +502,6 @@ func handleS3Delete(w http.ResponseWriter, r *http.Request) {
|
|||||||
jsonErr(w, "delete failed", 500)
|
jsonErr(w, "delete failed", 500)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
cdnCache.Delete("/" + bucket + "/" + key)
|
|
||||||
}
|
|
||||||
|
|
||||||
// If it was a folder, clear cache for all files in it
|
|
||||||
if strings.HasSuffix(key, "/") {
|
|
||||||
prefix := "/" + bucket + "/" + key
|
|
||||||
cdnCache.Range(func(k, v any) bool {
|
|
||||||
if strings.HasPrefix(k.(string), prefix) {
|
|
||||||
cdnCache.Delete(k)
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonOK(w, map[string]bool{"deleted": true})
|
jsonOK(w, map[string]bool{"deleted": true})
|
||||||
@@ -1213,24 +1198,6 @@ func handleS3PublicProxy(w http.ResponseWriter, r *http.Request, username, path
|
|||||||
|
|
||||||
targetPath := fmt.Sprintf("/%s/%s", actualBucket, objectKey)
|
targetPath := fmt.Sprintf("/%s/%s", actualBucket, objectKey)
|
||||||
|
|
||||||
// Check Cache for GET requests without Range
|
|
||||||
if r.Method == "GET" && r.Header.Get("Range") == "" {
|
|
||||||
if val, ok := cdnCache.Load(targetPath); ok {
|
|
||||||
entry := val.(*cacheEntry)
|
|
||||||
if time.Now().Before(entry.ExpiresAt) {
|
|
||||||
for k, v := range entry.Headers {
|
|
||||||
w.Header()[k] = v
|
|
||||||
}
|
|
||||||
w.Header().Set("X-Cache", "HIT")
|
|
||||||
w.WriteHeader(entry.StatusCode)
|
|
||||||
w.Write(entry.Body)
|
|
||||||
recordHit(actualBucket, entry.StatusCode, int64(len(entry.Body)), true, r.Header.Get("CF-IPCountry"), "read")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
cdnCache.Delete(targetPath)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
targetUrl, _ := url.Parse("http://127.0.0.1:9000")
|
targetUrl, _ := url.Parse("http://127.0.0.1:9000")
|
||||||
proxy := httputil.NewSingleHostReverseProxy(targetUrl)
|
proxy := httputil.NewSingleHostReverseProxy(targetUrl)
|
||||||
proxy.Transport = proxyTransport
|
proxy.Transport = proxyTransport
|
||||||
@@ -1244,39 +1211,13 @@ func handleS3PublicProxy(w http.ResponseWriter, r *http.Request, username, path
|
|||||||
resp.Body = io.NopCloser(strings.NewReader("<html><body><h1>403 - Access Denied</h1><p>Public access is not enabled for this bucket.</p></body></html>"))
|
resp.Body = io.NopCloser(strings.NewReader("<html><body><h1>403 - Access Denied</h1><p>Public access is not enabled for this bucket.</p></body></html>"))
|
||||||
resp.Header.Set("Content-Length", fmt.Sprintf("%d", len("<html><body><h1>403 - Access Denied</h1><p>Public access is not enabled for this bucket.</p></body></html>")))
|
resp.Header.Set("Content-Length", fmt.Sprintf("%d", len("<html><body><h1>403 - Access Denied</h1><p>Public access is not enabled for this bucket.</p></body></html>")))
|
||||||
resp.Header.Set("Content-Type", "text/html")
|
resp.Header.Set("Content-Type", "text/html")
|
||||||
} else {
|
|
||||||
ct := resp.Header.Get("Content-Type")
|
|
||||||
if strings.HasPrefix(ct, "image/") || strings.HasPrefix(ct, "video/") {
|
|
||||||
resp.Header.Set("Cache-Control", "public, max-age=31536000, immutable")
|
|
||||||
} else {
|
|
||||||
resp.Header.Set("Cache-Control", "public, max-age=3600")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
resp.Header.Set("X-Cache", "MISS")
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's a GET request without Range, we can cache it
|
tw := &trackingResponseWriter{ResponseWriter: w, statusCode: 200}
|
||||||
if r.Method == "GET" && r.Header.Get("Range") == "" {
|
proxy.ServeHTTP(tw, r)
|
||||||
cw := &cachingResponseWriter{ResponseWriter: w, statusCode: 200}
|
recordHit(actualBucket, tw.statusCode, tw.bytes, false, r.Header.Get("CF-IPCountry"), "read")
|
||||||
proxy.ServeHTTP(cw, r)
|
|
||||||
|
|
||||||
recordHit(actualBucket, cw.statusCode, int64(cw.buf.Len()), false, r.Header.Get("CF-IPCountry"), "read")
|
|
||||||
|
|
||||||
// Cache files under 10MB
|
|
||||||
if cw.statusCode == 200 && cw.buf.Len() < 10*1024*1024 {
|
|
||||||
cdnCache.Store(targetPath, &cacheEntry{
|
|
||||||
Body: cw.buf.Bytes(),
|
|
||||||
Headers: cw.Header().Clone(),
|
|
||||||
StatusCode: cw.statusCode,
|
|
||||||
ExpiresAt: time.Now().Add(1 * time.Hour),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tw := &trackingResponseWriter{ResponseWriter: w, statusCode: 200}
|
|
||||||
proxy.ServeHTTP(tw, r)
|
|
||||||
recordHit(actualBucket, tw.statusCode, tw.bytes, false, r.Header.Get("CF-IPCountry"), "read")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleS3BucketSettings(w http.ResponseWriter, r *http.Request) {
|
func handleS3BucketSettings(w http.ResponseWriter, r *http.Request) {
|
||||||
@@ -1750,24 +1691,6 @@ func handleS3CDNProxy(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
targetPath := "/" + bucket + "/" + key
|
targetPath := "/" + bucket + "/" + key
|
||||||
|
|
||||||
// Check Cache for GET requests without Range
|
|
||||||
if r.Method == "GET" && r.Header.Get("Range") == "" {
|
|
||||||
if val, ok := cdnCache.Load(targetPath); ok {
|
|
||||||
entry := val.(*cacheEntry)
|
|
||||||
if time.Now().Before(entry.ExpiresAt) {
|
|
||||||
for k, v := range entry.Headers {
|
|
||||||
w.Header()[k] = v
|
|
||||||
}
|
|
||||||
w.Header().Set("X-Cache", "HIT")
|
|
||||||
w.WriteHeader(entry.StatusCode)
|
|
||||||
w.Write(entry.Body)
|
|
||||||
recordHit(bucket, entry.StatusCode, int64(len(entry.Body)), true, r.Header.Get("CF-IPCountry"), "read")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
cdnCache.Delete(targetPath)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
targetUrl, _ := url.Parse("http://127.0.0.1:9000")
|
targetUrl, _ := url.Parse("http://127.0.0.1:9000")
|
||||||
proxy := httputil.NewSingleHostReverseProxy(targetUrl)
|
proxy := httputil.NewSingleHostReverseProxy(targetUrl)
|
||||||
proxy.Director = func(req *http.Request) {
|
proxy.Director = func(req *http.Request) {
|
||||||
@@ -1777,32 +1700,7 @@ func handleS3CDNProxy(w http.ResponseWriter, r *http.Request) {
|
|||||||
req.Host = targetUrl.Host
|
req.Host = targetUrl.Host
|
||||||
}
|
}
|
||||||
proxy.ModifyResponse = func(resp *http.Response) error {
|
proxy.ModifyResponse = func(resp *http.Response) error {
|
||||||
statusCode := resp.StatusCode
|
recordHit(bucket, resp.StatusCode, resp.ContentLength, false, r.Header.Get("CF-IPCountry"), "read")
|
||||||
var bodyBytes []byte
|
|
||||||
if r.Method == "GET" && r.Header.Get("Range") == "" {
|
|
||||||
if resp.ContentLength > 0 && resp.ContentLength < 10*1024*1024 {
|
|
||||||
bodyBytes, _ = io.ReadAll(resp.Body)
|
|
||||||
resp.Body = io.NopCloser(bytes.NewBuffer(bodyBytes))
|
|
||||||
if statusCode == 200 {
|
|
||||||
headersCopy := make(http.Header)
|
|
||||||
for k, v := range resp.Header {
|
|
||||||
headersCopy[k] = v
|
|
||||||
}
|
|
||||||
cdnCache.Store(targetPath, &cacheEntry{
|
|
||||||
Body: bodyBytes,
|
|
||||||
Headers: headersCopy,
|
|
||||||
StatusCode: statusCode,
|
|
||||||
ExpiresAt: time.Now().Add(5 * time.Minute),
|
|
||||||
})
|
|
||||||
resp.Header.Set("X-Cache", "MISS")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
respBytes := resp.ContentLength
|
|
||||||
if respBytes < 0 {
|
|
||||||
respBytes = int64(len(bodyBytes))
|
|
||||||
}
|
|
||||||
recordHit(bucket, statusCode, respBytes, false, r.Header.Get("CF-IPCountry"), "read")
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
proxy.ServeHTTP(w, r)
|
proxy.ServeHTTP(w, r)
|
||||||
|
|||||||
-50
@@ -1,50 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"net/http"
|
|
||||||
"sync"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
var cdnCache sync.Map // map[string]*cacheEntry
|
|
||||||
|
|
||||||
type cacheEntry struct {
|
|
||||||
Body []byte
|
|
||||||
Headers http.Header
|
|
||||||
StatusCode int
|
|
||||||
ExpiresAt time.Time
|
|
||||||
}
|
|
||||||
|
|
||||||
type cachingResponseWriter struct {
|
|
||||||
http.ResponseWriter
|
|
||||||
buf bytes.Buffer
|
|
||||||
statusCode int
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *cachingResponseWriter) WriteHeader(code int) {
|
|
||||||
w.statusCode = code
|
|
||||||
w.ResponseWriter.WriteHeader(code)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *cachingResponseWriter) Write(b []byte) (int, error) {
|
|
||||||
w.buf.Write(b)
|
|
||||||
return w.ResponseWriter.Write(b)
|
|
||||||
}
|
|
||||||
|
|
||||||
type trackingResponseWriter struct {
|
|
||||||
http.ResponseWriter
|
|
||||||
statusCode int
|
|
||||||
bytes int64
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *trackingResponseWriter) WriteHeader(code int) {
|
|
||||||
w.statusCode = code
|
|
||||||
w.ResponseWriter.WriteHeader(code)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *trackingResponseWriter) Write(b []byte) (int, error) {
|
|
||||||
n, err := w.ResponseWriter.Write(b)
|
|
||||||
w.bytes += int64(n)
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
@@ -1,331 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Cloud Workspace · Cosmos</title>
|
|
||||||
<meta name="description" content="Secure document collaboration and zero-latency file synchronization.">
|
|
||||||
<link rel="icon" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="6" fill="%23eef3f8"/><ellipse cx="16" cy="16" rx="14" ry="5.5" fill="none" stroke="%236ee7b7" stroke-width="1.5" transform="rotate(-24 16 16)"/></svg>'>
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@1&family=JetBrains+Mono:wght@300;400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
||||||
<style>
|
|
||||||
:root{--bg:#020308;--ink:#eef3f8;--dim:rgba(226,234,242,.55);--faint:rgba(226,234,242,.3);--line:rgba(226,234,242,.08);--ok:#43e5a0;--ac:110,231,183;--mono:'JetBrains Mono',ui-monospace,monospace;--disp:'Space Grotesk',sans-serif;--serif:'Instrument Serif',serif;--pad:clamp(24px,5vw,84px);--ez:cubic-bezier(.16,1,.3,1)}
|
|
||||||
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
|
|
||||||
html{scroll-behavior:smooth}
|
|
||||||
body{font-family:var(--disp);background:var(--bg);color:var(--ink);overflow-x:hidden;-webkit-font-smoothing:antialiased;animation:bootIn 1s ease both}
|
|
||||||
@keyframes bootIn{from{opacity:0}}
|
|
||||||
::selection{background:rgba(var(--ac),.3)}
|
|
||||||
::-webkit-scrollbar{width:10px}
|
|
||||||
::-webkit-scrollbar-track{background:var(--bg)}
|
|
||||||
::-webkit-scrollbar-thumb{background:#141b28;border:3px solid var(--bg);border-radius:6px}
|
|
||||||
a:focus-visible,button:focus-visible{outline:1px solid rgba(238,243,248,.55);outline-offset:4px;border-radius:4px}
|
|
||||||
#sky{position:fixed;inset:0;z-index:0;pointer-events:none}
|
|
||||||
.grain{position:fixed;inset:-8%;z-index:2;pointer-events:none;opacity:.05;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-size:180px 180px;animation:grain .9s steps(3) infinite}
|
|
||||||
@keyframes grain{0%,100%{transform:translate(0,0)}33%{transform:translate(-1.4%,1%)}66%{transform:translate(1%,-1.4%)}}
|
|
||||||
.vig{position:fixed;inset:0;z-index:2;pointer-events:none;background:radial-gradient(ellipse at 50% 42%,transparent 55%,rgba(1,2,8,.55) 100%)}
|
|
||||||
.mag{will-change:transform;transition:transform .45s var(--ez)}
|
|
||||||
.cur{position:fixed;top:0;left:0;z-index:300;pointer-events:none;opacity:0;transition:opacity .3s}
|
|
||||||
body.cur-vis .cur{opacity:1}
|
|
||||||
#curDot{width:4px;height:4px;margin:-2px 0 0 -2px;border-radius:50%;background:var(--ink)}
|
|
||||||
#curRing{width:34px;height:34px;margin:-17px 0 0 -17px;border-radius:50%;border:1px solid rgba(238,243,248,.4);transition:width .3s var(--ez),height .3s var(--ez),margin .3s var(--ez),border-color .3s}
|
|
||||||
#curRing.act{width:52px;height:52px;margin:-26px 0 0 -26px;border-color:rgba(238,243,248,.75)}
|
|
||||||
body.has-cur,body.has-cur a,body.has-cur button{cursor:none}
|
|
||||||
nav{position:fixed;top:0;left:0;right:0;z-index:100;height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 var(--pad);background:rgba(2,3,8,.42);backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%);border-bottom:1px solid rgba(226,234,242,.05);animation:navIn 1.1s .05s var(--ez) both}
|
|
||||||
@keyframes navIn{from{opacity:0;transform:translateY(-10px)}}
|
|
||||||
nav.scrolled{background:rgba(2,3,8,.85);border-bottom-color:rgba(226,234,242,.09)}
|
|
||||||
.logo{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--ink);font-size:16.5px;font-weight:600;letter-spacing:-.02em}
|
|
||||||
.mark{width:30px;height:30px;flex:none;animation:markSpin 16s linear infinite}
|
|
||||||
@keyframes markSpin{to{transform:rotate(360deg)}}
|
|
||||||
.nav-links{display:flex;gap:34px}
|
|
||||||
.nav-links a{position:relative;text-decoration:none;color:var(--dim);font-size:13.5px;font-weight:500;padding:4px 0;transition:color .25s}
|
|
||||||
.nav-links a i{font-style:normal;font-family:var(--mono);font-size:8.5px;color:rgba(226,234,242,.3);margin-right:7px;vertical-align:2px;letter-spacing:.1em}
|
|
||||||
.nav-links a::after{content:'';position:absolute;left:0;bottom:-2px;height:1px;width:100%;background:var(--ink);transform:scaleX(0);transform-origin:left;transition:transform .45s var(--ez)}
|
|
||||||
.nav-links a:hover{color:#fff}
|
|
||||||
.nav-links a:hover::after{transform:scaleX(1)}
|
|
||||||
.nav-links a.on{color:#fff}
|
|
||||||
.nav-links a.on::after{transform:scaleX(1);background:rgb(var(--ac))}
|
|
||||||
.nav-right{display:flex;align-items:center;gap:20px}
|
|
||||||
.nav-status{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:9.5px;letter-spacing:.24em;color:rgba(110,225,175,.75)}
|
|
||||||
.nav-status i,.ft-status i{width:5px;height:5px;border-radius:50%;background:var(--ok);box-shadow:0 0 8px var(--ok);animation:dotPulse 2.4s ease infinite;flex:none}
|
|
||||||
@keyframes dotPulse{0%,100%{opacity:1}50%{opacity:.35}}
|
|
||||||
.nav-btn{font-size:13px;font-weight:600;color:var(--ink);text-decoration:none;padding:9px 20px;border-radius:9px;border:1px solid rgba(226,234,242,.14);background:rgba(226,234,242,.03)}
|
|
||||||
.nav-btn:hover{background:rgba(226,234,242,.09);border-color:rgba(226,234,242,.32)}
|
|
||||||
.hero{position:relative;z-index:10;min-height:100vh;min-height:100svh;display:flex;align-items:center;justify-content:center;text-align:center;padding:130px var(--pad) 120px;overflow:hidden}
|
|
||||||
.hero-viz{position:absolute;inset:0;z-index:0;pointer-events:none}
|
|
||||||
.hero-viz canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
|
|
||||||
.hud{position:absolute;z-index:5;font-family:var(--mono);font-size:9.5px;letter-spacing:.16em;color:rgba(226,234,242,.32);text-transform:uppercase;line-height:2.1;pointer-events:none}
|
|
||||||
.hud-bl{left:var(--pad);bottom:30px;display:flex;flex-direction:column;text-align:left}
|
|
||||||
.hud-br{right:var(--pad);bottom:30px;display:flex;align-items:center;gap:10px}
|
|
||||||
.hud-br em{font-style:normal;color:rgba(226,234,242,.16)}
|
|
||||||
.hero-inner{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;max-width:900px}
|
|
||||||
.tag{display:inline-flex;align-items:center;gap:9px;padding:7px 16px;border-radius:99px;border:1px solid rgba(var(--ac),.22);background:rgba(var(--ac),.05);font-family:var(--mono);font-size:9.5px;letter-spacing:.2em;color:rgba(var(--ac),.9);margin-bottom:42px;animation:softUp .9s .12s var(--ez) both}
|
|
||||||
.tag .dot{width:5px;height:5px;border-radius:50%;background:rgb(var(--ac));box-shadow:0 0 10px rgb(var(--ac));animation:dotPulse 2.6s ease infinite}
|
|
||||||
.title{font-size:clamp(54px,10.5vw,148px);font-weight:600;letter-spacing:-.045em;line-height:.97;margin-bottom:30px;text-shadow:0 0 90px rgba(230,240,255,.06)}
|
|
||||||
.title em{font-family:var(--serif);font-style:italic;font-weight:400;letter-spacing:-.015em}
|
|
||||||
.msk{display:block;overflow:hidden;padding-bottom:.12em;margin-bottom:-.12em}
|
|
||||||
.msk-in{display:inline-block;animation:mskUp 1.15s .28s var(--ez) both}
|
|
||||||
@keyframes mskUp{from{transform:translateY(118%)}}
|
|
||||||
@keyframes softUp{from{opacity:0;transform:translateY(26px);filter:blur(6px)}}
|
|
||||||
.sub{max-width:520px;font-size:clamp(15px,1.7vw,17.5px);line-height:1.8;color:var(--dim);margin-bottom:48px;animation:softUp .9s .55s var(--ez) both}
|
|
||||||
.ctas{display:flex;gap:13px;flex-wrap:wrap;justify-content:center;animation:softUp .9s .7s var(--ez) both}
|
|
||||||
.btn{display:inline-flex;align-items:center;gap:10px;padding:14px 30px;border-radius:11px;font-size:14.5px;font-weight:600;letter-spacing:-.01em;text-decoration:none}
|
|
||||||
.btn-p{background:#fff;color:#04060d;box-shadow:0 8px 40px rgba(255,255,255,.08)}
|
|
||||||
.btn-p:hover{box-shadow:0 14px 60px rgba(255,255,255,.17)}
|
|
||||||
.btn-g{border:1px solid rgba(226,234,242,.16);color:var(--dim);background:rgba(226,234,242,.02)}
|
|
||||||
.btn-g:hover{color:#fff;border-color:rgba(226,234,242,.36)}
|
|
||||||
.scroll-cue{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:12px;animation:softUp 1s 1.3s var(--ez) both;z-index:3}
|
|
||||||
.scroll-cue>span:first-child{font-family:var(--mono);font-size:8.5px;letter-spacing:.34em;color:rgba(226,234,242,.28)}
|
|
||||||
.track{width:1px;height:54px;background:rgba(226,234,242,.08);position:relative;overflow:hidden;display:block}
|
|
||||||
.track i{position:absolute;left:0;top:-40%;width:100%;height:40%;display:block;background:linear-gradient(to bottom,transparent,rgba(var(--ac),.85),transparent);animation:cueFlow 2.2s var(--ez) infinite}
|
|
||||||
@keyframes cueFlow{to{top:130%}}
|
|
||||||
.ticker{position:relative;z-index:10;overflow:hidden;border-block:1px solid var(--line);padding:13px 0;background:rgba(2,3,8,.42);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
|
|
||||||
.tk{display:flex;width:max-content;animation:tick 46s linear infinite}
|
|
||||||
.ticker:hover .tk{animation-play-state:paused}
|
|
||||||
.tk-half{display:flex;align-items:center;gap:44px;padding-right:44px}
|
|
||||||
.tk-half span{font-family:var(--mono);font-size:10.5px;letter-spacing:.24em;white-space:nowrap;text-transform:uppercase;color:rgba(226,234,242,.36)}
|
|
||||||
.tk-half .ts{color:rgba(226,234,242,.14)}
|
|
||||||
@keyframes tick{to{transform:translateX(-50%)}}
|
|
||||||
.caps-wrap{position:relative;z-index:10;padding:clamp(80px,10vw,150px) var(--pad)}
|
|
||||||
.caps-inner{max-width:760px;margin:0 auto}
|
|
||||||
.m-index{display:inline-flex;align-items:center;gap:12px;font-family:var(--mono);font-size:9.5px;letter-spacing:.3em;text-transform:uppercase;color:rgba(var(--ac),.7);margin-bottom:22px}
|
|
||||||
.m-index::before{content:'';width:26px;height:1px;background:rgba(var(--ac),.55)}
|
|
||||||
.caps-title{font-size:clamp(30px,4.4vw,52px);font-weight:600;letter-spacing:-.035em;line-height:1.08;margin-bottom:44px}
|
|
||||||
.caps-title em{font-family:var(--serif);font-style:italic;font-weight:400}
|
|
||||||
.caps{list-style:none;border-top:1px solid var(--line);margin-bottom:44px}
|
|
||||||
.cap{display:flex;align-items:center;gap:14px;padding:13px 2px;border-bottom:1px solid var(--line);font-size:14.5px;color:rgba(226,234,242,.58);transition:color .3s}
|
|
||||||
.cap:hover{color:#fff}
|
|
||||||
.cap-ic{width:17px;height:17px;flex:none;border-radius:5px;display:grid;place-items:center;border:1px solid rgba(var(--ac),.32);background:rgba(var(--ac),.07);color:rgb(var(--ac));transition:box-shadow .3s,background .3s}
|
|
||||||
.cap:hover .cap-ic{background:rgba(var(--ac),.15);box-shadow:0 0 14px rgba(var(--ac),.3)}
|
|
||||||
[data-reveal]{opacity:0;transform:translateY(30px);transition:opacity .9s var(--ez),transform .9s var(--ez)}
|
|
||||||
[data-reveal].in{opacity:1;transform:none}
|
|
||||||
[data-reveal] .cap{opacity:0;transform:translateX(-12px);transition:opacity .7s var(--ez),transform .7s var(--ez),color .3s}
|
|
||||||
[data-reveal].in .cap{opacity:1;transform:none}
|
|
||||||
[data-reveal].in .cap:nth-child(1){transition-delay:.12s}
|
|
||||||
[data-reveal].in .cap:nth-child(2){transition-delay:.2s}
|
|
||||||
[data-reveal].in .cap:nth-child(3){transition-delay:.28s}
|
|
||||||
[data-reveal].in .cap:nth-child(4){transition-delay:.36s}
|
|
||||||
footer{position:relative;z-index:10;border-top:1px solid var(--line);padding:30px var(--pad);display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
|
|
||||||
.ft-logo{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-weight:600;font-size:15px}
|
|
||||||
.ft-logo .mark{width:20px;height:20px}
|
|
||||||
.ft-m{font-family:var(--mono);font-size:9.5px;letter-spacing:.16em;color:rgba(226,234,242,.26);text-transform:uppercase}
|
|
||||||
.ft-status{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10px;letter-spacing:.18em;color:rgba(110,225,175,.7);text-transform:uppercase}
|
|
||||||
@media(max-width:820px){.nav-links,.nav-status{display:none}.hud-bl{display:none}}
|
|
||||||
@media(max-width:560px){.ctas{flex-direction:column;width:100%}.btn{justify-content:center}}
|
|
||||||
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}.msk-in{animation:none!important}[data-reveal]{opacity:1!important;transform:none!important}[data-reveal] .cap{opacity:1!important;transform:none!important}}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<canvas id="sky" aria-hidden="true"></canvas>
|
|
||||||
<div class="grain" aria-hidden="true"></div>
|
|
||||||
<div class="vig" aria-hidden="true"></div>
|
|
||||||
<div class="cur" id="curDot" aria-hidden="true"></div>
|
|
||||||
<div class="cur" id="curRing" aria-hidden="true"></div>
|
|
||||||
|
|
||||||
<nav id="nav">
|
|
||||||
<a class="logo" href="/">
|
|
||||||
<svg class="mark" viewBox="0 0 34 34" aria-hidden="true"><ellipse cx="17" cy="17" rx="14.5" ry="6" fill="none" stroke="rgba(238,243,248,.55)" stroke-width="1" transform="rotate(-24 17 17)"/><circle cx="17" cy="17" r="4.4" fill="#eef3f8"/><circle cx="27.4" cy="12.2" r="1.8" fill="rgb(var(--ac))"/></svg>
|
|
||||||
<span>Cosmos</span>
|
|
||||||
</a>
|
|
||||||
<div class="nav-links">
|
|
||||||
<a href="/git"><i>01</i>Source</a>
|
|
||||||
<a href="/s3"><i>02</i>Storage</a>
|
|
||||||
<a href="/cloud" class="on"><i>03</i>Workspace</a>
|
|
||||||
</div>
|
|
||||||
<div class="nav-right">
|
|
||||||
<span class="nav-status"><i></i>NOMINAL</span>
|
|
||||||
<a class="nav-btn mag" href="/cloud/login">Sign In</a>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<section class="hero">
|
|
||||||
<div class="hero-viz"><canvas id="aur" aria-hidden="true"></canvas></div>
|
|
||||||
<div class="hud hud-bl"><span>ATMOSPHERIC LAYER · KP 6.3</span><span>SYNC ORBIT · 412 KM</span></div>
|
|
||||||
<div class="hud hud-br"><span id="utc">00:00:00 UTC</span><em>·</em><span>ALL SYSTEMS NOMINAL</span></div>
|
|
||||||
<div class="hero-inner">
|
|
||||||
<div class="tag"><span class="dot"></span><span data-scr>MODULE 03 · CLOUD WORKSPACE</span></div>
|
|
||||||
<h1 class="title"><span class="msk"><span class="msk-in">Cloud <em>Workspace.</em></span></span></h1>
|
|
||||||
<p class="sub">Secure document collaboration and zero-latency file synchronization.</p>
|
|
||||||
<div class="ctas">
|
|
||||||
<a class="btn btn-p mag" href="/cloud/login">Sign In</a>
|
|
||||||
<a class="btn btn-g mag" href="/cloud/signup">Create Account</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="scroll-cue"><span>SCROLL</span><span class="track"><i></i></span></div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="ticker" aria-hidden="true">
|
|
||||||
<div class="tk">
|
|
||||||
<div class="tk-half"><span>Real-time sync</span><span class="ts">//</span><span>Private sharing</span><span class="ts">//</span><span>Version history</span><span class="ts">//</span><span>Team spaces</span><span class="ts">//</span><span>Access control</span><span class="ts">//</span><span>Offline-ready</span><span class="ts">//</span><span>Self-hosted core</span><span class="ts">//</span><span>Zero exposure</span><span class="ts">//</span></div>
|
|
||||||
<div class="tk-half"><span>Real-time sync</span><span class="ts">//</span><span>Private sharing</span><span class="ts">//</span><span>Version history</span><span class="ts">//</span><span>Team spaces</span><span class="ts">//</span><span>Access control</span><span class="ts">//</span><span>Offline-ready</span><span class="ts">//</span><span>Self-hosted core</span><span class="ts">//</span><span>Zero exposure</span><span class="ts">//</span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section class="caps-wrap">
|
|
||||||
<div class="caps-inner" data-reveal>
|
|
||||||
<p class="m-index" data-scr>CAPABILITIES</p>
|
|
||||||
<h2 class="caps-title">Everything shared. <em>Nothing exposed.</em></h2>
|
|
||||||
<ul class="caps">
|
|
||||||
<li class="cap"><span class="cap-ic"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>Live document collaboration with presence</li>
|
|
||||||
<li class="cap"><span class="cap-ic"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>Zero-latency file sync across every device</li>
|
|
||||||
<li class="cap"><span class="cap-ic"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>Full version history & one-click restore</li>
|
|
||||||
<li class="cap"><span class="cap-ic"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>Granular permissions & private link sharing</li>
|
|
||||||
</ul>
|
|
||||||
<a class="btn btn-g mag" href="/cloud/signup">Create your account</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<footer data-reveal>
|
|
||||||
<a class="ft-logo" href="/"><svg class="mark" viewBox="0 0 34 34" aria-hidden="true"><ellipse cx="17" cy="17" rx="14.5" ry="6" fill="none" stroke="rgba(238,243,248,.55)" stroke-width="1" transform="rotate(-24 17 17)"/><circle cx="17" cy="17" r="4.4" fill="#eef3f8"/><circle cx="27.4" cy="12.2" r="1.8" fill="rgb(var(--ac))"/></svg>Cosmos</a>
|
|
||||||
<span class="ft-m">51.4778° N · 0.0015° W — SELF-HOSTED & PRIVATE</span>
|
|
||||||
<span class="ft-status"><i></i>All systems nominal</span>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
/* ── shared deterministic noise ── */
|
|
||||||
function h2(x,y,s){var h=Math.imul(x,374761393)^Math.imul(y,668265263)^Math.imul(s,974711);h=Math.imul(h^h>>>13,1274126177);return((h^h>>>16)>>>0)/4294967296}
|
|
||||||
function vn(x,y,s){var ix=Math.floor(x),iy=Math.floor(y),fx=x-ix,fy=y-iy,u=fx*fx*(3-2*fx),v=fy*fy*(3-2*fy),a=h2(ix,iy,s),b=h2(ix+1,iy,s),c=h2(ix,iy+1,s),d=h2(ix+1,iy+1,s);return a+(b-a)*u+(c-a)*v+(a-b-c+d)*u*v}
|
|
||||||
function fbm(x,y,o,s){var a=1,S=0,n=0;for(var i=0;i<o;i++){S+=a*vn(x,y,s+i*131);n+=a;a*=.5;x*=2;y*=2}return S/n}
|
|
||||||
var RMQ=matchMedia('(prefers-reduced-motion: reduce)').matches,DPRQ=Math.min(2,devicePixelRatio||1);
|
|
||||||
|
|
||||||
/* ══ SKY ENGINE ══ */
|
|
||||||
(function(){'use strict';
|
|
||||||
var cv=document.getElementById('sky');if(!cv)return;
|
|
||||||
var cx=cv.getContext('2d'),TAU=Math.PI*2,RM=RMQ,DPR=DPRQ;
|
|
||||||
var CFG={density:520,tint:[.72,1.02,.86],planet:[.84,.14,.062]};
|
|
||||||
var W,H,stars=[],meteors=[],comets=[],neb=null,nextMet=3200,nextCom=9000;
|
|
||||||
var m={x:.5,y:.5,sx:.5,sy:.5};
|
|
||||||
function resize(){W=innerWidth;H=innerHeight;cv.width=W*DPR;cv.height=H*DPR;cv.style.width=W+'px';cv.style.height=H+'px';cx.setTransform(DPR,0,0,DPR,0,0)}
|
|
||||||
function buildStars(){stars=[];var n=Math.round(CFG.density*W*H/(1440*800));for(var i=0;i<n;i++){var r=Math.pow(Math.random(),2.3)*1.9+.28,roll=Math.random();stars.push({x:Math.random(),y:Math.random(),r:r,p:.012+(r/2.2)*.06,a:.2+Math.random()*.7,tw:Math.random()*TAU,ts:.4+Math.random()*1.9,c:roll<.6?[255,255,255]:roll<.78?[201,215,255]:roll<.92?[255,238,220]:[255,208,176]})}}
|
|
||||||
function makeNeb(){var w=460,h=260,c=document.createElement('canvas');c.width=w;c.height=h;var g=c.getContext('2d'),im=g.createImageData(w,h),d=im.data,T=CFG.tint,nx=.749,ny=-.663;
|
|
||||||
for(var y=0;y<h;y++)for(var x=0;x<w;x++){var i=(y*w+x)*4,band=Math.exp(-Math.pow(((x/w-.18)*nx+(y/h-.86)*ny)/.16,2)),n1=fbm(x*.012,y*.012,5,7),mm=fbm(x*.022,y*.022,3,44),cl=(n1-.42)/.36;cl=cl<0?0:cl>1?1:cl;cl=cl*cl*(3-2*cl);var den=Math.min(1,cl*(.3+band*.85)),warm=mm*mm*mm,core=den>.55?(den-.55)/.45:0;
|
|
||||||
d[i]=Math.min(255,(18+warm*46+core*10)*T[0]);d[i+1]=Math.min(255,(30+mm*28+core*40)*T[1]);d[i+2]=Math.min(255,(66+mm*40+core*58)*T[2]);d[i+3]=Math.min(255,den*210)}
|
|
||||||
g.putImageData(im,0,0);return c}
|
|
||||||
function drawNeb(ox,oy,t){cx.globalCompositeOperation='screen';var s0=Math.max(W/neb.width,H/neb.height);
|
|
||||||
cx.globalAlpha=.32;cx.save();cx.translate(W/2-ox*34+Math.sin(t*5e-5)*40,H/2-oy*20+Math.cos(t*4e-5)*24);cx.drawImage(neb,-neb.width*s0*.92,-neb.height*s0*.92,neb.width*s0*1.85,neb.height*s0*1.85);cx.restore();
|
|
||||||
cx.globalAlpha=.22;cx.save();cx.translate(W/2-ox*80+Math.cos(t*4e-5)*34,H/2-oy*46+Math.sin(t*6e-5)*26);cx.rotate(.55);cx.drawImage(neb,-neb.width*s0*1.6,-neb.height*s0*1.6,neb.width*s0*3.2,neb.height*s0*3.2);cx.restore();
|
|
||||||
cx.globalAlpha=1;cx.globalCompositeOperation='source-over'}
|
|
||||||
function drawPlanet(ox,oy){var P=CFG.planet,px=W*P[0]-ox*30,py=H*P[1]-oy*18,r=Math.min(W,H)*P[2];
|
|
||||||
var g=cx.createRadialGradient(px-r*.3,py-r*.35,r*.1,px,py,r);
|
|
||||||
g.addColorStop(0,'rgba(52,70,102,.15)');g.addColorStop(.7,'rgba(22,34,60,.07)');g.addColorStop(1,'rgba(10,16,34,0)');
|
|
||||||
cx.fillStyle=g;cx.beginPath();cx.arc(px,py,r,0,TAU);cx.fill();
|
|
||||||
cx.strokeStyle='rgba(190,212,240,.14)';cx.lineWidth=1;cx.beginPath();cx.arc(px,py,r-.5,Math.PI*1.02,Math.PI*1.48);cx.stroke();
|
|
||||||
cx.save();cx.translate(px,py);cx.rotate(-.44);cx.scale(1,.3);
|
|
||||||
for(var i=0;i<2;i++){cx.beginPath();cx.arc(0,0,r*(1.55+i*.35),0,TAU);cx.strokeStyle='rgba(150,180,225,'+(.07-i*.03)+')';cx.lineWidth=5+i*4;cx.stroke()}cx.restore()}
|
|
||||||
function spawnMeteor(){var ang=.5+Math.random()*.7,dir=Math.random()<.5?1:-1;meteors.push({x:Math.random()*1.1*W-.05*W,y:Math.random()*.45*H-.05*H,dx:Math.cos(ang)*dir,dy:Math.sin(ang),sp:430+Math.random()*390,dur:.8+Math.random()*.55,life:0,len:60+Math.random()*90})}
|
|
||||||
function spawnComet(){var fr=Math.random()<.55;comets.push({x:fr?W+170:-170,y:Math.random()*.55*H+.05*H,vx:(fr?-1:1)*(48+Math.random()*57),vy:-22+Math.random()*56,a:0,ph:0,core:1.5+Math.random()*1.1,tail:[]})}
|
|
||||||
function drawMeteors(dt){cx.globalCompositeOperation='lighter';
|
|
||||||
for(var i=meteors.length-1;i>=0;i--){var m=meteors[i];m.life+=dt;var f=m.life/m.dur;
|
|
||||||
if(f>=1){meteors.splice(i,1);continue}
|
|
||||||
var a=Math.sin(Math.PI*f)*.9,hx=m.x+m.dx*m.sp*m.life,hy=m.y+m.dy*m.sp*m.life,tx=hx-m.dx*m.len,ty=hy-m.dy*m.len;
|
|
||||||
var g=cx.createLinearGradient(tx,ty,hx,hy);g.addColorStop(0,'rgba(180,205,255,0)');g.addColorStop(1,'rgba(220,235,255,'+a+')');
|
|
||||||
cx.strokeStyle=g;cx.lineWidth=1.4;cx.beginPath();cx.moveTo(tx,ty);cx.lineTo(hx,hy);cx.stroke();
|
|
||||||
cx.fillStyle='rgba(255,255,255,'+a+')';cx.beginPath();cx.arc(hx,hy,1.1,0,TAU);cx.fill()}
|
|
||||||
cx.globalCompositeOperation='source-over'}
|
|
||||||
function drawComets(dt){cx.globalCompositeOperation='lighter';
|
|
||||||
for(var i=comets.length-1;i>=0;i--){var c=comets[i];
|
|
||||||
if(c.ph===0){c.a=Math.min(1,c.a+dt*.5);if(c.a>=1)c.ph=1}
|
|
||||||
else if(c.ph===1){if(c.x<-260||c.x>W+260||c.y<-260||c.y>H+260)c.ph=2}
|
|
||||||
else{c.a=Math.max(0,c.a-dt*.35);if(c.a<=0){comets.splice(i,1);continue}}
|
|
||||||
c.x+=c.vx*dt;c.y+=c.vy*dt;c.tail.push({x:c.x,y:c.y});if(c.tail.length>130)c.tail.shift();
|
|
||||||
var n=c.tail.length;
|
|
||||||
for(var j=0;j<n-1;j++){var f=j/n,al=f*f*c.a*.5;
|
|
||||||
cx.strokeStyle='rgba(168,216,255,'+al+')';cx.lineWidth=Math.max(.3,f*c.core*2.6);
|
|
||||||
cx.beginPath();cx.moveTo(c.tail[j].x,c.tail[j].y);cx.lineTo(c.tail[j+1].x,c.tail[j+1].y);cx.stroke();
|
|
||||||
if(f>.6){cx.strokeStyle='rgba(255,255,255,'+((f-.6)/.4*c.a*.32)+')';cx.lineWidth=Math.max(.2,f*c.core*.5);cx.beginPath();cx.moveTo(c.tail[j].x,c.tail[j].y);cx.lineTo(c.tail[j+1].x,c.tail[j+1].y);cx.stroke()}}
|
|
||||||
var g=cx.createRadialGradient(c.x,c.y,0,c.x,c.y,c.core*7);
|
|
||||||
g.addColorStop(0,'rgba(255,255,255,'+c.a+')');g.addColorStop(.3,'rgba(178,226,255,'+c.a*.7+')');g.addColorStop(1,'rgba(0,0,0,0)');
|
|
||||||
cx.fillStyle=g;cx.beginPath();cx.arc(c.x,c.y,c.core*7,0,TAU);cx.fill();
|
|
||||||
cx.fillStyle='rgba(244,251,255,'+c.a+')';cx.beginPath();cx.arc(c.x,c.y,c.core,0,TAU);cx.fill()}
|
|
||||||
cx.globalCompositeOperation='source-over'}
|
|
||||||
function frame(t,dt){cx.clearRect(0,0,W,H);
|
|
||||||
var ox=m.sx-.5,oy=m.sy-.5;
|
|
||||||
drawNeb(ox,oy,t);
|
|
||||||
if(CFG.planet)drawPlanet(ox,oy);
|
|
||||||
var ts=t/1000;
|
|
||||||
for(var i=0;i<stars.length;i++){var s=stars[i];
|
|
||||||
var sx=((s.x*W-ox*s.p*240)%W+W)%W,sy=((s.y*H-oy*s.p*150)%H+H)%H;
|
|
||||||
var a=s.a*(.68+.32*Math.sin(ts*s.ts+s.tw));
|
|
||||||
cx.fillStyle='rgba('+s.c[0]+','+s.c[1]+','+s.c[2]+','+a+')';cx.beginPath();cx.arc(sx,sy,s.r,0,TAU);cx.fill();
|
|
||||||
if(s.r>1.42){cx.strokeStyle='rgba('+s.c[0]+','+s.c[1]+','+s.c[2]+','+(a*.3)+')';cx.lineWidth=.6;var L=s.r*5.2;
|
|
||||||
cx.beginPath();cx.moveTo(sx-L,sy);cx.lineTo(sx+L,sy);cx.moveTo(sx,sy-L);cx.lineTo(sx,sy+L);cx.stroke()}}
|
|
||||||
if(!RM){if(t>nextMet){spawnMeteor();if(Math.random()<.4)spawnMeteor();nextMet=t+3600+Math.random()*5200}
|
|
||||||
if(t>nextCom){spawnComet();nextCom=t+20000+Math.random()*17000}}
|
|
||||||
drawMeteors(dt);drawComets(dt)}
|
|
||||||
addEventListener('mousemove',function(e){m.x=e.clientX/innerWidth;m.y=e.clientY/innerHeight},{passive:true});
|
|
||||||
addEventListener('resize',function(){resize();buildStars()});
|
|
||||||
resize();buildStars();neb=makeNeb();
|
|
||||||
var last=performance.now();
|
|
||||||
(function loop(t){var dt=RM?0:Math.min(.05,(t-last)/1000)||.016;last=t;
|
|
||||||
m.sx+=(m.x-m.sx)*.06;m.sy+=(m.y-m.sy)*.06;frame(RM?2000:t,dt);requestAnimationFrame(loop)})(performance.now());
|
|
||||||
})();
|
|
||||||
|
|
||||||
/* ══ AURORA — shimmering curtains over the sky ══ */
|
|
||||||
(function(){'use strict';
|
|
||||||
var cv=document.getElementById('aur');if(!cv)return;
|
|
||||||
var c=cv.getContext('2d'),box=cv.parentElement,RM=RMQ,DPR=DPRQ,vis=true;
|
|
||||||
var W,H,ow,oh,oc,ocx;
|
|
||||||
var bands=[{b:.30,r:96,g:225,b:170,al:.16,seed:7,sp:.9,dr:.12},{b:.20,r:130,g:200,b:255,al:.09,seed:13,sp:.6,dr:.06}];
|
|
||||||
function resize(){var w=box.clientWidth,h=box.clientHeight;if(!w)return;W=w;H=h;
|
|
||||||
cv.width=w*DPR;cv.height=h*DPR;cv.style.width=w+'px';cv.style.height=h+'px';c.setTransform(DPR,0,0,DPR,0,0);
|
|
||||||
ow=Math.max(120,w/4|0);oh=Math.max(80,h/4|0);
|
|
||||||
oc=document.createElement('canvas');oc.width=ow;oc.height=oh;ocx=oc.getContext('2d')}
|
|
||||||
function ribbons(t){var s=t*.00012;
|
|
||||||
ocx.clearRect(0,0,ow,oh);ocx.globalCompositeOperation='screen';
|
|
||||||
for(var bi=0;bi<bands.length;bi++){var B=bands[bi];
|
|
||||||
for(var x=0;x<ow;x+=2){
|
|
||||||
var n=fbm(x*.02+B.seed+s*B.dr,s*B.sp,3,B.seed*17);
|
|
||||||
var n2=fbm(x*.06-B.seed,s*B.sp*1.6,2,B.seed*31);
|
|
||||||
var yb=oh*B.b+Math.sin(x*.02+s*2.4+B.seed)*oh*.03+n*oh*.07;
|
|
||||||
var len=oh*(.16+fbm(x*.012,s,3,B.seed*7)*.4);
|
|
||||||
var a=B.al*(.35+n2*.75);
|
|
||||||
var g=ocx.createLinearGradient(0,yb-len,0,yb);
|
|
||||||
g.addColorStop(0,'rgba('+B.r+','+B.g+','+B.b+',0)');
|
|
||||||
g.addColorStop(.7,'rgba('+B.r+','+B.g+','+B.b+','+a.toFixed(4)+')');
|
|
||||||
g.addColorStop(1,'rgba('+B.r+','+B.g+','+B.b+','+(a*.35).toFixed(4)+')');
|
|
||||||
ocx.fillStyle=g;ocx.fillRect(x,yb-len,2,len+1)}}
|
|
||||||
c.clearRect(0,0,W,H);c.globalCompositeOperation='screen';
|
|
||||||
c.imageSmoothingEnabled=true;c.imageSmoothingQuality='high';
|
|
||||||
c.drawImage(oc,0,0,W,H);c.globalCompositeOperation='source-over'}
|
|
||||||
new IntersectionObserver(function(e){vis=e[0].isIntersecting},{rootMargin:'80px'}).observe(box);
|
|
||||||
if(window.ResizeObserver)new ResizeObserver(resize).observe(box);else addEventListener('resize',resize);
|
|
||||||
resize();
|
|
||||||
(function loop(t){if(vis)ribbons(RM?20000:t);requestAnimationFrame(loop)})(performance.now());
|
|
||||||
})();
|
|
||||||
|
|
||||||
/* ══ UI ══ */
|
|
||||||
(function(){'use strict';
|
|
||||||
var F=matchMedia('(pointer:fine)').matches,d=document.getElementById('curDot'),r=document.getElementById('curRing');
|
|
||||||
if(F&&!RMQ&&d){document.body.classList.add('has-cur');
|
|
||||||
var x=innerWidth/2,y=innerHeight/2,rx=x,ry=y,seen=false;
|
|
||||||
addEventListener('mousemove',function(e){x=e.clientX;y=e.clientY;
|
|
||||||
if(!seen){seen=true;rx=x;ry=y;document.body.classList.add('cur-vis')}
|
|
||||||
var el=e.target instanceof Element?e.target:null;
|
|
||||||
r.classList.toggle('act',!!(el&&el.closest('a,button')))},{passive:true});
|
|
||||||
document.addEventListener('mouseleave',function(){document.body.classList.remove('cur-vis');seen=false});
|
|
||||||
(function loop(){d.style.transform='translate('+x+'px,'+y+'px)';
|
|
||||||
rx+=(x-rx)*.18;ry+=(y-ry)*.18;r.style.transform='translate('+rx+'px,'+ry+'px)';requestAnimationFrame(loop)})()}
|
|
||||||
function scramble(el){var tgt=el.dataset.txt;if(RMQ){el.textContent=tgt;return}
|
|
||||||
var f=0,total=Math.max(16,tgt.length*1.15),CH='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<>/[]·';
|
|
||||||
var iv=setInterval(function(){f++;var done=Math.floor(tgt.length*f/total),s='';
|
|
||||||
for(var i=0;i<tgt.length;i++){var ch=tgt[i];s+=i<done?ch:(ch===' '?' ':CH[Math.random()*CH.length|0])}
|
|
||||||
el.textContent=s;if(f>=total){el.textContent=tgt;clearInterval(iv)}},26)}
|
|
||||||
document.querySelectorAll('[data-scr]').forEach(function(el){el.dataset.txt=el.textContent});
|
|
||||||
setTimeout(function(){var t=document.querySelector('.tag [data-scr]');if(t)scramble(t)},350);
|
|
||||||
var io=new IntersectionObserver(function(es){es.forEach(function(en){if(!en.isIntersecting)return;
|
|
||||||
en.target.classList.add('in');en.target.querySelectorAll('[data-scr]').forEach(scramble);io.unobserve(en.target)})},{threshold:.15,rootMargin:'0px 0px -7% 0px'});
|
|
||||||
document.querySelectorAll('[data-reveal]').forEach(function(el){io.observe(el)});
|
|
||||||
var nav=document.getElementById('nav');
|
|
||||||
addEventListener('scroll',function(){nav.classList.toggle('scrolled',scrollY>40)},{passive:true});
|
|
||||||
var utc=document.getElementById('utc');
|
|
||||||
function tick(){var d=new Date(),p=function(n){return String(n).padStart(2,'0')};
|
|
||||||
utc.textContent=p(d.getUTCHours())+':'+p(d.getUTCMinutes())+':'+p(d.getUTCSeconds())+' UTC'}
|
|
||||||
tick();setInterval(tick,1000);
|
|
||||||
if(F&&!RMQ)document.querySelectorAll('.mag').forEach(function(b){
|
|
||||||
b.addEventListener('pointermove',function(e){var r2=b.getBoundingClientRect();
|
|
||||||
b.style.transform='translate('+((e.clientX-r2.left-r2.width/2)*.16)+'px,'+((e.clientY-r2.top-r2.height/2)*.22)+'px)'});
|
|
||||||
b.addEventListener('pointerleave',function(){b.style.transform=''})});
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -443,11 +443,11 @@ footer{position:relative;z-index:10;border-top:1px solid var(--line);
|
|||||||
<div class="m-text" data-reveal>
|
<div class="m-text" data-reveal>
|
||||||
<p class="m-index" data-scr>MODULE 02 · OBJECT STORAGE</p>
|
<p class="m-index" data-scr>MODULE 02 · OBJECT STORAGE</p>
|
||||||
<h2 class="m-name"><span class="msk"><span class="msk-in">Oort</span></span></h2>
|
<h2 class="m-name"><span class="msk"><span class="msk-in">Oort</span></span></h2>
|
||||||
<p class="m-desc">S3-compatible object storage at warp speed. Buckets, versioning, real-time analytics, custom CDN domains — all under your sky.</p>
|
<p class="m-desc">S3-compatible object storage at warp speed. Buckets, versioning, real-time analytics, custom domains — all under your sky.</p>
|
||||||
<ul class="caps">
|
<ul class="caps">
|
||||||
<li class="cap"><span class="tick"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>S3-compatible API — AWS SDK drop-in</li>
|
<li class="cap"><span class="tick"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>S3-compatible API — AWS SDK drop-in</li>
|
||||||
<li class="cap"><span class="tick"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>Bucket versioning & object lifecycle</li>
|
<li class="cap"><span class="tick"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>Bucket versioning & object lifecycle</li>
|
||||||
<li class="cap"><span class="tick"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>32,000+ req/s RAM cache layer</li>
|
<li class="cap"><span class="tick"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>High-throughput MinIO S3 storage engine</li>
|
||||||
<li class="cap"><span class="tick"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>Custom domains with real-time analytics</li>
|
<li class="cap"><span class="tick"><svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/></svg></span>Custom domains with real-time analytics</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="/oort" class="m-cta mag">
|
<a href="/oort" class="m-cta mag">
|
||||||
|
|||||||
+3
-3
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Oort — Object Storage · Cosmos</title>
|
<title>Oort — Object Storage · Cosmos</title>
|
||||||
<meta name="description" content="S3-compatible object storage engineered for infinite scale. Buckets, versioning, real-time CDN, custom domains.">
|
<meta name="description" content="S3-compatible object storage engineered for infinite scale. Buckets, versioning, real-time analytics, custom domains.">
|
||||||
<link rel="icon" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="6" fill="%23eef3f8"/><ellipse cx="16" cy="16" rx="14" ry="5.5" fill="none" stroke="%238fd9ff" stroke-width="1.5" transform="rotate(-24 16 16)"/></svg>'>
|
<link rel="icon" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="6" fill="%23eef3f8"/><ellipse cx="16" cy="16" rx="14" ry="5.5" fill="none" stroke="%238fd9ff" stroke-width="1.5" transform="rotate(-24 16 16)"/></svg>'>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
@@ -120,7 +120,7 @@ body:not(.has-cur).grabbing #rings{cursor:grabbing}
|
|||||||
<div class="hero-inner">
|
<div class="hero-inner">
|
||||||
<div class="tag"><span class="dot"></span><span data-scr>OBJECT STORAGE · S3 COMPATIBLE</span></div>
|
<div class="tag"><span class="dot"></span><span data-scr>OBJECT STORAGE · S3 COMPATIBLE</span></div>
|
||||||
<h1 class="title"><span class="msk"><span class="msk-in">OORT</span></span></h1>
|
<h1 class="title"><span class="msk"><span class="msk-in">OORT</span></span></h1>
|
||||||
<p class="sub">S3-compatible object storage engineered for infinite scale. Buckets, versioning, real-time CDN, custom domains — all yours, all private.</p>
|
<p class="sub">S3-compatible object storage engineered for infinite scale. Buckets, versioning, real-time analytics, custom domains — all yours, all private.</p>
|
||||||
<div class="ctas">
|
<div class="ctas">
|
||||||
<a class="btn btn-p mag" href="/oort/login">Sign In to Oort</a>
|
<a class="btn btn-p mag" href="/oort/login">Sign In to Oort</a>
|
||||||
<a class="btn btn-g mag" href="/oort/signup">Create Account
|
<a class="btn btn-g mag" href="/oort/signup">Create Account
|
||||||
@@ -130,7 +130,7 @@ body:not(.has-cur).grabbing #rings{cursor:grabbing}
|
|||||||
<div class="stats-row">
|
<div class="stats-row">
|
||||||
<div class="stat"><div class="sv"><span class="num" data-count="32000">0</span><em>+</em><span class="u">RPS</span></div><div class="sl">Throughput</div></div>
|
<div class="stat"><div class="sv"><span class="num" data-count="32000">0</span><em>+</em><span class="u">RPS</span></div><div class="sl">Throughput</div></div>
|
||||||
<div class="stat"><div class="sv"><span class="num" data-count="625">0</span><span class="u">MB/s</span></div><div class="sl">Bandwidth</div></div>
|
<div class="stat"><div class="sv"><span class="num" data-count="625">0</span><span class="u">MB/s</span></div><div class="sl">Bandwidth</div></div>
|
||||||
<div class="stat"><div class="sv"><span class="num" data-count="3.7" data-dec="1">0</span><span class="u">ms</span></div><div class="sl">Cache Latency</div></div>
|
<div class="stat"><div class="sv"><span class="num" data-count="3.7" data-dec="1">0</span><span class="u">ms</span></div><div class="sl">Read Latency</div></div>
|
||||||
<div class="stat"><div class="sv">∞</div><div class="sl">Storage</div></div>
|
<div class="stat"><div class="sv">∞</div><div class="sl">Storage</div></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -937,7 +937,7 @@ input:checked + .slider:before { transform: translateX(16px); }
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- KPI Row -->
|
<!-- KPI Row -->
|
||||||
<div class="stats-grid" id="analytics-kpi" style="padding: 0 16px 24px;" style="grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));">
|
<div class="stats-grid" id="analytics-kpi" style="padding: 0 16px 24px; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));">
|
||||||
<div class="stat-card">
|
<div class="stat-card">
|
||||||
<div class="stat-card-header">
|
<div class="stat-card-header">
|
||||||
<div class="stat-card-label">Total Requests</div>
|
<div class="stat-card-label">Total Requests</div>
|
||||||
@@ -948,16 +948,6 @@ input:checked + .slider:before { transform: translateX(16px); }
|
|||||||
<div class="stat-card-value" id="an-total-req">—</div>
|
<div class="stat-card-value" id="an-total-req">—</div>
|
||||||
<div class="stat-card-meta">All time</div>
|
<div class="stat-card-meta">All time</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-card">
|
|
||||||
<div class="stat-card-header">
|
|
||||||
<div class="stat-card-label">Cache Hit Rate</div>
|
|
||||||
<div class="stat-card-icon" style="background:rgba(16,185,129,.12)">
|
|
||||||
<svg fill="none" stroke="#10b981" stroke-width="2" viewBox="0 0 24 24" width="18" height="18"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="stat-card-value" id="an-cache-rate">—</div>
|
|
||||||
<div class="stat-card-meta">Served from edge</div>
|
|
||||||
</div>
|
|
||||||
<div class="stat-card">
|
<div class="stat-card">
|
||||||
<div class="stat-card-header">
|
<div class="stat-card-header">
|
||||||
<div class="stat-card-label">Bandwidth</div>
|
<div class="stat-card-label">Bandwidth</div>
|
||||||
@@ -978,16 +968,6 @@ input:checked + .slider:before { transform: translateX(16px); }
|
|||||||
<div class="stat-card-value" id="an-success-rate">—</div>
|
<div class="stat-card-value" id="an-success-rate">—</div>
|
||||||
<div class="stat-card-meta">2xx responses</div>
|
<div class="stat-card-meta">2xx responses</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-card">
|
|
||||||
<div class="stat-card-header">
|
|
||||||
<div class="stat-card-label">Origin Requests</div>
|
|
||||||
<div class="stat-card-icon" style="background:rgba(245,158,11,.12)">
|
|
||||||
<svg fill="none" stroke="#f59e0b" stroke-width="2" viewBox="0 0 24 24" width="18" height="18"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"/></svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="stat-card-value" id="an-origin">—</div>
|
|
||||||
<div class="stat-card-meta">Cache misses</div>
|
|
||||||
</div>
|
|
||||||
<div class="stat-card">
|
<div class="stat-card">
|
||||||
<div class="stat-card-header">
|
<div class="stat-card-header">
|
||||||
<div class="stat-card-label">Errors</div>
|
<div class="stat-card-label">Errors</div>
|
||||||
@@ -1048,7 +1028,7 @@ input:checked + .slider:before { transform: translateX(16px); }
|
|||||||
<tr style="border-bottom:1px solid var(--border);">
|
<tr style="border-bottom:1px solid var(--border);">
|
||||||
<th style="text-align:left;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Bucket</th>
|
<th style="text-align:left;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Bucket</th>
|
||||||
<th style="text-align:right;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Requests</th>
|
<th style="text-align:right;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Requests</th>
|
||||||
<th style="text-align:right;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Cache Hit</th>
|
<th style="text-align:right;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Status</th>
|
||||||
<th style="text-align:right;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Errors</th>
|
<th style="text-align:right;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Errors</th>
|
||||||
<th style="text-align:right;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Bandwidth</th>
|
<th style="text-align:right;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Bandwidth</th>
|
||||||
<th style="text-align:left;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Last Hit</th>
|
<th style="text-align:left;padding:12px 16px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.1em;color:var(--text3);">Last Hit</th>
|
||||||
@@ -1559,7 +1539,7 @@ async function addBucketDomain() {
|
|||||||
const d = inp.value.trim();
|
const d = inp.value.trim();
|
||||||
if(!d) { toast('Enter a domain name', 'error'); return; }
|
if(!d) { toast('Enter a domain name', 'error'); return; }
|
||||||
// basic validation
|
// basic validation
|
||||||
if(!d.includes('.')) { toast('Please enter a valid domain like cdn.example.com', 'error'); return; }
|
if(!d.includes('.')) { toast('Please enter a valid domain like static.example.com', 'error'); return; }
|
||||||
try {
|
try {
|
||||||
const res = await api('/oort/api/bucket/domain/add', {
|
const res = await api('/oort/api/bucket/domain/add', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -2044,8 +2024,6 @@ async function loadAnalytics() {
|
|||||||
const r = await api(`/oort/api/analytics?bucket=${b}&start=${dStart}&end=${dEnd}®ion=${r_reg}&op=${op}`);
|
const r = await api(`/oort/api/analytics?bucket=${b}&start=${dStart}&end=${dEnd}®ion=${r_reg}&op=${op}`);
|
||||||
|
|
||||||
const totalReq = r ? r.total_requests || 0 : 0;
|
const totalReq = r ? r.total_requests || 0 : 0;
|
||||||
const cacheHits = r ? r.total_cache_hits || 0 : 0;
|
|
||||||
const originHits = r ? r.total_origin_hits || 0 : 0;
|
|
||||||
const totalSucc = r ? r.total_success || 0 : 0;
|
const totalSucc = r ? r.total_success || 0 : 0;
|
||||||
const total4xx = r ? r.total_4xx || 0 : 0;
|
const total4xx = r ? r.total_4xx || 0 : 0;
|
||||||
const total5xx = r ? r.total_5xx || 0 : 0;
|
const total5xx = r ? r.total_5xx || 0 : 0;
|
||||||
@@ -2054,19 +2032,15 @@ async function loadAnalytics() {
|
|||||||
|
|
||||||
const totalReqEl = document.getElementById('an-total-req');
|
const totalReqEl = document.getElementById('an-total-req');
|
||||||
if(totalReqEl) totalReqEl.textContent = totalReq.toLocaleString();
|
if(totalReqEl) totalReqEl.textContent = totalReq.toLocaleString();
|
||||||
const cacheEl = document.getElementById('an-cache-rate');
|
|
||||||
if(cacheEl) cacheEl.textContent = totalReq > 0 ? ((cacheHits / totalReq) * 100).toFixed(1) + '%' : '0%';
|
|
||||||
const bwEl = document.getElementById('an-bandwidth');
|
const bwEl = document.getElementById('an-bandwidth');
|
||||||
if(bwEl) bwEl.textContent = fmtBytes(totalBytes);
|
if(bwEl) bwEl.textContent = fmtBytes(totalBytes);
|
||||||
const succEl = document.getElementById('an-success-rate');
|
const succEl = document.getElementById('an-success-rate');
|
||||||
if(succEl) succEl.textContent = totalReq > 0 ? ((totalSucc / totalReq) * 100).toFixed(1) + '%' : '0%';
|
if(succEl) succEl.textContent = totalReq > 0 ? ((totalSucc / totalReq) * 100).toFixed(1) + '%' : '100%';
|
||||||
const origEl = document.getElementById('an-origin');
|
|
||||||
if(origEl) origEl.textContent = originHits.toLocaleString();
|
|
||||||
const errEl = document.getElementById('an-errors');
|
const errEl = document.getElementById('an-errors');
|
||||||
if(errEl) errEl.textContent = totalErrors.toLocaleString();
|
if(errEl) errEl.textContent = totalErrors.toLocaleString();
|
||||||
if(subtitle) subtitle.textContent = 'Real-time storage performance metrics';
|
if(subtitle) subtitle.textContent = 'Real-time storage performance metrics';
|
||||||
|
|
||||||
const ts = r && r.timeseries ? r.timeseries : {labels:[], reqs:[], cache:[], origin:[]};
|
const ts = r && r.timeseries ? r.timeseries : {labels:[], reqs:[]};
|
||||||
const canv = document.getElementById('analyticsChart');
|
const canv = document.getElementById('analyticsChart');
|
||||||
if(canv) {
|
if(canv) {
|
||||||
if (analyticsChart) { analyticsChart.destroy(); }
|
if (analyticsChart) { analyticsChart.destroy(); }
|
||||||
@@ -2075,9 +2049,7 @@ async function loadAnalytics() {
|
|||||||
data: {
|
data: {
|
||||||
labels: ts.labels,
|
labels: ts.labels,
|
||||||
datasets: [
|
datasets: [
|
||||||
{ label: 'Total', data: ts.reqs, borderColor: '#8b5cf6', backgroundColor: 'rgba(139,92,246,0.08)', borderWidth: 2, fill: true, tension: 0.4, pointRadius: 2 },
|
{ label: 'S3 Requests', data: ts.reqs, borderColor: '#8b5cf6', backgroundColor: 'rgba(139,92,246,0.08)', borderWidth: 2, fill: true, tension: 0.4, pointRadius: 2 }
|
||||||
{ label: 'Cache', data: ts.cache, borderColor: '#10b981', backgroundColor: 'rgba(16,185,129,0.05)', borderWidth: 1.5, fill: false, tension: 0.4, pointRadius: 0 },
|
|
||||||
{ label: 'Origin', data: ts.origin, borderColor: '#f59e0b', backgroundColor: 'rgba(245,158,11,0.05)', borderWidth: 1.5, fill: false, tension: 0.4, pointRadius: 0 },
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
@@ -2104,12 +2076,11 @@ async function loadAnalytics() {
|
|||||||
tbody.innerHTML = '<tr><td colspan="6" style="text-align:center;padding:40px;color:var(--text3);">No data found.</td></tr>';
|
tbody.innerHTML = '<tr><td colspan="6" style="text-align:center;padding:40px;color:var(--text3);">No data found.</td></tr>';
|
||||||
} else {
|
} else {
|
||||||
tbody.innerHTML = buckets.map(bk => {
|
tbody.innerHTML = buckets.map(bk => {
|
||||||
const bCache = bk.requests > 0 ? ((bk.cache_hits / bk.requests) * 100).toFixed(1) : '0';
|
|
||||||
const lastHit = bk.last_hit ? new Date(bk.last_hit * 1000).toLocaleString() : 'Never';
|
const lastHit = bk.last_hit ? new Date(bk.last_hit * 1000).toLocaleString() : 'Never';
|
||||||
return `<tr style="border-bottom:1px solid rgba(255,255,255,0.04);">
|
return `<tr style="border-bottom:1px solid rgba(255,255,255,0.04);">
|
||||||
<td style="padding:14px 16px;font-weight:600;">${bk.display || bk.name}</td>
|
<td style="padding:14px 16px;font-weight:600;">${bk.display || bk.name}</td>
|
||||||
<td style="padding:14px 16px;text-align:right;">${(bk.requests||0).toLocaleString()}</td>
|
<td style="padding:14px 16px;text-align:right;">${(bk.requests||0).toLocaleString()}</td>
|
||||||
<td style="padding:14px 16px;text-align:right;"><span style="color:#34d399;">${bCache}%</span></td>
|
<td style="padding:14px 16px;text-align:right;"><span style="color:#34d399;">Active</span></td>
|
||||||
<td style="padding:14px 16px;text-align:right;color:${(bk.errors||0) > 0 ? '#f87171' : 'var(--text3)'}">${(bk.errors||0).toLocaleString()}</td>
|
<td style="padding:14px 16px;text-align:right;color:${(bk.errors||0) > 0 ? '#f87171' : 'var(--text3)'}">${(bk.errors||0).toLocaleString()}</td>
|
||||||
<td style="padding:14px 16px;text-align:right;">${fmtBytes(bk.bytes||0)}</td>
|
<td style="padding:14px 16px;text-align:right;">${fmtBytes(bk.bytes||0)}</td>
|
||||||
<td style="padding:14px 16px;font-size:12px;color:var(--text3);">${lastHit}</td>
|
<td style="padding:14px 16px;font-size:12px;color:var(--text3);">${lastHit}</td>
|
||||||
@@ -3650,7 +3621,7 @@ async function restoreVersion(key, versionId) {
|
|||||||
<div>
|
<div>
|
||||||
<label style="display:block; font-size:12px; font-weight:600; color:var(--text2); margin-bottom:8px;">Custom Domains</label>
|
<label style="display:block; font-size:12px; font-weight:600; color:var(--text2); margin-bottom:8px;">Custom Domains</label>
|
||||||
<div style="display:flex; gap:8px; margin-bottom:12px;">
|
<div style="display:flex; gap:8px; margin-bottom:12px;">
|
||||||
<input type="text" id="bucket-new-domain" class="form-control" placeholder="cdn.example.com">
|
<input type="text" id="bucket-new-domain" class="form-control" placeholder="static.example.com">
|
||||||
<button class="btn btn-primary" onclick="addBucketDomain()">Add Domain</button>
|
<button class="btn btn-primary" onclick="addBucketDomain()">Add Domain</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="bucket-domains-list" style="font-size:13px; color:var(--text3); padding:12px; background:rgba(0,0,0,0.2); border-radius:8px;">Loading domains...</div>
|
<div id="bucket-domains-list" style="font-size:13px; color:var(--text3); padding:12px; background:rgba(0,0,0,0.2); border-radius:8px;">Loading domains...</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user