mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 14:47:40 +03:00
Settings tweaks (#22750)
* add ability to order subfields with dot notation * put review genai enabled at the top of the genai subsection * fix genai summary title truncation issue in detail stream
This commit is contained in:
parent
68dfb157ea
commit
bb77a01779
@ -47,7 +47,7 @@ const review: SectionConfigOverrides = {
|
||||
"detections.labels": "/configuration/review/#alerts-and-detections",
|
||||
},
|
||||
restartRequired: [],
|
||||
fieldOrder: ["alerts", "detections", "genai"],
|
||||
fieldOrder: ["alerts", "detections", "genai", "genai.enabled"],
|
||||
fieldGroups: {},
|
||||
hiddenFields: [
|
||||
"enabled_in_config",
|
||||
|
||||
@ -108,7 +108,7 @@ export function GenAISummaryDialog({
|
||||
return (
|
||||
<Overlay open={open} onOpenChange={setOpen}>
|
||||
<Trigger asChild>
|
||||
<div>{children}</div>
|
||||
<div className="min-w-0">{children}</div>
|
||||
</Trigger>
|
||||
<Content
|
||||
className={cn(
|
||||
|
||||
@ -525,7 +525,7 @@ function ReviewGroup({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<span className="truncate hover:underline">
|
||||
<span className="block truncate hover:underline">
|
||||
{review.data.metadata.title}
|
||||
</span>
|
||||
</GenAISummaryDialog>
|
||||
|
||||
@ -483,9 +483,20 @@ function generateUiSchema(
|
||||
|
||||
const schemaObj = schema as Record<string, unknown>;
|
||||
|
||||
// Set field ordering
|
||||
// Set field ordering — supports dot notation (e.g. "genai.enabled")
|
||||
if (fieldOrder && fieldOrder.length > 0) {
|
||||
uiSchema["ui:order"] = [...fieldOrder, "*"];
|
||||
const depth = currentPath.length;
|
||||
const localOrder = fieldOrder
|
||||
.map((f) => f.split("."))
|
||||
.filter((segments) => {
|
||||
if (segments.length !== depth + 1) return false;
|
||||
return currentPath.every((p, i) => segments[i] === p);
|
||||
})
|
||||
.map((segments) => segments[depth]);
|
||||
|
||||
if (localOrder.length > 0) {
|
||||
uiSchema["ui:order"] = [...localOrder, "*"];
|
||||
}
|
||||
}
|
||||
|
||||
if (!isSchemaObject(schemaObj.properties)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user