chore: Add heavy score example to tui to see what it looks like with long output. Good enough as a step forward!

This commit is contained in:
2025-04-23 10:32:53 -04:00
parent d937ddca3a
commit 27f6ed97f9
6 changed files with 57 additions and 7 deletions

View File

@@ -36,13 +36,13 @@ pub mod tui {
/// modules::dummy::{ErrorScore, PanicScore, SuccessScore},
/// topology::HAClusterTopology,
/// };
///
///
/// #[tokio::main]
/// async fn main() {
/// let inventory = Inventory::autoload();
/// let topology = HAClusterTopology::autoload();
/// let mut maestro = Maestro::new(inventory, topology);
///
///
/// maestro.register_all(vec![
/// Box::new(SuccessScore {}),
/// Box::new(ErrorScore {}),
@@ -125,7 +125,6 @@ impl<T: Topology + std::fmt::Debug + Send + Sync + 'static> HarmonyTUI<T> {
std::fs::create_dir_all("log")?;
tui_logger::set_log_file("log/harmony.log").unwrap();
color_eyre::install()?;
let mut terminal = ratatui::init();
log_panics::init();

View File

@@ -63,7 +63,7 @@ impl<T: Topology + std::fmt::Debug> ScoreListWidget<T> {
warn!("No Score selected, nothing to launch");
}
}
pub(crate) fn get_selected_score(&self) -> Option<Box<dyn Score<T>>> {
let list_read = self.list_state.read().unwrap();
if let Some(index) = list_read.selected() {