mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
remove chroma from UI
This commit is contained in:
parent
a4d43a97c4
commit
3b78908ef3
@ -384,12 +384,12 @@ def vainfo():
|
||||
|
||||
@router.get("/logs/{service}", tags=[Tags.logs])
|
||||
def logs(
|
||||
service: str = Path(enum=["frigate", "nginx", "go2rtc", "chroma"]),
|
||||
service: str = Path(enum=["frigate", "nginx", "go2rtc"]),
|
||||
download: Optional[str] = None,
|
||||
start: Optional[int] = 0,
|
||||
end: Optional[int] = None,
|
||||
):
|
||||
"""Get logs for the requested service (frigate/nginx/go2rtc/chroma)"""
|
||||
"""Get logs for the requested service (frigate/nginx/go2rtc)"""
|
||||
|
||||
def download_logs(service_location: str):
|
||||
try:
|
||||
@ -408,7 +408,6 @@ def logs(
|
||||
"frigate": "/dev/shm/logs/frigate/current",
|
||||
"go2rtc": "/dev/shm/logs/go2rtc/current",
|
||||
"nginx": "/dev/shm/logs/nginx/current",
|
||||
"chroma": "/dev/shm/logs/chroma/current",
|
||||
}
|
||||
service_location = log_locations.get(service)
|
||||
|
||||
|
||||
@ -168,7 +168,7 @@ export default function Explore() {
|
||||
if (searchQuery) {
|
||||
const [url] = searchQuery;
|
||||
|
||||
// for chroma, only load 100 results for description and similarity
|
||||
// for embeddings, only load 100 results for description and similarity
|
||||
if (url === "events/search" && searchResults.length >= 100) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -12,5 +12,5 @@ export type LogLine = {
|
||||
content: string;
|
||||
};
|
||||
|
||||
export const logTypes = ["frigate", "go2rtc", "nginx", "chroma"] as const;
|
||||
export const logTypes = ["frigate", "go2rtc", "nginx"] as const;
|
||||
export type LogType = (typeof logTypes)[number];
|
||||
|
||||
@ -128,46 +128,6 @@ export function parseLogLines(logService: LogType, logs: string[]) {
|
||||
};
|
||||
})
|
||||
.filter((value) => value != null) as LogLine[];
|
||||
} else if (logService == "chroma") {
|
||||
return logs
|
||||
.map((line) => {
|
||||
const match = frigateDateStamp.exec(line);
|
||||
|
||||
if (!match) {
|
||||
const infoIndex = line.indexOf("[INFO]");
|
||||
|
||||
if (infoIndex != -1) {
|
||||
return {
|
||||
dateStamp: line.substring(0, 19),
|
||||
severity: "info",
|
||||
section: "startup",
|
||||
content: line.substring(infoIndex + 6).trim(),
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
const startup =
|
||||
line.indexOf("Starting component") !== -1 ||
|
||||
line.indexOf("startup") !== -1 ||
|
||||
line.indexOf("Started") !== -1 ||
|
||||
line.indexOf("Uvicorn") !== -1;
|
||||
const api = !!httpMethods.exec(line);
|
||||
const tag = startup ? "startup" : api ? "API" : "server";
|
||||
|
||||
return {
|
||||
dateStamp: match.toString().slice(1, -1),
|
||||
severity: pythonSeverity
|
||||
.exec(line)
|
||||
?.at(0)
|
||||
?.toString()
|
||||
?.toLowerCase() as LogSeverity,
|
||||
section: tag,
|
||||
content: line.substring(match.index + match[0].length).trim(),
|
||||
};
|
||||
})
|
||||
.filter((value) => value != null) as LogLine[];
|
||||
}
|
||||
|
||||
return [];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user