Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

chore: Fix lint warnings in SetupWizard and add AI API docs

rcourtman5e2311035b8c
diff --git a/docs/API.md b/docs/API.md
index d9b06ffe7a..3173216efe 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -140,6 +140,37 @@ Initiate OIDC login flow.
---
+## 🤖 Pulse AI *(New in 5.0)*
+
+### Get AI Settings
+`GET /api/settings/ai`
+Returns current AI configuration (providers, models, patrol status).
+
+### Update AI Settings
+`PUT /api/settings/ai`
+Configure AI providers, API keys, and preferences.
+
+### Chat
+`POST /api/ai/chat`
+Send a message to the AI assistant.
+```json
+{ "message": "What VMs are using the most CPU?", "context": ["vm-100", "vm-101"] }
+```
+
+### Patrol Status
+`GET /api/ai/patrol/status`
+Get current patrol status and recent findings.
+
+### Patrol Findings
+`GET /api/ai/patrol/findings`
+List all patrol findings with severity and recommendations.
+
+### Cost Tracking
+`GET /api/ai/cost?period=30d`
+Get AI usage statistics and costs.
+
+---
+
## 🤖 Agent Endpoints
### Unified Agent (Recommended)
diff --git a/frontend-modern/src/components/SetupWizard/SetupWizard.tsx b/frontend-modern/src/components/SetupWizard/SetupWizard.tsx
index 4c4d41b2ee..a86c9a8970 100644
--- a/frontend-modern/src/components/SetupWizard/SetupWizard.tsx
+++ b/frontend-modern/src/components/SetupWizard/SetupWizard.tsx
@@ -1,4 +1,4 @@
-import { Component, createSignal, Show, onMount } from 'solid-js';
+import { Component, createSignal, Show } from 'solid-js';
import { WelcomeStep } from './steps/WelcomeStep';
import { SecurityStep } from './steps/SecurityStep';
import { ConnectStep } from './steps/ConnectStep';
diff --git a/frontend-modern/src/components/SetupWizard/steps/ConnectStep.tsx b/frontend-modern/src/components/SetupWizard/steps/ConnectStep.tsx
index a959aae8b1..21ca58e1e1 100644
--- a/frontend-modern/src/components/SetupWizard/steps/ConnectStep.tsx
+++ b/frontend-modern/src/components/SetupWizard/steps/ConnectStep.tsx
@@ -28,7 +28,7 @@ export const ConnectStep: Component<ConnectStepProps> = (props) => {
// Manual form fields
const [host, setHost] = createSignal('');
- const [port, setPort] = createSignal('8006');
+ const [port, _setPort] = createSignal('8006');
const [tokenId, setTokenId] = createSignal('');
const [tokenSecret, setTokenSecret] = createSignal('');
@@ -69,7 +69,7 @@ export const ConnectStep: Component<ConnectStepProps> = (props) => {
if (discoveredNodes().length === 0) {
showSuccess('Scan complete - no nodes found. Try manual setup.');
}
- } catch (error) {
+ } catch (_error) {
showError('Discovery failed. Try manual setup.');
} finally {
setIsScanning(false);
diff --git a/frontend-modern/src/components/SetupWizard/steps/FeaturesStep.tsx b/frontend-modern/src/components/SetupWizard/steps/FeaturesStep.tsx
index 938b5f65d4..9f7dd32b0f 100644
--- a/frontend-modern/src/components/SetupWizard/steps/FeaturesStep.tsx
+++ b/frontend-modern/src/components/SetupWizard/steps/FeaturesStep.tsx
@@ -40,9 +40,9 @@ export const FeaturesStep: Component<FeaturesStepProps> = (props) => {
setIsSaving(true);
try {
- // Save feature preferences
+ // Only save auto-update setting through SystemConfig
+ // AI settings are configured separately via Settings → AI
await SettingsAPI.updateSystemSettings({
- aiEnabled: aiEnabled(),
autoUpdateEnabled: autoUpdates(),
});
@@ -53,7 +53,7 @@ export const FeaturesStep: Component<FeaturesStepProps> = (props) => {
showSuccess('Preferences saved!');
props.onNext();
- } catch (error) {
+ } catch (_error) {
// Continue anyway - settings can be changed later
props.onNext();
} finally {
@@ -73,8 +73,8 @@ export const FeaturesStep: Component<FeaturesStepProps> = (props) => {
<button
onClick={() => feature.setEnabled(!feature.enabled())}
class={`w-full p-4 rounded-xl border transition-all text-left flex items-start gap-4 ${feature.enabled()
- ? 'bg-blue-500/20 border-blue-400/40'
- : 'bg-white/5 border-white/10 hover:bg-white/10'
+ ? 'bg-blue-500/20 border-blue-400/40'
+ : 'bg-white/5 border-white/10 hover:bg-white/10'
}`}
>
<div class="text-3xl">{feature.icon}</div>
diff --git a/frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx b/frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx
index 9f190ba1df..5c5a3828e5 100644
--- a/frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx
+++ b/frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx
@@ -58,7 +58,7 @@ export const WelcomeStep: Component<WelcomeStepProps> = (props) => {
props.setIsUnlocked(true);
showSuccess('Token verified!');
props.onNext();
- } catch (error) {
+ } catch (_error) {
showError('Invalid bootstrap token. Please check and try again.');
} finally {
setIsValidating(false);