mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
Remove debug config from system page
This commit is contained in:
parent
2fe85084ba
commit
5ea60a3c31
@ -7,7 +7,7 @@ import { useWs } from '../api/ws';
|
|||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Table, Tbody, Thead, Tr, Th, Td } from '../components/Table';
|
import { Table, Tbody, Thead, Tr, Th, Td } from '../components/Table';
|
||||||
import { useCallback, useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import Dialog from '../components/Dialog';
|
import Dialog from '../components/Dialog';
|
||||||
|
|
||||||
const emptyObject = Object.freeze({});
|
const emptyObject = Object.freeze({});
|
||||||
@ -34,13 +34,6 @@ export default function System() {
|
|||||||
const gpuNames = Object.keys(gpu_usages || emptyObject);
|
const gpuNames = Object.keys(gpu_usages || emptyObject);
|
||||||
const cameraNames = Object.keys(cameras || emptyObject);
|
const cameraNames = Object.keys(cameras || emptyObject);
|
||||||
|
|
||||||
const handleCopyConfig = useCallback(() => {
|
|
||||||
async function copy() {
|
|
||||||
await window.navigator.clipboard.writeText(JSON.stringify(config, null, 2));
|
|
||||||
}
|
|
||||||
copy();
|
|
||||||
}, [config]);
|
|
||||||
|
|
||||||
const onHandleFfprobe = async (camera, e) => {
|
const onHandleFfprobe = async (camera, e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -267,16 +260,6 @@ export default function System() {
|
|||||||
<p>System stats update automatically every {config.mqtt.stats_interval} seconds.</p>
|
<p>System stats update automatically every {config.mqtt.stats_interval} seconds.</p>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="relative">
|
|
||||||
<Heading size="sm">Config</Heading>
|
|
||||||
<Button className="absolute top-8 right-4" onClick={handleCopyConfig}>
|
|
||||||
Copy to Clipboard
|
|
||||||
</Button>
|
|
||||||
<pre className="overflow-auto font-mono text-gray-900 dark:text-gray-100 rounded bg-gray-100 dark:bg-gray-800 p-2 max-h-96">
|
|
||||||
{JSON.stringify(config, null, 2)}
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user