def site_globals_editable(site_id, site) -> bool: # Site is a remote site of another site. Allow to edit probably pushed site # specific globals when remote WATO is enabled if is_wato_slave_site(): return True # Local site: Don't enable site specific locals when no remote sites configured if not has_wato_slave_sites(): return False return site["replication"] or site_is_local(site_id)
def execute_host_label_sync_job() -> Optional[DiscoveredHostLabelSyncJob]: """This function is called by the GUI cron job once a minute. Errors are logged to var/log/web.log.""" if not has_wato_slave_sites(): return None job = DiscoveredHostLabelSyncJob() job.set_function(job.do_sync) try: job.start() except background_job.BackgroundJobAlreadyRunning: logger.debug( "Another synchronization job is already running: Skipping this sync" ) return job
def is_relevant(self) -> bool: return has_wato_slave_sites() and self._replicates_mkps()
def is_show_more(self) -> bool: return not (has_wato_slave_sites() or is_wato_slave_site())