mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-26 06:11:54 +03:00
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
* add ptz presets and default role widgets * language tweaks * fix width in triggers view * tweak iOS PWA message in notifications settings * deprecate ui.date_style and ui.time_style these have been unused since date/time formatting has been pushed to i18n * add config migrator to remove date_style and time_style * remove date_style and time_style from reference config * fix camera list scrolling in state classification wizard on mobile
79 lines
1.9 KiB
TypeScript
79 lines
1.9 KiB
TypeScript
import type { SectionConfigOverrides } from "./types";
|
|
|
|
const onvif: SectionConfigOverrides = {
|
|
base: {
|
|
sectionDocs: "/configuration/cameras#setting-up-camera-ptz-controls",
|
|
fieldDocs: {
|
|
autotracking: "/configuration/autotracking",
|
|
"autotracking.calibrate_on_startup":
|
|
"/configuration/autotracking#calibration",
|
|
},
|
|
fieldOrder: [
|
|
"host",
|
|
"port",
|
|
"user",
|
|
"password",
|
|
"profile",
|
|
"tls_insecure",
|
|
"ignore_time_mismatch",
|
|
"autotracking",
|
|
],
|
|
hiddenFields: [
|
|
"autotracking.enabled_in_config",
|
|
"autotracking.movement_weights",
|
|
],
|
|
advancedFields: ["tls_insecure", "ignore_time_mismatch"],
|
|
overrideFields: [],
|
|
restartRequired: ["autotracking.calibrate_on_startup"],
|
|
fieldMessages: [
|
|
{
|
|
key: "autotracking-no-zones",
|
|
field: "autotracking.required_zones",
|
|
messageKey: "configMessages.onvif.autotrackingNoZones",
|
|
severity: "error",
|
|
position: "before",
|
|
condition: (ctx) => {
|
|
if (ctx.level !== "camera") return false;
|
|
const zones = ctx.fullCameraConfig?.zones;
|
|
return (
|
|
!zones ||
|
|
typeof zones !== "object" ||
|
|
Object.keys(zones).length === 0
|
|
);
|
|
},
|
|
},
|
|
],
|
|
uiSchema: {
|
|
host: {
|
|
"ui:options": { size: "sm" },
|
|
},
|
|
password: {
|
|
"ui:widget": "password",
|
|
},
|
|
profile: {
|
|
"ui:widget": "onvifProfile",
|
|
},
|
|
autotracking: {
|
|
required_zones: {
|
|
"ui:widget": "zoneNames",
|
|
},
|
|
return_preset: {
|
|
"ui:options": { size: "sm" },
|
|
"ui:widget": "ptzPresets",
|
|
},
|
|
track: {
|
|
"ui:widget": "objectLabels",
|
|
},
|
|
zooming: {
|
|
"ui:options": {
|
|
size: "xs",
|
|
enumI18nPrefix: "onvif.autotracking.zooming",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default onvif;
|