Beispiel #1
0
def get_cached_bi_compiler() -> BICompiler:
    if "bi_compiler" not in g:
        sites_callback = SitesCallback(cmk.gui.sites.states,
                                       bi_livestatus_query)
        g.bi_compiler = BICompiler(BIManager.bi_configuration_file(),
                                   sites_callback)
    return g.bi_compiler
Beispiel #2
0
 def __init__(self):
     sites_callback = SitesCallback(cmk.gui.sites.states,
                                    bi_livestatus_query)
     self.compiler = BICompiler(self.bi_configuration_file(),
                                sites_callback)
     self.compiler.load_compiled_aggregations()
     self.status_fetcher = BIStatusFetcher(sites_callback)
     self.computer = BIComputer(self.compiler.compiled_aggregations,
                                self.status_fetcher)
Beispiel #3
0
def get_cached_bi_compiler() -> BICompiler:
    return BICompiler(
        BIManager.bi_configuration_file(), SitesCallback(cmk.gui.sites.states, bi_livestatus_query)
    )