From 4cd12d717c27ccaf784485f189f28e1f2b84621a Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 31 Dec 2025 15:06:35 -0800 Subject: [PATCH] Remove separate live logs section, update logs in deployment card --- static/js/app.js | 33 +++------------------------------ templates/deployments.html | 11 ----------- 2 files changed, 3 insertions(+), 41 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index ac672cc..a4d339e 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -312,9 +312,6 @@ document.addEventListener("alpine:init", () => { appId: config.appId, currentDeploymentId: null, isDeploying: false, - liveLogs: "Waiting for logs...", - liveStatus: "building", - showLiveLogs: false, init() { // Check for in-progress deployments on page load @@ -327,13 +324,12 @@ document.addEventListener("alpine:init", () => { 10, ); this.isDeploying = true; - this.showLiveLogs = true; } this.fetchAppStatus(); setInterval(() => { this.fetchAppStatus(); - this.fetchLiveLogs(); + this.fetchDeploymentLogs(); }, 1000); }, @@ -351,7 +347,6 @@ document.addEventListener("alpine:init", () => { ) { this.currentDeploymentId = data.latestDeploymentID; if (deploying) { - this.showLiveLogs = true; this.isDeploying = true; } } @@ -366,23 +361,15 @@ document.addEventListener("alpine:init", () => { } }, - async fetchLiveLogs() { + async fetchDeploymentLogs() { if (!this.currentDeploymentId || !this.isDeploying) return; try { const res = await fetch( `/apps/${this.appId}/deployments/${this.currentDeploymentId}/logs`, ); const data = await res.json(); - this.liveLogs = data.logs || "Waiting for logs..."; - this.liveStatus = data.status; - this.$nextTick(() => { - Alpine.store("utils").scrollToBottom( - this.$refs.liveLogsWrapper, - ); - }); - - // Update matching deployment card if present + // Update the deployment card const card = document.querySelector( `[data-deployment-id="${this.currentDeploymentId}"]`, ); @@ -411,20 +398,6 @@ document.addEventListener("alpine:init", () => { submitDeploy() { this.isDeploying = true; - this.showLiveLogs = true; - this.liveLogs = "Starting deployment..."; - this.liveStatus = "building"; - }, - - get liveStatusBadgeClass() { - return ( - Alpine.store("utils").statusBadgeClass(this.liveStatus) + - " text-xs" - ); - }, - - get liveStatusLabel() { - return Alpine.store("utils").statusLabel(this.liveStatus); }, formatTime(isoTime) { diff --git a/templates/deployments.html b/templates/deployments.html index 2cb3c2d..f21b112 100644 --- a/templates/deployments.html +++ b/templates/deployments.html @@ -24,17 +24,6 @@ - -
-
-

Live Build Logs

- -
-
-

-        
-
-
{{if .Deployments}} {{range .Deployments}}