Skip to content
Merged
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
23 changes: 21 additions & 2 deletions server/src/banner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,32 @@ use crate::utils::uid::Uid;
use crate::{option::Config, storage::StorageMetadata};

pub fn print(config: &Config, meta: StorageMetadata) {
print_ascii_art();
let scheme = config.parseable.get_scheme();
status_info(config, &scheme, meta.deployment_id);
storage_info(config);
about::print();
println!();
}

fn print_ascii_art() {
let ascii_name = r#"
`7MM"""Mq. *MM `7MM
MM `MM. MM MM
MM ,M9 ,6"Yb. `7Mb,od8 ,pP"Ybd .gP"Ya ,6"Yb. MM,dMMb. MM .gP"Ya
MMmmdM9 8) MM MM' "' 8I `" ,M' Yb 8) MM MM `Mb MM ,M' Yb
MM ,pm9MM MM `YMMMa. 8M"""""" ,pm9MM MM M8 MM 8M""""""
MM 8M MM MM L. I8 YM. , 8M MM MM. ,M9 MM YM. ,
.JMML. `Moo9^Yo..JMML. M9mmmP' `Mbmmd' `Moo9^Yo. P^YbmdP' .JMML. `Mbmmd'
"#;

eprint!("{}", ascii_name);
eprintln!(
"
Welcome to Parseable Server!"
);
}

fn status_info(config: &Config, scheme: &str, id: Uid) {
let url = format!("\"{}://{}\"", scheme, config.parseable.address).underlined();
let mut credentials =
Expand All @@ -42,10 +61,10 @@ fn status_info(config: &Config, scheme: &str, id: Uid) {
eprintln!(
"
{}
Running at: {}
URL: {}
Credentials: {}
Deployment UID: \"{}\"",
"Parseable Server".to_string().bold(),
"Server:".to_string().bold(),
url,
credentials,
id.to_string(),
Expand Down