mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 02:35:22 +03:00
Add ability to set preset from UI
This commit is contained in:
parent
11639ed25c
commit
4665efa825
@ -61,7 +61,7 @@ class OnvifController:
|
|||||||
# setup existing presets
|
# setup existing presets
|
||||||
presets: list[dict] = ptz.GetPresets({"ProfileToken": profile.token})
|
presets: list[dict] = ptz.GetPresets({"ProfileToken": profile.token})
|
||||||
for preset in presets:
|
for preset in presets:
|
||||||
self.cams[camera_name]["presets"][preset["Name"]] = preset["token"]
|
self.cams[camera_name]["presets"][preset["Name"].lower()] = preset["token"]
|
||||||
|
|
||||||
# get list of supported features
|
# get list of supported features
|
||||||
ptz_config = ptz.GetConfigurationOptions(request)
|
ptz_config = ptz.GetConfigurationOptions(request)
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export default function CameraControlPanel({ camera = '' }) {
|
|||||||
<option value="">Select Preset</option>
|
<option value="">Select Preset</option>
|
||||||
{ptz.presets.map((item) => (
|
{ptz.presets.map((item) => (
|
||||||
<option key={item} value={item}>
|
<option key={item} value={item}>
|
||||||
{item}
|
{item.charAt(0).toUpperCase() + item.slice(1)}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user