Add repeater region display. Closes #309.

This commit is contained in:
jkingsman
2026-07-09 16:37:14 -07:00
parent 387c9b0e0a
commit 6c977f9108
10 changed files with 459 additions and 12 deletions
+4 -4
View File
@@ -20,8 +20,8 @@ const mockHook: {
radioSettings: null,
advertIntervals: null,
ownerInfo: null,
lppTelemetry: null,
regions: null,
},
paneStates: {
status: { loading: false, attempt: 0, error: null },
@@ -31,8 +31,8 @@ const mockHook: {
radioSettings: { loading: false, attempt: 0, error: null },
advertIntervals: { loading: false, attempt: 0, error: null },
ownerInfo: { loading: false, attempt: 0, error: null },
lppTelemetry: { loading: false, attempt: 0, error: null },
regions: { loading: false, attempt: 0, error: null },
},
consoleHistory: [],
consoleLoading: false,
@@ -151,8 +151,8 @@ describe('RepeaterDashboard', () => {
radioSettings: null,
advertIntervals: null,
ownerInfo: null,
lppTelemetry: null,
regions: null,
};
mockHook.paneStates = {
status: { loading: false, attempt: 0, error: null },
@@ -162,8 +162,8 @@ describe('RepeaterDashboard', () => {
radioSettings: { loading: false, attempt: 0, error: null },
advertIntervals: { loading: false, attempt: 0, error: null },
ownerInfo: { loading: false, attempt: 0, error: null },
lppTelemetry: { loading: false, attempt: 0, error: null },
regions: { loading: false, attempt: 0, error: null },
};
mockHook.consoleHistory = [];
mockHook.consoleLoading = false;
@@ -19,6 +19,7 @@ vi.mock('../api', () => ({
repeaterAdvertIntervals: vi.fn(),
repeaterOwnerInfo: vi.fn(),
repeaterLppTelemetry: vi.fn(),
repeaterRegions: vi.fn(),
sendRepeaterCommand: vi.fn(),
},
}));
@@ -351,6 +352,12 @@ describe('useRepeaterDashboard', () => {
guest_password: null,
});
mockApi.repeaterLppTelemetry.mockResolvedValueOnce({ sensors: [] });
mockApi.repeaterRegions.mockResolvedValueOnce({
regions: [],
raw: null,
truncated: false,
source: 'cli',
});
const { result } = renderHook(() => useRepeaterDashboard(repeaterConversation));
@@ -366,6 +373,7 @@ describe('useRepeaterDashboard', () => {
expect(mockApi.repeaterAdvertIntervals).toHaveBeenCalledTimes(1);
expect(mockApi.repeaterOwnerInfo).toHaveBeenCalledTimes(1);
expect(mockApi.repeaterLppTelemetry).toHaveBeenCalledTimes(1);
expect(mockApi.repeaterRegions).toHaveBeenCalledTimes(1);
});
it('refreshing neighbors fetches node info first', async () => {