예제 #1
0
 def _get_crash_report_row(self, crash_id: str, site_id: str) -> Optional[Dict[str, str]]:
     rows = CrashReportsRowTable().get_crash_report_rows(
         only_sites=[config.SiteId(ensure_str(site_id))],
         filter_headers="Filter: id = %s" % livestatus.lqencode(crash_id))
     if not rows:
         return None
     return rows[0]
예제 #2
0
def _get_crash_report_row(crash_id, site_id):
    # TODO: Drop this once the livestatus table is ready
    from cmk.gui.plugins.views.crash_reporting import CrashReportsRowTable
    for row in CrashReportsRowTable()._crash_report_rows_from_local_site():
        if row["site"] == site_id and row["crash_id"] == crash_id:
            return row
    return None
예제 #3
0
 def _get_crash_report_row(self, crash_id, site_id):
     # type: (Text, Text) -> Optional[Dict[Text, Text]]
     rows = CrashReportsRowTable().get_crash_report_rows(
         only_sites=[config.SiteId(bytes(site_id))],
         filter_headers="Filter: id = %s" % livestatus.lqencode(crash_id))
     if not rows:
         return None
     return rows[0]