def _init_graph(self): context = visuals.get_merged_context( visuals.get_context_from_uri_vars(["host", "service"], self.single_infos()), self._dashlet_spec["context"]) self._dashlet_spec[ "_graph_identification"] = self.graph_identification(context) try: graph_recipes = resolve_graph_recipe( self._dashlet_spec["_graph_identification"]) except MKMissingDataError: raise except livestatus.MKLivestatusNotFoundError as livestatus_excpt: raise MKMissingDataError( _("Missing data needed to render this graph. Details: %s") % livestatus_excpt) except Exception: raise MKGeneralException(_("Failed to calculate a graph recipe.")) self._dashlet_spec["_graph_title"] = graph_recipes[0]["title"]
def make_mk_missing_data_error() -> MKMissingDataError: return MKMissingDataError(_("No data was found with the current parameters of this dashlet."))