Styling - Progress Bar
Build Library / Build Library (push) Successful in 5m21s

Changed progress bar indicators and added policy name to the progress bar
closes #50
This commit is contained in:
brotoskyj
2025-12-17 16:38:53 -05:00
parent a7b659c951
commit 66bb21ed88
5 changed files with 8 additions and 6 deletions
+4 -2
View File
@@ -73,8 +73,9 @@ pub fn pull_policy_exec_histories(
.set_draw_target(ProgressDrawTarget::stderr());
progress_bar.lock().unwrap().set_style(
ProgressStyle::default_bar()
.template("Total Completion: {spinner:.green} [{elapsed_precise}] [{bar:40.green/blue}] {pos}/{len} {message}")
.unwrap(),
.template("Total Completion: {spinner:.green} [{elapsed_precise}] [{bar:40.green/cyan}] {pos}/{len} - Current Policy: {msg}")
.unwrap()
.progress_chars("#> ")
);
let client: Client = tracer.in_span("Building HTTP Client", |cx| {
let client_result: Result<Client, reqwest::Error> = build_client(headers);
@@ -108,6 +109,7 @@ pub fn pull_policy_exec_histories(
Local::now().naive_local() - chrono::Duration::days(days);
let (tx, rx) = unbounded::<Vec<Group>>();
let pb_clone = progress_bar.clone();
pb_clone.lock().unwrap().set_message(policy_names.clone());
thread::spawn(move || {
let mut seen: HashMap<(String, String, String), Group> = if writeable_filepath.exists()
{