report application deploy URL
This commit is contained in:
@@ -178,10 +178,10 @@ fn handle_events() {
|
||||
ApplicationFeatureStatus::Installing => {
|
||||
info!("Installing feature '{feature}' for '{application}'...");
|
||||
}
|
||||
ApplicationFeatureStatus::Installed => {
|
||||
ApplicationFeatureStatus::Installed { details: _ } => {
|
||||
info!(status = "finished"; "Feature '{feature}' installed");
|
||||
}
|
||||
ApplicationFeatureStatus::Failed { details } => {
|
||||
ApplicationFeatureStatus::Failed { message: details } => {
|
||||
error!(status = "failed"; "Feature '{feature}' installation failed: {details}");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
use std::sync::Mutex;
|
||||
|
||||
use harmony::instrumentation::{self, HarmonyEvent};
|
||||
use harmony::{
|
||||
instrumentation::{self, HarmonyEvent},
|
||||
modules::application::ApplicationFeatureStatus,
|
||||
};
|
||||
|
||||
use crate::theme;
|
||||
|
||||
@@ -11,26 +14,43 @@ pub fn init() {
|
||||
move |event| {
|
||||
let mut details = details.lock().unwrap();
|
||||
|
||||
if let HarmonyEvent::InterpretExecutionFinished {
|
||||
execution_id: _,
|
||||
topology: _,
|
||||
interpret: _,
|
||||
score: _,
|
||||
outcome: Ok(outcome),
|
||||
} = event
|
||||
{
|
||||
if outcome.status == harmony::interpret::InterpretStatus::SUCCESS {
|
||||
details.extend(outcome.details.clone());
|
||||
match event {
|
||||
HarmonyEvent::InterpretExecutionFinished {
|
||||
execution_id: _,
|
||||
topology: _,
|
||||
interpret: _,
|
||||
score: _,
|
||||
outcome: Ok(outcome),
|
||||
} => {
|
||||
if outcome.status == harmony::interpret::InterpretStatus::SUCCESS {
|
||||
details.extend(outcome.details.clone());
|
||||
}
|
||||
}
|
||||
} else if let HarmonyEvent::HarmonyFinished = event
|
||||
&& !details.is_empty()
|
||||
{
|
||||
println!("\n{} All done! What's next for you:", theme::EMOJI_SUMMARY);
|
||||
for detail in details.iter() {
|
||||
println!("- {detail}");
|
||||
HarmonyEvent::ApplicationFeatureStateChanged {
|
||||
topology: _,
|
||||
application: _,
|
||||
feature: _,
|
||||
status:
|
||||
ApplicationFeatureStatus::Installed {
|
||||
details: feature_details,
|
||||
},
|
||||
} => {
|
||||
details.extend(feature_details.clone());
|
||||
}
|
||||
println!();
|
||||
}
|
||||
HarmonyEvent::HarmonyFinished => {
|
||||
if !details.is_empty() {
|
||||
println!(
|
||||
"\n{} All done! Here's what's next for you:",
|
||||
theme::EMOJI_SUMMARY
|
||||
);
|
||||
for detail in details.iter() {
|
||||
println!("- {detail}");
|
||||
}
|
||||
println!();
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user