1 Commits

Author SHA1 Message Date
a3f83ea37d Update Rust crate anyhow to 1.0.97
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-03-29 18:17:28 +00:00
9 changed files with 1563 additions and 2780 deletions

View File

@@ -5,7 +5,7 @@ name: default
steps:
- name: frontend_build
image: node:24
image: node:23
volumes:
- name: frontend_app
path: /tmp/frontend_build

File diff suppressed because it is too large Load Diff

View File

@@ -6,23 +6,23 @@ edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
log = "0.4.28"
env_logger = "0.11.8"
clap = { version = "4.5.51", features = ["derive", "env"] }
serde = { version = "1.0.228", features = ["derive"] }
log = "0.4.27"
env_logger = "0.11.7"
clap = { version = "4.5.34", features = ["derive", "env"] }
serde = { version = "1.0.215", features = ["derive"] }
light-openid = { version = "1.0.4", features = ["crypto-wrapper"] }
basic-jwt = "0.4.0"
actix-web = "4.12.0"
basic-jwt = "0.3.0"
actix-web = "4.10.2"
actix-remote-ip = "0.1.0"
actix-session = { version = "0.11.0", features = ["cookie-session"] }
actix-identity = "0.9.0"
actix-cors = "0.7.1"
lazy_static = "1.5.0"
anyhow = "1.0.100"
reqwest = { version = "0.12.24", features = ["json"] }
thiserror = "2.0.17"
uuid = { version = "1.18.1", features = ["v4", "serde"] }
futures-util = "0.3.31"
lazy-regex = "3.4.2"
mime_guess = "2.0.5"
rust-embed = { version = "8.7.2" }
actix-session = { version = "0.10.1", features = ["cookie-session"] }
actix-identity = "0.8.0"
actix-cors = "0.7.0"
lazy_static = "1.4.0"
anyhow = "1.0.97"
reqwest = { version = "0.12.15", features = ["json"] }
thiserror = "2.0.3"
uuid = { version = "1.16.0", features = ["v4", "serde"] }
futures-util = "0.3.30"
lazy-regex = "3.1.0"
mime_guess = "2.0.4"
rust-embed = { version = "8.3.0" }

View File

@@ -3,6 +3,7 @@ use actix_web::body::BoxBody;
use actix_web::http::StatusCode;
use std::error::Error;
use std::fmt::{Display, Formatter};
use std::io::ErrorKind;
pub mod auth_controller;
pub mod group_controller;
@@ -37,7 +38,7 @@ impl actix_web::error::ResponseError for HttpErr {
}
}
fn error_response(&self) -> HttpResponse<BoxBody> {
log::error!("Error while processing request! {self}");
log::error!("Error while processing request! {}", self);
HttpResponse::InternalServerError().body("Failed to execute request!")
}
@@ -51,7 +52,7 @@ impl From<anyhow::Error> for HttpErr {
impl From<Box<dyn Error>> for HttpErr {
fn from(value: Box<dyn Error>) -> Self {
HttpErr::Err(std::io::Error::other(value.to_string()).into())
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
}
}
@@ -81,7 +82,7 @@ impl From<reqwest::header::ToStrError> for HttpErr {
impl From<actix_web::Error> for HttpErr {
fn from(value: actix_web::Error) -> Self {
HttpErr::Err(std::io::Error::other(value.to_string()).into())
HttpErr::Err(std::io::Error::new(ErrorKind::Other, value.to_string()).into())
}
}

View File

@@ -1,6 +1,6 @@
use actix_cors::Cors;
use actix_identity::IdentityMiddleware;
use actix_identity::config::LogoutBehavior;
use actix_identity::config::LogoutBehaviour;
use actix_remote_ip::RemoteIPConfig;
use actix_session::SessionMiddleware;
use actix_session::storage::CookieSessionStore;
@@ -37,7 +37,7 @@ async fn main() -> std::io::Result<()> {
.build();
let identity_middleware = IdentityMiddleware::builder()
.logout_behavior(LogoutBehavior::PurgeSession)
.logout_behaviour(LogoutBehaviour::PurgeSession)
.visit_deadline(Some(Duration::from_secs(
constants::MAX_INACTIVITY_DURATION,
)))

File diff suppressed because it is too large Load Diff

View File

@@ -10,25 +10,25 @@
"preview": "vite preview"
},
"dependencies": {
"@fluentui/react-components": "^9.72.7",
"@fluentui/react-icons": "^2.0.314",
"filesize": "^11.0.13",
"react": "^19.2.0",
"react-dom": "^19.2.0"
"@fluentui/react-components": "^9.61.5",
"@fluentui/react-icons": "^2.0.292",
"filesize": "^10.1.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@eslint/js": "^9.39.1",
"@types/react": "^19.2.5",
"@types/react-dom": "^19.2.3",
"@typescript-eslint/eslint-plugin": "^8.46.4",
"@typescript-eslint/parser": "^8.46.4",
"@vitejs/plugin-react": "^5.1.1",
"eslint": "^9.39.1",
"@eslint/js": "^9.21.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.23.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.24",
"globals": "^16.5.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.43.0",
"vite": "^7.2.2"
"eslint-plugin-react-refresh": "^0.4.14",
"globals": "^16.0.0",
"typescript": "^5.8.2",
"typescript-eslint": "^8.24.1",
"vite": "^6.2.3"
}
}

View File

@@ -123,7 +123,7 @@ function GroupInfo(p: { group: VMGroup }): React.ReactElement {
</TableCell>
<TableCell>
{item.architecture} &bull; RAM :{" "}
{filesize(item.memory)} &bull;{" "}
{filesize(item.memory * 1000 * 1000)} &bull;{" "}
{item.number_vcpu} vCPU
</TableCell>
<TableCell>{state?.[item.uuid] ?? ""}</TableCell>

View File

@@ -107,7 +107,7 @@ function VMWidget(p: { vm: VMInfoAndCaps }): React.ReactElement {
}
/>
<p className={styles.caption1} style={{ margin: "0px auto" }}>
{p.vm.architecture} &bull; RAM : {filesize(p.vm.memory)}{" "}
{p.vm.architecture} &bull; RAM : {filesize(p.vm.memory * 1000 * 1000)}{" "}
&bull; {p.vm.number_vcpu} vCPU
</p>