1 Commits

Author SHA1 Message Date
92e9506f47 Update Rust crate lazy_static to 1.5.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-03-29 23:01:42 +00:00
9 changed files with 1561 additions and 2778 deletions

View File

@@ -5,7 +5,7 @@ name: default
steps: steps:
- name: frontend_build - name: frontend_build
image: node:24 image: node:23
volumes: volumes:
- name: frontend_app - name: frontend_app
path: /tmp/frontend_build 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 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
log = "0.4.28" log = "0.4.27"
env_logger = "0.11.8" env_logger = "0.11.7"
clap = { version = "4.5.51", features = ["derive", "env"] } clap = { version = "4.5.34", features = ["derive", "env"] }
serde = { version = "1.0.228", features = ["derive"] } serde = { version = "1.0.215", features = ["derive"] }
light-openid = { version = "1.0.4", features = ["crypto-wrapper"] } light-openid = { version = "1.0.4", features = ["crypto-wrapper"] }
basic-jwt = "0.4.0" basic-jwt = "0.3.0"
actix-web = "4.12.0" actix-web = "4.10.2"
actix-remote-ip = "0.1.0" actix-remote-ip = "0.1.0"
actix-session = { version = "0.11.0", features = ["cookie-session"] } actix-session = { version = "0.10.1", features = ["cookie-session"] }
actix-identity = "0.9.0" actix-identity = "0.8.0"
actix-cors = "0.7.1" actix-cors = "0.7.1"
lazy_static = "1.5.0" lazy_static = "1.5.0"
anyhow = "1.0.100" anyhow = "1.0.93"
reqwest = { version = "0.12.24", features = ["json"] } reqwest = { version = "0.12.15", features = ["json"] }
thiserror = "2.0.17" thiserror = "2.0.3"
uuid = { version = "1.18.1", features = ["v4", "serde"] } uuid = { version = "1.16.0", features = ["v4", "serde"] }
futures-util = "0.3.31" futures-util = "0.3.30"
lazy-regex = "3.4.2" lazy-regex = "3.1.0"
mime_guess = "2.0.5" mime_guess = "2.0.4"
rust-embed = { version = "8.7.2" } rust-embed = { version = "8.3.0" }

View File

@@ -3,6 +3,7 @@ use actix_web::body::BoxBody;
use actix_web::http::StatusCode; use actix_web::http::StatusCode;
use std::error::Error; use std::error::Error;
use std::fmt::{Display, Formatter}; use std::fmt::{Display, Formatter};
use std::io::ErrorKind;
pub mod auth_controller; pub mod auth_controller;
pub mod group_controller; pub mod group_controller;
@@ -37,7 +38,7 @@ impl actix_web::error::ResponseError for HttpErr {
} }
} }
fn error_response(&self) -> HttpResponse<BoxBody> { 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!") HttpResponse::InternalServerError().body("Failed to execute request!")
} }
@@ -51,7 +52,7 @@ impl From<anyhow::Error> for HttpErr {
impl From<Box<dyn Error>> for HttpErr { impl From<Box<dyn Error>> for HttpErr {
fn from(value: Box<dyn Error>) -> Self { 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 { impl From<actix_web::Error> for HttpErr {
fn from(value: actix_web::Error) -> Self { 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_cors::Cors;
use actix_identity::IdentityMiddleware; use actix_identity::IdentityMiddleware;
use actix_identity::config::LogoutBehavior; use actix_identity::config::LogoutBehaviour;
use actix_remote_ip::RemoteIPConfig; use actix_remote_ip::RemoteIPConfig;
use actix_session::SessionMiddleware; use actix_session::SessionMiddleware;
use actix_session::storage::CookieSessionStore; use actix_session::storage::CookieSessionStore;
@@ -37,7 +37,7 @@ async fn main() -> std::io::Result<()> {
.build(); .build();
let identity_middleware = IdentityMiddleware::builder() let identity_middleware = IdentityMiddleware::builder()
.logout_behavior(LogoutBehavior::PurgeSession) .logout_behaviour(LogoutBehaviour::PurgeSession)
.visit_deadline(Some(Duration::from_secs( .visit_deadline(Some(Duration::from_secs(
constants::MAX_INACTIVITY_DURATION, constants::MAX_INACTIVITY_DURATION,
))) )))

File diff suppressed because it is too large Load Diff

View File

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

View File

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