Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-16 04:12:53 +01:00
make admin support hostinfo
Dieser Commit ist enthalten in:
Ursprung
968ed8a453
Commit
42e1018ad7
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
|
@ -12,7 +12,7 @@ use rocket::{
|
||||||
Catcher, Route,
|
Catcher, Route,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::auth::BaseURL;
|
use crate::auth::HostInfo;
|
||||||
use crate::{
|
use crate::{
|
||||||
api::{
|
api::{
|
||||||
core::{log_event, two_factor},
|
core::{log_event, two_factor},
|
||||||
|
@ -669,7 +669,7 @@ async fn get_ntp_time(has_http_access: bool) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get("/diagnostics")]
|
#[get("/diagnostics")]
|
||||||
async fn diagnostics(_token: AdminToken, ip_header: IpHeader, mut conn: DbConn, base_url: BaseURL) -> ApiResult<Html<String>> {
|
async fn diagnostics(_token: AdminToken, ip_header: IpHeader, host_info: HostInfo, mut conn: DbConn) -> ApiResult<Html<String>> {
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
use std::net::ToSocketAddrs;
|
use std::net::ToSocketAddrs;
|
||||||
|
|
||||||
|
@ -725,7 +725,7 @@ async fn diagnostics(_token: AdminToken, ip_header: IpHeader, mut conn: DbConn,
|
||||||
"uses_proxy": uses_proxy,
|
"uses_proxy": uses_proxy,
|
||||||
"db_type": *DB_TYPE,
|
"db_type": *DB_TYPE,
|
||||||
"db_version": get_sql_server_version(&mut conn).await,
|
"db_version": get_sql_server_version(&mut conn).await,
|
||||||
"admin_url": format!("{}/diagnostics", admin_url(&base_url.base_url)),
|
"admin_url": format!("{}/diagnostics", admin_url(&host_info.base_url)),
|
||||||
"overrides": &CONFIG.get_overrides().join(", "),
|
"overrides": &CONFIG.get_overrides().join(", "),
|
||||||
"host_arch": std::env::consts::ARCH,
|
"host_arch": std::env::consts::ARCH,
|
||||||
"host_os": std::env::consts::OS,
|
"host_os": std::env::consts::OS,
|
||||||
|
|
Laden …
In neuem Issue referenzieren