mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-18 14:18:21 +03:00
remove key from config when resetting to default/global
This commit is contained in:
parent
737be737cb
commit
87b76c6a02
@ -70,7 +70,7 @@ export interface SectionConfig {
|
|||||||
sectionDocs?: string;
|
sectionDocs?: string;
|
||||||
/** Per-field documentation links */
|
/** Per-field documentation links */
|
||||||
fieldDocs?: Record<string, string>;
|
fieldDocs?: Record<string, string>;
|
||||||
/** Fields that require restart when modified (empty means all fields) */
|
/** Fields that require restart when modified (empty means none; undefined uses default) */
|
||||||
restartRequired?: string[];
|
restartRequired?: string[];
|
||||||
/** Whether to enable live validation */
|
/** Whether to enable live validation */
|
||||||
liveValidate?: boolean;
|
liveValidate?: boolean;
|
||||||
@ -470,7 +470,7 @@ export function ConfigSection({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sectionConfig.restartRequired.length === 0) {
|
if (sectionConfig.restartRequired.length === 0) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!overrides || typeof overrides !== "object") {
|
if (!overrides || typeof overrides !== "object") {
|
||||||
@ -606,7 +606,7 @@ export function ConfigSection({
|
|||||||
? `cameras.${cameraName}.${sectionPath}`
|
? `cameras.${cameraName}.${sectionPath}`
|
||||||
: sectionPath;
|
: sectionPath;
|
||||||
|
|
||||||
const configData = level === "global" ? effectiveSchemaDefaults : "";
|
const configData = "";
|
||||||
|
|
||||||
await axios.put("config/set", {
|
await axios.put("config/set", {
|
||||||
requires_restart: requiresRestart ? 0 : 1,
|
requires_restart: requiresRestart ? 0 : 1,
|
||||||
@ -649,7 +649,6 @@ export function ConfigSection({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
effectiveSchemaDefaults,
|
|
||||||
sectionPath,
|
sectionPath,
|
||||||
level,
|
level,
|
||||||
cameraName,
|
cameraName,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user