fix: add explicit GET method to API requests and make refresh interval reactive

- Add explicit method: 'GET' to ApiProxy.request() calls in polaris.ts and PolarisSettings.tsx
  for compatibility with Headlamp SDK
- Make refresh interval reactive by polling localStorage every second in PolarisDataContext
  so settings changes take effect immediately without page reload

Fixes connection test button and data refresh issues.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
2026-02-12 12:23:33 -05:00
parent 8fab7828f4
commit 0e5ff9b7b7
3 changed files with 20 additions and 4 deletions
+3 -1
View File
@@ -58,7 +58,9 @@ export default function PolarisSettings(props: PluginSettingsProps) {
}
result = await response.json();
} else {
result = await ApiProxy.request(apiPath);
result = await ApiProxy.request(apiPath, {
method: 'GET',
});
}
setTestResult({