Hide software health state until scan.

This commit is contained in:
Marek Wolan
2024-01-09 14:29:23 +00:00
parent f2a496893c
commit 716bd626a5
2 changed files with 6 additions and 3 deletions

View File

@@ -140,7 +140,10 @@ class ServiceObservation(AbstractObservation):
service_state = access_from_nested_dict(state, self.where)
if service_state is NOT_PRESENT_IN_STATE:
return self.default_observation
return {"operating_status": service_state["operating_state"], "health_status": service_state["health_state"]}
return {
"operating_status": service_state["operating_state"],
"health_status": service_state["health_state_visible"],
}
@property
def space(self) -> spaces.Space:

View File

@@ -145,8 +145,8 @@ class Software(SimComponent):
state = super().describe_state()
state.update(
{
"health_state": self.health_state_actual.value,
"health_state_red_view": self.health_state_visible.value,
"health_state_actual": self.health_state_actual.value,
"health_state_visible": self.health_state_visible.value,
"criticality": self.criticality.value,
"patching_count": self.patching_count,
"scanning_count": self.scanning_count,