mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-17 13:48:21 +03:00
comment out api call for testing
This commit is contained in:
parent
7f6887d8b2
commit
3fc07e507a
@ -342,12 +342,19 @@ export function createConfigSection({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await axios.put("config/set", {
|
// await axios.put("config/set", {
|
||||||
requires_restart: requiresRestart ? 0 : 1,
|
// requires_restart: requiresRestart ? 0 : 1,
|
||||||
|
// update_topic: updateTopic,
|
||||||
|
// config_data: {
|
||||||
|
// [basePath]: overrides,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// log save to console for debugging
|
||||||
|
console.log("Saved config data:", {
|
||||||
|
[basePath]: overrides,
|
||||||
update_topic: updateTopic,
|
update_topic: updateTopic,
|
||||||
config_data: {
|
requires_restart: requiresRestart ? 0 : 1,
|
||||||
[basePath]: overrides,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
toast.success(
|
toast.success(
|
||||||
@ -421,12 +428,18 @@ export function createConfigSection({
|
|||||||
const basePath = `cameras.${cameraName}.${sectionPath}`;
|
const basePath = `cameras.${cameraName}.${sectionPath}`;
|
||||||
|
|
||||||
// Send empty string to delete the key from config (see update_yaml in backend)
|
// Send empty string to delete the key from config (see update_yaml in backend)
|
||||||
await axios.put("config/set", {
|
// await axios.put("config/set", {
|
||||||
requires_restart: requiresRestart ? 0 : 1,
|
// requires_restart: requiresRestart ? 0 : 1,
|
||||||
|
// update_topic: updateTopic,
|
||||||
|
// config_data: {
|
||||||
|
// [basePath]: "",
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
|
||||||
|
// log reset to console for debugging
|
||||||
|
console.log("Reset to global config for path:", basePath, {
|
||||||
update_topic: updateTopic,
|
update_topic: updateTopic,
|
||||||
config_data: {
|
requires_restart: requiresRestart ? 0 : 1,
|
||||||
[basePath]: "",
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
toast.success(
|
toast.success(
|
||||||
@ -516,6 +529,7 @@ export function createConfigSection({
|
|||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
onClick={handleSave}
|
onClick={handleSave}
|
||||||
|
variant="select"
|
||||||
disabled={!hasChanges || isSaving || disabled}
|
disabled={!hasChanges || isSaving || disabled}
|
||||||
className="gap-2"
|
className="gap-2"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -268,17 +268,14 @@ const globalSectionConfigs: Record<
|
|||||||
"input_tensor",
|
"input_tensor",
|
||||||
"input_dtype",
|
"input_dtype",
|
||||||
"model_type",
|
"model_type",
|
||||||
"labelmap",
|
|
||||||
"attributes_map",
|
|
||||||
],
|
],
|
||||||
advancedFields: [
|
advancedFields: [
|
||||||
"labelmap",
|
|
||||||
"attributes_map",
|
|
||||||
"input_pixel_format",
|
"input_pixel_format",
|
||||||
"input_tensor",
|
"input_tensor",
|
||||||
"input_dtype",
|
"input_dtype",
|
||||||
"model_type",
|
"model_type",
|
||||||
],
|
],
|
||||||
|
hiddenFields: ["labelmap", "attributes_map"],
|
||||||
},
|
},
|
||||||
genai: {
|
genai: {
|
||||||
i18nNamespace: "config/genai",
|
i18nNamespace: "config/genai",
|
||||||
@ -469,12 +466,15 @@ function GlobalConfigSection({
|
|||||||
|
|
||||||
setIsSaving(true);
|
setIsSaving(true);
|
||||||
try {
|
try {
|
||||||
await axios.put("config/set", {
|
// await axios.put("config/set", {
|
||||||
update_topic: `config/${sectionKey}`,
|
// update_topic: `config/${sectionKey}`,
|
||||||
config_data: {
|
// config_data: {
|
||||||
[sectionKey]: pendingData,
|
// [sectionKey]: pendingData,
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
// log axios for debugging
|
||||||
|
console.log("Saved config section", sectionKey, pendingData);
|
||||||
|
|
||||||
toast.success(
|
toast.success(
|
||||||
t("toast.success", {
|
t("toast.success", {
|
||||||
@ -692,7 +692,7 @@ export default function GlobalConfigView() {
|
|||||||
|
|
||||||
<div className="mt-4 flex flex-1 gap-6 overflow-hidden">
|
<div className="mt-4 flex flex-1 gap-6 overflow-hidden">
|
||||||
{/* Section Navigation */}
|
{/* Section Navigation */}
|
||||||
<nav className="w-48 shrink-0">
|
<nav className="w-64 shrink-0">
|
||||||
<ul className="space-y-1">
|
<ul className="space-y-1">
|
||||||
{currentSections.map((section) => {
|
{currentSections.map((section) => {
|
||||||
const sectionLabel = t("label", {
|
const sectionLabel = t("label", {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user