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
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ build-notebook-lifecycle-observe: (build-features "notebook,lifecycle,observe")

build-notebook-lifecycle-mcp: (build-features "notebook,lifecycle,mcp")

build-no-observe: (build-features "notebook,lifecycle,mcp,openwebui")

build-full: (build-features "notebook,lifecycle,observe,mcp,openwebui")

# --- Frontend & Minification ---
Expand Down
2 changes: 1 addition & 1 deletion src/logger/observability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl ObserveEvents {
}

pub fn send_message(&self, event: ObserveEventEntry) {
let message = format!("{:?}", &event);
let message = format!("{:?}", event);
if let Err(e) = self.sender.try_send(event) {
match e {
tokio::sync::mpsc::error::TrySendError::Full(_) => warn!(
Expand Down
3 changes: 2 additions & 1 deletion src/web/route/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ use crate::{
helper::{self},
},
};
use crate::config::CONFIG;
#[cfg(feature = "observe")]
use crate::{config::CONFIG, logger::MESSAGE_DELIMITER};
use crate::logger::MESSAGE_DELIMITER;

pub use self::oauth::generate_token_with_cookie;
use self::{
Expand Down
11 changes: 9 additions & 2 deletions src/web/route/openwebui/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use std::{borrow::Cow, collections::HashSet, marker::PhantomData, str::FromStr, sync::LazyLock, time::Duration};
use std::{
borrow::Cow, collections::HashSet, marker::PhantomData, str::FromStr, sync::LazyLock,
time::Duration,
};

use actix_web::{
HttpRequest, HttpResponse, delete,
Expand All @@ -15,6 +18,8 @@ use tera::{Context, Tera};
use tracing::{instrument, warn};
use url::Url;

#[cfg(feature = "observe")]
use crate::web::helper::observability_post;
use crate::{
config::CONFIG,
db::{
Expand All @@ -27,7 +32,7 @@ use crate::{
web::{
bridge_middleware::{CookieCheck, Htmx},
bson,
helper::{self, forwarding, observability_post},
helper::{self, forwarding},
},
};

Expand Down Expand Up @@ -258,6 +263,7 @@ async fn create_owui(
)
.await?;

#[cfg(feature = "observe")]
if let Some(bc) = bcookie {
observability_post("owui instance has been created", &bc);
}
Expand Down Expand Up @@ -331,6 +337,7 @@ async fn delete_owui(
)
.await?;

#[cfg(feature = "observe")]
if let Some(bc) = bcookie {
observability_post("owui instance has been deleted", &bc);
}
Expand Down
2 changes: 1 addition & 1 deletion src/web/route/portal/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ where
#[cfg(feature = "openwebui")]
pub(super) async fn owui_bookkeeping(user: &User) -> (Option<UserOwui>, bool) {
let id = user._id.to_string();
let name = format!("u{}-openwebui", &id);
let name = format!("u{}-openwebui", id);
let pod_name = format!("u{}-openwebui-0", id);
let pvc_name = format!("owui1-u{}-openwebui-0", id);

Expand Down
2 changes: 1 addition & 1 deletion src/web/route/resource/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub async fn resource_http(
client: Data<reqwest::Client>,
) -> Result<HttpResponse> {
let (mut bridge_cookie, resource) = resource.into_inner();
let prefix = format!("/resource/{}", &resource);
let prefix = format!("/resource/{}", resource);
let path = req
.uri()
.path()
Expand Down
Loading