mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
rename debug to system (#4447)
This commit is contained in:
parent
ebdf36e0b9
commit
82432a78b7
@ -44,7 +44,7 @@ export default function Sidebar() {
|
|||||||
</Match>
|
</Match>
|
||||||
{birdseye?.enabled ? <Destination href="/birdseye" text="Birdseye" /> : null}
|
{birdseye?.enabled ? <Destination href="/birdseye" text="Birdseye" /> : null}
|
||||||
<Destination href="/events" text="Events" />
|
<Destination href="/events" text="Events" />
|
||||||
<Destination href="/debug" text="Debug" />
|
<Destination href="/system" text="System" />
|
||||||
<Separator />
|
<Separator />
|
||||||
<div className="flex flex-grow" />
|
<div className="flex flex-grow" />
|
||||||
{ENV !== 'production' ? (
|
{ENV !== 'production' ? (
|
||||||
|
@ -35,7 +35,7 @@ export default function App() {
|
|||||||
path="/recording/:camera/:date?/:hour?/:minute?/:second?"
|
path="/recording/:camera/:date?/:hour?/:minute?/:second?"
|
||||||
getComponent={Routes.getRecording}
|
getComponent={Routes.getRecording}
|
||||||
/>
|
/>
|
||||||
<AsyncRoute path="/debug" getComponent={Routes.getDebug} />
|
<AsyncRoute path="/system" getComponent={Routes.getSystem} />
|
||||||
<AsyncRoute path="/styleguide" getComponent={Routes.getStyleGuide} />
|
<AsyncRoute path="/styleguide" getComponent={Routes.getStyleGuide} />
|
||||||
<Cameras default path="/" />
|
<Cameras default path="/" />
|
||||||
</Router>
|
</Router>
|
||||||
|
@ -12,7 +12,7 @@ import Dialog from '../components/Dialog';
|
|||||||
|
|
||||||
const emptyObject = Object.freeze({});
|
const emptyObject = Object.freeze({});
|
||||||
|
|
||||||
export default function Debug() {
|
export default function System() {
|
||||||
const [state, setState] = useState({ showFfprobe: false, ffprobe: '' });
|
const [state, setState] = useState({ showFfprobe: false, ffprobe: '' });
|
||||||
const { data: config } = useSWR('config');
|
const { data: config } = useSWR('config');
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ export default function Debug() {
|
|||||||
return (
|
return (
|
||||||
<div className="space-y-4 p-2 px-4">
|
<div className="space-y-4 p-2 px-4">
|
||||||
<Heading>
|
<Heading>
|
||||||
Debug <span className="text-sm">{service.version}</span>
|
System <span className="text-sm">{service.version}</span>
|
||||||
</Heading>
|
</Heading>
|
||||||
{state.showFfprobe && (
|
{state.showFfprobe && (
|
||||||
<Dialog>
|
<Dialog>
|
||||||
@ -175,7 +175,7 @@ export default function Debug() {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>Debug stats update automatically every {config.mqtt.stats_interval} seconds.</p>
|
<p>System stats update automatically every {config.mqtt.stats_interval} seconds.</p>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
|
|
@ -1,18 +1,18 @@
|
|||||||
import { h } from 'preact';
|
import { h } from 'preact';
|
||||||
import Debug from '../Debug';
|
import System from '../System';
|
||||||
import { render, screen, waitForElementToBeRemoved } from 'testing-library';
|
import { render, screen, waitForElementToBeRemoved } from 'testing-library';
|
||||||
|
|
||||||
describe('Debug Route', () => {
|
describe('System Route', () => {
|
||||||
beforeEach(() => {});
|
beforeEach(() => {});
|
||||||
|
|
||||||
test('shows an ActivityIndicator if stats are null', async () => {
|
test('shows an ActivityIndicator if stats are null', async () => {
|
||||||
render(<Debug />);
|
render(<System />);
|
||||||
expect(screen.queryByLabelText('Loading…')).toBeInTheDocument();
|
expect(screen.queryByLabelText('Loading…')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line jest/no-disabled-tests
|
// eslint-disable-next-line jest/no-disabled-tests
|
||||||
test.skip('shows stats and config', async () => {
|
test.skip('shows stats and config', async () => {
|
||||||
render(<Debug />);
|
render(<System />);
|
||||||
|
|
||||||
await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading…'));
|
await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading…'));
|
||||||
|
|
@ -28,8 +28,8 @@ export async function getRecording(_url, _cb, _props) {
|
|||||||
return module.default;
|
return module.default;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getDebug(_url, _cb, _props) {
|
export async function getSystem(_url, _cb, _props) {
|
||||||
const module = await import('./Debug.jsx');
|
const module = await import('./System.jsx');
|
||||||
return module.default;
|
return module.default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user