report Ntfy endpoint
This commit is contained in:
@@ -88,10 +88,10 @@ pub struct Outcome {
|
||||
}
|
||||
|
||||
impl Outcome {
|
||||
pub fn noop() -> Self {
|
||||
pub fn noop(message: String) -> Self {
|
||||
Self {
|
||||
status: InterpretStatus::NOOP,
|
||||
message: String::new(),
|
||||
message,
|
||||
details: vec![],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,9 @@ impl<T: Topology + PrometheusApplicationMonitoring<CRDPrometheus>> Interpret<T>
|
||||
PreparationOutcome::Success { details: _ } => {
|
||||
Ok(Outcome::success("Prometheus installed".into()))
|
||||
}
|
||||
PreparationOutcome::Noop => Ok(Outcome::noop()),
|
||||
PreparationOutcome::Noop => {
|
||||
Ok(Outcome::noop("Prometheus installation skipped".into()))
|
||||
}
|
||||
},
|
||||
Err(err) => Err(InterpretError::from(err)),
|
||||
}
|
||||
|
||||
@@ -70,7 +70,9 @@ impl<T: Topology + PrometheusApplicationMonitoring<RHOBObservability>> Interpret
|
||||
PreparationOutcome::Success { details: _ } => {
|
||||
Ok(Outcome::success("Prometheus installed".into()))
|
||||
}
|
||||
PreparationOutcome::Noop => Ok(Outcome::noop()),
|
||||
PreparationOutcome::Noop => {
|
||||
Ok(Outcome::noop("Prometheus installation skipped".into()))
|
||||
}
|
||||
},
|
||||
Err(err) => Err(InterpretError::from(err)),
|
||||
}
|
||||
|
||||
@@ -113,7 +113,13 @@ impl<T: Topology + HelmCommand + K8sclient + MultiTargetTopology> Interpret<T> f
|
||||
.await?;
|
||||
info!("user added");
|
||||
|
||||
Ok(Outcome::success("Ntfy installed".to_string()))
|
||||
Ok(Outcome::success_with_details(
|
||||
"Ntfy installed".to_string(),
|
||||
vec![format!(
|
||||
"Ntfy ({}): http://{}",
|
||||
self.score.namespace, self.score.host
|
||||
)],
|
||||
))
|
||||
}
|
||||
|
||||
fn get_name(&self) -> InterpretName {
|
||||
|
||||
Reference in New Issue
Block a user