Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rust/agama-server/src/manager/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ use axum::{
};
use rand::distributions::{Alphanumeric, DistString};
use serde::Serialize;
use std::{pin::Pin, process::Command};
use std::pin::Pin;
use tokio::process::Command;
use tokio_stream::{Stream, StreamExt};
use tower_http::services::ServeFile;

Expand Down Expand Up @@ -115,7 +116,7 @@ pub async fn manager_service(dbus: zbus::Connection) -> Result<Router, ServiceEr
.route("/install", post(install_action))
.route("/finish", post(finish_action))
.route("/installer", get(installer_status))
.route("/logs", get(download_logs))
.route("/logs.tar.gz", get(download_logs))
.merge(status_router)
.merge(progress_router)
.with_state(state))
Expand Down Expand Up @@ -252,6 +253,7 @@ async fn generate_logs() -> Result<String, Error> {
Command::new("agama")
.args(["logs", "store", "-d", path.as_str()])
.status()
.await
.map_err(|e| ServiceError::CannotGenerateLogs(e.to_string()))?;

let full_path = format!("{path}.tar.gz");
Expand Down
5 changes: 5 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Oct 23 15:25:36 UTC 2024 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Fix the action to download the logs (gh#agama-project/agama#1693).

-------------------------------------------------------------------
Tue Oct 22 09:46:41 UTC 2024 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
5 changes: 5 additions & 0 deletions web/package/agama-web-ui.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Oct 23 15:26:29 UTC 2024 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Adapt the URL to fetch the logs (gh#agama-project/agama#1693).

-------------------------------------------------------------------
Fri Oct 11 09:46:02 UTC 2024 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion web/src/api/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ const finishInstallation = () => post("/api/manager/finish");
/**
* Returns the binary content of the YaST logs file.
*/
const fetchLogs = () => get("/api/manager/logs");
const fetchLogs = () => get("/api/manager/logs.tar.gz");

export { startProbing, startInstallation, finishInstallation, fetchLogs };