Skip to content

Commit 2b4aea5

Browse files
committed
feat(actix): update welcome message
1 parent 2d88f3a commit 2b4aea5

7 files changed

Lines changed: 23 additions & 35 deletions

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
test_projects
2+
3+
# cargo
24
crates/target
35
/target
6+
7+
# qdrant
48
.qdrant-initialized
5-
storage
9+
storage
10+
snapshots

.rusty-hook.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

crates/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CodeIndex is a local-first high performance codebase index engine designed for A
77
### Install Dependencies
88

99
```bash
10+
rustup component add rustfmt
1011
brew install protobuf
1112
cargo install cargo-watch
1213
```

crates/qdrant/src/actix/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ pub fn init(
6868
let static_folder = Path::new(&static_folder);
6969
if !static_folder.exists() || !static_folder.is_dir() {
7070
// enabled BUT folder does not exist
71-
log::warn!(
72-
"Static content folder for Web UI '{}' does not exist",
73-
static_folder.display(),
74-
);
71+
// log::warn!(
72+
// "Static content folder for Web UI '{}' does not exist",
73+
// static_folder.display(),
74+
// );
7575
false
7676
} else {
7777
// enabled AND folder exists

crates/qdrant/src/greeting.rs

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ use std::env;
33
use atty::Stream;
44
use colored::{Color, ColoredString, Colorize};
55

6-
use crate::settings::Settings;
7-
86
fn paint(text: &str, true_color: bool) -> ColoredString {
97
if true_color {
10-
text.bold().truecolor(184, 20, 56)
8+
text.bold().truecolor(70, 144, 239)
119
} else {
12-
text.bold().color(Color::Red)
10+
text.bold().color(Color::Blue)
1311
}
1412
}
1513

1614
/// Prints welcome message
1715
#[rustfmt::skip]
18-
pub fn welcome(settings: &Settings) {
16+
pub fn welcome() {
1917
if !atty::is(Stream::Stdout) {
2018
colored::control::set_override(false);
2119
}
@@ -29,22 +27,11 @@ pub fn welcome(settings: &Settings) {
2927
Err(_) => true_color = false,
3028
}
3129

32-
println!("{}", paint(r#" _ _ "#, true_color));
33-
println!("{}", paint(r#" __ _ __| |_ __ __ _ _ __ | |_ "#, true_color));
34-
println!("{}", paint(r#" / _` |/ _` | '__/ _` | '_ \| __| "#, true_color));
35-
println!("{}", paint(r#"| (_| | (_| | | | (_| | | | | |_ "#, true_color));
36-
println!("{}", paint(r#" \__, |\__,_|_| \__,_|_| |_|\__| "#, true_color));
37-
println!("{}", paint(r#" |_| "#, true_color));
38-
println!();
39-
let ui_link = format!(
40-
"http{}://localhost:{}/dashboard",
41-
if settings.service.enable_tls { "s" } else { "" },
42-
settings.service.http_port
43-
);
44-
45-
println!("{} {}",
46-
"Access web UI at".truecolor(134, 186, 144),
47-
ui_link.bold().underline().truecolor(82, 139, 183));
30+
println!("{}", paint(r#" _________ _________ ________ _________ "#, true_color));
31+
println!("{}", paint(r#" __ ____/___________ /________ _/____________ /________ __"#, true_color));
32+
println!("{}", paint(r#" _ / _ __ \ __ /_ _ \__ / __ __ \ __ /_ _ \_ |/_/"#, true_color));
33+
println!("{}", paint(r#" / /___ / /_/ / /_/ / / __/_/ / _ / / / /_/ / / __/_> < "#, true_color));
34+
println!("{}", paint(r#" \____/ \____/\__,_/ \___//___/ /_/ /_/\__,_/ \___//_/|_| "#, true_color));
4835
println!();
4936
}
5037

@@ -54,6 +41,6 @@ mod tests {
5441

5542
#[test]
5643
fn test_welcome() {
57-
welcome(&Settings::new(None).unwrap());
44+
welcome();
5845
}
5946
}

crates/qdrant/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fn main() -> anyhow::Result<()> {
124124
segment::madvise::set_global(settings.storage.mmap_advice);
125125
segment::vector_storage::common::set_async_scorer(settings.storage.async_scorer);
126126

127-
welcome(&settings);
127+
welcome();
128128

129129
if let Some(recovery_warning) = &settings.storage.recovery_mode {
130130
log::warn!("Qdrant is loaded in recovery mode: {}", recovery_warning);

crates/qdrant/src/settings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ impl Settings {
242242
}
243243

244244
let env = env::var("RUN_MODE").unwrap_or_else(|_| "development".into());
245-
let config_path_env = format!("config/{env}");
245+
let config_path_env = format!("crates/qdrant/config/{env}");
246246

247247
// Report error if main or env config files exist, report warning if not
248248
// Check if main and env configuration file
249249
load_errors.extend(
250-
["config/config", &config_path_env]
250+
["crates/qdrant/config/config", &config_path_env]
251251
.into_iter()
252252
.filter(|path| !config_exists(path))
253253
.map(|path| LogMsg::Warn(format!("Config file not found: {path}"))),

0 commit comments

Comments
 (0)