Files
EvoBGP/web/src/lib/components/network/NetworkAutoRefreshToggle.svelte
T
Denozordec a1ada06a76
CI / changes (push) Successful in 9s
CI / commitlint (push) Has been skipped
CI / openapi (push) Successful in 24s
CI / web (push) Successful in 29s
CI / go (push) Successful in 43s
CI / bird2 (push) Successful in 15s
CI / release (push) Successful in 3m29s
feat(api): add live status tracking for speakers and BGP sessions
- Introduced new schemas for `SpeakerLiveStatus`, `BgpSessionLive`, and `LiveSpeakerPoll` in OpenAPI documentation to support live status queries.
- Enhanced the `/v1/speakers` endpoint to include a `live` query parameter, allowing retrieval of real-time speaker and BGP status.
- Updated the HTTP API to collect and return live status data for speakers, improving monitoring capabilities.
- Modified frontend components to display live status information, enhancing user visibility into speaker health and BGP session states.
- Added a new endpoint `/v1/bird/status` for retrieving the local BIRD status, further enriching the network monitoring features.
2026-05-21 17:36:50 +07:00

31 lines
841 B
Svelte
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script lang="ts">
import { Label } from '$lib/ui/core/label/index.js';
import { Switch } from '$lib/ui/core/switch/index.js';
import { readNetworkAutoRefresh, writeNetworkAutoRefresh } from '$lib/network/network-metrics.js';
type Props = {
enabled?: boolean;
onchange?: (enabled: boolean) => void;
disabled?: boolean;
};
let {
enabled = $bindable(readNetworkAutoRefresh()),
onchange,
disabled = false
}: Props = $props();
function onToggle(checked: boolean) {
enabled = checked;
writeNetworkAutoRefresh(checked);
onchange?.(checked);
}
</script>
<div class="flex items-center gap-2">
<Switch id="network-auto-refresh" bind:checked={enabled} onCheckedChange={onToggle} {disabled} />
<Label for="network-auto-refresh" class="cursor-pointer text-sm text-muted-foreground">
Авто (~15 с)
</Label>
</div>