mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 10:59:50 +00:00
Add more info to system log (#4899)
* Add more info to system log * Add util, oops * Tweak UI
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { HomeAssistant } from "../types";
|
||||
|
||||
export interface LoggedError {
|
||||
name: string;
|
||||
message: string;
|
||||
level: string;
|
||||
source: string;
|
||||
@@ -14,3 +15,8 @@ export interface LoggedError {
|
||||
|
||||
export const fetchSystemLog = (hass: HomeAssistant) =>
|
||||
hass.callApi<LoggedError[]>("GET", "error/all");
|
||||
|
||||
export const getLoggedErrorIntegration = (item: LoggedError) =>
|
||||
item.name.startsWith("homeassistant.components.")
|
||||
? item.name.split(".")[2]
|
||||
: undefined;
|
||||
|
||||
Reference in New Issue
Block a user